agentworkshop 0.7.41 → 0.7.46
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.
- package/.AgentWorkShop/prompts/host-tools.json +265 -6
- package/.AgentWorkShop/prompts/lead-supervise.md +54 -29
- package/.AgentWorkShop/prompts/peer-reply-optional.md +6 -2
- package/.AgentWorkShop/prompts/peer-reply-required.md +8 -7
- package/.output/.AgentWorkShop/aml-python/amlkit.py +185 -120
- package/.output/.AgentWorkShop/aml-python/requirements.txt +9 -7
- package/.output/.AgentWorkShop/aml-python/train-hybrid-example.py +87 -0
- package/.output/.AgentWorkShop/prompts/host-tools.json +265 -6
- package/.output/.AgentWorkShop/prompts/lead-supervise.md +54 -29
- package/.output/.AgentWorkShop/prompts/peer-reply-optional.md +6 -2
- package/.output/.AgentWorkShop/prompts/peer-reply-required.md +8 -7
- package/.output/.AgentWorkShop/schema.json +12 -0
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/-hB4kEmt.js +1 -0
- package/.output/public/_nuxt/1g9IT9Qh2.js +1 -0
- package/.output/public/_nuxt/74x7BOWv2.js +1 -0
- package/.output/public/_nuxt/9c5GOgbu.js +1 -0
- package/.output/public/_nuxt/9zrLAN2o2.js +1 -0
- package/.output/public/_nuxt/B1RT9NTO2.js +1 -0
- package/.output/public/_nuxt/B2x8SKRO.js +1 -0
- package/.output/public/_nuxt/B6Olw0Op.js +1 -0
- package/.output/public/_nuxt/B7jlMWsz.js +1 -0
- package/.output/public/_nuxt/B8cnjDtt.js +1 -0
- package/.output/public/_nuxt/B9rIcCX12.js +1 -0
- package/.output/public/_nuxt/BACBBVdw.js +1 -0
- package/.output/public/_nuxt/BBhLVYdM.js +1 -0
- package/.output/public/_nuxt/BDmNbZ252.js +1 -0
- package/.output/public/_nuxt/BFVf8HLR.js +1 -0
- package/.output/public/_nuxt/BGKUW7ra.js +1 -0
- package/.output/public/_nuxt/BH3obZJ42.js +1 -0
- package/.output/public/_nuxt/BHwG4yNs.js +1 -0
- package/.output/public/_nuxt/BIOq3xqe2.js +1 -0
- package/.output/public/_nuxt/BITZvQBK.js +1 -0
- package/.output/public/_nuxt/BL_dbd2v2.js +1 -0
- package/.output/public/_nuxt/BMMoqi94.js +1 -0
- package/.output/public/_nuxt/BNnnYEYh2.js +1 -0
- package/.output/public/_nuxt/BQXCMsXk.js +1 -0
- package/.output/public/_nuxt/BS9P_Ies2.js +1 -0
- package/.output/public/_nuxt/BWU1pvLL.js +1 -0
- package/.output/public/_nuxt/B_9_BM9G.js +3 -0
- package/.output/public/_nuxt/B_LcD7qE2.js +1 -0
- package/.output/public/_nuxt/BcQXL8pb.js +1 -0
- package/.output/public/_nuxt/BdM_Qr752.js +1 -0
- package/.output/public/_nuxt/BiOSWsjD.js +2 -0
- package/.output/public/_nuxt/BkSViqQd.js +1 -0
- package/.output/public/_nuxt/Bl5dYv4m.js +1 -0
- package/.output/public/_nuxt/BmiMC_BC.js +2 -0
- package/.output/public/_nuxt/BnpY_zNx.js +1 -0
- package/.output/public/_nuxt/BqYVLAcm.js +1 -0
- package/.output/public/_nuxt/Br3AySNQ.js +1 -0
- package/.output/public/_nuxt/Br3MggOL.js +1 -0
- package/.output/public/_nuxt/BrRX-l9B2.js +4108 -0
- package/.output/public/_nuxt/Bt2ZL5332.js +1 -0
- package/.output/public/_nuxt/Bub2P5me.js +28 -0
- package/.output/public/_nuxt/BvRk9kiK.js +0 -0
- package/.output/public/_nuxt/BvRk9kiK2.js +0 -0
- package/.output/public/_nuxt/Bwc6lt2X.js +3 -0
- package/.output/public/_nuxt/BxHBIVAg.js +1 -0
- package/.output/public/_nuxt/BxYTM0hb.js +1 -0
- package/.output/public/_nuxt/ByMj6e7s.js +3 -0
- package/.output/public/_nuxt/BzvHUfRR2.js +1 -0
- package/.output/public/_nuxt/C2YYOgMe.js +42 -0
- package/.output/public/_nuxt/C3twEwTh2.js +1 -0
- package/.output/public/_nuxt/C4WhK2wq.js +1 -0
- package/.output/public/_nuxt/C50LmoI1.js +0 -0
- package/.output/public/_nuxt/CAaSPBqk.js +1 -0
- package/.output/public/_nuxt/CBDX7p73.js +1 -0
- package/.output/public/_nuxt/CD9lpEz22.js +13 -0
- package/.output/public/_nuxt/CGZVhYJ4.js +1 -0
- package/.output/public/_nuxt/CJRDL4EG.js +1 -0
- package/.output/public/_nuxt/CKQPwwZa2.js +1 -0
- package/.output/public/_nuxt/CLySL7mW.js +75 -0
- package/.output/public/_nuxt/CMXcOb6W.js +1 -0
- package/.output/public/_nuxt/CN1CDAwe.js +1 -0
- package/.output/public/_nuxt/CP0I2l-6.js +1 -0
- package/.output/public/_nuxt/CP0Nep9S.js +1 -0
- package/.output/public/_nuxt/CPeZNE4S2.js +1 -0
- package/.output/public/_nuxt/CPmNRTBk2.js +21 -0
- package/.output/public/_nuxt/CQabB0oy.js +1 -0
- package/.output/public/_nuxt/CT-vTjcG.js +1 -0
- package/.output/public/_nuxt/CTVfcnjU.js +3 -0
- package/.output/public/_nuxt/CWzp2R6G.js +1 -0
- package/.output/public/_nuxt/C_VAXV7I2.js +7 -0
- package/.output/public/_nuxt/CavpkQb0.js +1 -0
- package/.output/public/_nuxt/CeWnOF3O.js +1 -0
- package/.output/public/_nuxt/CfLUvgr32.js +1 -0
- package/.output/public/_nuxt/Ch1P2mIf.js +1 -0
- package/.output/public/_nuxt/ChoLwR-s.js +1 -0
- package/.output/public/_nuxt/Chphw5IA2.js +1 -0
- package/.output/public/_nuxt/ChtjzEpK2.js +19 -0
- package/.output/public/_nuxt/CiTQY_n32.js +1 -0
- package/.output/public/_nuxt/Ck5oMvUk.js +1 -0
- package/.output/public/_nuxt/Ckafrjnw2.js +1 -0
- package/.output/public/_nuxt/Cm_PTn9t2.js +1 -0
- package/.output/public/_nuxt/Cmp8PMrA.js +1 -0
- package/.output/public/_nuxt/Cnrmlixo.js +3 -0
- package/.output/public/_nuxt/Cr518Gh02.js +1 -0
- package/.output/public/_nuxt/Crbir9cT.js +1 -0
- package/.output/public/_nuxt/CtPNnATm2.js +31 -0
- package/.output/public/_nuxt/Cu8c3oMN2.js +1 -0
- package/.output/public/_nuxt/CwLQAKay2.js +1 -0
- package/.output/public/_nuxt/CzlUIbK32.js +17 -0
- package/.output/public/_nuxt/D6lZftfy.js +1 -0
- package/.output/public/_nuxt/D83nVQPl.js +1 -0
- package/.output/public/_nuxt/D89BUtx6.js +1 -0
- package/.output/public/_nuxt/DCtk3qqr.js +1 -0
- package/.output/public/_nuxt/DD6Z0yPN2.js +1 -0
- package/.output/public/_nuxt/DGw8juu_.js +2 -0
- package/.output/public/_nuxt/DHSDk8Bq2.js +4 -0
- package/.output/public/_nuxt/DJdDFnjG2.js +1 -0
- package/.output/public/_nuxt/DJyNDnag.js +1 -0
- package/.output/public/_nuxt/DK3Fl9T5.js +1 -0
- package/.output/public/_nuxt/DLPuRMeG.js +19 -0
- package/.output/public/_nuxt/DMYYS5sK.js +1 -0
- package/.output/public/_nuxt/DNno23Jf2.js +1 -0
- package/.output/public/_nuxt/DNoEoo8t.js +1 -0
- package/.output/public/_nuxt/DPUXbTg92.js +1 -0
- package/.output/public/_nuxt/DRpFsrno.js +1 -0
- package/.output/public/_nuxt/DXIaadqv.js +1 -0
- package/.output/public/_nuxt/D_7AzAWe.js +1 -0
- package/.output/public/_nuxt/Dbe9TFc9.js +1 -0
- package/.output/public/_nuxt/DdNujZN5.js +1 -0
- package/.output/public/_nuxt/DdvQ7LRI.js +14 -0
- package/.output/public/_nuxt/DhFv8S2Z.js +1 -0
- package/.output/public/_nuxt/DkJVtqfc.js +1 -0
- package/.output/public/_nuxt/DkLCjrCk2.js +47 -0
- package/.output/public/_nuxt/DkpmSnHX.js +1 -0
- package/.output/public/_nuxt/DlUQa0wn2.js +1 -0
- package/.output/public/_nuxt/DoKpLEqc.js +1 -0
- package/.output/public/_nuxt/DpqA8D8_.js +1 -0
- package/.output/public/_nuxt/Dq0emNZi2.js +1 -0
- package/.output/public/_nuxt/DqtgGFEc.js +1 -0
- package/.output/public/_nuxt/DqtnqNgL2.js +1 -0
- package/.output/public/_nuxt/Dqz5HiXa.js +2 -0
- package/.output/public/_nuxt/Du9v6qGB.js +1 -0
- package/.output/public/_nuxt/DxagrjB8.js +1 -0
- package/.output/public/_nuxt/Dy3oXKdn2.js +1 -0
- package/.output/public/_nuxt/DzBbYWrw2.js +1 -0
- package/.output/public/_nuxt/EhhQmlBV2.js +1 -0
- package/.output/public/_nuxt/H2rNs1O82.js +1 -0
- package/.output/public/_nuxt/H6pPjo0l.js +1 -0
- package/.output/public/_nuxt/JAM4aNC_.js +1 -0
- package/.output/public/_nuxt/JgheoP3e.js +1 -0
- package/.output/public/_nuxt/LwIFGLgF.js +1 -0
- package/.output/public/_nuxt/Nw_6OpQZ2.js +1 -0
- package/.output/public/_nuxt/OXtV_ukR.js +1 -0
- package/.output/public/_nuxt/OmpTerminalPanel.ComMDrA8.css +1 -0
- package/.output/public/_nuxt/PLGqdko0.js +1 -0
- package/.output/public/_nuxt/PixDfCSm.js +1 -0
- package/.output/public/_nuxt/RAqsw632.js +1 -0
- package/.output/public/_nuxt/Sjjmp5OD2.js +1 -0
- package/.output/public/_nuxt/TOWR4WpO.js +1 -0
- package/.output/public/_nuxt/TownView.BvlfuLtP.css +1 -0
- package/.output/public/_nuxt/U8oQxruK.js +1 -0
- package/.output/public/_nuxt/WleoCtUX.js +1 -0
- package/.output/public/_nuxt/YaroNkJZ2.js +1 -0
- package/.output/public/_nuxt/Z-Z6EhXs.js +1 -0
- package/.output/public/_nuxt/ZuQtOnfI.js +1 -0
- package/.output/public/_nuxt/ZvXovq7N2.js +1 -0
- package/.output/public/_nuxt/_id_.BTrFUIHX.css +1 -0
- package/.output/public/_nuxt/_id_.Bossmhv1.css +1 -0
- package/.output/public/_nuxt/_wsId_.D-u-dbP9.css +1 -0
- package/.output/public/_nuxt/agents.Cgm_JG9L.css +1 -0
- package/.output/public/_nuxt/aml.Bi5X6_oi.css +1 -0
- package/.output/public/_nuxt/bg2adfck.js +1 -0
- package/.output/public/_nuxt/bt__BP-I.js +13 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/7827fe9f-b4c2-461f-b1fb-c0c7da7d66b8.json +1 -0
- package/.output/public/_nuxt/cBI0JqsV2.js +209 -0
- package/.output/public/_nuxt/cDcDztgb2.js +1 -0
- package/.output/public/_nuxt/cGSl2GZp.js +1 -0
- package/.output/public/_nuxt/channel-templates.DplM1pJ3.css +1 -0
- package/.output/public/_nuxt/csitHKnE2.js +1 -0
- package/.output/public/_nuxt/d-w5jR8R.js +1 -0
- package/.output/public/_nuxt/daq.0uieKcZk.css +1 -0
- package/.output/public/_nuxt/dcw.pQRVkAi_.css +1 -0
- package/.output/public/_nuxt/default.uao9U50c.css +1 -0
- package/.output/public/_nuxt/e7BBCLxr.js +1 -0
- package/.output/public/_nuxt/entry.6DEjPWvR.css +1 -0
- package/.output/public/_nuxt/eutnXI4F.js +24 -0
- package/.output/public/_nuxt/fxWyOzyp2.js +1 -0
- package/.output/public/_nuxt/hkMGMTqt.js +1 -0
- package/.output/public/_nuxt/ikAUnxx3.js +1 -0
- package/.output/public/_nuxt/lWYQbIR3.js +1 -0
- package/.output/public/_nuxt/logs.CD0Olr3c.css +1 -0
- package/.output/public/_nuxt/monitor.CI2v5Nvl.css +1 -0
- package/.output/public/_nuxt/pages.CMhSEhEb.css +1 -0
- package/.output/public/_nuxt/permissions.DxuOOIqQ.css +1 -0
- package/.output/public/_nuxt/plugins.C50x1qZp.css +1 -0
- package/.output/public/_nuxt/qOlYoGLf.js +1 -0
- package/.output/public/_nuxt/schedules.BXNJ9q_I.css +1 -0
- package/.output/public/_nuxt/settings.Bo5EYkLI.css +1 -0
- package/.output/public/_nuxt/teams.sGmx1AdX.css +1 -0
- package/.output/public/_nuxt/tokens.DFMFaCYU.css +1 -0
- package/.output/public/_nuxt/uI9Ki_XZ.js +9 -0
- package/.output/public/_nuxt/users.DBxcKnfg.css +1 -0
- package/.output/public/_nuxt/v55S8LnT.js +1 -0
- package/.output/public/_nuxt/wDPc4SSR.js +106 -0
- package/.output/public/_nuxt/workshop.b4YRXEe0.css +1 -0
- package/.output/public/_nuxt/y9kob70X.js +1 -0
- package/.output/public/_nuxt/zh-S_7rN.js +1 -0
- package/.output/server/chunks/_/LeftOutlined.mjs +1 -1
- package/.output/server/chunks/_/SearchOutlined.mjs +1243 -279
- package/.output/server/chunks/_/SearchOutlined.mjs.map +1 -1
- package/.output/server/chunks/_/binding-authz.mjs +1 -1
- package/.output/server/chunks/_/character-asset.repo.mjs +1 -1
- package/.output/server/chunks/_/entity.mjs +1 -1
- package/.output/server/chunks/_/env-manager.mjs +1 -1
- package/.output/server/chunks/_/host-bindings.mjs +1 -1
- package/.output/server/chunks/_/nitro.mjs +26659 -18787
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/_/scene-layout.repo.mjs +1 -1
- package/.output/server/chunks/build/Checkbox-4EdGAAl_.mjs +206 -0
- package/.output/server/chunks/build/Checkbox-4EdGAAl_.mjs.map +1 -0
- package/.output/server/chunks/build/FormItemContext-4ORSzhWv.mjs +72 -0
- package/.output/server/chunks/build/FormItemContext-4ORSzhWv.mjs.map +1 -0
- package/.output/server/chunks/build/OmpTerminalPanel-EQHrOJbw.mjs +942 -0
- package/.output/server/chunks/build/OmpTerminalPanel-EQHrOJbw.mjs.map +1 -0
- package/.output/server/chunks/build/PluginSlot-BP_qedpQ.mjs +399 -0
- package/.output/server/chunks/build/PluginSlot-BP_qedpQ.mjs.map +1 -0
- package/.output/server/chunks/build/TownView-BAR8CPIZ.mjs +6373 -0
- package/.output/server/chunks/build/TownView-BAR8CPIZ.mjs.map +1 -0
- package/.output/server/chunks/build/_id_-DgMpjM3_.mjs +1354 -0
- package/.output/server/chunks/build/_id_-DgMpjM3_.mjs.map +1 -0
- package/.output/server/chunks/build/_id_-Dv3BQbYV.mjs +388 -0
- package/.output/server/chunks/build/_id_-Dv3BQbYV.mjs.map +1 -0
- package/.output/server/chunks/build/_wsId_-BKJvFmyf.mjs +13109 -0
- package/.output/server/chunks/build/_wsId_-BKJvFmyf.mjs.map +1 -0
- package/.output/server/chunks/build/agents-B2GLPmn2.mjs +1085 -0
- package/.output/server/chunks/build/agents-B2GLPmn2.mjs.map +1 -0
- package/.output/server/chunks/build/aml-DdWicH3t.mjs +806 -0
- package/.output/server/chunks/build/aml-DdWicH3t.mjs.map +1 -0
- package/.output/server/chunks/build/api-BY6ji7RC.mjs +50 -0
- package/.output/server/chunks/build/api-BY6ji7RC.mjs.map +1 -0
- package/.output/server/chunks/build/api-error-BwAQLw44.mjs +47 -0
- package/.output/server/chunks/build/api-error-BwAQLw44.mjs.map +1 -0
- package/.output/server/chunks/build/apiClient-D281qrK2.mjs +81 -0
- package/.output/server/chunks/build/apiClient-D281qrK2.mjs.map +1 -0
- package/.output/server/chunks/build/builtin-catalog-edpDcgfL.mjs +117 -0
- package/.output/server/chunks/build/builtin-catalog-edpDcgfL.mjs.map +1 -0
- package/.output/server/chunks/build/card-CUSocE9p.mjs +953 -0
- package/.output/server/chunks/build/card-CUSocE9p.mjs.map +1 -0
- package/.output/server/chunks/build/channel-templates-RPOtkgRf.mjs +846 -0
- package/.output/server/chunks/build/channel-templates-RPOtkgRf.mjs.map +1 -0
- package/.output/server/chunks/build/checkbox-C4AKj81e.mjs +439 -0
- package/.output/server/chunks/build/checkbox-C4AKj81e.mjs.map +1 -0
- package/.output/server/chunks/build/client-only-qNA2OVV_.mjs +43 -0
- package/.output/server/chunks/build/client-only-qNA2OVV_.mjs.map +1 -0
- package/.output/server/chunks/build/constants-HPHJvjne.mjs +139 -0
- package/.output/server/chunks/build/constants-HPHJvjne.mjs.map +1 -0
- package/.output/server/chunks/build/core-CgTOPS4t.mjs +294 -0
- package/.output/server/chunks/build/core-CgTOPS4t.mjs.map +1 -0
- package/.output/server/chunks/build/daq-CPtsh0e7.mjs +1253 -0
- package/.output/server/chunks/build/daq-CPtsh0e7.mjs.map +1 -0
- package/.output/server/chunks/build/dcw-ry5Gyw6Y.mjs +478 -0
- package/.output/server/chunks/build/dcw-ry5Gyw6Y.mjs.map +1 -0
- package/.output/server/chunks/build/default-DxOE1eB0.mjs +2061 -0
- package/.output/server/chunks/build/default-DxOE1eB0.mjs.map +1 -0
- package/.output/server/chunks/build/descriptions-CFaUq4y4.mjs +406 -0
- package/.output/server/chunks/build/descriptions-CFaUq4y4.mjs.map +1 -0
- package/.output/server/chunks/build/drawer-Cfh9_zft.mjs +834 -0
- package/.output/server/chunks/build/drawer-Cfh9_zft.mjs.map +1 -0
- package/.output/server/chunks/build/dropdown-KdKWCS5K.mjs +556 -0
- package/.output/server/chunks/build/dropdown-KdKWCS5K.mjs.map +1 -0
- package/.output/server/chunks/build/dropdown-Yev6knaj.mjs +14 -0
- package/.output/server/chunks/build/dropdown-Yev6knaj.mjs.map +1 -0
- package/.output/server/chunks/build/form-uSlNqIAV.mjs +4711 -0
- package/.output/server/chunks/build/form-uSlNqIAV.mjs.map +1 -0
- package/.output/server/chunks/build/input-Cr_KFj4T.mjs +1381 -0
- package/.output/server/chunks/build/input-Cr_KFj4T.mjs.map +1 -0
- package/.output/server/chunks/build/input-number-BRVnxeiA.mjs +1119 -0
- package/.output/server/chunks/build/input-number-BRVnxeiA.mjs.map +1 -0
- package/.output/server/chunks/build/interval-DvHBIIZh.mjs +9 -0
- package/.output/server/chunks/build/interval-DvHBIIZh.mjs.map +1 -0
- package/.output/server/chunks/build/logs-CeaiO3y9.mjs +367 -0
- package/.output/server/chunks/build/logs-CeaiO3y9.mjs.map +1 -0
- package/.output/server/chunks/build/menu-BgkRSSx7.mjs +1949 -0
- package/.output/server/chunks/build/menu-BgkRSSx7.mjs.map +1 -0
- package/.output/server/chunks/build/monitor-DnuXEIi5.mjs +2245 -0
- package/.output/server/chunks/build/monitor-DnuXEIi5.mjs.map +1 -0
- package/.output/server/chunks/build/narrow-fetch-CcG-BPxc.mjs +6 -0
- package/.output/server/chunks/build/narrow-fetch-CcG-BPxc.mjs.map +1 -0
- package/.output/server/chunks/build/pages-Bn90ijKD.mjs +539 -0
- package/.output/server/chunks/build/pages-Bn90ijKD.mjs.map +1 -0
- package/.output/server/chunks/build/permissions-DL70W1YD.mjs +629 -0
- package/.output/server/chunks/build/permissions-DL70W1YD.mjs.map +1 -0
- package/.output/server/chunks/build/plugins-DrsZo--K.mjs +246 -0
- package/.output/server/chunks/build/plugins-DrsZo--K.mjs.map +1 -0
- package/.output/server/chunks/build/popconfirm-Ox-_2V8A.mjs +339 -0
- package/.output/server/chunks/build/popconfirm-Ox-_2V8A.mjs.map +1 -0
- package/.output/server/chunks/build/schedules-VLzNcjnW.mjs +7164 -0
- package/.output/server/chunks/build/schedules-VLzNcjnW.mjs.map +1 -0
- package/.output/server/chunks/build/segmented-C61yLHvo.mjs +341 -0
- package/.output/server/chunks/build/segmented-C61yLHvo.mjs.map +1 -0
- package/.output/server/chunks/build/select-rdBWytVK.mjs +3922 -0
- package/.output/server/chunks/build/select-rdBWytVK.mjs.map +1 -0
- package/.output/server/chunks/build/settings-DVAUVMsX.mjs +1089 -0
- package/.output/server/chunks/build/settings-DVAUVMsX.mjs.map +1 -0
- package/.output/server/chunks/build/space-B2uhHJG8.mjs +110 -0
- package/.output/server/chunks/build/space-B2uhHJG8.mjs.map +1 -0
- package/.output/server/chunks/build/spin-C2cuvGth.mjs +357 -0
- package/.output/server/chunks/build/spin-C2cuvGth.mjs.map +1 -0
- package/.output/server/chunks/build/switch-DZAUIbIN.mjs +377 -0
- package/.output/server/chunks/build/switch-DZAUIbIN.mjs.map +1 -0
- package/.output/server/chunks/build/table-DOFAvY-v.mjs +8881 -0
- package/.output/server/chunks/build/table-DOFAvY-v.mjs.map +1 -0
- package/.output/server/chunks/build/tabs-DTeIuZeP.mjs +1923 -0
- package/.output/server/chunks/build/tabs-DTeIuZeP.mjs.map +1 -0
- package/.output/server/chunks/build/tag-CHLGvNM6.mjs +1029 -0
- package/.output/server/chunks/build/tag-CHLGvNM6.mjs.map +1 -0
- package/.output/server/chunks/build/teams-Mc07PYO8.mjs +1195 -0
- package/.output/server/chunks/build/teams-Mc07PYO8.mjs.map +1 -0
- package/.output/server/chunks/build/tokens-DiwD5qni.mjs +1036 -0
- package/.output/server/chunks/build/tokens-DiwD5qni.mjs.map +1 -0
- package/.output/server/chunks/build/town-BIn3be5v.mjs +39 -0
- package/.output/server/chunks/build/town-BIn3be5v.mjs.map +1 -0
- package/.output/server/chunks/build/town-D8VmTCmN.mjs +128 -0
- package/.output/server/chunks/build/town-D8VmTCmN.mjs.map +1 -0
- package/.output/server/chunks/build/types-D6J7slEa.mjs +5561 -0
- package/.output/server/chunks/build/types-D6J7slEa.mjs.map +1 -0
- package/.output/server/chunks/build/useAgentHarnessOptions-CPn5dzKe.mjs +121 -0
- package/.output/server/chunks/build/useAgentHarnessOptions-CPn5dzKe.mjs.map +1 -0
- package/.output/server/chunks/build/useAgentTemplateActions-DQWzVnZ0.mjs +74 -0
- package/.output/server/chunks/build/useAgentTemplateActions-DQWzVnZ0.mjs.map +1 -0
- package/.output/server/chunks/build/useAgentTemplateDialogState-CZzpu5og.mjs +64 -0
- package/.output/server/chunks/build/useAgentTemplateDialogState-CZzpu5og.mjs.map +1 -0
- package/.output/server/chunks/build/useAgentTemplateForm-vqyiRPtt.mjs +114 -0
- package/.output/server/chunks/build/useAgentTemplateForm-vqyiRPtt.mjs.map +1 -0
- package/.output/server/chunks/build/useAgentTemplatesCatalog-DcQbsOik.mjs +130 -0
- package/.output/server/chunks/build/useAgentTemplatesCatalog-DcQbsOik.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlDatasets-BM0lZu40.mjs +89 -0
- package/.output/server/chunks/build/useAmlDatasets-BM0lZu40.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlEntities-BjXWvFd_.mjs +83 -0
- package/.output/server/chunks/build/useAmlEntities-BjXWvFd_.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlEnv-BB7p6x_w.mjs +191 -0
- package/.output/server/chunks/build/useAmlEnv-BB7p6x_w.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlExperiments-BtyW32PO.mjs +86 -0
- package/.output/server/chunks/build/useAmlExperiments-BtyW32PO.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlFormat-WrKuRfw2.mjs +79 -0
- package/.output/server/chunks/build/useAmlFormat-WrKuRfw2.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlJobs-DBuLvWMF.mjs +263 -0
- package/.output/server/chunks/build/useAmlJobs-DBuLvWMF.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlModels-VurmkBYe.mjs +90 -0
- package/.output/server/chunks/build/useAmlModels-VurmkBYe.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlNotes-BUdj3X6Y.mjs +83 -0
- package/.output/server/chunks/build/useAmlNotes-BUdj3X6Y.mjs.map +1 -0
- package/.output/server/chunks/build/useAmlPredict-DFy-Do10.mjs +127 -0
- package/.output/server/chunks/build/useAmlPredict-DFy-Do10.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqAddNode-kW7uTSMQ.mjs +139 -0
- package/.output/server/chunks/build/useDaqAddNode-kW7uTSMQ.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqDetailBinding-cpBz4hSL.mjs +67 -0
- package/.output/server/chunks/build/useDaqDetailBinding-cpBz4hSL.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqDetailFrames-BZGtKKXW.mjs +76 -0
- package/.output/server/chunks/build/useDaqDetailFrames-BZGtKKXW.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqDetailHistory-C4_hVeqZ.mjs +173 -0
- package/.output/server/chunks/build/useDaqDetailHistory-C4_hVeqZ.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqDetailNode-Bwid_iA8.mjs +96 -0
- package/.output/server/chunks/build/useDaqDetailNode-Bwid_iA8.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqDetailParams-JfqHvTxr.mjs +156 -0
- package/.output/server/chunks/build/useDaqDetailParams-JfqHvTxr.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqFilters-C13836p-.mjs +219 -0
- package/.output/server/chunks/build/useDaqFilters-C13836p-.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqNodeWindow-1DWj2H5G.mjs +87 -0
- package/.output/server/chunks/build/useDaqNodeWindow-1DWj2H5G.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqOptimizations-Ct-TSXxy.mjs +133 -0
- package/.output/server/chunks/build/useDaqOptimizations-Ct-TSXxy.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqStream-wOxZcMDA.mjs +395 -0
- package/.output/server/chunks/build/useDaqStream-wOxZcMDA.mjs.map +1 -0
- package/.output/server/chunks/build/useDaqTemplates-BqQRdrIm.mjs +184 -0
- package/.output/server/chunks/build/useDaqTemplates-BqQRdrIm.mjs.map +1 -0
- package/.output/server/chunks/build/useDashboardCharts-DZysNDUX.mjs +351 -0
- package/.output/server/chunks/build/useDashboardCharts-DZysNDUX.mjs.map +1 -0
- package/.output/server/chunks/build/useDashboardData-Ny_wtbo6.mjs +150 -0
- package/.output/server/chunks/build/useDashboardData-Ny_wtbo6.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwAddNode-C8nE7geh.mjs +148 -0
- package/.output/server/chunks/build/useDcwAddNode-C8nE7geh.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwCards-ETEsHvVy.mjs +64 -0
- package/.output/server/chunks/build/useDcwCards-ETEsHvVy.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwDetailScope-BNrpDzbO.mjs +181 -0
- package/.output/server/chunks/build/useDcwDetailScope-BNrpDzbO.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwDetailTemplates-IcKAJ37Y.mjs +145 -0
- package/.output/server/chunks/build/useDcwDetailTemplates-IcKAJ37Y.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwFilter-FfVlDdyS.mjs +68 -0
- package/.output/server/chunks/build/useDcwFilter-FfVlDdyS.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwLedger-BLoMmcu1.mjs +76 -0
- package/.output/server/chunks/build/useDcwLedger-BLoMmcu1.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwLineMutations-BMC5BTWU.mjs +134 -0
- package/.output/server/chunks/build/useDcwLineMutations-BMC5BTWU.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwLineRun-Bpxk4mse.mjs +101 -0
- package/.output/server/chunks/build/useDcwLineRun-Bpxk4mse.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwProducts-D-zrMaeV.mjs +90 -0
- package/.output/server/chunks/build/useDcwProducts-D-zrMaeV.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwQuery-1lYHOaU6.mjs +95 -0
- package/.output/server/chunks/build/useDcwQuery-1lYHOaU6.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwQuickActions-C-tgcXIr.mjs +85 -0
- package/.output/server/chunks/build/useDcwQuickActions-C-tgcXIr.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwRecipes-BzGOymqz.mjs +237 -0
- package/.output/server/chunks/build/useDcwRecipes-BzGOymqz.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwStream-D04kCV3J.mjs +435 -0
- package/.output/server/chunks/build/useDcwStream-D04kCV3J.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwTemplates-Dsjw9u6U.mjs +88 -0
- package/.output/server/chunks/build/useDcwTemplates-Dsjw9u6U.mjs.map +1 -0
- package/.output/server/chunks/build/useDcwWrites-3RxwN36I.mjs +120 -0
- package/.output/server/chunks/build/useDcwWrites-3RxwN36I.mjs.map +1 -0
- package/.output/server/chunks/build/useDeviceTwins-CbVad1M3.mjs +128 -0
- package/.output/server/chunks/build/useDeviceTwins-CbVad1M3.mjs.map +1 -0
- package/.output/server/chunks/build/useLocalTime-9a4B-aHv.mjs +1 -8
- package/.output/server/chunks/build/useLocalTime-9a4B-aHv.mjs.map +1 -1
- package/.output/server/chunks/build/useLogsFormat-BlwLpyzy.mjs +74 -0
- package/.output/server/chunks/build/useLogsFormat-BlwLpyzy.mjs.map +1 -0
- package/.output/server/chunks/build/useLogsManual-Deev2Cjk.mjs +81 -0
- package/.output/server/chunks/build/useLogsManual-Deev2Cjk.mjs.map +1 -0
- package/.output/server/chunks/build/useLogsQuery-CRAm2hmS.mjs +112 -0
- package/.output/server/chunks/build/useLogsQuery-CRAm2hmS.mjs.map +1 -0
- package/.output/server/chunks/build/useLogsScope-ClNijVj4.mjs +80 -0
- package/.output/server/chunks/build/useLogsScope-ClNijVj4.mjs.map +1 -0
- package/.output/server/chunks/build/useMonitorColumns-ylxrUNTK.mjs +212 -0
- package/.output/server/chunks/build/useMonitorColumns-ylxrUNTK.mjs.map +1 -0
- package/.output/server/chunks/build/useMonitorData-CEpKXoD4.mjs +131 -0
- package/.output/server/chunks/build/useMonitorData-CEpKXoD4.mjs.map +1 -0
- package/.output/server/chunks/build/useMonitorFormat-_7zLapf3.mjs +87 -0
- package/.output/server/chunks/build/useMonitorFormat-_7zLapf3.mjs.map +1 -0
- package/.output/server/chunks/build/useMonitorTerminal-Dj4QwRNW.mjs +68 -0
- package/.output/server/chunks/build/useMonitorTerminal-Dj4QwRNW.mjs.map +1 -0
- package/.output/server/chunks/build/useOpsLog-CgnNG7_n.mjs +137 -0
- package/.output/server/chunks/build/useOpsLog-CgnNG7_n.mjs.map +1 -0
- package/.output/server/chunks/build/useTeamActions-D6sxdpkP.mjs +76 -0
- package/.output/server/chunks/build/useTeamActions-D6sxdpkP.mjs.map +1 -0
- package/.output/server/chunks/build/useTeamAddMemberDialog-Q-ntQ6Vo.mjs +81 -0
- package/.output/server/chunks/build/useTeamAddMemberDialog-Q-ntQ6Vo.mjs.map +1 -0
- package/.output/server/chunks/build/useTeamCreateDialog-D7OMfDTM.mjs +94 -0
- package/.output/server/chunks/build/useTeamCreateDialog-D7OMfDTM.mjs.map +1 -0
- package/.output/server/chunks/build/useTeamDeployDialog-vBRqjiut.mjs +77 -0
- package/.output/server/chunks/build/useTeamDeployDialog-vBRqjiut.mjs.map +1 -0
- package/.output/server/chunks/build/useTeamDialogState-CFRUQxAf.mjs +79 -0
- package/.output/server/chunks/build/useTeamDialogState-CFRUQxAf.mjs.map +1 -0
- package/.output/server/chunks/build/useTeamPluginDialog-B8kxewpZ.mjs +100 -0
- package/.output/server/chunks/build/useTeamPluginDialog-B8kxewpZ.mjs.map +1 -0
- package/.output/server/chunks/build/useTeamsCatalog-xRhk7ezA.mjs +120 -0
- package/.output/server/chunks/build/useTeamsCatalog-xRhk7ezA.mjs.map +1 -0
- package/.output/server/chunks/build/useTokenClipboard-CwQpoFeP.mjs +69 -0
- package/.output/server/chunks/build/useTokenClipboard-CwQpoFeP.mjs.map +1 -0
- package/.output/server/chunks/build/useTokenCreate-DpDcF1Vx.mjs +112 -0
- package/.output/server/chunks/build/useTokenCreate-DpDcF1Vx.mjs.map +1 -0
- package/.output/server/chunks/build/useTokenRename-BRejFrtc.mjs +84 -0
- package/.output/server/chunks/build/useTokenRename-BRejFrtc.mjs.map +1 -0
- package/.output/server/chunks/build/useTokenReveal-DER2afAS.mjs +115 -0
- package/.output/server/chunks/build/useTokenReveal-DER2afAS.mjs.map +1 -0
- package/.output/server/chunks/build/useTokensList-DHt65IOY.mjs +89 -0
- package/.output/server/chunks/build/useTokensList-DHt65IOY.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkbenchAuth-B2j-zILO.mjs +135 -0
- package/.output/server/chunks/build/useWorkbenchAuth-B2j-zILO.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkbenchWorkspaces-B_2mOxN6.mjs +133 -0
- package/.output/server/chunks/build/useWorkbenchWorkspaces-B_2mOxN6.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkshopApi-B1B9vd4m.mjs +102 -0
- package/.output/server/chunks/build/useWorkshopApi-B1B9vd4m.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkshopWs-B-Es2Xg3.mjs +1782 -0
- package/.output/server/chunks/build/useWorkshopWs-B-Es2Xg3.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkspaceAuth-tQ1ORWXo.mjs +57 -0
- package/.output/server/chunks/build/useWorkspaceAuth-tQ1ORWXo.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkspaceChannels-BwB6TAWY.mjs +87 -0
- package/.output/server/chunks/build/useWorkspaceChannels-BwB6TAWY.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkspacePanels-CuAmDpT5.mjs +75 -0
- package/.output/server/chunks/build/useWorkspacePanels-CuAmDpT5.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkspaceShell-CcQ4JlqO.mjs +165 -0
- package/.output/server/chunks/build/useWorkspaceShell-CcQ4JlqO.mjs.map +1 -0
- package/.output/server/chunks/build/users-De2HygNt.mjs +561 -0
- package/.output/server/chunks/build/users-De2HygNt.mjs.map +1 -0
- package/.output/server/chunks/build/workshop-CmgpTwyf.mjs +1018 -0
- package/.output/server/chunks/build/workshop-CmgpTwyf.mjs.map +1 -0
- package/.output/server/chunks/build/workspaces-DVIEk1Bl.mjs +139 -0
- package/.output/server/chunks/build/workspaces-DVIEk1Bl.mjs.map +1 -0
- package/.output/server/chunks/routes/api/health.get.mjs +2 -2
- package/.output/server/chunks/routes/api/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/mcp/workshop.mjs +2 -2
- package/.output/server/chunks/routes/api/metrics.mjs +2 -2
- package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs +2 -2
- package/.output/server/chunks/routes/api/plugins/client/_name_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/plugins/i18n.get.mjs +2 -2
- package/.output/server/chunks/routes/api/plugins/manifest.get.mjs +2 -2
- package/.output/server/chunks/routes/api/system/config-groups/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/system/config-groups/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/system/config.get.mjs +2 -2
- package/.output/server/chunks/routes/api/system/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/system/index.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/system/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/system/index2.get.mjs +2 -2
- package/.output/server/chunks/routes/api/system/monitor/terminal/ws.mjs +35 -4
- package/.output/server/chunks/routes/api/system/monitor/terminal/ws.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/monitor/terminate.post.mjs +2 -2
- package/.output/server/chunks/routes/api/system/monitor.get.mjs +2 -2
- package/.output/server/chunks/routes/api/system/settings/events.get.mjs +2 -2
- package/.output/server/chunks/routes/api/system/settings/reset.post.mjs +2 -2
- package/.output/server/chunks/routes/api/users/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/users/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/users/_id_.put.mjs +2 -2
- package/.output/server/chunks/routes/api/users/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/users/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/users/login.post.mjs +2 -2
- package/.output/server/chunks/routes/api/users/logout.post.mjs +2 -2
- package/.output/server/chunks/routes/api/users/me.get.mjs +2 -2
- package/.output/server/chunks/routes/api/users/register.post.mjs +2 -2
- package/.output/server/chunks/routes/api/users/setup-status.get.mjs +2 -2
- package/.output/server/chunks/routes/api/users/tokens/_id/token.get.mjs +2 -2
- package/.output/server/chunks/routes/api/users/tokens/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/users/tokens/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/_...path_.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/a2a/send.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/approvals/_id/decide.post.mjs +38 -6
- package/.output/server/chunks/routes/api/workshop/agent-tools/approvals/_id/decide.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.get.mjs +14 -5
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/index2.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agents/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agents/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agents/subscribe.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id/preview.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/entities/prune.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/env/recheck.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/env/uv.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/env/venv.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index2.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index2.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index3.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index4.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/index6.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/cancel.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/logs.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/retry.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/models/_id/predict.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/models/_id/promote.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/approvals/_id/decide.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/assets/character/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/devices/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/audit.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/caller.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +10 -5
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channel-templates/from-channel.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/_memoryId_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/search.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/model.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/position.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/range.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/stop.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.get.mjs +41 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.post.mjs +52 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/messages/_messageId/read.post.mjs +33 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/messages/_messageId/read.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/permissions.get.mjs +48 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/permissions.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/events.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +10 -14
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +15 -28
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +3 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs +29 -23
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs +9 -4
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index5.get.mjs +22 -10
- package/.output/server/chunks/routes/api/workshop/channels/_id/index5.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index6.get.mjs +34 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index6.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/_userId/approve.post.mjs +33 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/_userId/approve.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/_userId_.delete.mjs +34 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/_userId_.delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/join.post.mjs +35 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/join.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/leave.post.mjs +33 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/leave.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/queue.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +22 -6
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.get.mjs +21 -3
- package/.output/server/chunks/routes/api/workshop/channels.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs +5 -5
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id/bindings.put.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/alarms.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bindings.put.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index5.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/index6.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id/read.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id/write.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/revert.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/versions.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/index.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +11 -4
- package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +28 -36
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index.put.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index10.get.mjs +26 -12
- package/.output/server/chunks/routes/api/workshop/index10.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index11.get.mjs +12 -7
- package/.output/server/chunks/routes/api/workshop/index11.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index12.get.mjs +3 -3
- package/.output/server/chunks/routes/api/workshop/index12.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index13.get.mjs +29 -0
- package/.output/server/chunks/routes/api/workshop/index13.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/index14.get.mjs +28 -0
- package/.output/server/chunks/routes/api/workshop/index14.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index2.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index3.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index3.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index4.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index4.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index5.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index5.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index6.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index7.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index7.post.mjs +14 -16
- package/.output/server/chunks/routes/api/workshop/index7.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs +40 -19
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.post.mjs +19 -5
- package/.output/server/chunks/routes/api/workshop/index8.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index9.get.mjs +20 -24
- package/.output/server/chunks/routes/api/workshop/index9.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index9.post.mjs +30 -0
- package/.output/server/chunks/routes/api/workshop/index9.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/mailbox/all.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/mailbox.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/memories/maintenance.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/notifications/read.post.mjs +41 -0
- package/.output/server/chunks/routes/api/workshop/notifications/read.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/plugins/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/runtime.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/scene/layouts.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/schedules/_id/run.post.mjs +29 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id/run.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id/runs.get.mjs +31 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id/runs.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id_.delete.mjs +30 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id_.delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id_.get.mjs +29 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id_.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id_.patch.mjs +40 -0
- package/.output/server/chunks/routes/api/workshop/schedules/_id_.patch.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/complete.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/tasks/_id/dispatch.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/tasks/_id/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/tasks/_id/reassign.post.mjs +39 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/reassign.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/report.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/tasks/_id/retry.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/tasks/_id/update.post.mjs +44 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/update.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id_.get.mjs +9 -5
- package/.output/server/chunks/routes/api/workshop/tasks/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.put.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id/index2.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id/members/_agentId_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/teams/_id_.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/users/me.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/users/register.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +3 -3
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/workspaces/index.delete.mjs +2 -2
- package/.output/server/chunks/routes/renderer.mjs +3 -3
- package/.output/server/chunks/virtual/entry.mjs +5704 -722
- package/.output/server/chunks/virtual/entry.mjs.map +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +15 -5549
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/README-zh.md +109 -45
- package/README.md +115 -38
- package/app/components/AppHeader.vue +284 -959
- package/app/components/aml/AmlDatasetFormModal.vue +279 -0
- package/app/components/aml/AmlDatasetTable.vue +319 -0
- package/app/components/aml/AmlEnvPanel.vue +230 -0
- package/app/components/aml/AmlExperimentsTable.vue +142 -0
- package/app/components/aml/AmlInfraBanner.vue +23 -0
- package/app/components/aml/AmlJobsTable.vue +248 -0
- package/app/components/aml/AmlModelsTable.vue +173 -0
- package/app/components/aml/AmlOverviewBar.vue +62 -0
- package/app/components/aml/AmlPageHeader.vue +47 -0
- package/app/components/aml/AmlPredictConsole.vue +201 -0
- package/app/components/app-header/HeaderTools.vue +208 -0
- package/app/components/app-header/HitlBell.vue +423 -0
- package/app/components/app-header/TrailNav.vue +261 -0
- package/app/components/app-header/UserChip.vue +150 -0
- package/app/components/daq/DaqAddNodeModal.vue +209 -0
- package/app/components/daq/DaqAlarmBar.vue +46 -0
- package/app/components/daq/DaqControlCard.vue +159 -0
- package/app/components/daq/DaqDetailFramesTile.vue +139 -0
- package/app/components/daq/DaqDetailHistoryCard.vue +128 -0
- package/app/components/daq/DaqDetailLiveCard.vue +92 -0
- package/app/components/daq/DaqDetailParamForm.vue +350 -0
- package/app/components/daq/DaqInfraBanner.vue +31 -0
- package/app/components/daq/DaqLineBanner.vue +47 -0
- package/app/components/daq/DaqNodePanel.vue +396 -0
- package/app/components/daq/DaqOptPanel.vue +197 -0
- package/app/components/daq/DaqTemplateModal.vue +246 -0
- package/app/components/dashboard/DashboardFleetPanel.vue +228 -0
- package/app/components/dashboard/DashboardGaugeBand.vue +78 -0
- package/app/components/dashboard/DashboardHarnessPanel.vue +149 -0
- package/app/components/dashboard/DashboardHero.vue +209 -0
- package/app/components/dashboard/DashboardLineStatePanel.vue +78 -0
- package/app/components/dashboard/DashboardNodeStatePanel.vue +46 -0
- package/app/components/dashboard/DashboardPipelinePanel.vue +46 -0
- package/app/components/dashboard/DashboardTrendPanel.vue +83 -0
- package/app/components/dashboard/DashboardWritePanel.vue +52 -0
- package/app/components/dcw/DcwAddNodeModal.vue +328 -0
- package/app/components/dcw/DcwAdoptCard.vue +89 -0
- package/app/components/dcw/DcwCreateLineModal.vue +105 -0
- package/app/components/dcw/DcwDeleteLineModal.vue +73 -0
- package/app/components/dcw/DcwDetailHead.vue +65 -0
- package/app/components/dcw/DcwDetailTemplateModal.vue +238 -0
- package/app/components/dcw/DcwEditLineModal.vue +108 -0
- package/app/components/dcw/DcwGatewayBar.vue +94 -0
- package/app/components/dcw/DcwLedgerCard.vue +160 -0
- package/app/components/dcw/DcwLineCard.vue +117 -0
- package/app/components/dcw/DcwLineRunCard.vue +158 -0
- package/app/components/dcw/DcwNodesTable.vue +253 -0
- package/app/components/dcw/DcwProductCreateModal.vue +113 -0
- package/app/components/dcw/DcwQueryCard.vue +251 -0
- package/app/components/dcw/DcwRecipeEditModal.vue +285 -0
- package/app/components/dcw/DcwRecipeHistoryModal.vue +165 -0
- package/app/components/dcw/DcwRecipePanel.vue +367 -0
- package/app/components/dcw/DcwRunDataModal.vue +191 -0
- package/app/components/dcw/DcwTemplateModal.vue +227 -0
- package/app/components/dcw/DcwWriteHistoryCard.vue +96 -0
- package/app/components/logs/LogsEventTable.vue +309 -0
- package/app/components/logs/LogsFilterCard.vue +234 -0
- package/app/components/logs/LogsManualModal.vue +231 -0
- package/app/components/logs/LogsPageHead.vue +71 -0
- package/app/components/monitor/MonitorAgentTable.vue +143 -0
- package/app/components/monitor/MonitorChannelTable.vue +80 -0
- package/app/components/monitor/MonitorLoginGate.vue +24 -0
- package/app/components/monitor/MonitorPageHead.vue +92 -0
- package/app/components/monitor/MonitorProcessTable.vue +159 -0
- package/app/components/monitor/MonitorStatGrid.vue +165 -0
- package/app/components/settings/AppearancePane.vue +282 -0
- package/app/components/settings/PluginsSection.vue +280 -0
- package/app/components/settings/RuntimeFieldRow.vue +189 -0
- package/app/components/settings/RuntimeGroupSection.vue +290 -0
- package/app/components/settings/RuntimePane.vue +235 -0
- package/app/components/settings/SystemPane.vue +83 -0
- package/app/components/tokens/TokenCreateModal.vue +42 -0
- package/app/components/tokens/TokenOnceModal.vue +164 -0
- package/app/components/tokens/TokenRenameModal.vue +40 -0
- package/app/components/tokens/TokensAuthGate.vue +47 -0
- package/app/components/tokens/TokensPageHead.vue +76 -0
- package/app/components/tokens/TokensTable.vue +227 -0
- package/app/components/workshop/A2aRpcDebugger.vue +237 -237
- package/app/components/workshop/AgentInspectorDrawer.vue +424 -424
- package/app/components/workshop/AgentLanesView.vue +278 -998
- package/app/components/workshop/ArtifactCard.vue +120 -120
- package/app/components/workshop/AssetLibrary.vue +452 -452
- package/app/components/workshop/ChannelSessionList.vue +377 -804
- package/app/components/workshop/ChatMemberPanel.vue +555 -0
- package/app/components/workshop/ChatTimeline.vue +569 -0
- package/app/components/workshop/CommandPalette.vue +270 -269
- package/app/components/workshop/Composer.vue +540 -827
- package/app/components/workshop/DeviceTwinPanel.vue +167 -643
- package/app/components/workshop/EventBlock.vue +214 -602
- package/app/components/workshop/FileSelectorModal.vue +188 -188
- package/app/components/workshop/InspectorPanel.vue +301 -301
- package/app/components/workshop/MemoryPanel.vue +48 -7
- package/app/components/workshop/MultiChannelView.vue +4 -4
- package/app/components/workshop/NotificationCenter.vue +325 -0
- package/app/components/workshop/TaskBoardView.vue +121 -547
- package/app/components/workshop/TaskInspectorDrawer.vue +101 -7
- package/app/components/workshop/TranscriptTimeline.vue +223 -601
- package/app/components/workshop/agents/AgentTemplateEditModal.vue +139 -0
- package/app/components/workshop/agents/AgentTemplateTable.vue +269 -0
- package/app/components/workshop/agents/AgentTemplateToolbar.vue +67 -0
- package/app/components/workshop/blocks/ClusterArtifact.vue +61 -61
- package/app/components/workshop/blocks/ClusterError.vue +85 -85
- package/app/components/workshop/blocks/ClusterLife.vue +87 -87
- package/app/components/workshop/blocks/ClusterMember.vue +95 -93
- package/app/components/workshop/blocks/ClusterMemory.vue +84 -84
- package/app/components/workshop/blocks/ClusterOther.vue +67 -67
- package/app/components/workshop/blocks/ClusterRoute.vue +1 -1
- package/app/components/workshop/blocks/ClusterStatus.vue +149 -147
- package/app/components/workshop/blocks/ClusterTool.vue +158 -158
- package/app/components/workshop/blocks/EventBlockAvatar.vue +114 -0
- package/app/components/workshop/blocks/EventBlockHead.vue +232 -0
- package/app/components/workshop/composer/ComposerToolbar.vue +278 -0
- package/app/components/workshop/composer/MentionMenu.vue +135 -0
- package/app/components/workshop/composer/ReplyChip.vue +65 -0
- package/app/components/workshop/composer/StatusChip.vue +171 -0
- package/app/components/workshop/console/CenterPane.vue +94 -0
- package/app/components/workshop/console/Dock.vue +71 -0
- package/app/components/workshop/console/LeftPane.vue +84 -0
- package/app/components/workshop/console/RightPane.vue +95 -0
- package/app/components/workshop/console/Topbar.vue +289 -0
- package/app/components/workshop/device-twin/DeviceTwinCard.vue +265 -0
- package/app/components/workshop/device-twin/DeviceTwinDcwSection.vue +203 -0
- package/app/components/workshop/lanes/AddMemberModal.vue +270 -0
- package/app/components/workshop/lanes/EditMemberModal.vue +106 -0
- package/app/components/workshop/lanes/LaneHeader.vue +432 -0
- package/app/components/workshop/lanes/LanesToolbar.vue +97 -0
- package/app/components/workshop/session-list/ChannelSettingsModal.vue +329 -0
- package/app/components/workshop/session-list/MountChannelModal.vue +124 -0
- package/app/components/workshop/session-list/SaveTemplateModal.vue +93 -0
- package/app/components/workshop/task-board/Card.vue +172 -0
- package/app/components/workshop/task-board/Column.vue +151 -0
- package/app/components/workshop/task-board/List.vue +157 -0
- package/app/components/workshop/task-board/StatusMenu.vue +88 -0
- package/app/components/workshop/teams/TeamAddMemberModal.vue +53 -0
- package/app/components/workshop/teams/TeamCard.vue +183 -0
- package/app/components/workshop/teams/TeamCreateModal.vue +94 -0
- package/app/components/workshop/teams/TeamDeployModal.vue +40 -0
- package/app/components/workshop/teams/TeamPluginModal.vue +119 -0
- package/app/components/workshop/terminal/OmpTerminalPanel.vue +270 -1011
- package/app/components/workshop/terminal/TerminalHitlCard.vue +170 -0
- package/app/components/workshop/town/TownScene.ts +72 -961
- package/app/components/workshop/town/TownScene3D.ts +357 -4045
- package/app/components/workshop/town/TownView.vue +461 -7405
- package/app/components/workshop/town/components/TownAgentBindings.vue +380 -0
- package/app/components/workshop/town/components/TownAgentInspector.vue +546 -0
- package/app/components/workshop/town/components/TownAlarmList.vue +147 -0
- package/app/components/workshop/town/components/TownBoundaryPanel.vue +350 -0
- package/app/components/workshop/town/components/TownCalloutLayer.vue +147 -0
- package/app/components/workshop/town/components/TownChannelDock.vue +116 -0
- package/app/components/workshop/town/components/TownControlDock.vue +400 -0
- package/app/components/workshop/town/components/TownDaqNodeInspector.vue +345 -0
- package/app/components/workshop/town/components/TownDaqTree.vue +366 -0
- package/app/components/workshop/town/components/TownDcwBindSection.vue +473 -0
- package/app/components/workshop/town/components/TownDcwNodeInspector.vue +185 -0
- package/app/components/workshop/town/components/TownDcwTree.vue +280 -0
- package/app/components/workshop/town/components/TownDeviceBindings.vue +394 -0
- package/app/components/workshop/town/components/TownDeviceTransform.vue +248 -0
- package/app/components/workshop/town/components/TownEventList.vue +120 -0
- package/app/components/workshop/town/components/TownHealthBody.vue +100 -0
- package/app/components/workshop/town/components/TownKpiStrip.vue +207 -0
- package/app/components/workshop/town/components/TownLeftRail.vue +308 -0
- package/app/components/workshop/town/components/TownLoadingMask.vue +61 -0
- package/app/components/workshop/town/components/TownNavMap.vue +154 -0
- package/app/components/workshop/town/components/TownRightRail.vue +540 -0
- package/app/components/workshop/town/components/TownStage.vue +281 -0
- package/app/components/workshop/town/components/TownStageTop.vue +238 -0
- package/app/components/workshop/town/components/TownStatusBar.vue +108 -0
- package/app/components/workshop/town/components/TownTopNav.vue +367 -0
- package/app/components/workshop/town/components/TownTrendDock.vue +178 -0
- package/app/components/workshop/town/scene/town-scene-agents.ts +254 -0
- package/app/components/workshop/town/scene/town-scene-behavior.ts +194 -0
- package/app/components/workshop/town/scene/town-scene-bubbles.ts +96 -0
- package/app/components/workshop/town/scene/town-scene-core.ts +158 -0
- package/app/components/workshop/town/scene/town-scene-models.ts +109 -0
- package/app/components/workshop/town/scene/town-scene-visuals.ts +279 -0
- package/app/components/workshop/town/scene/town-scene3d-agents.ts +308 -0
- package/app/components/workshop/town/scene/town-scene3d-blocks.ts +297 -0
- package/app/components/workshop/town/scene/town-scene3d-bubbles.ts +281 -0
- package/app/components/workshop/town/scene/town-scene3d-camera.ts +282 -0
- package/app/components/workshop/town/scene/town-scene3d-devices.ts +433 -0
- package/app/components/workshop/town/scene/town-scene3d-editing.ts +490 -0
- package/app/components/workshop/town/scene/town-scene3d-events.ts +173 -0
- package/app/components/workshop/town/scene/town-scene3d-factory.ts +412 -0
- package/app/components/workshop/town/scene/town-scene3d-hud.ts +110 -0
- package/app/components/workshop/town/scene/town-scene3d-lifecycle.ts +144 -0
- package/app/components/workshop/town/scene/town-scene3d-links.ts +141 -0
- package/app/components/workshop/town/scene/town-scene3d-loop.ts +286 -0
- package/app/components/workshop/town/scene/town-scene3d-models.ts +154 -0
- package/app/components/workshop/town/scene/town-scene3d-nodes.ts +562 -0
- package/app/components/workshop/town/scene/town-scene3d-ranges.ts +273 -0
- package/app/components/workshop/town/scene/town-scene3d-renderer.ts +320 -0
- package/app/components/workshop/town/scene/town-scene3d-selection.ts +257 -0
- package/app/components/workshop/town/scene/town-scene3d-types.ts +264 -0
- package/app/components/workshop/transcript/TranscriptBlockList.vue +68 -0
- package/app/components/workshop/transcript/TranscriptEarlierPager.vue +81 -0
- package/app/components/workshop/transcript/TranscriptEmptyState.vue +153 -0
- package/app/components/workshop/transcript/TranscriptFilterBar.vue +126 -0
- package/app/components/workshop/workbench/AuthGate.vue +179 -0
- package/app/components/workshop/workbench/CreateWorkspaceModal.vue +36 -0
- package/app/components/workshop/workbench/WorkbenchHead.vue +129 -0
- package/app/components/workshop/workbench/WorkspaceCard.vue +198 -0
- package/app/components/workshop/workbench/WorkspaceEmpty.vue +56 -0
- package/app/composables/workshop/device-twin-types.ts +29 -0
- package/app/composables/workshop/event-blocks/attention.ts +58 -0
- package/app/composables/workshop/event-blocks/classify.ts +44 -0
- package/app/composables/workshop/event-blocks/clusterer.ts +231 -0
- package/app/composables/workshop/event-blocks/constants.ts +48 -0
- package/app/composables/workshop/event-blocks/fold-stream.ts +45 -0
- package/app/composables/workshop/event-blocks/markdown.ts +81 -0
- package/app/composables/workshop/event-blocks/mentions.ts +49 -0
- package/app/composables/workshop/event-blocks/text-utils.ts +100 -0
- package/app/composables/workshop/event-blocks/types.ts +40 -0
- package/app/composables/workshop/town/town-relay-props.ts +226 -0
- package/app/composables/workshop/town/town-view-types.ts +145 -0
- package/app/composables/workshop/town/useTownAgentBindings.ts +115 -0
- package/app/composables/workshop/town/useTownAgentChat.ts +203 -0
- package/app/composables/workshop/town/useTownAlarms.ts +36 -0
- package/app/composables/workshop/town/useTownCallouts.ts +174 -0
- package/app/composables/workshop/town/useTownChannels.ts +220 -0
- package/app/composables/workshop/town/useTownHealth.ts +66 -0
- package/app/composables/workshop/town/useTownHudTickers.ts +77 -0
- package/app/composables/workshop/town/useTownLayout.ts +277 -0
- package/app/composables/workshop/town/useTownNavMap.ts +301 -0
- package/app/composables/workshop/town/useTownNodeBindings.ts +345 -0
- package/app/composables/workshop/town/useTownPanelDrag.ts +91 -0
- package/app/composables/workshop/town/useTownRailData.ts +421 -0
- package/app/composables/workshop/town/useTownSceneControl.ts +92 -0
- package/app/composables/workshop/town/useTownSceneInput.ts +275 -0
- package/app/composables/workshop/town/useTownSceneRuntime.ts +390 -0
- package/app/composables/workshop/town/useTownSheets.ts +41 -0
- package/app/composables/workshop/town/useTownTrends.ts +93 -0
- package/app/composables/workshop/useChannelList.ts +88 -0
- package/app/composables/workshop/useChannelTerminals.ts +65 -0
- package/app/composables/workshop/useComposerMentions.ts +130 -0
- package/app/composables/workshop/useDeviceTwinDcwWrite.ts +77 -0
- package/app/composables/workshop/useDeviceTwinPanel.ts +56 -0
- package/app/composables/workshop/useEventBlockView.ts +159 -0
- package/app/composables/workshop/useEventBlocks.ts +33 -662
- package/app/composables/workshop/useHitlAnswer.ts +184 -0
- package/app/composables/workshop/useLaneWidths.ts +27 -0
- package/app/composables/workshop/useOmpTerminalSession.ts +424 -0
- package/app/composables/workshop/usePluginAdmin.ts +152 -0
- package/app/composables/workshop/useRuntimeConfigDraft.ts +118 -0
- package/app/composables/workshop/useSettingsGroups.ts +243 -0
- package/app/composables/workshop/useTaskBoardColumns.ts +47 -0
- package/app/composables/workshop/useTaskBoardDrag.ts +78 -0
- package/app/composables/workshop/useTaskBoardMenu.ts +60 -0
- package/app/composables/workshop/useTaskBoardTasks.ts +74 -0
- package/app/composables/workshop/useTerminalRenderer.ts +308 -0
- package/app/composables/workshop/useTranscriptEnterStage.ts +48 -0
- package/app/composables/workshop/useTranscriptHistory.ts +52 -0
- package/app/composables/workshop/useTranscriptScroll.ts +113 -0
- package/app/composables/workshop/useWorkshopApi.ts +85 -2
- package/app/composables/workshop/useWorkshopWs.ts +265 -126
- package/app/config/schema.ts +13 -0
- package/app/layouts/town.vue +21 -16
- package/app/middleware/locale-cookie.global.ts +22 -0
- package/app/pages/aml/api.ts +6 -0
- package/app/pages/aml/composables/useAmlDatasets.ts +38 -0
- package/app/pages/aml/composables/useAmlEntities.ts +57 -0
- package/app/pages/aml/composables/useAmlEnv.ts +191 -0
- package/app/pages/aml/composables/useAmlExperiments.ts +45 -0
- package/app/pages/aml/composables/useAmlFormat.ts +44 -0
- package/app/pages/aml/composables/useAmlJobs.ts +131 -0
- package/app/pages/aml/composables/useAmlModels.ts +56 -0
- package/app/pages/aml/composables/useAmlNotes.ts +47 -0
- package/app/pages/aml/composables/useAmlPredict.ts +93 -0
- package/app/pages/aml/constants.ts +63 -0
- package/app/pages/aml/index.vue +143 -2574
- package/app/pages/aml/styles.css +420 -0
- package/app/pages/aml/types.ts +189 -0
- package/app/pages/composables/useDashboardCharts.ts +192 -0
- package/app/pages/composables/useDashboardData.ts +144 -0
- package/app/pages/daq/[id].vue +59 -929
- package/app/pages/daq/composables/useDaqAddNode.ts +126 -0
- package/app/pages/daq/composables/useDaqDetailBinding.ts +29 -0
- package/app/pages/daq/composables/useDaqDetailFrames.ts +42 -0
- package/app/pages/daq/composables/useDaqDetailHistory.ts +199 -0
- package/app/pages/daq/composables/useDaqDetailNode.ts +53 -0
- package/app/pages/daq/composables/useDaqDetailParams.ts +138 -0
- package/app/pages/daq/composables/useDaqFilters.ts +187 -0
- package/app/pages/daq/composables/useDaqNodeWindow.ts +86 -0
- package/app/pages/daq/composables/useDaqOptimizations.ts +99 -0
- package/app/pages/daq/composables/useDaqTemplates.ts +152 -0
- package/app/pages/daq/daq-page.css +681 -0
- package/app/pages/daq/index.vue +260 -2316
- package/app/pages/dcw/[id].vue +297 -2616
- package/app/pages/dcw/composables/useDcwAddNode.ts +121 -0
- package/app/pages/dcw/composables/useDcwCards.ts +27 -0
- package/app/pages/dcw/composables/useDcwDetailScope.ts +145 -0
- package/app/pages/dcw/composables/useDcwDetailTemplates.ts +94 -0
- package/app/pages/dcw/composables/useDcwFilter.ts +29 -0
- package/app/pages/dcw/composables/useDcwLedger.ts +34 -0
- package/app/pages/dcw/composables/useDcwLineMutations.ts +115 -0
- package/app/pages/dcw/composables/useDcwLineRun.ts +60 -0
- package/app/pages/dcw/composables/useDcwProducts.ts +54 -0
- package/app/pages/dcw/composables/useDcwQuery.ts +68 -0
- package/app/pages/dcw/composables/useDcwQuickActions.ts +47 -0
- package/app/pages/dcw/composables/useDcwRecipes.ts +239 -0
- package/app/pages/dcw/composables/useDcwTemplates.ts +50 -0
- package/app/pages/dcw/composables/useDcwWrites.ts +81 -0
- package/app/pages/dcw/dcw-page.css +344 -0
- package/app/pages/dcw/index.vue +64 -986
- package/app/pages/dcw/types.ts +9 -0
- package/app/pages/index.vue +126 -981
- package/app/pages/logs/composables/useLogsFormat.ts +43 -0
- package/app/pages/logs/composables/useLogsManual.ts +63 -0
- package/app/pages/logs/composables/useLogsQuery.ts +52 -0
- package/app/pages/logs/composables/useLogsScope.ts +39 -0
- package/app/pages/logs/index.vue +57 -728
- package/app/pages/monitor/composables/useMonitorColumns.ts +69 -0
- package/app/pages/monitor/composables/useMonitorData.ts +124 -0
- package/app/pages/monitor/composables/useMonitorFormat.ts +39 -0
- package/app/pages/monitor/composables/useMonitorTerminal.ts +28 -0
- package/app/pages/monitor/types.ts +61 -0
- package/app/pages/monitor.vue +88 -658
- package/app/pages/permissions/index.vue +3 -2
- package/app/pages/plugins/index.vue +318 -311
- package/app/pages/settings.vue +168 -1562
- package/app/pages/tokens/composables/useTokenClipboard.ts +33 -0
- package/app/pages/tokens/composables/useTokenCreate.ts +93 -0
- package/app/pages/tokens/composables/useTokenRename.ts +54 -0
- package/app/pages/tokens/composables/useTokenReveal.ts +84 -0
- package/app/pages/tokens/composables/useTokensList.ts +60 -0
- package/app/pages/tokens.vue +79 -597
- package/app/pages/users.vue +5 -4
- package/app/pages/workshop/agents.vue +130 -609
- package/app/pages/workshop/channel-templates.vue +18 -11
- package/app/pages/workshop/composables/useAgentHarnessOptions.ts +59 -0
- package/app/pages/workshop/composables/useAgentTemplateActions.ts +42 -0
- package/app/pages/workshop/composables/useAgentTemplateDialogState.ts +24 -0
- package/app/pages/workshop/composables/useAgentTemplateForm.ts +88 -0
- package/app/pages/workshop/composables/useAgentTemplatesCatalog.ts +92 -0
- package/app/pages/workshop/composables/useTeamActions.ts +44 -0
- package/app/pages/workshop/composables/useTeamAddMemberDialog.ts +49 -0
- package/app/pages/workshop/composables/useTeamCreateDialog.ts +67 -0
- package/app/pages/workshop/composables/useTeamDeployDialog.ts +49 -0
- package/app/pages/workshop/composables/useTeamDialogState.ts +46 -0
- package/app/pages/workshop/composables/useTeamPluginDialog.ts +72 -0
- package/app/pages/workshop/composables/useTeamsCatalog.ts +100 -0
- package/app/pages/workshop/composables/useWorkbenchAuth.ts +125 -0
- package/app/pages/workshop/composables/useWorkbenchWorkspaces.ts +123 -0
- package/app/pages/workshop/composables/useWorkspaceAuth.ts +31 -0
- package/app/pages/workshop/composables/useWorkspaceChannels.ts +62 -0
- package/app/pages/workshop/composables/useWorkspacePanels.ts +56 -0
- package/app/pages/workshop/composables/useWorkspaceShell.ts +136 -0
- package/app/pages/workshop/index.vue +116 -668
- package/app/pages/workshop/schedules.vue +553 -0
- package/app/pages/workshop/teams.vue +233 -740
- package/app/pages/workshop/w/[wsId].vue +221 -704
- package/app/plugins/locale-restore.client.ts +16 -1
- package/app/stores/workshop/chat.ts +434 -0
- package/app/stores/workshop/entities.ts +385 -283
- package/app/stores/workshop/events.ts +5 -4
- package/app/stores/workshop/hitl.ts +110 -7
- package/app/stores/workshop/narrow-fetch.ts +23 -0
- package/app/stores/workshop/notifications.ts +288 -0
- package/app/stores/workshop/user.ts +23 -10
- package/app/stores/workshop/workspaces.ts +12 -2
- package/app/utils/builtin-catalog.ts +104 -0
- package/config.yml +176 -170
- package/docs/aml.md +10 -0
- package/docs/cli.en.md +5 -5
- package/docs/cli.md +5 -5
- package/docs/full-test-plan.md +17 -4
- package/docs/plugins.en.md +1 -1
- package/docs/plugins.md +1 -1
- package/docs/sdk.en.md +1 -1
- package/docs/sdk.md +1 -1
- package/i18n/dicts/dcwDetail.json +2 -0
- package/i18n/locales/en.ts +364 -35
- package/i18n/locales/zh-CN.ts +336 -7
- package/package.json +3 -4
- package/scripts/_audit/detached-instance.mjs +112 -0
- package/scripts/_audit/schedules-ui/schedules-page.png +0 -0
- package/scripts/_audit/schedules-ui/workspace-channel-tag.png +0 -0
- package/scripts/_audit/stubs/nuxt-imports.mjs +67 -0
- package/scripts/_audit/ts-register-hook.mjs +12 -0
- package/scripts/_audit/ts-resolve-hook.mjs +25 -5
- package/scripts/_audit/watchdog-recovery-test.mjs +24 -2
- package/scripts/_dbg-comm-verify.mjs +188 -0
- package/scripts/_dbg-full-feature-e2e.mjs +19 -11
- package/scripts/_dbg-im-e2e.mjs +169 -0
- package/scripts/_dbg-opt2-run.mjs +114 -0
- package/scripts/_dbg-opt2-setup.mjs +95 -0
- package/scripts/_dbg-param-map-e2e.ts +1 -1
- package/scripts/_dbg-param-map-rest-smoke.mjs +1 -1
- package/scripts/_dbg-perms-e2e.mjs +132 -109
- package/scripts/_dbg-real-scenario-e2e.mjs +246 -0
- package/scripts/_dbg-schedule-e2e.mjs +262 -0
- package/scripts/_dbg-schedule-ui-verify.mjs +115 -0
- package/scripts/_dbg-team-matrix.mjs +148 -0
- package/scripts/_dbg-ui-fullcrawl.mjs +91 -0
- package/scripts/_dbg-ui-static-audit.mjs +65 -0
- package/scripts/_dbg-write-lock-e2e.mjs +131 -0
- package/scripts/_demo-agentteam-capture.mjs +278 -0
- package/scripts/_e2e-ui-functional.mjs +371 -0
- package/scripts/_i18n-en-cjk-scan.mjs +28 -0
- package/scripts/_i18n-en-verify.mjs +107 -0
- package/scripts/_i18n-extra-checks.mjs +53 -0
- package/scripts/_i18n-scan-hardcoded.mjs +180 -0
- package/scripts/_i18n-verify-keys.mjs +50 -0
- package/scripts/_loop-biax-campaign.mjs +15 -9
- package/scripts/_probe-daq-omp-task.mjs +100 -0
- package/scripts/_probe-daq-scope-default.mjs +123 -0
- package/scripts/_probe-recipe-switch.mjs +92 -0
- package/scripts/_provision-injection-line.mjs +39 -0
- package/scripts/_run-matrix.ps1 +53 -0
- package/scripts/_run-real-injection-fifo-goals.mjs +367 -0
- package/scripts/_sweep-button-contrast.mjs +87 -0
- package/scripts/acceptance-aml-db.ts +23 -0
- package/scripts/acceptance-aml-hybrid-live.mjs +94 -0
- package/scripts/acceptance-aml-hybrid-twin.ts +93 -0
- package/scripts/acceptance-hybrid-python.py +51 -0
- package/scripts/aml-ui-smoke.mjs +2 -0
- package/scripts/api-live-e2e.mjs +32 -7
- package/scripts/demo-group-chat-all-real.ts +279 -0
- package/scripts/demo-group-chat-omp-cases.ts +210 -0
- package/scripts/demo-group-chat-omp.ts +184 -0
- package/scripts/demo-group-chat-order.ts +197 -0
- package/scripts/e2e-agent-team.mjs +6 -4
- package/scripts/e2e-agentteam-chat.mjs +473 -0
- package/scripts/e2e-agentteam-real-triage.mjs +421 -0
- package/scripts/e2e-agentteam-task-flow-real.ts +443 -0
- package/scripts/e2e-aw-tui-global.mjs +8 -8
- package/scripts/e2e-channel-isolation.ts +5 -1
- package/scripts/e2e-closedloop/cleanup.mjs +27 -0
- package/scripts/e2e-closedloop/lib.mjs +109 -0
- package/scripts/e2e-closedloop/main.mjs +59 -0
- package/scripts/e2e-closedloop/scenarios-accounts.mjs +208 -0
- package/scripts/e2e-closedloop/scenarios-authz.mjs +190 -0
- package/scripts/e2e-closedloop/scenarios-daq-dcw.mjs +219 -0
- package/scripts/e2e-closedloop/scenarios-plugins.mjs +169 -0
- package/scripts/e2e-closedloop/state.mjs +10 -0
- package/scripts/e2e-crash-cycle.mjs +108 -0
- package/scripts/e2e-full-closedloop.mjs +6 -919
- package/scripts/e2e-hil-multi-user.mjs +307 -0
- package/scripts/e2e-hil-restart.mjs +339 -0
- package/scripts/e2e-hitl-live.mjs +336 -323
- package/scripts/e2e-lead-team-mgmt.ts +1 -1
- package/scripts/e2e-memory-system.ts +70 -89
- package/scripts/e2e-multiharness-team.mjs +32 -15
- package/scripts/e2e-omp-workspace.ts +21 -6
- package/scripts/e2e-parallel-execution.mjs +20 -6
- package/scripts/e2e-plc-plugin-closedloop.mjs +96 -65
- package/scripts/e2e-rest-memory.mjs +26 -11
- package/scripts/e2e-resume-crash.mjs +22 -7
- package/scripts/e2e-task-queue.ts +8 -8
- package/scripts/e2e-template-isolation.mjs +4 -2
- package/scripts/proof-omp-real.ts +189 -0
- package/scripts/real-injection-closed-loop.mjs +383 -0
- package/scripts/test-agent-runtime.ts +5 -1
- package/scripts/test-agentteam-guardrails.ts +113 -0
- package/scripts/test-agentteam-task-chat-flow.ts +420 -0
- package/scripts/test-agentteam-workflow.ts +472 -0
- package/scripts/test-collab-e2e.mjs +17 -3
- package/scripts/test-dcw-read.ts +9 -2
- package/scripts/test-event-persistence.mjs +10 -2
- package/scripts/test-full-system.ts +16 -3
- package/scripts/test-group-chat-hardening.ts +265 -0
- package/scripts/test-group-chat-unit/lib.ts +186 -0
- package/scripts/test-group-chat-unit/main.ts +45 -0
- package/scripts/test-group-chat-unit/section-a-migration.ts +75 -0
- package/scripts/test-group-chat-unit/section-b-permission-matrix.ts +88 -0
- package/scripts/test-group-chat-unit/section-c-member-lifecycle.ts +64 -0
- package/scripts/test-group-chat-unit/section-d-mention-resolution.ts +36 -0
- package/scripts/test-group-chat-unit/section-e-chat-facts.ts +97 -0
- package/scripts/test-group-chat-unit/section-f-user-notifications.ts +52 -0
- package/scripts/test-group-chat-unit/section-g-member-projection.ts +44 -0
- package/scripts/test-group-chat-unit/section-h-outbox-consistency.ts +30 -0
- package/scripts/test-group-chat-unit/section-i-read-idempotency.ts +24 -0
- package/scripts/test-group-chat-unit/section-j-permission-scope.ts +150 -0
- package/scripts/test-group-chat-unit.ts +35 -0
- package/scripts/test-hitl-decision.ts +526 -0
- package/scripts/test-hitl-legacy-channel-auth.ts +143 -0
- package/scripts/test-lane-history-live.mjs +30 -7
- package/scripts/test-memory-vector.ts +10 -0
- package/scripts/test-orchestration.ts +7 -2
- package/scripts/test-persistence-lazy.ts +7 -1
- package/scripts/test-prompt-system.mjs +46 -20
- package/scripts/test-route-reason.mjs +9 -2
- package/scripts/test-schedule-runtime.ts +309 -0
- package/scripts/test-scheduler-loop/lib.ts +321 -0
- package/scripts/test-scheduler-loop/main.ts +40 -0
- package/scripts/test-scheduler-loop/scenarios-modes.ts +95 -0
- package/scripts/test-scheduler-loop/scenarios-runtime.ts +58 -0
- package/scripts/test-scheduler-loop/scenarios-supervise.ts +183 -0
- package/scripts/test-scheduler-loop/scenarios-triage.ts +102 -0
- package/scripts/test-scheduler-loop.ts +5 -460
- package/scripts/test-supervision-watchdog.ts +105 -0
- package/scripts/test-task-engine.ts +27 -5
- package/scripts/test-task-lease-fencing.ts +154 -0
- package/scripts/test-terminal-e2e.mjs +9 -3
- package/scripts/three-system-e2e/lib.mjs +79 -0
- package/scripts/three-system-e2e/main.mjs +40 -0
- package/scripts/three-system-e2e/phases/phase-0-user-token.mjs +42 -0
- package/scripts/three-system-e2e/phases/phase-0a2-line-autoselect.mjs +35 -0
- package/scripts/three-system-e2e/phases/phase-0b-fixture-grants.mjs +39 -0
- package/scripts/three-system-e2e/phases/phase-0c-plugin-outbound-auth.mjs +95 -0
- package/scripts/three-system-e2e/phases/stage-1-health.mjs +47 -0
- package/scripts/three-system-e2e/phases/stage-2-5-team-plugins.mjs +84 -0
- package/scripts/three-system-e2e/phases/stage-2-teams-tools-hitl.mjs +184 -0
- package/scripts/three-system-e2e/phases/stage-3-diag.mjs +73 -0
- package/scripts/three-system-e2e/phases/stage-4-plugin-toggle.mjs +53 -0
- package/scripts/three-system-e2e/state.mjs +87 -0
- package/scripts/three-system-e2e.mjs +24 -646
- package/scripts/typecheck.mjs +75 -0
- package/scripts/ui/lib.mjs +14 -2
- package/scripts/ui/record-demo.mjs +557 -0
- package/scripts/ui/smoke-refactor.mjs +258 -0
- package/scripts/verify-a2a-live.mjs +15 -1
- package/scripts/verify-ws-events.mjs +19 -1
- package/server/api/system/monitor/terminal/ws.ts +51 -1
- package/server/api/workshop/agent-tools/approvals/[id]/decide.post.ts +59 -5
- package/server/api/workshop/agent-tools/approvals/index.get.ts +28 -3
- package/server/api/workshop/channel-templates/[id]/instantiate.post.ts +6 -1
- package/server/api/workshop/channels/[id]/chat/messages/[messageId]/read.post.ts +22 -0
- package/server/api/workshop/channels/[id]/chat/messages/index.get.ts +29 -0
- package/server/api/workshop/channels/[id]/chat/messages/index.post.ts +51 -0
- package/server/api/workshop/channels/[id]/chat/permissions.get.ts +35 -0
- package/server/api/workshop/channels/[id]/index.patch.ts +34 -8
- package/server/api/workshop/channels/[id]/members/[userId]/approve.post.ts +20 -0
- package/server/api/workshop/channels/[id]/members/[userId].delete.ts +21 -0
- package/server/api/workshop/channels/[id]/members/index.get.ts +23 -0
- package/server/api/workshop/channels/[id]/members/join.post.ts +30 -0
- package/server/api/workshop/channels/[id]/members/leave.post.ts +20 -0
- package/server/api/workshop/channels/[id]/messages/index.post.ts +3 -0
- package/server/api/workshop/channels/[id]/tasks/index.post.ts +8 -0
- package/server/api/workshop/channels.get.ts +21 -1
- package/server/api/workshop/hitl/pending.get.ts +27 -7
- package/server/api/workshop/hitl/respond.post.ts +86 -89
- package/server/api/workshop/notifications/index.get.ts +60 -0
- package/server/api/workshop/notifications/read.post.ts +31 -0
- package/server/api/workshop/schedules/[id]/run.post.ts +15 -0
- package/server/api/workshop/schedules/[id]/runs.get.ts +15 -0
- package/server/api/workshop/schedules/[id].delete.ts +14 -0
- package/server/api/workshop/schedules/[id].get.ts +13 -0
- package/server/api/workshop/schedules/[id].patch.ts +29 -0
- package/server/api/workshop/schedules/index.get.ts +12 -0
- package/server/api/workshop/schedules/index.post.ts +32 -0
- package/server/api/workshop/tasks/[id]/reassign.post.ts +32 -0
- package/server/api/workshop/tasks/[id]/update.post.ts +35 -0
- package/server/api/workshop/tasks/[id].get.ts +15 -6
- package/server/api/workshop/ws/audience.ts +56 -0
- package/server/api/workshop/ws/db-buffer.ts +68 -0
- package/server/api/workshop/ws/event-mapping.ts +47 -0
- package/server/api/workshop/ws/handlers.ts +132 -0
- package/server/api/workshop/ws/hub.ts +133 -0
- package/server/api/workshop/ws/index.ts +23 -0
- package/server/api/workshop/ws/notification-uplink.ts +77 -0
- package/server/api/workshop/ws/peer-sub.ts +128 -0
- package/server/api/workshop/ws/publish.ts +122 -0
- package/server/api/workshop/ws/shared.ts +94 -0
- package/server/api/workshop/ws/streams.ts +146 -0
- package/server/api/workshop/ws/subscriptions.ts +137 -0
- package/server/plugins/workshop.ts +30 -0
- package/server/plugins-builtin/diag-bridge/host/constants.mjs +25 -0
- package/server/plugins-builtin/diag-bridge/host/diagnosis.mjs +56 -0
- package/server/plugins-builtin/diag-bridge/host/helpers.mjs +126 -0
- package/server/plugins-builtin/diag-bridge/host/index.mjs +15 -0
- package/server/plugins-builtin/diag-bridge/host/plugin.mjs +296 -0
- package/server/plugins-builtin/diag-bridge/host/snapshot.mjs +93 -0
- package/server/plugins-builtin/diag-bridge/host/sweep.mjs +51 -0
- package/server/plugins-builtin/diag-bridge/index.mjs +9 -661
- package/server/plugins-builtin/rag-bridge/index.mjs +57 -133
- package/server/repositories/user.repository.ts +13 -0
- package/server/services/system-config/contracts.ts +29 -0
- package/server/services/system-config/dispose.ts +19 -0
- package/server/services/system-config/facade.ts +26 -0
- package/server/services/system-config/groups.ts +108 -0
- package/server/services/system-config/helpers.ts +41 -0
- package/server/services/system-config/index.ts +21 -0
- package/server/services/system-config/init.ts +26 -0
- package/server/services/system-config/mutate.ts +103 -0
- package/server/services/system-config/plugins.ts +104 -0
- package/server/services/system-config/recompute.ts +66 -0
- package/server/services/system-config/snapshot.ts +59 -0
- package/server/services/system-config/state.ts +79 -0
- package/server/services/system-config/types.ts +58 -0
- package/server/services/workshop/agents/adapters/line-spawn.ts +2 -2
- package/server/services/workshop/agents/adapters/omp-rpc-client/api.ts +111 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/contracts.ts +22 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/facade.ts +7 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/frames.ts +111 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/helpers.ts +38 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/index.ts +25 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/start.ts +70 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/state.ts +65 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/stdout.ts +92 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/types.ts +115 -0
- package/server/services/workshop/agents/adapters/omp-rpc-client/usage.ts +47 -0
- package/server/services/workshop/agents/agent-interface.ts +52 -4
- package/server/services/workshop/agents/base-agent.ts +36 -8
- package/server/services/workshop/agents/claude-agent.ts +5 -0
- package/server/services/workshop/agents/codex-agent/client.ts +170 -0
- package/server/services/workshop/agents/codex-agent/core.ts +119 -0
- package/server/services/workshop/agents/codex-agent/facade.ts +8 -0
- package/server/services/workshop/agents/codex-agent/helpers.ts +13 -0
- package/server/services/workshop/agents/codex-agent/hitl.ts +138 -0
- package/server/services/workshop/agents/codex-agent/index.ts +14 -0
- package/server/services/workshop/agents/codex-agent/turn.ts +367 -0
- package/server/services/workshop/agents/codex-agent/types.ts +42 -0
- package/server/services/workshop/agents/dsh-agent.ts +5 -0
- package/server/services/workshop/agents/harness-availability.ts +127 -127
- package/server/services/workshop/agents/harness-terminal/api.ts +197 -0
- package/server/services/workshop/agents/harness-terminal/index.ts +17 -0
- package/server/services/workshop/agents/harness-terminal/io.ts +120 -0
- package/server/services/workshop/agents/harness-terminal/park.ts +55 -0
- package/server/services/workshop/agents/harness-terminal/sanitize.ts +98 -0
- package/server/services/workshop/agents/harness-terminal/session.ts +124 -0
- package/server/services/workshop/agents/harness-terminal/shared.ts +74 -0
- package/server/services/workshop/agents/hermes-agent.ts +5 -0
- package/server/services/workshop/agents/hitl-capabilities.ts +312 -0
- package/server/services/workshop/agents/hitl-decision/answers.ts +27 -0
- package/server/services/workshop/agents/hitl-decision/decide.ts +268 -0
- package/server/services/workshop/agents/hitl-decision/dispatcher.ts +81 -0
- package/server/services/workshop/agents/hitl-decision/index.ts +24 -0
- package/server/services/workshop/agents/hitl-decision/payload.ts +45 -0
- package/server/services/workshop/agents/hitl-decision/reconcile.ts +70 -0
- package/server/services/workshop/agents/hitl-decision/shared.ts +106 -0
- package/server/services/workshop/agents/hitl-decision/visibility.ts +94 -0
- package/server/services/workshop/agents/hitl-registry.ts +403 -7
- package/server/services/workshop/agents/host-tool-bridge/catalog.ts +78 -0
- package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +167 -0
- package/server/services/workshop/agents/host-tool-bridge/index.ts +15 -0
- package/server/services/workshop/agents/host-tool-bridge/session.ts +22 -0
- package/server/services/workshop/agents/host-tool-bridge/tools/industrial.ts +64 -0
- package/server/services/workshop/agents/host-tool-bridge/tools/memory.ts +44 -0
- package/server/services/workshop/agents/host-tool-bridge/tools/messaging.ts +182 -0
- package/server/services/workshop/agents/host-tool-bridge/tools/progress.ts +84 -0
- package/server/services/workshop/agents/host-tool-bridge/tools/tasks.ts +120 -0
- package/server/services/workshop/agents/host-tool-bridge/tools/team.ts +70 -0
- package/server/services/workshop/agents/host-tool-bridge/types.ts +31 -0
- package/server/services/workshop/agents/industrial/aml-dataset-tools.ts +276 -0
- package/server/services/workshop/agents/industrial/aml-job-tools.ts +363 -0
- package/server/services/workshop/agents/industrial/daq-tools.ts +251 -0
- package/server/services/workshop/agents/industrial/dcw-judge-tools.ts +153 -0
- package/server/services/workshop/agents/industrial/dcw-tools.ts +213 -0
- package/server/services/workshop/agents/industrial/index.ts +24 -0
- package/server/services/workshop/agents/industrial/ops-tools.ts +382 -0
- package/server/services/workshop/agents/industrial/param-tools.ts +172 -0
- package/server/services/workshop/agents/industrial/twin-tools.ts +175 -0
- package/server/services/workshop/agents/mock-agent.ts +136 -12
- package/server/services/workshop/agents/omp-agent/client.ts +116 -0
- package/server/services/workshop/agents/omp-agent/context-governance.ts +204 -0
- package/server/services/workshop/agents/omp-agent/core.ts +146 -0
- package/server/services/workshop/agents/omp-agent/event-mapping.ts +142 -0
- package/server/services/workshop/agents/omp-agent/facade.ts +8 -0
- package/server/services/workshop/agents/omp-agent/helpers.ts +37 -0
- package/server/services/workshop/agents/omp-agent/index.ts +16 -0
- package/server/services/workshop/agents/omp-agent/lifecycle.ts +80 -0
- package/server/services/workshop/agents/omp-agent/tools-steer.ts +487 -0
- package/server/services/workshop/agents/omp-agent/types.ts +45 -0
- package/server/services/workshop/agents/opencode-agent/core.ts +77 -0
- package/server/services/workshop/agents/opencode-agent/engine-agnostic.ts +274 -0
- package/server/services/workshop/agents/opencode-agent/facade.ts +8 -0
- package/server/services/workshop/agents/opencode-agent/helpers.ts +29 -0
- package/server/services/workshop/agents/opencode-agent/hitl.ts +113 -0
- package/server/services/workshop/agents/opencode-agent/index.ts +16 -0
- package/server/services/workshop/agents/opencode-agent/lifecycle.ts +44 -0
- package/server/services/workshop/agents/opencode-agent/server.ts +244 -0
- package/server/services/workshop/agents/opencode-agent/turn.ts +278 -0
- package/server/services/workshop/agents/opencode-agent/types.ts +54 -0
- package/server/services/workshop/agents/prompt-builder.ts +16 -6
- package/server/services/workshop/agents/qwen-agent.ts +6 -2
- package/server/services/workshop/agents/registry.ts +32 -2
- package/server/services/workshop/aml/job-orchestrator/broadcast.ts +37 -0
- package/server/services/workshop/aml/job-orchestrator/control.ts +94 -0
- package/server/services/workshop/aml/job-orchestrator/failure.ts +77 -0
- package/server/services/workshop/aml/job-orchestrator/index.ts +22 -0
- package/server/services/workshop/aml/job-orchestrator/process.ts +100 -0
- package/server/services/workshop/aml/job-orchestrator/shared.ts +51 -0
- package/server/services/workshop/aml/job-orchestrator/stages.ts +96 -0
- package/server/services/workshop/aml/job-orchestrator/start-job.ts +124 -0
- package/server/services/workshop/aml/job-orchestrator/status.ts +20 -0
- package/server/services/workshop/aml/job-orchestrator/submit.ts +120 -0
- package/server/services/workshop/aml/job-orchestrator/tick.ts +37 -0
- package/server/services/workshop/aml/python/amlkit.py +185 -120
- package/server/services/workshop/aml/python/requirements.txt +9 -7
- package/server/services/workshop/aml/python/train-hybrid-example.py +87 -0
- package/server/services/workshop/aml/twin/acceptance.ts +68 -0
- package/server/services/workshop/aml/twin/calibration-scheduler.ts +48 -0
- package/server/services/workshop/aml/twin/channel-profile.ts +43 -0
- package/server/services/workshop/aml/twin/contracts.ts +215 -0
- package/server/services/workshop/aml/twin/physics-runtime.ts +165 -0
- package/server/services/workshop/aml/twin/repo.ts +26 -0
- package/server/services/workshop/aml/twin/snapshot-service.ts +81 -0
- package/server/services/workshop/aml/twin/trial-service.ts +89 -0
- package/server/services/workshop/aml/twin/uq-ood.ts +66 -0
- package/server/services/workshop/daq/daq-controller/contracts.ts +39 -0
- package/server/services/workshop/daq/daq-controller/crud.ts +202 -0
- package/server/services/workshop/daq/daq-controller/driver-probe.ts +64 -0
- package/server/services/workshop/daq/daq-controller/facade.ts +28 -0
- package/server/services/workshop/daq/daq-controller/frames.ts +137 -0
- package/server/services/workshop/daq/daq-controller/helpers.ts +52 -0
- package/server/services/workshop/daq/daq-controller/index.ts +22 -0
- package/server/services/workshop/daq/daq-controller/ingest.ts +189 -0
- package/server/services/workshop/daq/daq-controller/runtime-control.ts +72 -0
- package/server/services/workshop/daq/daq-controller/state.ts +194 -0
- package/server/services/workshop/daq/daq-controller/sweep-alarms.ts +164 -0
- package/server/services/workshop/daq/daq-controller/tsdb-twin.ts +138 -0
- package/server/services/workshop/daq/daq-controller/types.ts +68 -0
- package/server/services/workshop/daq/daq-controller/views.ts +84 -0
- package/server/services/workshop/daq/drivers/http.ts +95 -0
- package/server/services/workshop/daq/drivers/index.ts +29 -0
- package/server/services/workshop/daq/drivers/mock.ts +130 -0
- package/server/services/workshop/daq/drivers/modbus-rtu.ts +67 -0
- package/server/services/workshop/daq/drivers/modbus-tcp.ts +307 -0
- package/server/services/workshop/daq/drivers/mqtt.ts +182 -0
- package/server/services/workshop/daq/drivers/opcua.ts +227 -0
- package/server/services/workshop/daq/drivers/registry.ts +144 -0
- package/server/services/workshop/daq/drivers/s7-stub.ts +29 -0
- package/server/services/workshop/daq/drivers/shared.ts +60 -0
- package/server/services/workshop/db/channel-member.repo.ts +122 -0
- package/server/services/workshop/db/channel.repo.ts +93 -8
- package/server/services/workshop/db/chat-message.repo.ts +233 -0
- package/server/services/workshop/db/database/index.ts +18 -0
- package/server/services/workshop/db/database/json.ts +14 -0
- package/server/services/workshop/db/database/migrations.ts +367 -0
- package/server/services/workshop/db/database/open.ts +76 -0
- package/server/services/workshop/db/database/rows.ts +374 -0
- package/server/services/workshop/db/database/schema.ts +651 -0
- package/server/services/workshop/db/database/seed-data.ts +60 -0
- package/server/services/workshop/db/database/seed.ts +145 -0
- package/server/services/workshop/db/hitl-request.repo.ts +221 -0
- package/server/services/workshop/db/notification.repo.ts +199 -0
- package/server/services/workshop/db/outbox.repo.ts +127 -0
- package/server/services/workshop/db/scheduled-task.repo.ts +235 -0
- package/server/services/workshop/db/schema.sql +185 -0
- package/server/services/workshop/db/task.repo.ts +185 -69
- package/server/services/workshop/db/transaction.ts +72 -0
- package/server/services/workshop/dcw/dcw-controller/actuation.ts +127 -0
- package/server/services/workshop/dcw/dcw-controller/bindings.ts +83 -0
- package/server/services/workshop/dcw/dcw-controller/contracts.ts +16 -0
- package/server/services/workshop/dcw/dcw-controller/control.ts +78 -0
- package/server/services/workshop/dcw/dcw-controller/crud.ts +152 -0
- package/server/services/workshop/dcw/dcw-controller/facade.ts +19 -0
- package/server/services/workshop/dcw/dcw-controller/helpers.ts +57 -0
- package/server/services/workshop/dcw/dcw-controller/index.ts +22 -0
- package/server/services/workshop/dcw/dcw-controller/lines.ts +213 -0
- package/server/services/workshop/dcw/dcw-controller/params.ts +97 -0
- package/server/services/workshop/dcw/dcw-controller/products.ts +103 -0
- package/server/services/workshop/dcw/dcw-controller/recipes.ts +137 -0
- package/server/services/workshop/dcw/dcw-controller/state.ts +66 -0
- package/server/services/workshop/dcw/dcw-controller/types.ts +57 -0
- package/server/services/workshop/dcw/dcw-controller/write.ts +147 -0
- package/server/services/workshop/dcw/dcw-node.ts +8 -0
- package/server/services/workshop/dcw/drivers/http.ts +66 -0
- package/server/services/workshop/dcw/drivers/index.ts +26 -0
- package/server/services/workshop/dcw/drivers/mock.ts +44 -0
- package/server/services/workshop/dcw/drivers/modbus-rtu.ts +93 -0
- package/server/services/workshop/dcw/drivers/modbus.ts +139 -0
- package/server/services/workshop/dcw/drivers/mqtt.ts +108 -0
- package/server/services/workshop/dcw/drivers/opcua.ts +110 -0
- package/server/services/workshop/dcw/drivers/registry.ts +118 -0
- package/server/services/workshop/dcw/drivers/shared.ts +113 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/contracts.ts +26 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/facade.ts +13 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/helpers.ts +30 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/index.ts +17 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/internal.ts +33 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/judge.ts +52 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/lock.ts +137 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/rollback.ts +190 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/state.ts +21 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/sweep.ts +77 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/types.ts +3 -0
- package/server/services/workshop/dcw/recipe-rollback-manager/views.ts +214 -0
- package/server/services/workshop/plugins/host/api.mjs +90 -0
- package/server/services/workshop/plugins/host/config.mjs +135 -0
- package/server/services/workshop/plugins/host/index.mjs +23 -0
- package/server/services/workshop/plugins/host/init.mjs +101 -0
- package/server/services/workshop/plugins/host/load.mjs +321 -0
- package/server/services/workshop/plugins/host/reload.mjs +94 -0
- package/server/services/workshop/plugins/host/rollback.mjs +72 -0
- package/server/services/workshop/plugins/host/services.mjs +58 -0
- package/server/services/workshop/plugins/host/state.mjs +54 -0
- package/server/services/workshop/plugins/host/toggle.mjs +64 -0
- package/server/services/workshop/plugins/host.mjs +6 -890
- package/server/services/workshop/runtime/agent-runtime/contracts.ts +25 -0
- package/server/services/workshop/runtime/agent-runtime/facade.ts +7 -0
- package/server/services/workshop/runtime/agent-runtime/helpers.ts +18 -0
- package/server/services/workshop/runtime/agent-runtime/index.ts +19 -0
- package/server/services/workshop/runtime/agent-runtime/lifecycle.ts +119 -0
- package/server/services/workshop/runtime/agent-runtime/message.ts +409 -0
- package/server/services/workshop/runtime/agent-runtime/state.ts +371 -0
- package/server/services/workshop/runtime/agent-runtime/supervise.ts +188 -0
- package/server/services/workshop/runtime/agent-runtime/types.ts +186 -0
- package/server/services/workshop/runtime/channel-runtime.ts +7 -0
- package/server/services/workshop/runtime/chat-mention.ts +164 -0
- package/server/services/workshop/runtime/chat-projection.ts +246 -0
- package/server/services/workshop/runtime/execution-mode.ts +11 -2
- package/server/services/workshop/runtime/manager/a2a.ts +283 -0
- package/server/services/workshop/runtime/manager/access.ts +483 -0
- package/server/services/workshop/runtime/manager/admin-agents.ts +268 -0
- package/server/services/workshop/runtime/manager/admin-channel.ts +276 -0
- package/server/services/workshop/runtime/manager/bus.ts +182 -0
- package/server/services/workshop/runtime/manager/channel-templates.ts +171 -0
- package/server/services/workshop/runtime/manager/chat-reply.ts +181 -0
- package/server/services/workshop/runtime/manager/chat.ts +384 -0
- package/server/services/workshop/runtime/manager/contracts.ts +210 -0
- package/server/services/workshop/runtime/manager/facade.ts +24 -0
- package/server/services/workshop/runtime/manager/helpers.ts +119 -0
- package/server/services/workshop/runtime/manager/host-tools.ts +249 -0
- package/server/services/workshop/runtime/manager/index.ts +42 -0
- package/server/services/workshop/runtime/manager/internal.ts +73 -0
- package/server/services/workshop/runtime/manager/lead-team.ts +161 -0
- package/server/services/workshop/runtime/manager/notifications.ts +108 -0
- package/server/services/workshop/runtime/manager/runtime-observe.ts +300 -0
- package/server/services/workshop/runtime/manager/runtime-wiring.ts +307 -0
- package/server/services/workshop/runtime/manager/schedules.ts +302 -0
- package/server/services/workshop/runtime/manager/state.ts +644 -0
- package/server/services/workshop/runtime/manager/tasks.ts +518 -0
- package/server/services/workshop/runtime/manager/teams.ts +148 -0
- package/server/services/workshop/runtime/manager/types.ts +245 -0
- package/server/services/workshop/runtime/manager/workspace.ts +136 -0
- package/server/services/workshop/runtime/memory/contracts.ts +18 -0
- package/server/services/workshop/runtime/memory/facade.ts +10 -0
- package/server/services/workshop/runtime/memory/governance.ts +184 -0
- package/server/services/workshop/runtime/memory/helpers.ts +196 -0
- package/server/services/workshop/runtime/memory/index.ts +27 -0
- package/server/services/workshop/runtime/memory/recall.ts +216 -0
- package/server/services/workshop/runtime/memory/score.ts +33 -0
- package/server/services/workshop/runtime/memory/state.ts +40 -0
- package/server/services/workshop/runtime/memory/types.ts +44 -0
- package/server/services/workshop/runtime/memory/write.ts +93 -0
- package/server/services/workshop/runtime/permission-scope.ts +81 -0
- package/server/services/workshop/runtime/schedule-runtime.ts +320 -0
- package/server/services/workshop/runtime/scheduler-loop/contracts.ts +29 -0
- package/server/services/workshop/runtime/scheduler-loop/execute.ts +295 -0
- package/server/services/workshop/runtime/scheduler-loop/facade.ts +7 -0
- package/server/services/workshop/runtime/scheduler-loop/helpers.ts +14 -0
- package/server/services/workshop/runtime/scheduler-loop/index.ts +16 -0
- package/server/services/workshop/runtime/scheduler-loop/rules.ts +131 -0
- package/server/services/workshop/runtime/scheduler-loop/snapshot.ts +99 -0
- package/server/services/workshop/runtime/scheduler-loop/state.ts +150 -0
- package/server/services/workshop/runtime/scheduler-loop/tick.ts +157 -0
- package/server/services/workshop/runtime/scheduler-loop/types.ts +50 -0
- package/server/services/workshop/runtime/task-engine/contracts.ts +16 -0
- package/server/services/workshop/runtime/task-engine/create.ts +145 -0
- package/server/services/workshop/runtime/task-engine/facade.ts +7 -0
- package/server/services/workshop/runtime/task-engine/helpers.ts +87 -0
- package/server/services/workshop/runtime/task-engine/index.ts +15 -0
- package/server/services/workshop/runtime/task-engine/lease.ts +79 -0
- package/server/services/workshop/runtime/task-engine/lifecycle.ts +308 -0
- package/server/services/workshop/runtime/task-engine/policy.ts +113 -0
- package/server/services/workshop/runtime/task-engine/transition.ts +146 -0
- package/server/services/workshop/runtime/task-engine/types.ts +3 -0
- package/server/services/workshop/runtime/task-engine/update.ts +116 -0
- package/server/services/workshop/runtime/task-engine/views.ts +169 -0
- package/server/services/workshop/runtime/user-notification-hub.ts +192 -0
- package/server/services/workshop/settings.ts +32 -0
- package/server/services/workshop/types/task.ts +85 -0
- package/server/utils/errors.ts +2 -0
- package/server/utils/mojibake-guard.ts +29 -0
- package/shared/config/schema.json +12 -0
- package/shared/dcw-protocol/catalog.ts +203 -0
- package/shared/dcw-protocol/closed-loop.ts +137 -0
- package/shared/dcw-protocol/index.ts +19 -0
- package/shared/dcw-protocol/line.ts +131 -0
- package/shared/dcw-protocol/recipe.ts +301 -0
- package/shared/workshop-protocol.ts +327 -5
- package/tui/aw-tui.mjs +27 -6
- package/tui/lib/pickers.mjs +21 -2
- package/.output/public/_nuxt/4sIEbgcl.js +0 -42
- package/.output/public/_nuxt/88GOowgO2.js +0 -1
- package/.output/public/_nuxt/B7gZokg82.js +0 -209
- package/.output/public/_nuxt/BC9wjTJK2.js +0 -4
- package/.output/public/_nuxt/BCGafdXT.js +0 -2
- package/.output/public/_nuxt/BDmh31hl.js +0 -1
- package/.output/public/_nuxt/BFjGV-RV2.js +0 -4108
- package/.output/public/_nuxt/BHA40aHa.js +0 -1
- package/.output/public/_nuxt/BJHKLJJU.js +0 -1
- package/.output/public/_nuxt/BN16aRdQ.js +0 -1
- package/.output/public/_nuxt/BN6iuJEg2.js +0 -1
- package/.output/public/_nuxt/BU83-NnX.js +0 -106
- package/.output/public/_nuxt/BWVhZntO.js +0 -1
- package/.output/public/_nuxt/BXxH0UQE.js +0 -1
- package/.output/public/_nuxt/BYhEUx8t.js +0 -17
- package/.output/public/_nuxt/BneN7fbu.js +0 -75
- package/.output/public/_nuxt/BsROmY89.js +0 -1
- package/.output/public/_nuxt/C0ZrS1KL.js +0 -19
- package/.output/public/_nuxt/C3J6FYKa.js +0 -1
- package/.output/public/_nuxt/C3gwHTz0.js +0 -1
- package/.output/public/_nuxt/C4DWUZ6d2.js +0 -1
- package/.output/public/_nuxt/C4oW1HsE.js +0 -1
- package/.output/public/_nuxt/C4s_niy-.js +0 -14
- package/.output/public/_nuxt/CClOy-Hz2.js +0 -1
- package/.output/public/_nuxt/CFxtLwjp.js +0 -1
- package/.output/public/_nuxt/CS50LB_l.js +0 -1
- package/.output/public/_nuxt/CSkxz2NX.js +0 -3
- package/.output/public/_nuxt/CWoJjWmZ.js +0 -1
- package/.output/public/_nuxt/CYWVXZTS2.js +0 -7
- package/.output/public/_nuxt/C__m4EhR.js +0 -1
- package/.output/public/_nuxt/CoNpEq5X.js +0 -1
- package/.output/public/_nuxt/Crod5z2f.js +0 -1
- package/.output/public/_nuxt/CssgYAAL2.js +0 -1
- package/.output/public/_nuxt/CzlMDL5H.js +0 -13
- package/.output/public/_nuxt/D0ZBQrN_2.js +0 -1
- package/.output/public/_nuxt/D6mbFA-a.js +0 -1
- package/.output/public/_nuxt/D6uzXueg.js +0 -2
- package/.output/public/_nuxt/D98NH8kG.js +0 -1
- package/.output/public/_nuxt/D9Oidm5I.js +0 -1
- package/.output/public/_nuxt/DBHNsT1Y.js +0 -23
- package/.output/public/_nuxt/DDgJcSET.js +0 -19
- package/.output/public/_nuxt/DGIuvyRN2.js +0 -1
- package/.output/public/_nuxt/DGbd-UiG.js +0 -1
- package/.output/public/_nuxt/DGj-WEBg.js +0 -1
- package/.output/public/_nuxt/DHFrCUxA2.js +0 -13
- package/.output/public/_nuxt/DIaZ2PTo2.js +0 -1
- package/.output/public/_nuxt/DPnwL14Y.js +0 -1
- package/.output/public/_nuxt/DR12_WCA.js +0 -3
- package/.output/public/_nuxt/DS8qj8EL.js +0 -1
- package/.output/public/_nuxt/DTFCy6h-.js +0 -1
- package/.output/public/_nuxt/DUjW5Yq5.js +0 -1
- package/.output/public/_nuxt/DYr1VMiQ.js +0 -6
- package/.output/public/_nuxt/DZtm4l-P2.js +0 -1
- package/.output/public/_nuxt/D_OTvQza.js +0 -1
- package/.output/public/_nuxt/Dap5PmTL.js +0 -2
- package/.output/public/_nuxt/DdD9mCHM.js +0 -1
- package/.output/public/_nuxt/DeJykBFf.js +0 -9
- package/.output/public/_nuxt/DeyBFhKH2.js +0 -4
- package/.output/public/_nuxt/DkGQ7lnb2.js +0 -1
- package/.output/public/_nuxt/Dqw1lpr-.js +0 -1
- package/.output/public/_nuxt/DtYHUi5Z.js +0 -1
- package/.output/public/_nuxt/DvLxILQP.js +0 -1
- package/.output/public/_nuxt/Dz_Q3Lpw2.js +0 -1
- package/.output/public/_nuxt/DzbFpZRk.js +0 -3
- package/.output/public/_nuxt/IREZ1eC2.js +0 -1
- package/.output/public/_nuxt/JCoYF4IJ.js +0 -31
- package/.output/public/_nuxt/JTLM-kqr2.js +0 -1
- package/.output/public/_nuxt/KZQX7xoM.js +0 -3
- package/.output/public/_nuxt/OmpTerminalPanel.B_Pl5Ynm.css +0 -1
- package/.output/public/_nuxt/RYFtK4qZ2.js +0 -1
- package/.output/public/_nuxt/TownView.f-YOdXRs.css +0 -1
- package/.output/public/_nuxt/YnQxK3eG.js +0 -1
- package/.output/public/_nuxt/_id_.D9ymtHB5.css +0 -1
- package/.output/public/_nuxt/_id_.jf-_8E_c.css +0 -1
- package/.output/public/_nuxt/_wsId_.B4WiqkIS.css +0 -1
- package/.output/public/_nuxt/aLLjF2K-2.js +0 -1
- package/.output/public/_nuxt/aWWIh8YL.js +0 -24
- package/.output/public/_nuxt/agents.ZD0rVdHE.css +0 -1
- package/.output/public/_nuxt/aml.BN8ZEW4h.css +0 -1
- package/.output/public/_nuxt/builds/meta/78a295bb-2072-48a4-8b46-6d545fdae743.json +0 -1
- package/.output/public/_nuxt/ca4TJ3Op.js +0 -1
- package/.output/public/_nuxt/channel-templates.BOtahzPi.css +0 -1
- package/.output/public/_nuxt/daq.DjSgY94l.css +0 -1
- package/.output/public/_nuxt/dcw.8Y7FqCVN.css +0 -1
- package/.output/public/_nuxt/default.J32SgqFY.css +0 -1
- package/.output/public/_nuxt/entry.bdm0tv6M.css +0 -1
- package/.output/public/_nuxt/eqq3wWQF.js +0 -18
- package/.output/public/_nuxt/jZsY8yYz.js +0 -1
- package/.output/public/_nuxt/logs.BpKzmKsh.css +0 -1
- package/.output/public/_nuxt/monitor.D9pe7qN6.css +0 -1
- package/.output/public/_nuxt/pages.D7aSDlUI.css +0 -1
- package/.output/public/_nuxt/pdk8jLGT.js +0 -1
- package/.output/public/_nuxt/permissions.DwTVlFe6.css +0 -1
- package/.output/public/_nuxt/plugins.sb4nDGqr.css +0 -1
- package/.output/public/_nuxt/qr6R6Ha1.js +0 -1
- package/.output/public/_nuxt/settings.BTgR-NiE.css +0 -1
- package/.output/public/_nuxt/teams.CxnxKVVs.css +0 -1
- package/.output/public/_nuxt/tokens.BFY7qv4f.css +0 -1
- package/.output/public/_nuxt/town.BLrD9-WH.css +0 -1
- package/.output/public/_nuxt/users.DLgZ1D0h.css +0 -1
- package/.output/public/_nuxt/vRTjoWqd.js +0 -1
- package/.output/public/_nuxt/workshop.CR_QzeAN.css +0 -1
- package/.output/public/_nuxt/xh3_vYcu.js +0 -1
- package/.output/public/_nuxt/yF0aYMF1.js +0 -4
- package/.output/public/_nuxt/zq5t1vyX.js +0 -1
- package/.output/server/chunks/build/Checkbox-eax2M3o-.mjs +0 -207
- package/.output/server/chunks/build/Checkbox-eax2M3o-.mjs.map +0 -1
- package/.output/server/chunks/build/OmpTerminalPanel-Cu_s4i0A.mjs +0 -915
- package/.output/server/chunks/build/OmpTerminalPanel-Cu_s4i0A.mjs.map +0 -1
- package/.output/server/chunks/build/PluginSlot-CcR4Ys3T.mjs +0 -400
- package/.output/server/chunks/build/PluginSlot-CcR4Ys3T.mjs.map +0 -1
- package/.output/server/chunks/build/TownView--otsnr_7.mjs +0 -2790
- package/.output/server/chunks/build/TownView--otsnr_7.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-Brv-JSvr.mjs +0 -803
- package/.output/server/chunks/build/_id_-Brv-JSvr.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-D9pl1OZy.mjs +0 -381
- package/.output/server/chunks/build/_id_-D9pl1OZy.mjs.map +0 -1
- package/.output/server/chunks/build/_wsId_-BASfDf0s.mjs +0 -10066
- package/.output/server/chunks/build/_wsId_-BASfDf0s.mjs.map +0 -1
- package/.output/server/chunks/build/agents-CLQqJF2y.mjs +0 -1111
- package/.output/server/chunks/build/agents-CLQqJF2y.mjs.map +0 -1
- package/.output/server/chunks/build/aml-_7FdFL2p.mjs +0 -588
- package/.output/server/chunks/build/aml-_7FdFL2p.mjs.map +0 -1
- package/.output/server/chunks/build/api-error-dul30BYQ.mjs +0 -47
- package/.output/server/chunks/build/api-error-dul30BYQ.mjs.map +0 -1
- package/.output/server/chunks/build/apiClient-BwnfOQU8.mjs +0 -81
- package/.output/server/chunks/build/apiClient-BwnfOQU8.mjs.map +0 -1
- package/.output/server/chunks/build/button-DEcZFcqN.mjs +0 -1938
- package/.output/server/chunks/build/button-DEcZFcqN.mjs.map +0 -1
- package/.output/server/chunks/build/card-Dipvaykh.mjs +0 -955
- package/.output/server/chunks/build/card-Dipvaykh.mjs.map +0 -1
- package/.output/server/chunks/build/channel-templates-p6SZNjlM.mjs +0 -835
- package/.output/server/chunks/build/channel-templates-p6SZNjlM.mjs.map +0 -1
- package/.output/server/chunks/build/checkbox-8fB-wI-T.mjs +0 -439
- package/.output/server/chunks/build/checkbox-8fB-wI-T.mjs.map +0 -1
- package/.output/server/chunks/build/client-only-D5BzSQc6.mjs +0 -43
- package/.output/server/chunks/build/client-only-D5BzSQc6.mjs.map +0 -1
- package/.output/server/chunks/build/daq-DkMvD8sg.mjs +0 -1058
- package/.output/server/chunks/build/daq-DkMvD8sg.mjs.map +0 -1
- package/.output/server/chunks/build/dcw-C1jgVJkO.mjs +0 -249
- package/.output/server/chunks/build/dcw-C1jgVJkO.mjs.map +0 -1
- package/.output/server/chunks/build/default-BE4r0FZN.mjs +0 -1486
- package/.output/server/chunks/build/default-BE4r0FZN.mjs.map +0 -1
- package/.output/server/chunks/build/drawer-Cmh90erI.mjs +0 -836
- package/.output/server/chunks/build/drawer-Cmh90erI.mjs.map +0 -1
- package/.output/server/chunks/build/dropdown-CGQ0KAzA.mjs +0 -14
- package/.output/server/chunks/build/dropdown-CGQ0KAzA.mjs.map +0 -1
- package/.output/server/chunks/build/dropdown-vhn1NPFs.mjs +0 -558
- package/.output/server/chunks/build/dropdown-vhn1NPFs.mjs.map +0 -1
- package/.output/server/chunks/build/initDefaultProps-DIbWwP4R.mjs +0 -21
- package/.output/server/chunks/build/initDefaultProps-DIbWwP4R.mjs.map +0 -1
- package/.output/server/chunks/build/input-number-DzpyYB99.mjs +0 -1521
- package/.output/server/chunks/build/input-number-DzpyYB99.mjs.map +0 -1
- package/.output/server/chunks/build/input-sf_BT6o6.mjs +0 -2617
- package/.output/server/chunks/build/input-sf_BT6o6.mjs.map +0 -1
- package/.output/server/chunks/build/logs--dByNyhw.mjs +0 -198
- package/.output/server/chunks/build/logs--dByNyhw.mjs.map +0 -1
- package/.output/server/chunks/build/menu-WCrlpYVh.mjs +0 -1950
- package/.output/server/chunks/build/menu-WCrlpYVh.mjs.map +0 -1
- package/.output/server/chunks/build/modal-yvUquPj5.mjs +0 -1272
- package/.output/server/chunks/build/modal-yvUquPj5.mjs.map +0 -1
- package/.output/server/chunks/build/monitor-C0okQaXz.mjs +0 -2212
- package/.output/server/chunks/build/monitor-C0okQaXz.mjs.map +0 -1
- package/.output/server/chunks/build/pages-B0bUWnC6.mjs +0 -512
- package/.output/server/chunks/build/pages-B0bUWnC6.mjs.map +0 -1
- package/.output/server/chunks/build/permissions-68SsNjex.mjs +0 -629
- package/.output/server/chunks/build/permissions-68SsNjex.mjs.map +0 -1
- package/.output/server/chunks/build/plugins-lGlUr1lj.mjs +0 -240
- package/.output/server/chunks/build/plugins-lGlUr1lj.mjs.map +0 -1
- package/.output/server/chunks/build/popconfirm-CRaHcz5O.mjs +0 -342
- package/.output/server/chunks/build/popconfirm-CRaHcz5O.mjs.map +0 -1
- package/.output/server/chunks/build/segmented-3TrWo0lS.mjs +0 -5047
- package/.output/server/chunks/build/segmented-3TrWo0lS.mjs.map +0 -1
- package/.output/server/chunks/build/select-D-CeE5vY.mjs +0 -3923
- package/.output/server/chunks/build/select-D-CeE5vY.mjs.map +0 -1
- package/.output/server/chunks/build/settings-Ddd1qx2Z.mjs +0 -1174
- package/.output/server/chunks/build/settings-Ddd1qx2Z.mjs.map +0 -1
- package/.output/server/chunks/build/space-CCBYAkXt.mjs +0 -197
- package/.output/server/chunks/build/space-CCBYAkXt.mjs.map +0 -1
- package/.output/server/chunks/build/spin-HVY81X_L.mjs +0 -358
- package/.output/server/chunks/build/spin-HVY81X_L.mjs.map +0 -1
- package/.output/server/chunks/build/switch-CelRXpcy.mjs +0 -377
- package/.output/server/chunks/build/switch-CelRXpcy.mjs.map +0 -1
- package/.output/server/chunks/build/table-BjSWwmic.mjs +0 -8883
- package/.output/server/chunks/build/table-BjSWwmic.mjs.map +0 -1
- package/.output/server/chunks/build/tabs-BM3tAh_J.mjs +0 -1925
- package/.output/server/chunks/build/tabs-BM3tAh_J.mjs.map +0 -1
- package/.output/server/chunks/build/tag-DNE9vXc0.mjs +0 -1029
- package/.output/server/chunks/build/tag-DNE9vXc0.mjs.map +0 -1
- package/.output/server/chunks/build/teams-MEDLZdMn.mjs +0 -1215
- package/.output/server/chunks/build/teams-MEDLZdMn.mjs.map +0 -1
- package/.output/server/chunks/build/tokens-C7fTM5C2.mjs +0 -888
- package/.output/server/chunks/build/tokens-C7fTM5C2.mjs.map +0 -1
- package/.output/server/chunks/build/town-BUqRobze.mjs +0 -52
- package/.output/server/chunks/build/town-BUqRobze.mjs.map +0 -1
- package/.output/server/chunks/build/town-CoQdblbZ.mjs +0 -124
- package/.output/server/chunks/build/town-CoQdblbZ.mjs.map +0 -1
- package/.output/server/chunks/build/useDaqStream-DfCFpb3p.mjs +0 -395
- package/.output/server/chunks/build/useDaqStream-DfCFpb3p.mjs.map +0 -1
- package/.output/server/chunks/build/useDcwStream-UPiX-3iO.mjs +0 -435
- package/.output/server/chunks/build/useDcwStream-UPiX-3iO.mjs.map +0 -1
- package/.output/server/chunks/build/useDeviceTwins-Yko6nNPF.mjs +0 -128
- package/.output/server/chunks/build/useDeviceTwins-Yko6nNPF.mjs.map +0 -1
- package/.output/server/chunks/build/useOpsLog-CO_VWh7t.mjs +0 -137
- package/.output/server/chunks/build/useOpsLog-CO_VWh7t.mjs.map +0 -1
- package/.output/server/chunks/build/useWorkshopApi-NyjL0L3j.mjs +0 -90
- package/.output/server/chunks/build/useWorkshopApi-NyjL0L3j.mjs.map +0 -1
- package/.output/server/chunks/build/useWorkshopWs-C_I7q9As.mjs +0 -1319
- package/.output/server/chunks/build/useWorkshopWs-C_I7q9As.mjs.map +0 -1
- package/.output/server/chunks/build/users-Cfd5-l2-.mjs +0 -561
- package/.output/server/chunks/build/users-Cfd5-l2-.mjs.map +0 -1
- package/.output/server/chunks/build/workshop-BL5bhfs0.mjs +0 -931
- package/.output/server/chunks/build/workshop-BL5bhfs0.mjs.map +0 -1
- package/.output/server/chunks/build/workspaces-Bgz5Ekwp.mjs +0 -139
- package/.output/server/chunks/build/workspaces-Bgz5Ekwp.mjs.map +0 -1
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.continue.json +0 -1
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.json +0 -1
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/054bb4bc4e4217a2ab0b0c6b663747214a9af464f5568ea60e784704e340bb0f.source +0 -153
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/0554197c3d2bac203a1f5c48a5d52495d1336db1bd7aa4f4c19875810363e684.source +0 -153
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/05c203d12a954fffba942e1d626e3f5fec05b18a5aef2bac003b7884a4b77406.source +0 -431
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/145a6e6ba811af35aed31e0cc3211f53706a14980fa069ee9e3c1591139f96f0.source +0 -180
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/1ae0fb281f97899c025e368ca73f41349b01fb5f85b19e08d7ebccff49095ed5.source +0 -112
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/20ee9967aa0541c516db7575bdd4a1a745939bc7016bd10d7635903113edb8ec.source +0 -227
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/233751843aeba9d4c5263f275b8102de00443c06f286918cbd23e0b6729e01aa.source +0 -131
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/263c2e05b425e5c322e60c6475279f963bab3a873eb521b21df7fec935a46597.source +0 -160
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/2ac5eaac28eaaee2178c4b32014df8e732f9dd432a285a872f5b7f31c1395fa4.source +0 -157
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/33a0db0d2d95d2c11d0720090458e5fba1425376f5ceb5b422d1d3471be3226b.source +0 -348
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/359e474ae83db35e4615d3728de6bf694b64d4dce9b536730a3b6518f9c0494a.source +0 -296
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/37a4c3c31c4b70f6b719c53d1e9c4fcba603f31adfdd11bb6ef9f0d094923c56.source +0 -285
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/461feca1c14a695eb8b0f17a6f95fe97eeceabc0510faaea4ba6d25bde147d8d.source +0 -217
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/4cfadbda8591f29d5e1e230dc000e701b756e850441b3900fb596a4d2f6e98c2.source +0 -301
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/50ca2810cf0b248c96948994c0c404531bbad6e553166b6816b3b03bfa0f75d2.source +0 -151
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/52d9e8cb591a9ae86e238c3620a610cd386717bee222c0f37b25b2ac7e523dc4.source +0 -135
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/6c87daafa4c006560a954636a97333f6123153c9d34d96203f7ee3a14e556357.source +0 -156
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/77bc47854b577900621cacf1697f81fa2bc005af129d37614a97a3441c08f99f.source +0 -72
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/7bbb789d3a527817118cf8399ed1861d6a962ade10878fd07223435d333a7089.source +0 -469
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/86b7c1daafc8b60ba9982dde5bf1bcc74265709483c176e71f23ec6fc267451f.source +0 -259
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/8df66d62bd41984d0970e8236882080c5085ac937d07a29779463d6a03b37c76.source +0 -97
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/9962f2d1b3a85137bd40cc835725600b39f89ee02a27c06b2e0402e1eafde115.source +0 -277
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/a1090ea066b792cb201739f4994e37bf7c12f52e805239a1eab87f18a537f266.source +0 -171
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/a5241091650134d0919897e086a606a3846c8b2b54f8b4c84a8696c145ac3e9e.source +0 -425
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/af19fa4c6e34d5540028be4b17600161283af3a2a2dfc61a3fdc0834436a0c14.source +0 -99
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/b3713d78e2b2f93905ff6be8d58a8d0a2f42dea322eb67c987fda22ff6a084d5.source +0 -325
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/b3849943c3aff102d1af815631fc843a2a52c17646a4b04696ece323e483bbec.source +0 -332
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/bac735a3803a6650b7f1eb8f587e6dc5c68ea055000c3c99a11789438b78e837.source +0 -43
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/d32c24d61eb8b33c73e5a8fc7e4dc7ef437aed238ee4371c2b00617e6104090a.source +0 -154
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/d5170dc9a9879fda04fdf91d8a110d4efb6787ee38dda596d4da899883d36a72.source +0 -531
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/dc59bcd7bb397be63ba2f2c3fec23f3782dcb17d2d75a9981eeced761f33eb32.source +0 -439
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/eb5ff8cf66b92aec7bf6726781d8df74faa2b030c3aaac17d6b00c1fc04c9b32.source +0 -323
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/f10615a6fae18436e70d1201b2d44fdae3174a3aa7bb4db97dea1b3ed291d721.source +0 -433
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/f36d3e271668bc1260c2823542d22dbf1d0f7041ff16b1ac175bce2256e582ca.source +0 -280
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/f94449380af09f31ac352152007146a75cc80bae8d6411ffe57b2c56f933b0ff.source +0 -117
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/fe4dfd81178fd6b648335f6405d9ede71319aebde796008e50db21f8adf44c99.source +0 -160
- package/scripts/.mimosa/hook-state/sess_aeaecb58-8833-4b83-b93c-050467d21e03.mtxwtxme-61028-1f4519fbc4.baseline/ffb4e3aa548cfdadabaa44ab599f9b6a3ca6288176a2cc7a4b2fc2a12b5fb848.source +0 -101
- package/scripts/.mimosa/hook-status/sess_aeaecb58-8833-4b83-b93c-050467d21e03-d944d71bb3.json +0 -14
- package/scripts/_dbg-audit-all-pages.mjs +0 -43
- package/scripts/_dbg-daq-frames-e2e.mjs +0 -118
- package/scripts/_dbg-daq-rowstyle-verify.mjs +0 -112
- package/scripts/_dbg-hitl-timeout-e2e.mjs +0 -93
- package/scripts/_dbg-live-line-e2e.mjs +0 -279
- package/scripts/_dbg-minimal-omp.mjs +0 -77
- package/scripts/_dbg-mode-nav.mjs +0 -173
- package/scripts/_dbg-real-scenario-timeline.log +0 -55
- package/scripts/_dbg-team-repro.mjs +0 -76
- package/scripts/_dbg-town-agents-probe.mjs +0 -60
- package/scripts/_dbg-visual-acceptance.mjs +0 -63
- package/scripts/_townview_style.css +0 -1185
- package/scripts/_townview_template.html +0 -1215
- package/scripts/test-agent-brain.ts +0 -135
- package/scripts/test-game-session.ts +0 -160
- package/scripts/test-protocol.ts +0 -156
- package/scripts/verify-game.mjs +0 -477
- package/server/api/workshop/ws.ts +0 -763
- package/server/data/agent-node-bindings.json +0 -554
- package/server/data/daq-templates.json +0 -16
- package/server/data/daqs.json +0 -7464
- package/server/data/dcw-lines.json +0 -1787
- package/server/data/dcw-products.json +0 -1626
- package/server/data/dcw-recipes.json +0 -4672
- package/server/data/dcw-rollback.json +0 -20754
- package/server/data/dcw-runs.json +0 -6354
- package/server/data/dcw-templates.json +0 -146
- package/server/data/dcw-writes.json +0 -15650
- package/server/data/dcws.json +0 -9033
- package/server/data/device-twins.json +0 -133
- package/server/data/line-runs.json +0 -322
- package/server/data/scene-layouts.json +0 -277
- package/server/services/system-config.ts +0 -629
- package/server/services/workshop/agents/adapters/omp-rpc-client.ts +0 -604
- package/server/services/workshop/agents/codex-agent.ts +0 -743
- package/server/services/workshop/agents/harness-terminal.ts +0 -625
- package/server/services/workshop/agents/host-tool-bridge.ts +0 -714
- package/server/services/workshop/agents/industrial-tools.ts +0 -1680
- package/server/services/workshop/agents/omp-agent.ts +0 -1199
- package/server/services/workshop/agents/opencode-agent.ts +0 -960
- package/server/services/workshop/aml/job-orchestrator.ts +0 -639
- package/server/services/workshop/daq/daq-controller.ts +0 -1284
- package/server/services/workshop/daq/drivers.ts +0 -1185
- package/server/services/workshop/db/database.ts +0 -1044
- package/server/services/workshop/dcw/dcw-controller.ts +0 -1176
- package/server/services/workshop/dcw/drivers.ts +0 -731
- package/server/services/workshop/dcw/recipe-rollback-manager.ts +0 -713
- package/server/services/workshop/runtime/agent-runtime.ts +0 -821
- package/server/services/workshop/runtime/manager.ts +0 -3050
- package/server/services/workshop/runtime/memory.ts +0 -681
- package/server/services/workshop/runtime/scheduler-loop.ts +0 -799
- package/server/services/workshop/runtime/task-engine.ts +0 -574
- package/shared/dcw-protocol.ts +0 -747
- /package/.output/public/_nuxt/{BrIJiJSN.js → BrIJiJSN2.js} +0 -0
- /package/.output/public/_nuxt/{CNs_Ozdc2.js → CNs_Ozdc.js} +0 -0
- /package/.output/public/_nuxt/{DIOBYJe3.js → DIOBYJe32.js} +0 -0
- /package/.output/public/_nuxt/{lO5tpDZ5.js → lO5tpDZ52.js} +0 -0
|
@@ -1,2790 +0,0 @@
|
|
|
1
|
-
import { _ as _plugin_vue_export_helper_default, u as useI18n, at as useHttp, b as useUserStore } from '../virtual/entry.mjs';
|
|
2
|
-
import { u as useResponsive } from './useResponsive-BKDMGTHs.mjs';
|
|
3
|
-
import { u as useWorkspacesStore } from './workspaces-Bgz5Ekwp.mjs';
|
|
4
|
-
import { a as apiErrorMessage } from './api-error-dul30BYQ.mjs';
|
|
5
|
-
import { u as useEntitiesStore, a as useWorkshopWs } from './useWorkshopWs-C_I7q9As.mjs';
|
|
6
|
-
import { s as setInterval, n as nowLocalIso } from './useLocalTime-9a4B-aHv.mjs';
|
|
7
|
-
import { u as useTownBus } from './useTownBus-D9SoIsAN.mjs';
|
|
8
|
-
import { u as useDcwStream } from './useDcwStream-UPiX-3iO.mjs';
|
|
9
|
-
import { u as useDaqStream } from './useDaqStream-DfCFpb3p.mjs';
|
|
10
|
-
import { u as useDeviceTwins } from './useDeviceTwins-Yko6nNPF.mjs';
|
|
11
|
-
import { shallowRef, ref, computed, toValue, watch, nextTick, defineComponent, reactive, mergeProps, unref, readonly, getCurrentScope, onScopeDispose, getCurrentInstance, toRef, customRef, useSSRContext } from 'vue';
|
|
12
|
-
import { ssrRenderAttrs, ssrRenderClass, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrRenderComponent, ssrRenderList, ssrRenderStyle, ssrLooseContain, ssrLooseEqual } from 'vue/server-renderer';
|
|
13
|
-
import { bu as DAQ_TEMPLATES } from '../_/nitro.mjs';
|
|
14
|
-
import * as THREE from 'three';
|
|
15
|
-
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
16
|
-
import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';
|
|
17
|
-
|
|
18
|
-
function hashHue(id) {
|
|
19
|
-
if (!id) return 200;
|
|
20
|
-
let h = 0;
|
|
21
|
-
for (const c of id) h = (h * 31 + c.charCodeAt(0)) % 360;
|
|
22
|
-
return h;
|
|
23
|
-
}
|
|
24
|
-
const CHANNEL_HUES = [16, 40, 158, 178, 195, 212, 235, 262];
|
|
25
|
-
function channelColorCss(channelId) {
|
|
26
|
-
const h = CHANNEL_HUES[hashHue(channelId) % CHANNEL_HUES.length];
|
|
27
|
-
return `hsl(${h}, 52%, 60%)`;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function partsToText(parts) {
|
|
31
|
-
return parts.map((p) => {
|
|
32
|
-
var _a;
|
|
33
|
-
return "text" in p ? (_a = p.text) != null ? _a : "" : "data" in p ? JSON.stringify(p.data) : "";
|
|
34
|
-
}).join("\n").trim();
|
|
35
|
-
}
|
|
36
|
-
const truncate = (s, n) => s.length > n ? `${s.slice(0, n)}\u2026` : s;
|
|
37
|
-
function artifactName(a) {
|
|
38
|
-
var _a, _b;
|
|
39
|
-
return ((_a = a.name) == null ? void 0 : _a.trim()) ? a.name : ((_b = a.artifactId) != null ? _b : "").slice(0, 6);
|
|
40
|
-
}
|
|
41
|
-
function eventToBubble(e) {
|
|
42
|
-
var _a, _b, _c, _d, _e, _f;
|
|
43
|
-
switch (e.type) {
|
|
44
|
-
case "agent.message": {
|
|
45
|
-
const msg = e.payload;
|
|
46
|
-
const t = partsToText((_a = msg.parts) != null ? _a : []);
|
|
47
|
-
return t ? { channelId: e.channelId, agentId: e.agentId, kind: "info", text: truncate(t, 220), ttlMs: 3600 } : null;
|
|
48
|
-
}
|
|
49
|
-
case "agent.status.message": {
|
|
50
|
-
const text = String((_b = e.payload.text) != null ? _b : "");
|
|
51
|
-
if (!text) return null;
|
|
52
|
-
return { channelId: e.channelId, agentId: e.agentId, kind: "info", text: truncate(text, 220), ttlMs: 2600 };
|
|
53
|
-
}
|
|
54
|
-
case "a2a.message": {
|
|
55
|
-
const msg = e.payload;
|
|
56
|
-
const t = partsToText((_c = msg.parts) != null ? _c : []);
|
|
57
|
-
return t ? { channelId: e.channelId, agentId: e.agentId, kind: "info", text: truncate(t, 200), ttlMs: 3200 } : null;
|
|
58
|
-
}
|
|
59
|
-
case "a2a.artifact": {
|
|
60
|
-
const p = e.payload;
|
|
61
|
-
const a = p == null ? void 0 : p.artifact;
|
|
62
|
-
if (!a) return null;
|
|
63
|
-
const body = partsToText((_d = a.parts) != null ? _d : []);
|
|
64
|
-
return {
|
|
65
|
-
channelId: e.channelId,
|
|
66
|
-
agentId: e.agentId,
|
|
67
|
-
kind: "artifact",
|
|
68
|
-
text: `\u4EA4\u4ED8\u300C${artifactName(a)}\u300D${body ? ` \xB7 ${truncate(body, 120)}` : ""}`,
|
|
69
|
-
ttlMs: 3200
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
case "error": {
|
|
73
|
-
const p = e.payload;
|
|
74
|
-
return { channelId: e.channelId, agentId: e.agentId, kind: "error", text: `\u26A0 ${(_e = p.code) != null ? _e : "ERROR"} ${truncate((_f = p.message) != null ? _f : "", 160)}`, ttlMs: 4200 };
|
|
75
|
-
}
|
|
76
|
-
default:
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function mapEnvelopeToIntent(e) {
|
|
81
|
-
const bubble = eventToBubble(e);
|
|
82
|
-
switch (e.type) {
|
|
83
|
-
case "agent.status":
|
|
84
|
-
case "agent.member":
|
|
85
|
-
case "task.status":
|
|
86
|
-
case "task.progress":
|
|
87
|
-
return { channelId: e.channelId, agentId: e.agentId, bubble: bubble != null ? bubble : void 0 };
|
|
88
|
-
case "agent.message":
|
|
89
|
-
case "agent.status.message":
|
|
90
|
-
case "a2a.message":
|
|
91
|
-
case "a2a.artifact":
|
|
92
|
-
case "error":
|
|
93
|
-
return { channelId: e.channelId, agentId: e.agentId, bubble: bubble != null ? bubble : void 0 };
|
|
94
|
-
default:
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
//#region app/composables/workshop/useCharacterAssets.ts
|
|
100
|
-
/**
|
|
101
|
-
* useCharacterAssets —— 角色模型库(前端注册表 + REST 拉取/上传/绑定)。
|
|
102
|
-
*
|
|
103
|
-
* 职责:
|
|
104
|
-
* - 拉取服务端资产清单(GET /api/workshop/assets/character)并 merge 内置约定模型;
|
|
105
|
-
* - 上传新模型(POST /api/workshop/assets/character,multipart);
|
|
106
|
-
* - 删除模型(引删保护 DELETE):仍被绑定 → 提示 used>0;
|
|
107
|
-
* - 绑定模型到某 Agent(PATCH /api/workshop/channels/:cid/agents/:agentId/model)。
|
|
108
|
-
* 单例挂 globalThis,跨组件安全;store 为 reactive(异步加载完成后驱动组件重渲染)。
|
|
109
|
-
*/
|
|
110
|
-
var GLOBAL_KEY$1 = "__characterAssets";
|
|
111
|
-
function fromApi(a) {
|
|
112
|
-
return {
|
|
113
|
-
id: a.id,
|
|
114
|
-
name: a.name,
|
|
115
|
-
file: a.file,
|
|
116
|
-
frames: a.sheet?.frames ?? 4,
|
|
117
|
-
frameWidth: a.sheet?.frameWidth ?? 48,
|
|
118
|
-
frameHeight: a.sheet?.frameHeight ?? 88,
|
|
119
|
-
kind: a.kind === "glb" ? "glb" : a.kind === "dev" ? "dev" : "sheet",
|
|
120
|
-
builtin: a.author === "system",
|
|
121
|
-
applied: (a.appliedTo?.length ?? 0) > 0
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
function createStore$1() {
|
|
125
|
-
const models = [];
|
|
126
|
-
const builtins = [
|
|
127
|
-
{
|
|
128
|
-
id: "knight",
|
|
129
|
-
name: "灰羽骑士",
|
|
130
|
-
file: "/assets/game/character/knight.png",
|
|
131
|
-
frames: 4,
|
|
132
|
-
frameWidth: 48,
|
|
133
|
-
frameHeight: 88,
|
|
134
|
-
kind: "sheet",
|
|
135
|
-
builtin: true,
|
|
136
|
-
applied: false
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: "mage",
|
|
140
|
-
name: "紫晶法师",
|
|
141
|
-
file: "/assets/game/character/mage.png",
|
|
142
|
-
frames: 4,
|
|
143
|
-
frameWidth: 48,
|
|
144
|
-
frameHeight: 88,
|
|
145
|
-
kind: "sheet",
|
|
146
|
-
builtin: true,
|
|
147
|
-
applied: false
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
id: "bot",
|
|
151
|
-
name: "青枢机械",
|
|
152
|
-
file: "/assets/game/character/bot.png",
|
|
153
|
-
frames: 4,
|
|
154
|
-
frameWidth: 48,
|
|
155
|
-
frameHeight: 88,
|
|
156
|
-
kind: "sheet",
|
|
157
|
-
builtin: true,
|
|
158
|
-
applied: false
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
id: "hero-3d",
|
|
162
|
-
name: "标准员工模型",
|
|
163
|
-
file: "/assets/game/character/hero-3d.glb",
|
|
164
|
-
frames: 1,
|
|
165
|
-
frameWidth: 0,
|
|
166
|
-
frameHeight: 0,
|
|
167
|
-
kind: "glb",
|
|
168
|
-
builtin: true,
|
|
169
|
-
applied: false,
|
|
170
|
-
hint: "默认员工 3D 模型"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
id: "yangyang-walk",
|
|
174
|
-
name: "杨杨(走路)",
|
|
175
|
-
file: "/assets/game/character/yangyang-walk.glb",
|
|
176
|
-
frames: 1,
|
|
177
|
-
frameWidth: 0,
|
|
178
|
-
frameHeight: 0,
|
|
179
|
-
kind: "glb",
|
|
180
|
-
builtin: true,
|
|
181
|
-
applied: false,
|
|
182
|
-
hint: "自定义角色:骨骼走路动画(剪辑 WALK;文件较大,建议少量绑定)"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
id: "device-3d",
|
|
186
|
-
name: "工业泵设备",
|
|
187
|
-
file: "/assets/game/character/device-3d.glb",
|
|
188
|
-
frames: 1,
|
|
189
|
-
frameWidth: 0,
|
|
190
|
-
frameHeight: 0,
|
|
191
|
-
kind: "dev",
|
|
192
|
-
builtin: true,
|
|
193
|
-
applied: false,
|
|
194
|
-
hint: "数字孪生实体模型(拖入场景生成设备)"
|
|
195
|
-
}
|
|
196
|
-
];
|
|
197
|
-
const deviceFallbacks = [];
|
|
198
|
-
try {
|
|
199
|
-
const deviceModules = /* #__PURE__ */ Object.assign({});
|
|
200
|
-
for (const [key, url] of Object.entries(deviceModules)) {
|
|
201
|
-
const base = key.split("/").pop() ?? "";
|
|
202
|
-
const id = "dev-folder-" + base.replace(/\.glb$/i, "");
|
|
203
|
-
const servedFile = url.replace(/^\/public\//, "/");
|
|
204
|
-
deviceFallbacks.push({
|
|
205
|
-
id,
|
|
206
|
-
name: base.replace(/\.glb$/i, "").replace(/[-_]/g, " "),
|
|
207
|
-
file: servedFile,
|
|
208
|
-
frames: 1,
|
|
209
|
-
frameWidth: 0,
|
|
210
|
-
frameHeight: 0,
|
|
211
|
-
kind: "dev",
|
|
212
|
-
builtin: true,
|
|
213
|
-
applied: false,
|
|
214
|
-
hint: "设备实体(拖入场景生成数字孪生)"
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
} catch {}
|
|
218
|
-
const headers = (json = true) => {
|
|
219
|
-
const h = {};
|
|
220
|
-
if (json) h["content-type"] = "application/json";
|
|
221
|
-
return h;
|
|
222
|
-
};
|
|
223
|
-
const store = reactive({
|
|
224
|
-
models,
|
|
225
|
-
loaded: false,
|
|
226
|
-
loading: false,
|
|
227
|
-
error: "",
|
|
228
|
-
async load() {
|
|
229
|
-
if (store.loading || store.loaded) return;
|
|
230
|
-
store.loading = true;
|
|
231
|
-
try {
|
|
232
|
-
const [charRes, scanRes] = await Promise.allSettled([fetch("/api/workshop/assets/character", { headers: headers() }), fetch("/api/workshop/assets/devices", { headers: headers() })]);
|
|
233
|
-
const charJson = charRes.status === "fulfilled" ? await charRes.value.json().catch(() => ({})) : {};
|
|
234
|
-
const scanJson = scanRes.status === "fulfilled" ? await scanRes.value.json().catch(() => ({})) : {};
|
|
235
|
-
const apiAssets = charJson?.data?.assets ?? [];
|
|
236
|
-
const scannedDevices = (scanJson?.data?.devices ?? []).map((d) => ({
|
|
237
|
-
id: d.id,
|
|
238
|
-
name: d.name,
|
|
239
|
-
file: d.file,
|
|
240
|
-
frames: 1,
|
|
241
|
-
frameWidth: 0,
|
|
242
|
-
frameHeight: 0,
|
|
243
|
-
kind: "dev",
|
|
244
|
-
builtin: true,
|
|
245
|
-
applied: false,
|
|
246
|
-
hint: "设备实体(拖入场景生成数字孪生)",
|
|
247
|
-
hFactor: typeof d.defaultScale === "number" && d.defaultScale > 0 ? d.defaultScale : 1
|
|
248
|
-
}));
|
|
249
|
-
const builtinFiles = new Set(builtins.map((b) => b.file));
|
|
250
|
-
const scannedCharacters = (scanJson?.data?.characters ?? []).filter((d) => !builtinFiles.has(d.file)).map((d) => ({
|
|
251
|
-
id: d.id,
|
|
252
|
-
name: d.name,
|
|
253
|
-
file: d.file,
|
|
254
|
-
frames: 1,
|
|
255
|
-
frameWidth: 0,
|
|
256
|
-
frameHeight: 0,
|
|
257
|
-
kind: "glb",
|
|
258
|
-
builtin: true,
|
|
259
|
-
applied: false,
|
|
260
|
-
hint: "角色 3D 模型(在频道成员管理中设置)"
|
|
261
|
-
}));
|
|
262
|
-
const merged = [];
|
|
263
|
-
const seen = /* @__PURE__ */ new Set();
|
|
264
|
-
for (const a of apiAssets) {
|
|
265
|
-
merged.push(fromApi(a));
|
|
266
|
-
seen.add(a.id);
|
|
267
|
-
}
|
|
268
|
-
for (const d of scannedDevices) {
|
|
269
|
-
if (seen.has(d.id)) continue;
|
|
270
|
-
merged.push(d);
|
|
271
|
-
seen.add(d.id);
|
|
272
|
-
}
|
|
273
|
-
for (const c of scannedCharacters) {
|
|
274
|
-
if (seen.has(c.id)) continue;
|
|
275
|
-
merged.push(c);
|
|
276
|
-
seen.add(c.id);
|
|
277
|
-
}
|
|
278
|
-
for (const b of builtins) if (!seen.has(b.id)) merged.push(b);
|
|
279
|
-
for (const d of deviceFallbacks) if (!seen.has(d.id)) merged.push(d);
|
|
280
|
-
store.models.splice(0, store.models.length, ...merged);
|
|
281
|
-
store.loaded = true;
|
|
282
|
-
store.error = "";
|
|
283
|
-
} catch (err) {
|
|
284
|
-
store.loaded = false;
|
|
285
|
-
store.error = apiErrorMessage(err);
|
|
286
|
-
} finally {
|
|
287
|
-
store.loading = false;
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
byId(id) {
|
|
291
|
-
return models.find((m) => m.id === id);
|
|
292
|
-
},
|
|
293
|
-
async upload(file, opts) {
|
|
294
|
-
const fd = new FormData();
|
|
295
|
-
fd.append("file", file);
|
|
296
|
-
fd.append("name", opts.name ?? file.name.replace(/\.[^.]+$/, ""));
|
|
297
|
-
fd.append("workspaceId", opts.workspaceId ?? "");
|
|
298
|
-
fd.append("kind", opts.kind ?? "sheet");
|
|
299
|
-
fd.append("frameWidth", String(opts.frameWidth ?? 48));
|
|
300
|
-
fd.append("frameHeight", String(opts.frameHeight ?? 88));
|
|
301
|
-
fd.append("frames", String(opts.frames ?? 4));
|
|
302
|
-
const res = await fetch("/api/workshop/assets/character", {
|
|
303
|
-
method: "POST",
|
|
304
|
-
headers: headers(false),
|
|
305
|
-
body: fd
|
|
306
|
-
});
|
|
307
|
-
const json = await res.json().catch(() => ({}));
|
|
308
|
-
if (!res.ok || !json?.data?.asset) throw new Error(json?.message ?? "上传失败");
|
|
309
|
-
store.loaded = false;
|
|
310
|
-
await store.load();
|
|
311
|
-
return fromApi(json.data.asset);
|
|
312
|
-
},
|
|
313
|
-
async remove(id) {
|
|
314
|
-
const res = await fetch(`/api/workshop/assets/character/${id}`, {
|
|
315
|
-
method: "DELETE",
|
|
316
|
-
headers: headers()
|
|
317
|
-
});
|
|
318
|
-
const json = await res.json().catch(() => ({}));
|
|
319
|
-
if (!res.ok) throw new Error(json?.message ?? "删除失败");
|
|
320
|
-
store.loaded = false;
|
|
321
|
-
await store.load();
|
|
322
|
-
return { used: json?.data?.used ?? 0 };
|
|
323
|
-
},
|
|
324
|
-
async uploadDevice(file, name) {
|
|
325
|
-
const fd = new FormData();
|
|
326
|
-
fd.append("file", file);
|
|
327
|
-
if (name) fd.append("name", name);
|
|
328
|
-
const res = await fetch("/api/workshop/assets/devices", {
|
|
329
|
-
method: "POST",
|
|
330
|
-
headers: headers(false),
|
|
331
|
-
body: fd
|
|
332
|
-
});
|
|
333
|
-
const json = await res.json().catch(() => ({}));
|
|
334
|
-
if (!res.ok || !json?.data?.asset) throw new Error(json?.message ?? "设备模型上传失败");
|
|
335
|
-
store.loaded = false;
|
|
336
|
-
await store.load();
|
|
337
|
-
const a = json.data.asset;
|
|
338
|
-
return {
|
|
339
|
-
id: a.id,
|
|
340
|
-
name: a.name,
|
|
341
|
-
file: a.file,
|
|
342
|
-
frames: 1,
|
|
343
|
-
frameWidth: 0,
|
|
344
|
-
frameHeight: 0,
|
|
345
|
-
kind: "dev",
|
|
346
|
-
builtin: false,
|
|
347
|
-
applied: false,
|
|
348
|
-
hint: "设备实体(拖入场景生成数字孪生)"
|
|
349
|
-
};
|
|
350
|
-
},
|
|
351
|
-
async removeDevice(id) {
|
|
352
|
-
const key = id.replace(/^dev-folder-/, "");
|
|
353
|
-
const res = await fetch(`/api/workshop/assets/devices/${encodeURIComponent(key)}`, {
|
|
354
|
-
method: "DELETE",
|
|
355
|
-
headers: headers()
|
|
356
|
-
});
|
|
357
|
-
const json = await res.json().catch(() => ({}));
|
|
358
|
-
if (!res.ok) throw new Error(json?.message ?? "设备模型删除失败");
|
|
359
|
-
store.loaded = false;
|
|
360
|
-
await store.load();
|
|
361
|
-
},
|
|
362
|
-
async bind(channelId, agentId, modelRef) {
|
|
363
|
-
const res = await fetch(`/api/workshop/channels/${channelId}/agents/${agentId}/model`, {
|
|
364
|
-
method: "PATCH",
|
|
365
|
-
headers: headers(),
|
|
366
|
-
body: JSON.stringify({ modelRef })
|
|
367
|
-
});
|
|
368
|
-
const json = await res.json().catch(() => ({}));
|
|
369
|
-
if (!res.ok) throw new Error(json?.message ?? "绑定失败");
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
return store;
|
|
373
|
-
}
|
|
374
|
-
function useCharacterAssets() {
|
|
375
|
-
const g = globalThis;
|
|
376
|
-
if (!g[GLOBAL_KEY$1]) g[GLOBAL_KEY$1] = createStore$1();
|
|
377
|
-
const store = g[GLOBAL_KEY$1];
|
|
378
|
-
store.load();
|
|
379
|
-
return store;
|
|
380
|
-
}
|
|
381
|
-
//#endregion
|
|
382
|
-
//#region app/components/workshop/town/ModelPreview3D.vue?vue&type=script&setup=true&lang.ts
|
|
383
|
-
var ModelPreview3D_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
384
|
-
__name: "ModelPreview3D",
|
|
385
|
-
__ssrInlineRender: true,
|
|
386
|
-
props: {
|
|
387
|
-
file: { default: "" },
|
|
388
|
-
localFile: { default: null },
|
|
389
|
-
height: { default: 64 }
|
|
390
|
-
},
|
|
391
|
-
setup(__props) {
|
|
392
|
-
/**
|
|
393
|
-
* ModelPreview3D —— 设备模型 GLB 实时 3D 缩略预览(共享渲染器版)。
|
|
394
|
-
*
|
|
395
|
-
* 关键设计:模型库有 12+ 张卡,浏览器 WebGL 活动上下文上限 ~16 —— 每卡独立
|
|
396
|
-
* WebGLRenderer 会让排在后面的卡(薄膜双拉系列)上下文被驱逐 → 黑块。
|
|
397
|
-
* 这里改为模块级共享单渲染器:一个 offscreen WebGL canvas + 单 rAF 循环,
|
|
398
|
-
* 逐槽位渲染后 drawImage 到各卡自己的 2D canvas。上下文恒为 1,GPU 占用受控。
|
|
399
|
-
*/
|
|
400
|
-
const props = __props;
|
|
401
|
-
const hostRef = ref(null);
|
|
402
|
-
const failed = ref(false);
|
|
403
|
-
const loading = ref(false);
|
|
404
|
-
const rigGlobal = globalThis;
|
|
405
|
-
let objectUrl = "";
|
|
406
|
-
function acquireRig() {
|
|
407
|
-
if (rigGlobal.__modelPreviewRig) return rigGlobal.__modelPreviewRig;
|
|
408
|
-
const renderer = new THREE.WebGLRenderer({
|
|
409
|
-
alpha: true,
|
|
410
|
-
antialias: false,
|
|
411
|
-
powerPreference: "low-power"
|
|
412
|
-
});
|
|
413
|
-
renderer.setPixelRatio(Math.min((void 0).devicePixelRatio, 1.5));
|
|
414
|
-
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
|
415
|
-
renderer.toneMappingExposure = 1.15;
|
|
416
|
-
const rig = {
|
|
417
|
-
renderer,
|
|
418
|
-
slots: /* @__PURE__ */ new Set(),
|
|
419
|
-
raf: 0,
|
|
420
|
-
clock: new THREE.Clock()
|
|
421
|
-
};
|
|
422
|
-
let acc = 0;
|
|
423
|
-
const tick = () => {
|
|
424
|
-
rig.raf = requestAnimationFrame(tick);
|
|
425
|
-
const dt = rig.clock.getDelta();
|
|
426
|
-
acc += dt * 1e3;
|
|
427
|
-
if (acc < 1e3 / 30) return;
|
|
428
|
-
const step = acc / 1e3;
|
|
429
|
-
acc = 0;
|
|
430
|
-
for (const s of rig.slots) {
|
|
431
|
-
if (!s.canvas.isConnected || !s.visible) continue;
|
|
432
|
-
if (s.group) s.group.rotation.y += step * s.speed;
|
|
433
|
-
rig.renderer.setSize(s.w, s.h, false);
|
|
434
|
-
rig.renderer.render(s.scene, s.camera);
|
|
435
|
-
s.ctx.clearRect(0, 0, s.w, s.h);
|
|
436
|
-
s.ctx.drawImage(rig.renderer.domElement, 0, 0, s.w, s.h);
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
tick();
|
|
440
|
-
rigGlobal.__modelPreviewRig = rig;
|
|
441
|
-
return rig;
|
|
442
|
-
}
|
|
443
|
-
function releaseRig() {
|
|
444
|
-
const rig = rigGlobal.__modelPreviewRig;
|
|
445
|
-
if (!rig || rig.slots.size > 0) return;
|
|
446
|
-
cancelAnimationFrame(rig.raf);
|
|
447
|
-
rig.renderer.dispose();
|
|
448
|
-
rig.renderer.domElement.remove();
|
|
449
|
-
delete rigGlobal.__modelPreviewRig;
|
|
450
|
-
}
|
|
451
|
-
function buildLighting(scene) {
|
|
452
|
-
try {
|
|
453
|
-
const pmrem = new THREE.PMREMGenerator(rigGlobal.__modelPreviewRig.renderer);
|
|
454
|
-
scene.environment = pmrem.fromScene(new RoomEnvironment(), .04).texture;
|
|
455
|
-
scene.environmentIntensity = .55;
|
|
456
|
-
pmrem.dispose();
|
|
457
|
-
} catch {}
|
|
458
|
-
scene.add(new THREE.HemisphereLight(14674431, 3813157, 1.3));
|
|
459
|
-
const key = new THREE.DirectionalLight(16773855, 2.2);
|
|
460
|
-
key.position.set(3, 4, 2);
|
|
461
|
-
scene.add(key);
|
|
462
|
-
const rim = new THREE.DirectionalLight(4311284, 1);
|
|
463
|
-
rim.position.set(-3, 1, -2.5);
|
|
464
|
-
scene.add(rim);
|
|
465
|
-
}
|
|
466
|
-
function fitObject(obj) {
|
|
467
|
-
const box = new THREE.Box3().setFromObject(obj);
|
|
468
|
-
const size = new THREE.Vector3();
|
|
469
|
-
box.getSize(size);
|
|
470
|
-
const center = box.getCenter(new THREE.Vector3());
|
|
471
|
-
const s = 2 / (Math.max(size.x, Math.max(size.y, size.z)) || 1);
|
|
472
|
-
obj.scale.setScalar(s);
|
|
473
|
-
obj.position.set(-center.x * s, -center.y * s, -center.z * s);
|
|
474
|
-
}
|
|
475
|
-
let slot = null;
|
|
476
|
-
function mountScene(source) {
|
|
477
|
-
if (!hostRef.value || failed.value) return;
|
|
478
|
-
const el = hostRef.value;
|
|
479
|
-
const w = el.clientWidth || 120;
|
|
480
|
-
const h = props.height || 64;
|
|
481
|
-
const rig = acquireRig();
|
|
482
|
-
const canvas = (void 0).createElement("canvas");
|
|
483
|
-
canvas.style.width = "100%";
|
|
484
|
-
canvas.style.height = `${h}px`;
|
|
485
|
-
canvas.width = Math.max(2, Math.round(w * Math.min((void 0).devicePixelRatio, 1.5)));
|
|
486
|
-
canvas.height = Math.max(2, Math.round(h * Math.min((void 0).devicePixelRatio, 1.5)));
|
|
487
|
-
const ctx = canvas.getContext("2d");
|
|
488
|
-
if (!ctx) {
|
|
489
|
-
failed.value = true;
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
el.appendChild(canvas);
|
|
493
|
-
const scene = new THREE.Scene();
|
|
494
|
-
buildLighting(scene);
|
|
495
|
-
const camera = new THREE.PerspectiveCamera(38, w / h, .1, 100);
|
|
496
|
-
camera.position.set(2.4, 1.8, 3.1);
|
|
497
|
-
camera.lookAt(0, 0, 0);
|
|
498
|
-
const group = new THREE.Group();
|
|
499
|
-
scene.add(group);
|
|
500
|
-
slot = {
|
|
501
|
-
canvas,
|
|
502
|
-
ctx,
|
|
503
|
-
scene,
|
|
504
|
-
camera,
|
|
505
|
-
group,
|
|
506
|
-
w: canvas.width,
|
|
507
|
-
h: canvas.height,
|
|
508
|
-
speed: .6,
|
|
509
|
-
visible: false,
|
|
510
|
-
io: null
|
|
511
|
-
};
|
|
512
|
-
if (typeof IntersectionObserver !== "undefined") {
|
|
513
|
-
slot.io = new IntersectionObserver((entries) => {
|
|
514
|
-
for (const e of entries) if (slot) slot.visible = e.isIntersecting;
|
|
515
|
-
});
|
|
516
|
-
slot.io.observe(canvas);
|
|
517
|
-
} else slot.visible = true;
|
|
518
|
-
rig.slots.add(slot);
|
|
519
|
-
loading.value = true;
|
|
520
|
-
new GLTFLoader().load(source, (glt) => {
|
|
521
|
-
const obj = glt.scene;
|
|
522
|
-
if (!slot) return;
|
|
523
|
-
obj.traverse((c) => {
|
|
524
|
-
const m = c;
|
|
525
|
-
if (m.isMesh) {
|
|
526
|
-
m.castShadow = false;
|
|
527
|
-
m.receiveShadow = false;
|
|
528
|
-
}
|
|
529
|
-
});
|
|
530
|
-
fitObject(obj);
|
|
531
|
-
slot.group.add(obj);
|
|
532
|
-
loading.value = false;
|
|
533
|
-
}, void 0, () => {
|
|
534
|
-
loading.value = false;
|
|
535
|
-
failed.value = true;
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
function dispose() {
|
|
539
|
-
if (objectUrl) URL.revokeObjectURL(objectUrl);
|
|
540
|
-
objectUrl = "";
|
|
541
|
-
if (slot) {
|
|
542
|
-
const rig = rigGlobal.__modelPreviewRig;
|
|
543
|
-
slot.io?.disconnect();
|
|
544
|
-
rig?.slots.delete(slot);
|
|
545
|
-
slot.scene.traverse((c) => {
|
|
546
|
-
const mesh = c;
|
|
547
|
-
if (mesh.isMesh) {
|
|
548
|
-
mesh.geometry?.dispose();
|
|
549
|
-
const mats = Array.isArray(mesh.material) ? mesh.material : [mesh.material];
|
|
550
|
-
for (const mat of mats) {
|
|
551
|
-
for (const key of Object.keys(mat)) {
|
|
552
|
-
const v = mat[key];
|
|
553
|
-
if (v && v.isTexture) v.dispose();
|
|
554
|
-
}
|
|
555
|
-
mat?.dispose();
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
|
-
slot.canvas.remove();
|
|
560
|
-
slot = null;
|
|
561
|
-
releaseRig();
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
function startLoad() {
|
|
565
|
-
failed.value = false;
|
|
566
|
-
if (props.localFile) {
|
|
567
|
-
objectUrl = URL.createObjectURL(props.localFile);
|
|
568
|
-
mountScene(objectUrl);
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
if (props.file) mountScene(props.file);
|
|
572
|
-
}
|
|
573
|
-
watch(() => [props.file, props.localFile], () => {
|
|
574
|
-
dispose();
|
|
575
|
-
if (props.localFile ?? (props.file ? props.file : null)) nextTick(() => startLoad());
|
|
576
|
-
});
|
|
577
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
578
|
-
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
579
|
-
ref_key: "hostRef",
|
|
580
|
-
ref: hostRef,
|
|
581
|
-
class: "model-preview-3d",
|
|
582
|
-
style: { height: `${__props.height}px` }
|
|
583
|
-
}, _attrs))} data-v-ed056b0a>`);
|
|
584
|
-
if (unref(loading)) _push(`<div class="mp-loading" data-v-ed056b0a><span class="mp-spin" data-v-ed056b0a></span></div>`);
|
|
585
|
-
else if (unref(failed)) _push(`<div class="mp-failed" data-v-ed056b0a> PREVIEW NA </div>`);
|
|
586
|
-
else _push(`<!---->`);
|
|
587
|
-
_push(`</div>`);
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
//#endregion
|
|
592
|
-
//#region app/components/workshop/town/ModelPreview3D.vue
|
|
593
|
-
var _sfc_setup$4 = ModelPreview3D_vue_vue_type_script_setup_true_lang_default.setup;
|
|
594
|
-
ModelPreview3D_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
595
|
-
const ssrContext = useSSRContext();
|
|
596
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/workshop/town/ModelPreview3D.vue");
|
|
597
|
-
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
598
|
-
};
|
|
599
|
-
var ModelPreview3D_default = /*#__PURE__*/ Object.assign(_plugin_vue_export_helper_default(ModelPreview3D_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-ed056b0a"]]), { __name: "WorkshopTownModelPreview3D" });
|
|
600
|
-
//#endregion
|
|
601
|
-
//#region app/components/workshop/AssetLibrary.vue?vue&type=script&setup=true&lang.ts
|
|
602
|
-
var AssetLibrary_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
603
|
-
__name: "AssetLibrary",
|
|
604
|
-
__ssrInlineRender: true,
|
|
605
|
-
setup(__props) {
|
|
606
|
-
/**
|
|
607
|
-
* 设备模型库(Asset Library)面板 —— 只列举「设备/实体」3D 模型,支持上传/删除。
|
|
608
|
-
*
|
|
609
|
-
* 交互:
|
|
610
|
-
* - 仅展示 kind === 'dev' 的模型(扫描 public/assets/game/devices + 用户上传);
|
|
611
|
-
* character 角色模型不出现在模型库 —— 在频道成员管理中为成员设置。
|
|
612
|
-
* - 每张模型卡可拖拽:拖起把 assetId 写入 dataTransfer,落到孪生场景 →
|
|
613
|
-
* TownScene3D.dropModelOnWorld() 在落点生成一个设备实例(数字孪生)。
|
|
614
|
-
* - 上传:选择 .glb/.gltf/.obj/.fbx → POST /api/workshop/assets/devices,写入 devices 目录。
|
|
615
|
-
* - 删除:删除对应模型文件(仅限 devices 目录内)。
|
|
616
|
-
*/
|
|
617
|
-
const { t } = useI18n();
|
|
618
|
-
const assets = useCharacterAssets();
|
|
619
|
-
/** 侧边模型库:展示所有设备实体模型(含内置模型、设备目录扫描与用户上传)。 */
|
|
620
|
-
const deviceModels = computed(() => assets.models.filter((m) => m.kind === "dev"));
|
|
621
|
-
/** 可 3D 预览的格式(glb/gltf);obj/fbx 保持占位图标 */
|
|
622
|
-
const isPreviewable = (name) => /\.(glb|gltf)$/i.test(name);
|
|
623
|
-
const uploading = ref(false);
|
|
624
|
-
const uploadError = ref("");
|
|
625
|
-
const uploadFile = ref(null);
|
|
626
|
-
const dropActive = ref(false);
|
|
627
|
-
const deletingId = ref("");
|
|
628
|
-
const deleteMsg = ref("");
|
|
629
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
630
|
-
_push(`<aside${ssrRenderAttrs(mergeProps({ class: "asset-lib" }, _attrs))} data-v-3d6a30ed><div class="lib-head" data-v-3d6a30ed><span class="head-title" data-v-3d6a30ed>${ssrInterpolate(_ctx.$t("assetLibrary.k7la4x5001"))}</span><span class="head-hint" data-v-3d6a30ed>${ssrInterpolate(_ctx.$t("assetLibrary.kulif5b002"))}</span></div><div class="${ssrRenderClass([{ drop: unref(dropActive) }, "upload-box"])}" data-v-3d6a30ed><label class="upload-row" data-v-3d6a30ed><input type="file" accept=".glb,.gltf,.obj,.fbx" class="file-input" data-v-3d6a30ed><span class="upload-name" data-v-3d6a30ed><span class="i-tabler-plus upload-ico" data-v-3d6a30ed></span> ${ssrInterpolate(unref(uploadFile)?.name || _ctx.$t("assetLibrary.k1iiort6010"))}</span></label>`);
|
|
631
|
-
if (unref(dropActive)) _push(`<span class="drop-hint" data-v-3d6a30ed><span class="i-tabler-download" data-v-3d6a30ed></span> ${ssrInterpolate(_ctx.$t("assetLibrary.k5hg6jq003"))}</span>`);
|
|
632
|
-
else _push(`<!---->`);
|
|
633
|
-
if (unref(uploadFile)) {
|
|
634
|
-
_push(`<!--[-->`);
|
|
635
|
-
if (isPreviewable(unref(uploadFile).name)) _push(ssrRenderComponent(ModelPreview3D_default, {
|
|
636
|
-
"local-file": unref(uploadFile),
|
|
637
|
-
height: 92
|
|
638
|
-
}, null, _parent));
|
|
639
|
-
else _push(`<span class="upload-file-tag" data-v-3d6a30ed>${ssrInterpolate(unref(uploadFile).name)} (${ssrInterpolate(_ctx.$t("assetLibrary.k1xz5wvk009"))}</span>`);
|
|
640
|
-
_push(`<div class="upload-actions" data-v-3d6a30ed><button class="upload-btn go"${ssrIncludeBooleanAttr(unref(uploading)) ? " disabled" : ""} data-v-3d6a30ed>${ssrInterpolate(unref(uploading) ? _ctx.$t("assetLibrary.k1ar7n8i005") : _ctx.$t("assetLibrary.k1hhga4h014"))}</button><button class="upload-btn"${ssrIncludeBooleanAttr(unref(uploading)) ? " disabled" : ""} data-v-3d6a30ed>${ssrInterpolate(_ctx.$t("assetLibrary.k3xdnn004"))}</button></div><!--]-->`);
|
|
641
|
-
} else if (unref(uploading)) _push(`<span class="mini-err" data-v-3d6a30ed>${ssrInterpolate(_ctx.$t("assetLibrary.k1ar7n8i005"))}</span>`);
|
|
642
|
-
else _push(`<!---->`);
|
|
643
|
-
if (unref(uploadError) && !unref(uploadFile)) _push(`<span class="mini-err" data-v-3d6a30ed>${ssrInterpolate(unref(uploadError))}</span>`);
|
|
644
|
-
else _push(`<!---->`);
|
|
645
|
-
_push(`</div><div class="lib-grid" data-v-3d6a30ed><!--[-->`);
|
|
646
|
-
ssrRenderList(unref(deviceModels), (m) => {
|
|
647
|
-
_push(`<div class="model-card"${ssrRenderAttr("data-model-id", m.id)} draggable="true"${ssrRenderAttr("title", m.hint || _ctx.$t("assetLibrary.katn7lo015", { p0: m.name }))} data-v-3d6a30ed>`);
|
|
648
|
-
if (isPreviewable(m.file)) _push(ssrRenderComponent(ModelPreview3D_default, {
|
|
649
|
-
file: m.file,
|
|
650
|
-
height: 76
|
|
651
|
-
}, null, _parent));
|
|
652
|
-
else _push(`<span class="model-img glb dev" data-v-3d6a30ed><span class="i-tabler-cpu glb-cube" aria-hidden="true" data-v-3d6a30ed></span></span>`);
|
|
653
|
-
_push(`<span class="model-name" data-v-3d6a30ed>${ssrInterpolate(m.name)}</span><span class="model-badge" data-v-3d6a30ed>${ssrInterpolate(_ctx.$t("assetLibrary.k1n32zs0006"))}</span><div class="card-actions" data-v-3d6a30ed>`);
|
|
654
|
-
if (m.file.includes("/assets/game/devices/")) _push(`<button class="card-btn danger"${ssrIncludeBooleanAttr(unref(deletingId) === m.id) ? " disabled" : ""} data-v-3d6a30ed>${ssrInterpolate(unref(deletingId) === m.id ? "…" : _ctx.$t("assetLibrary.k498l011"))}</button>`);
|
|
655
|
-
else _push(`<!---->`);
|
|
656
|
-
_push(`</div></div>`);
|
|
657
|
-
});
|
|
658
|
-
_push(`<!--]-->`);
|
|
659
|
-
if (!unref(assets).loaded) _push(`<div class="lib-note" data-v-3d6a30ed><span class="loading-dot" data-v-3d6a30ed></span> ${ssrInterpolate(_ctx.$t("assetLibrary.k1kq2tmi007"))}</div>`);
|
|
660
|
-
else if (unref(deviceModels).length === 0) _push(`<div class="lib-note" data-v-3d6a30ed>${ssrInterpolate(_ctx.$t("assetLibrary.k15527e1008"))}</div>`);
|
|
661
|
-
else _push(`<!---->`);
|
|
662
|
-
_push(`</div>`);
|
|
663
|
-
if (unref(deleteMsg)) _push(`<span class="mini-msg" data-v-3d6a30ed>${ssrInterpolate(unref(deleteMsg))}</span>`);
|
|
664
|
-
else _push(`<!---->`);
|
|
665
|
-
_push(`</aside>`);
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
});
|
|
669
|
-
//#endregion
|
|
670
|
-
//#region app/components/workshop/AssetLibrary.vue
|
|
671
|
-
var _sfc_setup$3 = AssetLibrary_vue_vue_type_script_setup_true_lang_default.setup;
|
|
672
|
-
AssetLibrary_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
673
|
-
const ssrContext = useSSRContext();
|
|
674
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/workshop/AssetLibrary.vue");
|
|
675
|
-
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
676
|
-
};
|
|
677
|
-
var AssetLibrary_default = /*#__PURE__*/ Object.assign(_plugin_vue_export_helper_default(AssetLibrary_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3d6a30ed"]]), { __name: "WorkshopAssetLibrary" });
|
|
678
|
-
//#endregion
|
|
679
|
-
//#region app/components/workshop/DaqTemplateIcon.vue?vue&type=script&setup=true&lang.ts
|
|
680
|
-
var DaqTemplateIcon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
681
|
-
__name: "DaqTemplateIcon",
|
|
682
|
-
__ssrInlineRender: true,
|
|
683
|
-
props: { icon: {} },
|
|
684
|
-
setup(__props) {
|
|
685
|
-
/**
|
|
686
|
-
* 数采/智控模板图标 —— 全项目唯一的 SVG 片段注入口。
|
|
687
|
-
*
|
|
688
|
-
* 为什么这里必须用 v-html:DAQ_ICONS 的值是 SVG **绘制片段**(path/circle/rect),
|
|
689
|
-
* 必须按 SVG 命名空间解析成图元,文本插值只会把它们画成字面文本。
|
|
690
|
-
* 为什么是安全的:DAO_ICONS 是编译期静态字面量表 —— 键来自 #shared 协议的图标枚举,
|
|
691
|
-
* 值全部是本文件里手写的字符串,不含用户输入、不含 <script>/on* 事件属性/外部引用。
|
|
692
|
-
* 收敛收益:TownView 原先有 6 处 v-html(各自重复同样的判断),现在只此一处。
|
|
693
|
-
*/
|
|
694
|
-
const props = __props;
|
|
695
|
-
/** 数采模板图标(设计稿 ICONS;SVG path 直嵌) */
|
|
696
|
-
const DAQ_ICONS = {
|
|
697
|
-
thermo: "<path d=\"M10 4a2 2 0 0 1 4 0v9a4 4 0 1 1-4 0V4Z\"/><circle cx=\"12\" cy=\"16.5\" r=\"1.6\"/>",
|
|
698
|
-
pressure: "<circle cx=\"12\" cy=\"12\" r=\"8\"/><path d=\"m12 12 3.5-3.5\"/><circle cx=\"12\" cy=\"12\" r=\"1.2\"/>",
|
|
699
|
-
tension: "<circle cx=\"12\" cy=\"10\" r=\"4\"/><path d=\"M4 18.5h16M8 18.5V14M16 18.5V14\"/><path d=\"M2.5 10H8M16 10h5.5\"/>",
|
|
700
|
-
encoder: "<circle cx=\"12\" cy=\"12\" r=\"8\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/><path d=\"M12 4v3M12 17v3M4 12h3M17 12h3\"/>",
|
|
701
|
-
camera: "<rect x=\"3\" y=\"7\" width=\"13\" height=\"10\" rx=\"2\"/><path d=\"m16 11 5-3v8l-5-3\"/><circle cx=\"8\" cy=\"12\" r=\"2.5\"/>",
|
|
702
|
-
gateway: "<rect x=\"8\" y=\"11\" width=\"8\" height=\"10\" rx=\"1.5\"/><circle cx=\"12\" cy=\"5.5\" r=\"1.5\"/><path d=\"M12 10V7M8.5 8.5a5 5 0 0 1 7 0M6 6a8.5 8.5 0 0 1 12 0\"/>"
|
|
703
|
-
};
|
|
704
|
-
const markup = computed(() => DAQ_ICONS[props.icon] ?? DAQ_ICONS.gateway);
|
|
705
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
706
|
-
_push(`<svg${ssrRenderAttrs(mergeProps({ viewBox: "0 0 24 24" }, _attrs))}>${unref(markup) ?? ""}</svg>`);
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
});
|
|
710
|
-
//#endregion
|
|
711
|
-
//#region app/components/workshop/DaqTemplateIcon.vue
|
|
712
|
-
var _sfc_setup$2 = DaqTemplateIcon_vue_vue_type_script_setup_true_lang_default.setup;
|
|
713
|
-
DaqTemplateIcon_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
714
|
-
const ssrContext = useSSRContext();
|
|
715
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/workshop/DaqTemplateIcon.vue");
|
|
716
|
-
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
717
|
-
};
|
|
718
|
-
var DaqTemplateIcon_default = Object.assign(DaqTemplateIcon_vue_vue_type_script_setup_true_lang_default, { __name: "WorkshopDaqTemplateIcon" });
|
|
719
|
-
//#endregion
|
|
720
|
-
//#region app/components/workshop/DeviceTwinPanel.vue?vue&type=script&setup=true&lang.ts
|
|
721
|
-
var DeviceTwinPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
722
|
-
__name: "DeviceTwinPanel",
|
|
723
|
-
__ssrInlineRender: true,
|
|
724
|
-
props: {
|
|
725
|
-
daqLive: {},
|
|
726
|
-
dcwLive: {}
|
|
727
|
-
},
|
|
728
|
-
emits: ["focus-device"],
|
|
729
|
-
setup(__props) {
|
|
730
|
-
/**
|
|
731
|
-
* 设备控制台(Device Twin Console) —— 工业数字孪生 HMI:
|
|
732
|
-
* 设备实体直接列表展示(状态灯/遥测数据网格/下发控制),点击行聚焦小镇场景中的对应实体。
|
|
733
|
-
*
|
|
734
|
-
* 与 3D 小镇联动:拖 `dev` 模型进场景会创建设备 twin;本面板实时刷新其 state/telemetry,
|
|
735
|
-
* 并展示绑定智控通道的当前 set 值,支持窗口内直写下发(替代旧 power_on/power_off/set_speed)。
|
|
736
|
-
*/
|
|
737
|
-
const { t } = useI18n();
|
|
738
|
-
/** 实时数采数据(twinId → 该实体相关的实时通道:
|
|
739
|
-
* 数采节点 = 自身通道;设备 = 绑定到它的全部数采通道;由 TownView 从模拟上报喂入) */
|
|
740
|
-
const twins = useDeviceTwins();
|
|
741
|
-
useDcwStream();
|
|
742
|
-
/** 数采实体(绿卡):kind=daq 或旧数据 modelRef 前缀兜底 */
|
|
743
|
-
const isDaq = (t) => t.kind === "daq" || (t.modelRef ?? "").startsWith("daq-");
|
|
744
|
-
const busyId = ref("");
|
|
745
|
-
const ctrlMsg = ref("");
|
|
746
|
-
/** 行内删除(两步确认:首击布防 3s,再击执行) */
|
|
747
|
-
const armedId = ref("");
|
|
748
|
-
const stateColor = {
|
|
749
|
-
idle: "var(--hud-amber)",
|
|
750
|
-
running: "var(--hud-ok)",
|
|
751
|
-
alarm: "var(--hud-danger)",
|
|
752
|
-
offline: "var(--hud-dim)"
|
|
753
|
-
};
|
|
754
|
-
const stateLabel = {
|
|
755
|
-
idle: "STANDBY",
|
|
756
|
-
running: "RUNNING",
|
|
757
|
-
alarm: "ALARM",
|
|
758
|
-
offline: "OFFLINE"
|
|
759
|
-
};
|
|
760
|
-
const modelTag = (name) => name.replace(/[^A-Za-z0-9]/g, "").slice(0, 4).toUpperCase() || "DEV";
|
|
761
|
-
const devNo = (id) => id.replace(/^dev-/, "").replace(/[^a-z0-9]/gi, "").slice(-6).toUpperCase();
|
|
762
|
-
const fmt = (v) => typeof v === "number" ? (Math.round(v * 100) / 100).toString() : String(v);
|
|
763
|
-
/** 智控上下限文案(无穷大显示 ±∞) */
|
|
764
|
-
const dcwWinText = (r) => `${Number.isFinite(r.lo) ? r.lo : "-∞"} ~ ${Number.isFinite(r.hi) ? r.hi : "+∞"} ${r.unit}`;
|
|
765
|
-
/** 写入草稿/错误(智控节点 id 键控) */
|
|
766
|
-
const dcwDrafts = reactive({});
|
|
767
|
-
const dcwErrs = reactive({});
|
|
768
|
-
const dcwBusy = ref("");
|
|
769
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
770
|
-
_push(`<aside${ssrRenderAttrs(mergeProps({ class: "twin-panel" }, _attrs))} data-v-37ad3127><div class="twin-head" data-v-37ad3127><span class="twin-kicker" data-v-37ad3127>${ssrInterpolate(_ctx.$t("deviceTwinPanel.k7k6evr002"))}</span><span class="twin-count" data-v-37ad3127>${ssrInterpolate(unref(twins).twins.length)}</span></div>`);
|
|
771
|
-
if (unref(twins).error) _push(`<div class="twin-error" data-v-37ad3127>${ssrInterpolate(unref(twins).error)}</div>`);
|
|
772
|
-
else _push(`<!---->`);
|
|
773
|
-
if (!unref(twins).loaded) _push(`<div class="twin-empty" data-v-37ad3127>${ssrInterpolate(_ctx.$t("deviceTwinPanel.kkw7sn5003"))}</div>`);
|
|
774
|
-
else if (unref(twins).twins.length === 0) _push(`<div class="twin-empty" data-v-37ad3127><div class="twin-empty-frame" data-v-37ad3127><div class="twin-empty-title" data-v-37ad3127>${ssrInterpolate(_ctx.$t("deviceTwinPanel.k13y2qmg004"))}</div><div class="twin-empty-sub" data-v-37ad3127>${ssrInterpolate(_ctx.$t("deviceTwinPanel.kotf23l005"))}</div></div></div>`);
|
|
775
|
-
else {
|
|
776
|
-
_push(`<div class="twin-list" data-v-37ad3127><!--[-->`);
|
|
777
|
-
ssrRenderList(unref(twins).twins, (tw) => {
|
|
778
|
-
_push(`<button class="${ssrRenderClass([{ daq: isDaq(tw) }, "twin-card"])}" type="button" data-v-37ad3127><div class="twin-row" data-v-37ad3127><span class="twin-model-tag" data-v-37ad3127>${ssrInterpolate(modelTag(tw.modelRef || tw.name))}</span><div class="twin-idbar" data-v-37ad3127><span class="twin-name" data-v-37ad3127>${ssrInterpolate(tw.name)}</span><span class="twin-code" data-v-37ad3127>${ssrInterpolate(isDaq(tw) ? "DAQ" : devNo(tw.id))}</span></div><button class="${ssrRenderClass([{ armed: unref(armedId) === tw.id }, "twin-del"])}"${ssrIncludeBooleanAttr(unref(busyId) === tw.id) ? " disabled" : ""}${ssrRenderAttr("title", unref(armedId) === tw.id ? "再次点击确认删除该设备实例" : "删除该设备实例")} data-v-37ad3127>${ssrInterpolate(unref(armedId) === tw.id ? _ctx.$t("deviceTwinPanel.k44653007") : "✕")}</button><span class="${ssrRenderClass([`s-${tw.state}`, "twin-state"])}" data-v-37ad3127><i class="twin-state-dot" style="${ssrRenderStyle({ background: stateColor[tw.state] || "var(--hud-dim)" })}" data-v-37ad3127></i> ${ssrInterpolate(stateLabel[tw.state] || tw.state)}</span></div>`);
|
|
779
|
-
if (Object.keys(tw.telemetry).length) {
|
|
780
|
-
_push(`<div class="twin-tele" data-v-37ad3127><!--[-->`);
|
|
781
|
-
ssrRenderList(tw.telemetry, (v, k) => {
|
|
782
|
-
_push(`<span class="tele-item" data-v-37ad3127><em data-v-37ad3127>${ssrInterpolate(k)}</em><b data-v-37ad3127>${ssrInterpolate(fmt(v))}</b></span>`);
|
|
783
|
-
});
|
|
784
|
-
_push(`<!--]--></div>`);
|
|
785
|
-
} else _push(`<!---->`);
|
|
786
|
-
if (__props.daqLive?.[tw.id]?.length) {
|
|
787
|
-
_push(`<div class="twin-daq" data-v-37ad3127><!--[-->`);
|
|
788
|
-
ssrRenderList(__props.daqLive[tw.id], (d, i) => {
|
|
789
|
-
_push(`<span class="${ssrRenderClass([{ alarm: d.alarm }, "daq-item"])}" data-v-37ad3127><em data-v-37ad3127>${ssrInterpolate(d.ch)}</em><b data-v-37ad3127>${ssrInterpolate(d.value)}<i data-v-37ad3127>${ssrInterpolate(d.unit)}</i></b></span>`);
|
|
790
|
-
});
|
|
791
|
-
_push(`<!--]--></div>`);
|
|
792
|
-
} else _push(`<!---->`);
|
|
793
|
-
if (__props.dcwLive?.[tw.id]?.length) {
|
|
794
|
-
_push(`<div class="twin-dcw" data-v-37ad3127><!--[-->`);
|
|
795
|
-
ssrRenderList(__props.dcwLive[tw.id], (r) => {
|
|
796
|
-
_push(`<div class="dcw-item" data-v-37ad3127><div class="dcw-head" data-v-37ad3127><em data-v-37ad3127>${ssrInterpolate(r.ch)}`);
|
|
797
|
-
if (r.src === "recipe") _push(`<i class="dcw-src" data-v-37ad3127>${ssrInterpolate(_ctx.$t("deviceTwinPanel.k48grv006"))}</i>`);
|
|
798
|
-
else _push(`<!---->`);
|
|
799
|
-
_push(`</em><b class="dcw-set" data-v-37ad3127>${ssrInterpolate(r.value != null ? r.value.toFixed(r.decimals) : "--")}<i data-v-37ad3127>${ssrInterpolate(r.unit)}</i></b></div>`);
|
|
800
|
-
if (r.readValue != null || r.lastReadAt) {
|
|
801
|
-
_push(`<div class="dcw-act"${ssrRenderAttr("title", _ctx.$t("deviceTwinPanel.k9r7d4e030"))} data-v-37ad3127><em data-v-37ad3127>ACT</em><b data-v-37ad3127>${ssrInterpolate(r.readValue != null ? r.readValue.toFixed(r.decimals) : "--")}<i data-v-37ad3127>${ssrInterpolate(r.unit)}</i></b>`);
|
|
802
|
-
if (r.lastReadAt) _push(`<i class="dcw-act-at" data-v-37ad3127>${ssrInterpolate(r.lastReadAt.slice(11, 19))}</i>`);
|
|
803
|
-
else _push(`<!---->`);
|
|
804
|
-
_push(`</div>`);
|
|
805
|
-
} else _push(`<!---->`);
|
|
806
|
-
_push(`<div class="dcw-win" data-v-37ad3127><span${ssrRenderAttr("title", r.src === "recipe" ? "当前运行配方工艺窗口" : "节点全局量程")} data-v-37ad3127>${ssrInterpolate(dcwWinText(r))}</span></div><div class="dcw-ctrl" data-v-37ad3127><input${ssrRenderAttr("value", unref(dcwDrafts)[r.id])} type="number" class="ctrl-input"${ssrRenderAttr("step", 10 ** -r.decimals)}${ssrRenderAttr("min", Number.isFinite(r.lo) ? r.lo : void 0)}${ssrRenderAttr("max", Number.isFinite(r.hi) ? r.hi : void 0)}${ssrRenderAttr("placeholder", `${Number.isFinite(r.lo) ? r.lo : ""} ~ ${Number.isFinite(r.hi) ? r.hi : ""}`)} data-v-37ad3127><button class="ctrl-btn dcw-send"${ssrIncludeBooleanAttr(unref(dcwDrafts)[r.id] == null || unref(dcwDrafts)[r.id] === "" || unref(dcwBusy) === r.id) ? " disabled" : ""}${ssrRenderAttr("title", _ctx.$t("deviceTwinPanel.k1j04u8001"))} data-v-37ad3127>${ssrInterpolate(unref(dcwBusy) === r.id ? "···" : "SET")}</button></div>`);
|
|
807
|
-
if (unref(dcwErrs)[r.id]) _push(`<small class="dcw-err" data-v-37ad3127>${ssrInterpolate(unref(dcwErrs)[r.id])}</small>`);
|
|
808
|
-
else _push(`<!---->`);
|
|
809
|
-
_push(`</div>`);
|
|
810
|
-
});
|
|
811
|
-
_push(`<!--]--></div>`);
|
|
812
|
-
} else _push(`<!---->`);
|
|
813
|
-
_push(`</button>`);
|
|
814
|
-
});
|
|
815
|
-
_push(`<!--]--></div>`);
|
|
816
|
-
}
|
|
817
|
-
if (unref(ctrlMsg)) _push(`<span class="twin-err" data-v-37ad3127>${ssrInterpolate(unref(ctrlMsg))}</span>`);
|
|
818
|
-
else _push(`<!---->`);
|
|
819
|
-
_push(`</aside>`);
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
});
|
|
823
|
-
//#endregion
|
|
824
|
-
//#region app/components/workshop/DeviceTwinPanel.vue
|
|
825
|
-
var _sfc_setup$1 = DeviceTwinPanel_vue_vue_type_script_setup_true_lang_default.setup;
|
|
826
|
-
DeviceTwinPanel_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
827
|
-
const ssrContext = useSSRContext();
|
|
828
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/workshop/DeviceTwinPanel.vue");
|
|
829
|
-
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
830
|
-
};
|
|
831
|
-
var DeviceTwinPanel_default = /*#__PURE__*/ Object.assign(_plugin_vue_export_helper_default(DeviceTwinPanel_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-37ad3127"]]), { __name: "WorkshopDeviceTwinPanel" });
|
|
832
|
-
//#endregion
|
|
833
|
-
//#region app/composables/workshop/useSceneLayouts.ts
|
|
834
|
-
/**
|
|
835
|
-
* useSceneLayouts —— 频道领地放置(3D 小镇布局注册表)。
|
|
836
|
-
*
|
|
837
|
-
* 职责:
|
|
838
|
-
* - 拉取已放置频道清单(GET /api/workshop/scene/layouts);
|
|
839
|
-
* - 放置/更新领地(PUT /:channelId):拖频道入场景、编辑边界后落库;
|
|
840
|
-
* - 移除放置(DELETE /:channelId):把频道(及其 Agent)从场景撤出。
|
|
841
|
-
* 场景初始为空场地;未放置的频道只出现在频道坞,不进入 3D。
|
|
842
|
-
* 单例挂 globalThis,跨组件安全;store 为 reactive(驱动频道坞/选中面板重渲染)。
|
|
843
|
-
*/
|
|
844
|
-
var GLOBAL_KEY = "__sceneLayouts";
|
|
845
|
-
function headers(json = true) {
|
|
846
|
-
const h = {};
|
|
847
|
-
if (json) h["content-type"] = "application/json";
|
|
848
|
-
return h;
|
|
849
|
-
}
|
|
850
|
-
function createStore() {
|
|
851
|
-
/** 在飞请求句柄:并发 load 等同一个真实请求(旧实现直接 return → 调用方拿空 layouts 去 hydrate,频道竞态消失) */
|
|
852
|
-
let inFlight = null;
|
|
853
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
854
|
-
const store = reactive({
|
|
855
|
-
layouts: {},
|
|
856
|
-
loaded: false,
|
|
857
|
-
loading: false,
|
|
858
|
-
error: "",
|
|
859
|
-
rev: 0,
|
|
860
|
-
async load() {
|
|
861
|
-
if (!inFlight) inFlight = doLoad().finally(() => {
|
|
862
|
-
inFlight = null;
|
|
863
|
-
});
|
|
864
|
-
return inFlight;
|
|
865
|
-
},
|
|
866
|
-
byChannel(channelId) {
|
|
867
|
-
return store.layouts[channelId];
|
|
868
|
-
},
|
|
869
|
-
async save(channelId, input) {
|
|
870
|
-
store.layouts[channelId] = {
|
|
871
|
-
channelId,
|
|
872
|
-
x: input.x,
|
|
873
|
-
z: input.z,
|
|
874
|
-
radiusX: input.radiusX,
|
|
875
|
-
radiusZ: input.radiusZ,
|
|
876
|
-
shape: input.shape ?? "ellipse",
|
|
877
|
-
rotationY: input.rotationY ?? 0,
|
|
878
|
-
updatedAt: nowLocalIso()
|
|
879
|
-
};
|
|
880
|
-
store.rev++;
|
|
881
|
-
let lastErr = null;
|
|
882
|
-
for (let attempt = 0; attempt < 3; attempt++) try {
|
|
883
|
-
const res = await fetch(`/api/workshop/scene/layouts/${channelId}`, {
|
|
884
|
-
method: "PUT",
|
|
885
|
-
headers: headers(),
|
|
886
|
-
body: JSON.stringify(input)
|
|
887
|
-
});
|
|
888
|
-
const json = await res.json().catch(() => ({}));
|
|
889
|
-
if (!res.ok || !json?.data?.layout) throw new Error(json?.message ?? "保存频道布局失败");
|
|
890
|
-
store.layouts[channelId] = json.data.layout;
|
|
891
|
-
return json.data.layout;
|
|
892
|
-
} catch (err) {
|
|
893
|
-
lastErr = err instanceof Error ? err : new Error(String(err));
|
|
894
|
-
if (attempt < 2) await sleep(500 * (attempt + 1));
|
|
895
|
-
}
|
|
896
|
-
throw lastErr ?? /* @__PURE__ */ new Error("保存频道布局失败");
|
|
897
|
-
},
|
|
898
|
-
async remove(channelId) {
|
|
899
|
-
const res = await fetch(`/api/workshop/scene/layouts/${channelId}`, {
|
|
900
|
-
method: "DELETE",
|
|
901
|
-
headers: headers()
|
|
902
|
-
});
|
|
903
|
-
const json = await res.json().catch(() => ({}));
|
|
904
|
-
if (!res.ok) throw new Error(json?.message ?? "移除频道放置失败");
|
|
905
|
-
const next = Object.fromEntries(Object.entries(store.layouts).filter(([k]) => k !== channelId));
|
|
906
|
-
store.layouts = next;
|
|
907
|
-
store.rev++;
|
|
908
|
-
}
|
|
909
|
-
});
|
|
910
|
-
/** 单次真实拉取(3 次退避重试;非 2xx 视为失败 —— 401/500 的空 layouts 曾让整场频道消失) */
|
|
911
|
-
async function doLoad() {
|
|
912
|
-
store.loading = true;
|
|
913
|
-
let lastErr = "";
|
|
914
|
-
try {
|
|
915
|
-
for (let attempt = 0; attempt < 3; attempt++) try {
|
|
916
|
-
const res = await fetch("/api/workshop/scene/layouts", { headers: headers() });
|
|
917
|
-
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
918
|
-
const list = (await res.json().catch(() => ({})))?.data?.layouts ?? [];
|
|
919
|
-
const next = {};
|
|
920
|
-
for (const l of list) next[l.channelId] = l;
|
|
921
|
-
store.layouts = next;
|
|
922
|
-
store.loaded = true;
|
|
923
|
-
store.error = "";
|
|
924
|
-
store.rev++;
|
|
925
|
-
return;
|
|
926
|
-
} catch (err) {
|
|
927
|
-
lastErr = apiErrorMessage(err);
|
|
928
|
-
if (attempt < 2) await sleep(400 * (attempt + 1));
|
|
929
|
-
}
|
|
930
|
-
store.loaded = false;
|
|
931
|
-
store.error = lastErr;
|
|
932
|
-
} finally {
|
|
933
|
-
store.loading = false;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
return store;
|
|
937
|
-
}
|
|
938
|
-
function useSceneLayouts() {
|
|
939
|
-
const g = globalThis;
|
|
940
|
-
if (!g[GLOBAL_KEY]) g[GLOBAL_KEY] = createStore();
|
|
941
|
-
const store = g[GLOBAL_KEY];
|
|
942
|
-
store.load();
|
|
943
|
-
return store;
|
|
944
|
-
}
|
|
945
|
-
//#endregion
|
|
946
|
-
//#region node_modules/.pnpm/@vueuse+shared@13.9.0_vue@3.5.41_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs
|
|
947
|
-
function tryOnScopeDispose(fn) {
|
|
948
|
-
if (getCurrentScope()) {
|
|
949
|
-
onScopeDispose(fn);
|
|
950
|
-
return true;
|
|
951
|
-
}
|
|
952
|
-
return false;
|
|
953
|
-
}
|
|
954
|
-
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
955
|
-
var toString = Object.prototype.toString;
|
|
956
|
-
var isObject = (val) => toString.call(val) === "[object Object]";
|
|
957
|
-
var noop = () => {};
|
|
958
|
-
function toRef$1(...args) {
|
|
959
|
-
if (args.length !== 1) return toRef(...args);
|
|
960
|
-
const r = args[0];
|
|
961
|
-
return typeof r === "function" ? readonly(customRef(() => ({
|
|
962
|
-
get: r,
|
|
963
|
-
set: noop
|
|
964
|
-
}))) : ref(r);
|
|
965
|
-
}
|
|
966
|
-
function createFilterWrapper(filter, fn) {
|
|
967
|
-
function wrapper(...args) {
|
|
968
|
-
return new Promise((resolve, reject) => {
|
|
969
|
-
Promise.resolve(filter(() => fn.apply(this, args), {
|
|
970
|
-
fn,
|
|
971
|
-
thisArg: this,
|
|
972
|
-
args
|
|
973
|
-
})).then(resolve).catch(reject);
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
return wrapper;
|
|
977
|
-
}
|
|
978
|
-
var bypassFilter = (invoke) => {
|
|
979
|
-
return invoke();
|
|
980
|
-
};
|
|
981
|
-
function pausableFilter(extendFilter = bypassFilter, options = {}) {
|
|
982
|
-
const { initialState = "active" } = options;
|
|
983
|
-
const isActive = toRef$1(initialState === "active");
|
|
984
|
-
function pause() {
|
|
985
|
-
isActive.value = false;
|
|
986
|
-
}
|
|
987
|
-
function resume() {
|
|
988
|
-
isActive.value = true;
|
|
989
|
-
}
|
|
990
|
-
const eventFilter = (...args) => {
|
|
991
|
-
if (isActive.value) extendFilter(...args);
|
|
992
|
-
};
|
|
993
|
-
return {
|
|
994
|
-
isActive: readonly(isActive),
|
|
995
|
-
pause,
|
|
996
|
-
resume,
|
|
997
|
-
eventFilter
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
function toArray(value) {
|
|
1001
|
-
return Array.isArray(value) ? value : [value];
|
|
1002
|
-
}
|
|
1003
|
-
function getLifeCycleTarget(target) {
|
|
1004
|
-
return getCurrentInstance();
|
|
1005
|
-
}
|
|
1006
|
-
function watchWithFilter(source, cb, options = {}) {
|
|
1007
|
-
const { eventFilter = bypassFilter, ...watchOptions } = options;
|
|
1008
|
-
return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
|
1009
|
-
}
|
|
1010
|
-
function watchPausable(source, cb, options = {}) {
|
|
1011
|
-
const { eventFilter: filter, initialState = "active", ...watchOptions } = options;
|
|
1012
|
-
const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });
|
|
1013
|
-
return {
|
|
1014
|
-
stop: watchWithFilter(source, cb, {
|
|
1015
|
-
...watchOptions,
|
|
1016
|
-
eventFilter
|
|
1017
|
-
}),
|
|
1018
|
-
pause,
|
|
1019
|
-
resume,
|
|
1020
|
-
isActive
|
|
1021
|
-
};
|
|
1022
|
-
}
|
|
1023
|
-
function tryOnMounted(fn, sync = true, target) {
|
|
1024
|
-
if (getLifeCycleTarget());
|
|
1025
|
-
else if (sync) fn();
|
|
1026
|
-
else nextTick(fn);
|
|
1027
|
-
}
|
|
1028
|
-
function watchImmediate(source, cb, options) {
|
|
1029
|
-
return watch(source, cb, {
|
|
1030
|
-
...options,
|
|
1031
|
-
immediate: true
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
//#endregion
|
|
1035
|
-
//#region node_modules/.pnpm/@vueuse+core@13.9.0_vue@3.5.41_typescript@5.9.3_/node_modules/@vueuse/core/index.mjs
|
|
1036
|
-
var defaultWindow = void 0;
|
|
1037
|
-
function unrefElement(elRef) {
|
|
1038
|
-
var _a;
|
|
1039
|
-
const plain = toValue(elRef);
|
|
1040
|
-
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
1041
|
-
}
|
|
1042
|
-
function useEventListener(...args) {
|
|
1043
|
-
const cleanups = [];
|
|
1044
|
-
const cleanup = () => {
|
|
1045
|
-
cleanups.forEach((fn) => fn());
|
|
1046
|
-
cleanups.length = 0;
|
|
1047
|
-
};
|
|
1048
|
-
const register = (el, event, listener, options) => {
|
|
1049
|
-
el.addEventListener(event, listener, options);
|
|
1050
|
-
return () => el.removeEventListener(event, listener, options);
|
|
1051
|
-
};
|
|
1052
|
-
const firstParamTargets = computed(() => {
|
|
1053
|
-
const test = toArray(toValue(args[0])).filter((e) => e != null);
|
|
1054
|
-
return test.every((e) => typeof e !== "string") ? test : void 0;
|
|
1055
|
-
});
|
|
1056
|
-
const stopWatch = watchImmediate(() => {
|
|
1057
|
-
var _a, _b;
|
|
1058
|
-
return [
|
|
1059
|
-
(_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null),
|
|
1060
|
-
toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
|
|
1061
|
-
toArray(unref(firstParamTargets.value ? args[2] : args[1])),
|
|
1062
|
-
toValue(firstParamTargets.value ? args[3] : args[2])
|
|
1063
|
-
];
|
|
1064
|
-
}, ([raw_targets, raw_events, raw_listeners, raw_options]) => {
|
|
1065
|
-
cleanup();
|
|
1066
|
-
if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length)) return;
|
|
1067
|
-
const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
|
|
1068
|
-
cleanups.push(...raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone)))));
|
|
1069
|
-
}, { flush: "post" });
|
|
1070
|
-
const stop = () => {
|
|
1071
|
-
stopWatch();
|
|
1072
|
-
cleanup();
|
|
1073
|
-
};
|
|
1074
|
-
tryOnScopeDispose(cleanup);
|
|
1075
|
-
return stop;
|
|
1076
|
-
}
|
|
1077
|
-
var _global = typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
1078
|
-
var globalKey = "__vueuse_ssr_handlers__";
|
|
1079
|
-
var handlers = /* @__PURE__ */ getHandlers();
|
|
1080
|
-
function getHandlers() {
|
|
1081
|
-
if (!(globalKey in _global)) _global[globalKey] = _global[globalKey] || {};
|
|
1082
|
-
return _global[globalKey];
|
|
1083
|
-
}
|
|
1084
|
-
function getSSRHandler(key, fallback) {
|
|
1085
|
-
return handlers[key] || fallback;
|
|
1086
|
-
}
|
|
1087
|
-
function guessSerializerType(rawInit) {
|
|
1088
|
-
return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
|
|
1089
|
-
}
|
|
1090
|
-
var StorageSerializers = {
|
|
1091
|
-
boolean: {
|
|
1092
|
-
read: (v) => v === "true",
|
|
1093
|
-
write: (v) => String(v)
|
|
1094
|
-
},
|
|
1095
|
-
object: {
|
|
1096
|
-
read: (v) => JSON.parse(v),
|
|
1097
|
-
write: (v) => JSON.stringify(v)
|
|
1098
|
-
},
|
|
1099
|
-
number: {
|
|
1100
|
-
read: (v) => Number.parseFloat(v),
|
|
1101
|
-
write: (v) => String(v)
|
|
1102
|
-
},
|
|
1103
|
-
any: {
|
|
1104
|
-
read: (v) => v,
|
|
1105
|
-
write: (v) => String(v)
|
|
1106
|
-
},
|
|
1107
|
-
string: {
|
|
1108
|
-
read: (v) => v,
|
|
1109
|
-
write: (v) => String(v)
|
|
1110
|
-
},
|
|
1111
|
-
map: {
|
|
1112
|
-
read: (v) => new Map(JSON.parse(v)),
|
|
1113
|
-
write: (v) => JSON.stringify(Array.from(v.entries()))
|
|
1114
|
-
},
|
|
1115
|
-
set: {
|
|
1116
|
-
read: (v) => new Set(JSON.parse(v)),
|
|
1117
|
-
write: (v) => JSON.stringify(Array.from(v))
|
|
1118
|
-
},
|
|
1119
|
-
date: {
|
|
1120
|
-
read: (v) => new Date(v),
|
|
1121
|
-
write: (v) => v.toISOString()
|
|
1122
|
-
}
|
|
1123
|
-
};
|
|
1124
|
-
var customStorageEventName = "vueuse-storage";
|
|
1125
|
-
function useStorage(key, defaults, storage, options = {}) {
|
|
1126
|
-
var _a;
|
|
1127
|
-
const { flush = "pre", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window = defaultWindow, eventFilter, onError = (e) => {
|
|
1128
|
-
console.error(e);
|
|
1129
|
-
}, initOnMounted } = options;
|
|
1130
|
-
const data = (shallow ? shallowRef : ref)(typeof defaults === "function" ? defaults() : defaults);
|
|
1131
|
-
const keyComputed = computed(() => toValue(key));
|
|
1132
|
-
if (!storage) try {
|
|
1133
|
-
storage = getSSRHandler("getDefaultStorage", () => {
|
|
1134
|
-
var _a2;
|
|
1135
|
-
return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
|
|
1136
|
-
})();
|
|
1137
|
-
} catch (e) {
|
|
1138
|
-
onError(e);
|
|
1139
|
-
}
|
|
1140
|
-
if (!storage) return data;
|
|
1141
|
-
const rawInit = toValue(defaults);
|
|
1142
|
-
const type = guessSerializerType(rawInit);
|
|
1143
|
-
const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
|
|
1144
|
-
const { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, (newValue) => write(newValue), {
|
|
1145
|
-
flush,
|
|
1146
|
-
deep,
|
|
1147
|
-
eventFilter
|
|
1148
|
-
});
|
|
1149
|
-
watch(keyComputed, () => update(), { flush });
|
|
1150
|
-
let firstMounted = false;
|
|
1151
|
-
const onStorageEvent = (ev) => {
|
|
1152
|
-
if (initOnMounted && !firstMounted) return;
|
|
1153
|
-
update(ev);
|
|
1154
|
-
};
|
|
1155
|
-
const onStorageCustomEvent = (ev) => {
|
|
1156
|
-
if (initOnMounted && !firstMounted) return;
|
|
1157
|
-
updateFromCustomEvent(ev);
|
|
1158
|
-
};
|
|
1159
|
-
if (window && listenToStorageChanges) {
|
|
1160
|
-
if (storage instanceof Storage) useEventListener(window, "storage", onStorageEvent, { passive: true });
|
|
1161
|
-
else useEventListener(window, customStorageEventName, onStorageCustomEvent);
|
|
1162
|
-
}
|
|
1163
|
-
if (initOnMounted) tryOnMounted(() => {
|
|
1164
|
-
firstMounted = true;
|
|
1165
|
-
update();
|
|
1166
|
-
});
|
|
1167
|
-
else update();
|
|
1168
|
-
function dispatchWriteEvent(oldValue, newValue) {
|
|
1169
|
-
if (window) {
|
|
1170
|
-
const payload = {
|
|
1171
|
-
key: keyComputed.value,
|
|
1172
|
-
oldValue,
|
|
1173
|
-
newValue,
|
|
1174
|
-
storageArea: storage
|
|
1175
|
-
};
|
|
1176
|
-
window.dispatchEvent(storage instanceof Storage ? new StorageEvent("storage", payload) : new CustomEvent(customStorageEventName, { detail: payload }));
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
function write(v) {
|
|
1180
|
-
try {
|
|
1181
|
-
const oldValue = storage.getItem(keyComputed.value);
|
|
1182
|
-
if (v == null) {
|
|
1183
|
-
dispatchWriteEvent(oldValue, null);
|
|
1184
|
-
storage.removeItem(keyComputed.value);
|
|
1185
|
-
} else {
|
|
1186
|
-
const serialized = serializer.write(v);
|
|
1187
|
-
if (oldValue !== serialized) {
|
|
1188
|
-
storage.setItem(keyComputed.value, serialized);
|
|
1189
|
-
dispatchWriteEvent(oldValue, serialized);
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
} catch (e) {
|
|
1193
|
-
onError(e);
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
function read(event) {
|
|
1197
|
-
const rawValue = event ? event.newValue : storage.getItem(keyComputed.value);
|
|
1198
|
-
if (rawValue == null) {
|
|
1199
|
-
if (writeDefaults && rawInit != null) storage.setItem(keyComputed.value, serializer.write(rawInit));
|
|
1200
|
-
return rawInit;
|
|
1201
|
-
} else if (!event && mergeDefaults) {
|
|
1202
|
-
const value = serializer.read(rawValue);
|
|
1203
|
-
if (typeof mergeDefaults === "function") return mergeDefaults(value, rawInit);
|
|
1204
|
-
else if (type === "object" && !Array.isArray(value)) return {
|
|
1205
|
-
...rawInit,
|
|
1206
|
-
...value
|
|
1207
|
-
};
|
|
1208
|
-
return value;
|
|
1209
|
-
} else if (typeof rawValue !== "string") return rawValue;
|
|
1210
|
-
else return serializer.read(rawValue);
|
|
1211
|
-
}
|
|
1212
|
-
function update(event) {
|
|
1213
|
-
if (event && event.storageArea !== storage) return;
|
|
1214
|
-
if (event && event.key == null) {
|
|
1215
|
-
data.value = rawInit;
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
if (event && event.key !== keyComputed.value) return;
|
|
1219
|
-
pauseWatch();
|
|
1220
|
-
try {
|
|
1221
|
-
const serializedData = serializer.write(data.value);
|
|
1222
|
-
if (event === void 0 || (event == null ? void 0 : event.newValue) !== serializedData) data.value = read(event);
|
|
1223
|
-
} catch (e) {
|
|
1224
|
-
onError(e);
|
|
1225
|
-
} finally {
|
|
1226
|
-
if (event) nextTick(resumeWatch);
|
|
1227
|
-
else resumeWatch();
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
function updateFromCustomEvent(event) {
|
|
1231
|
-
update(event.detail);
|
|
1232
|
-
}
|
|
1233
|
-
return data;
|
|
1234
|
-
}
|
|
1235
|
-
//#endregion
|
|
1236
|
-
//#region app/components/workshop/town/TownView.vue?vue&type=script&setup=true&lang.ts
|
|
1237
|
-
/** 两种渲染器共享:事件订阅 + HUD 事件 + E2E 钩子 */
|
|
1238
|
-
var PANEL_POS_KEY = "aw-town-panel-pos";
|
|
1239
|
-
var HISTORY_TTL_MS = 3e4;
|
|
1240
|
-
var CALLOUT_STACK = 104;
|
|
1241
|
-
var TREND_VISIBLE_DEFAULT = 8;
|
|
1242
|
-
/** 地图窗口缩放随 3D dolly(夹在 0.4~5;dolly 再深地图不再放大) */
|
|
1243
|
-
var TownView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
1244
|
-
__name: "TownView",
|
|
1245
|
-
__ssrInlineRender: true,
|
|
1246
|
-
props: {
|
|
1247
|
-
channelId: {},
|
|
1248
|
-
allChannels: { type: Boolean }
|
|
1249
|
-
},
|
|
1250
|
-
setup(__props) {
|
|
1251
|
-
/**
|
|
1252
|
-
* 小镇视图(AgentTeam RPG 可视化)— Vue 壳。
|
|
1253
|
-
*
|
|
1254
|
-
* 职责:挂载 Phaser(SSR 安全动态 import)、从 entities store 构建初始实体基线、
|
|
1255
|
-
* 订阅用TownBus(与时间线同源事件流)驱动场景、监听 channel.snapshot 重建、
|
|
1256
|
-
* HUD 覆盖层(加载态/连接态/当前说话者/统计)、E2E 钩子。
|
|
1257
|
-
*/
|
|
1258
|
-
const { t } = useI18n();
|
|
1259
|
-
/**
|
|
1260
|
-
* 两种渲染器(Phaser 2D / Three.js 3D)共享的最小公开接口。
|
|
1261
|
-
* TownView 无感切换:事件订阅/HUD/跑马灯/迷你地图/拖放换装只用这里的方法。
|
|
1262
|
-
*/
|
|
1263
|
-
const props = __props;
|
|
1264
|
-
const entities = useEntitiesStore();
|
|
1265
|
-
const wsStore = useWorkspacesStore();
|
|
1266
|
-
const { conn } = useWorkshopWs();
|
|
1267
|
-
useTownBus();
|
|
1268
|
-
const characterAssets = useCharacterAssets();
|
|
1269
|
-
const deviceTwins = useDeviceTwins();
|
|
1270
|
-
const sceneLayouts = useSceneLayouts();
|
|
1271
|
-
useHttp();
|
|
1272
|
-
const { isDesktop } = useResponsive();
|
|
1273
|
-
/** 当前打开的抽屉:'left' | 'right' | null */
|
|
1274
|
-
const sheetOpen = ref(null);
|
|
1275
|
-
/** 窄屏底部坞是否展开(默认收起,舞台优先) */
|
|
1276
|
-
const dockOpen = ref(false);
|
|
1277
|
-
/** 回到桌面档必须清空抽屉状态,否则遮罩会滞留在屏幕上 */
|
|
1278
|
-
watch(isDesktop, (d) => {
|
|
1279
|
-
if (d) {
|
|
1280
|
-
sheetOpen.value = null;
|
|
1281
|
-
dockOpen.value = false;
|
|
1282
|
-
}
|
|
1283
|
-
});
|
|
1284
|
-
ref(null);
|
|
1285
|
-
/** 当前渲染器(TownScene / TownScene3D 之一) */
|
|
1286
|
-
const sceneRef = shallowRef(null);
|
|
1287
|
-
shallowRef(null);
|
|
1288
|
-
/** 3D 场景实例(dispose 用) */
|
|
1289
|
-
const scene3dRef = shallowRef(null);
|
|
1290
|
-
const ready = ref(false);
|
|
1291
|
-
const fps = ref(0);
|
|
1292
|
-
const agentCount = ref(0);
|
|
1293
|
-
const blockCount = ref(0);
|
|
1294
|
-
ref(null);
|
|
1295
|
-
const selected = ref(null);
|
|
1296
|
-
const errorText = ref("");
|
|
1297
|
-
const syncing = computed(() => conn.state === "connecting");
|
|
1298
|
-
const activeChannelName = computed(() => entities.channels[props.channelId]?.name ?? "");
|
|
1299
|
-
const mode = ref("browse");
|
|
1300
|
-
const snap = ref(true);
|
|
1301
|
-
const saveState = ref(null);
|
|
1302
|
-
const saveStateLabel = computed(() => {
|
|
1303
|
-
switch (saveState.value?.state) {
|
|
1304
|
-
case "dirty": return t("townView.k3oo50k155");
|
|
1305
|
-
case "saving": return t("townView.k1b38d59156");
|
|
1306
|
-
case "saved": return t("townView.k3n51yk157");
|
|
1307
|
-
case "error": return t("townView.k1b3ayhc158");
|
|
1308
|
-
default: return "";
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
|
-
/** 变换模式(Blender 键位):G 移动 / R 旋转 / S 缩放;选中设备时与场景手柄联动 */
|
|
1312
|
-
const tMode = ref("translate");
|
|
1313
|
-
watch(() => [selected.value, mode.value], ([sel, m]) => {
|
|
1314
|
-
if (m === "edit" && sel?.kind === "device") scene3dRef.value?.setTransformMode(tMode.value);
|
|
1315
|
-
});
|
|
1316
|
-
/** 选中频道(边界编辑面板) */
|
|
1317
|
-
const selectedChannel = ref(null);
|
|
1318
|
-
/** 边界编辑面板(拖拽中存草稿;确认后场景 applySceneLayouts + 落库) */
|
|
1319
|
-
const boundaryDraft = ref(null);
|
|
1320
|
-
/** 频道坞:把某频道拖入场景(须拖拽放置;点击不自动落点)。 */
|
|
1321
|
-
const dockHint = ref("");
|
|
1322
|
-
/** 角色模型选项(character 3D .glb;只在成员/选中面板设置,不进设备模型库) */
|
|
1323
|
-
const agentModels = computed(() => characterAssets.models.filter((m) => m.kind === "glb"));
|
|
1324
|
-
/** 设备模型选项(仅设备模型;换模即时重挂 + 落库) */
|
|
1325
|
-
const deviceModels = computed(() => characterAssets.models.filter((m) => m.kind === "dev"));
|
|
1326
|
-
/** 选中对象名称草稿(设备可改名;角色只读显示) */
|
|
1327
|
-
const objNameDraft = ref("");
|
|
1328
|
-
/** 选中角色活动范围草稿(面板滑杆/形状实时 → setAgentRangeScene;提交 → 落库) */
|
|
1329
|
-
const agentRangeDraft = ref(null);
|
|
1330
|
-
/** 框选绘制中标记(面板按钮态;绘制完成/切换选中/退出编辑自动复位) */
|
|
1331
|
-
const agentDrawingRange = ref(false);
|
|
1332
|
-
watch(() => selected.value, (sel) => {
|
|
1333
|
-
objNameDraft.value = sel?.kind === "device" ? scene3dRef.value?.getDeviceName?.(sel.id) ?? "" : "";
|
|
1334
|
-
agentRangeDraft.value = null;
|
|
1335
|
-
if (sel?.kind === "agent") {
|
|
1336
|
-
const r = scene3dRef.value?.getAgentRange?.(sel.id);
|
|
1337
|
-
agentRangeDraft.value = r ? {
|
|
1338
|
-
radiusX: r.radiusX,
|
|
1339
|
-
radiusZ: r.radiusZ,
|
|
1340
|
-
shape: r.shape
|
|
1341
|
-
} : null;
|
|
1342
|
-
agentDrawingRange.value = scene3dRef.value?.isRangeDrawing(sel.id) ?? false;
|
|
1343
|
-
} else agentDrawingRange.value = false;
|
|
1344
|
-
});
|
|
1345
|
-
/** 活动范围状态文本(对象面板展示) */
|
|
1346
|
-
const agentRangeStatusText = computed(() => {
|
|
1347
|
-
const sel = selected.value;
|
|
1348
|
-
if (!sel || sel.kind !== "agent") return "";
|
|
1349
|
-
const r = scene3dRef.value?.getAgentRange?.(sel.id);
|
|
1350
|
-
if (!r) return t("townView.k1v1icf6160");
|
|
1351
|
-
return `${r.shape === "rect" ? t("townView.k43u0g050") : t("townView.k414bc049")} ${Math.round(r.radiusX)} × ${Math.round(r.radiusZ)}`;
|
|
1352
|
-
});
|
|
1353
|
-
/** 删除选中设备实例(移除孪生 + 场景节点);两步确认:首击布防 3s,再击执行 */
|
|
1354
|
-
const deviceDeleteArmed = ref("");
|
|
1355
|
-
const channelPanelTab = ref("boundary");
|
|
1356
|
-
/** 选中频道成员(供成员 tab 为每个成员设置 character 模型) */
|
|
1357
|
-
const channelMembers = computed(() => {
|
|
1358
|
-
if (!selectedChannel.value) return [];
|
|
1359
|
-
return buildTownInput().find((c) => c.channelId === selectedChannel.value)?.agents ?? [];
|
|
1360
|
-
});
|
|
1361
|
-
/** 场景放置/移除版本戳(blockCount 事件时自增;驱动 dockChannels 对 hasChannel 的响应式重算) */
|
|
1362
|
-
const dockRev = ref(0);
|
|
1363
|
-
/** 频道坞列表(所有挂载频道;已放置/未放置标记) */
|
|
1364
|
-
const dockChannels = computed(() => {
|
|
1365
|
-
dockRev.value;
|
|
1366
|
-
return allMountedChannelIds().map((cid) => {
|
|
1367
|
-
return {
|
|
1368
|
-
channelId: cid,
|
|
1369
|
-
name: entities.channels[cid]?.name ?? cid.slice(0, 8),
|
|
1370
|
-
agentCount: (entities.agents[cid] ?? []).length,
|
|
1371
|
-
placed: scene3dRef.value?.hasChannel(cid) ?? false,
|
|
1372
|
-
color: hashColor(cid)
|
|
1373
|
-
};
|
|
1374
|
-
});
|
|
1375
|
-
});
|
|
1376
|
-
function allMountedChannelIds() {
|
|
1377
|
-
const ids = [];
|
|
1378
|
-
for (const ws of wsWorkspaces() ?? []) for (const cid of ws.channelIds ?? []) if (!ids.includes(cid)) ids.push(cid);
|
|
1379
|
-
if (!ids.includes(props.channelId)) ids.push(props.channelId);
|
|
1380
|
-
return ids;
|
|
1381
|
-
}
|
|
1382
|
-
/** workspaces store(频道坞列举所有已挂载频道) */
|
|
1383
|
-
function wsWorkspaces() {
|
|
1384
|
-
return wsStore.workspaces;
|
|
1385
|
-
}
|
|
1386
|
-
/** 稳定频道色(与场景 channelColorNum 同源:同一 hashHue,UI 用 CSS 色) */
|
|
1387
|
-
function hashColor(id) {
|
|
1388
|
-
return channelColorCss(id);
|
|
1389
|
-
}
|
|
1390
|
-
/** 从 entities store 构建小镇实体基线(当前 workspace 挂载的 channel) */
|
|
1391
|
-
function buildTownInput() {
|
|
1392
|
-
const out = [];
|
|
1393
|
-
for (const [cid, ch] of Object.entries(entities.channels)) {
|
|
1394
|
-
const agents = (entities.agents[cid] ?? []).map((a) => {
|
|
1395
|
-
const curTask = a.currentTaskId ? (entities.tasks[cid] ?? []).find((t) => t.id === a.currentTaskId) : void 0;
|
|
1396
|
-
return {
|
|
1397
|
-
agentId: a.agentId,
|
|
1398
|
-
name: a.name,
|
|
1399
|
-
role: a.role,
|
|
1400
|
-
harness: a.harness,
|
|
1401
|
-
state: a.state,
|
|
1402
|
-
currentTaskId: a.currentTaskId ?? null,
|
|
1403
|
-
currentTaskTitle: curTask?.title ?? null,
|
|
1404
|
-
currentTaskProgress: a.currentTaskProgress ?? curTask?.progress ?? null,
|
|
1405
|
-
modelRef: a.modelRef ?? null,
|
|
1406
|
-
homeX: a.config?.homeX ?? null,
|
|
1407
|
-
homeZ: a.config?.homeZ ?? null,
|
|
1408
|
-
range: a.config?.range ?? null
|
|
1409
|
-
};
|
|
1410
|
-
});
|
|
1411
|
-
out.push({
|
|
1412
|
-
channelId: cid,
|
|
1413
|
-
channelName: ch.name,
|
|
1414
|
-
agents
|
|
1415
|
-
});
|
|
1416
|
-
}
|
|
1417
|
-
return out;
|
|
1418
|
-
}
|
|
1419
|
-
function syncSceneModels(scene) {
|
|
1420
|
-
if (!scene || !("registerModelsFromList" in scene)) return;
|
|
1421
|
-
if ("screenToWorld" in scene) scene.registerModelsFromList(characterAssets.models.map((m) => ({
|
|
1422
|
-
id: m.id,
|
|
1423
|
-
file: m.file,
|
|
1424
|
-
name: m.name,
|
|
1425
|
-
kind: m.kind,
|
|
1426
|
-
hFactor: m.hFactor ?? 1
|
|
1427
|
-
})));
|
|
1428
|
-
else scene.registerModelsFromList(characterAssets.models.map((m) => ({
|
|
1429
|
-
id: m.id,
|
|
1430
|
-
file: m.file,
|
|
1431
|
-
name: m.name
|
|
1432
|
-
})));
|
|
1433
|
-
}
|
|
1434
|
-
watch(() => characterAssets.models.map((m) => `${m.id}:${m.file}`).join("|"), () => syncSceneModels(sceneRef.value));
|
|
1435
|
-
/** 用全量设备池收敛场景节点(真设备孪生 + 全部 DAQ 节点投影;按节点 id 对账)。
|
|
1436
|
-
* 必须传 sceneTwinPool 而非 deviceTwins.twins —— syncDevices 会移除不在清单内的
|
|
1437
|
-
* 本地节点,漏掉 daq 投影时设备事件每次到达都会把场景中的数采节点误删。 */
|
|
1438
|
-
function syncSceneDevices(scene) {
|
|
1439
|
-
if ("syncDevices" in scene) scene.syncDevices(sceneTwinPool.value);
|
|
1440
|
-
}
|
|
1441
|
-
watch(() => sceneLayouts.rev, (rev) => {
|
|
1442
|
-
const scene = scene3dRef.value;
|
|
1443
|
-
if (!scene || !sceneLayouts.loaded || rev === 0) return;
|
|
1444
|
-
scene.hydrate(buildTownInput(), Object.values(sceneLayouts.layouts), sceneTwinPool.value);
|
|
1445
|
-
syncChannelDock();
|
|
1446
|
-
});
|
|
1447
|
-
/** 频道坞已放置/未放置标记刷新(布局变化后) */
|
|
1448
|
-
function syncChannelDock() {
|
|
1449
|
-
sceneLayouts.load().finally(() => {});
|
|
1450
|
-
}
|
|
1451
|
-
/** 设备控制台行点击 → 场景镜头聚焦该实体并选中(工业 HMI 联动手感) */
|
|
1452
|
-
function onFocusDevice(t) {
|
|
1453
|
-
const s = scene3dRef.value;
|
|
1454
|
-
if (!s) return;
|
|
1455
|
-
if (typeof t.posX === "number" && typeof t.posZ === "number") s.focusTo(t.posX, t.posZ);
|
|
1456
|
-
s.setSelected?.({
|
|
1457
|
-
kind: "device",
|
|
1458
|
-
id: t.id
|
|
1459
|
-
});
|
|
1460
|
-
}
|
|
1461
|
-
const panelPos = reactive({});
|
|
1462
|
-
function restorePanelPos() {
|
|
1463
|
-
if (typeof localStorage === "undefined") return;
|
|
1464
|
-
try {
|
|
1465
|
-
const saved = JSON.parse(localStorage.getItem(PANEL_POS_KEY) || "{}");
|
|
1466
|
-
for (const k of Object.keys(saved)) if (saved[k] && Number.isFinite(saved[k].x)) panelPos[k] = saved[k];
|
|
1467
|
-
} catch {}
|
|
1468
|
-
}
|
|
1469
|
-
restorePanelPos();
|
|
1470
|
-
/** 领地块(2D 场景无形状数据 → 回退圆) */
|
|
1471
|
-
const minimap = shallowRef(null);
|
|
1472
|
-
const lastDrop = shallowRef(null);
|
|
1473
|
-
/** 模型落点反馈(供 HUD 显示) */
|
|
1474
|
-
const lastDropText = computed(() => {
|
|
1475
|
-
const d = lastDrop.value;
|
|
1476
|
-
if (!d) return "";
|
|
1477
|
-
return d.mode === "rebind" ? t("townView.kgz2nej193", {
|
|
1478
|
-
p0: d.agentId?.slice(0, 8) ?? t("townView.k479op189"),
|
|
1479
|
-
p1: d.textureKey
|
|
1480
|
-
}) : t("townView.k5e2460194", { p0: d.textureKey });
|
|
1481
|
-
});
|
|
1482
|
-
/** 员工会话台:选中角色时展示其「本人」消息(实时缓冲直采,按 agentId 精确归属;重名不串扰) */
|
|
1483
|
-
const agentChatRows = computed(() => {
|
|
1484
|
-
const sel = selected.value;
|
|
1485
|
-
if (!sel || sel.kind !== "agent") return [];
|
|
1486
|
-
const rows = liveChatBuf.get(sel.id);
|
|
1487
|
-
if (!rows || rows.length === 0) return [];
|
|
1488
|
-
const lastHistAt = agentHistory.value.length ? agentHistory.value[agentHistory.value.length - 1]?.at ?? 0 : 0;
|
|
1489
|
-
return rows.filter((r) => r.at > lastHistAt);
|
|
1490
|
-
});
|
|
1491
|
-
const agentChatTitle = computed(() => {
|
|
1492
|
-
if (!selected.value || selected.value.kind !== "agent") return "";
|
|
1493
|
-
return scene3dRef.value?.getAgentName?.(selected.value.id) ?? t("townView.k3xdvm125");
|
|
1494
|
-
});
|
|
1495
|
-
/** 选中角色的实体元数据(状态/harness/角色;驱动会话台头部状态章) */
|
|
1496
|
-
const selectedAgentMeta = computed(() => {
|
|
1497
|
-
const sel = selected.value;
|
|
1498
|
-
if (!sel || sel.kind !== "agent") return null;
|
|
1499
|
-
for (const list of Object.values(entities.agents)) {
|
|
1500
|
-
const a = (list ?? []).find((x) => x.agentId === sel.id);
|
|
1501
|
-
if (a) return a;
|
|
1502
|
-
}
|
|
1503
|
-
return null;
|
|
1504
|
-
});
|
|
1505
|
-
/** 选中角色的职务名(卡片标题/身份章):Leader / Worker —— 以职务取代人称,贴近 Agent Harness 习惯 */
|
|
1506
|
-
const selectedAgentRoleLabel = computed(() => selectedAgentMeta.value?.role === "lead" ? "Leader" : "Worker");
|
|
1507
|
-
const selectedAgentRoleTag = computed(() => selectedAgentMeta.value?.role === "lead" ? "LEADER" : "WORKER");
|
|
1508
|
-
const agentChatStateLabel = computed(() => {
|
|
1509
|
-
const st = selectedAgentMeta.value?.state;
|
|
1510
|
-
if (st === "busy") return t("townView.k3n4l5f163");
|
|
1511
|
-
if (st === "stopped") return t("townView.k3n58d1164");
|
|
1512
|
-
return t("townView.k3zcvb115");
|
|
1513
|
-
});
|
|
1514
|
-
const agentHistory = ref([]);
|
|
1515
|
-
const historyLoading = ref(false);
|
|
1516
|
-
/** 历史缓存(30s TTL;重选同角色短时间内免拉) */
|
|
1517
|
-
const historyCache = /* @__PURE__ */ new Map();
|
|
1518
|
-
const chatScroll = ref(null);
|
|
1519
|
-
/** 实时消息缓冲(agentId → 近实时条目;响应式 Map,computed 直接追踪) */
|
|
1520
|
-
const liveChatBuf = reactive(/* @__PURE__ */ new Map());
|
|
1521
|
-
function cookieToken() {
|
|
1522
|
-
return "";
|
|
1523
|
-
}
|
|
1524
|
-
function channelOfAgent(agentId) {
|
|
1525
|
-
for (const cid of Object.keys(entities.agents)) if ((entities.agents[cid] ?? []).some((a) => a.agentId === agentId)) return cid;
|
|
1526
|
-
}
|
|
1527
|
-
/** 拉取并缓存该角色的历史对话(按 at 升序;force 跳过 TTL 缓存) */
|
|
1528
|
-
async function loadAgentHistory(agentId, channelId, force = false) {
|
|
1529
|
-
const cached = historyCache.get(agentId);
|
|
1530
|
-
if (!force && cached && Date.now() - cached.at < HISTORY_TTL_MS) {
|
|
1531
|
-
agentHistory.value = cached.rows;
|
|
1532
|
-
return;
|
|
1533
|
-
}
|
|
1534
|
-
historyLoading.value = true;
|
|
1535
|
-
try {
|
|
1536
|
-
const tok = cookieToken();
|
|
1537
|
-
const q = `/api/workshop/channels/${channelId}/events?limit=500&excludeTypes=agent.delta`;
|
|
1538
|
-
const json = await (await fetch(q, { headers: tok ? { authorization: `Bearer ${decodeURIComponent(tok)}` } : {} })).json().catch(() => null);
|
|
1539
|
-
const events = json?.data?.items ?? (Array.isArray(json?.data) ? json.data : []);
|
|
1540
|
-
const rows = [];
|
|
1541
|
-
for (const e of events) {
|
|
1542
|
-
const b = mapEnvelopeToIntent(e)?.bubble;
|
|
1543
|
-
if (!b || b.agentId !== agentId) continue;
|
|
1544
|
-
const atRaw = e.at;
|
|
1545
|
-
const at = typeof atRaw === "number" ? atRaw : atRaw ? Date.parse(String(atRaw)) : 0;
|
|
1546
|
-
rows.push({
|
|
1547
|
-
id: `${String(e.seq ?? rows.length)}-${rows.length}`,
|
|
1548
|
-
agentId: b.agentId,
|
|
1549
|
-
text: b.text,
|
|
1550
|
-
kind: b.kind,
|
|
1551
|
-
at,
|
|
1552
|
-
live: false
|
|
1553
|
-
});
|
|
1554
|
-
}
|
|
1555
|
-
rows.sort((a, b) => a.at - b.at);
|
|
1556
|
-
historyCache.set(agentId, {
|
|
1557
|
-
rows,
|
|
1558
|
-
at: Date.now()
|
|
1559
|
-
});
|
|
1560
|
-
agentHistory.value = rows;
|
|
1561
|
-
} catch {
|
|
1562
|
-
agentHistory.value = [];
|
|
1563
|
-
} finally {
|
|
1564
|
-
historyLoading.value = false;
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
watch(() => selected.value, (sel) => {
|
|
1568
|
-
if (!sel || sel.kind !== "agent") {
|
|
1569
|
-
agentHistory.value = [];
|
|
1570
|
-
return;
|
|
1571
|
-
}
|
|
1572
|
-
const cid = channelOfAgent(sel.id);
|
|
1573
|
-
if (cid) loadAgentHistory(sel.id, cid);
|
|
1574
|
-
else agentHistory.value = [];
|
|
1575
|
-
}, { immediate: true });
|
|
1576
|
-
/** 选中角色的身份色(频道哈希,与场景环同源) */
|
|
1577
|
-
const agentChatColor = computed(() => {
|
|
1578
|
-
const sel = selected.value;
|
|
1579
|
-
if (!sel || sel.kind !== "agent") return "#35e0a0";
|
|
1580
|
-
const cid = channelOfAgent(sel.id);
|
|
1581
|
-
return cid ? channelColorCss(cid) ?? "#35e0a0" : "#35e0a0";
|
|
1582
|
-
});
|
|
1583
|
-
/** 对话类型标签(工业 HMI 小印章) */
|
|
1584
|
-
function chatKindLabel(kind) {
|
|
1585
|
-
switch (kind) {
|
|
1586
|
-
case "artifact": return t("townView.k3w9q9165");
|
|
1587
|
-
case "delta": return "……";
|
|
1588
|
-
case "info": return t("townView.k44xa7166");
|
|
1589
|
-
case "error": return t("townView.k3zbgf167");
|
|
1590
|
-
default: return "";
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
/** 时间戳(HH:MM:SS;空值占位) */
|
|
1594
|
-
function fmtTime(at) {
|
|
1595
|
-
if (!at || !Number.isFinite(at) || at <= 0) return "--:--:--";
|
|
1596
|
-
const d = new Date(at);
|
|
1597
|
-
return `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}:${String(d.getSeconds()).padStart(2, "0")}`;
|
|
1598
|
-
}
|
|
1599
|
-
watch(() => agentHistory.value.length + agentChatRows.value.length, async () => {
|
|
1600
|
-
await nextTick();
|
|
1601
|
-
const el = chatScroll.value;
|
|
1602
|
-
if (el) el.scrollTop = el.scrollHeight;
|
|
1603
|
-
});
|
|
1604
|
-
/** 场景管线统一设备池:真实设备孪生(剔除旧 daq 孪生)+ server 数采节点伪孪生 */
|
|
1605
|
-
/** 产线光晕色(lineId → Hex;未分配 undefined = 缺省绿) */
|
|
1606
|
-
const lineColorOf = (lid) => dcw.lines.find((l) => l.id === lid)?.color;
|
|
1607
|
-
/** 智控节点伪孪生投影(与 daqTwins 同构;value = 当前设定值;lineColor = 产线光环) */
|
|
1608
|
-
const dcwTwins = computed(() => dcw.nodes.map((n) => ({
|
|
1609
|
-
id: n.id,
|
|
1610
|
-
workspaceId: "",
|
|
1611
|
-
name: n.name,
|
|
1612
|
-
modelRef: `dcw-${n.templateRef.startsWith("dcw-") ? n.templateRef.slice(4) : n.templateRef}`,
|
|
1613
|
-
boundAgentId: null,
|
|
1614
|
-
kind: "daq",
|
|
1615
|
-
telemetry: { value: n.value ?? 0 },
|
|
1616
|
-
desired: {},
|
|
1617
|
-
controls: [],
|
|
1618
|
-
state: n.enabled ? n.state === "error" ? "alarm" : "running" : "offline",
|
|
1619
|
-
posX: n.posX,
|
|
1620
|
-
posZ: n.posZ,
|
|
1621
|
-
lineId: n.lineId || void 0,
|
|
1622
|
-
lineColor: n.lineId ? lineColorOf(n.lineId) : void 0,
|
|
1623
|
-
updatedAt: n.lastWriteAt ?? n.createdAt
|
|
1624
|
-
})));
|
|
1625
|
-
const sceneTwinPool = computed(() => [
|
|
1626
|
-
...deviceTwins.twins.filter((t) => !isLegacyDaqTwin(t)),
|
|
1627
|
-
...daqTwins.value,
|
|
1628
|
-
...dcwTwins.value
|
|
1629
|
-
]);
|
|
1630
|
-
const sceneTwinById = (id) => sceneTwinPool.value.find((t) => t.id === id);
|
|
1631
|
-
/** 空场景提示判定:场景里没有任何「已落位」实体(设备/数采/数控)且无频道积木时才提示。
|
|
1632
|
-
* 只看 blockCount 会在清空频道布局后、设备与工业节点仍在场时误报"空场景"。 */
|
|
1633
|
-
const sceneEmpty = computed(() => ready.value && blockCount.value === 0 && !sceneTwinPool.value.some((t) => typeof t.posX === "number" && typeof t.posZ === "number"));
|
|
1634
|
-
/** 事件流:最近事件队列(at 供右轨"实时事件"面板;2D 场景无 at → 占位) */
|
|
1635
|
-
const ticker = shallowRef([]);
|
|
1636
|
-
/** 数采流单例:REST 快照 + townBus WS 帧(reading/node.changed/controller) */
|
|
1637
|
-
const daq = useDaqStream();
|
|
1638
|
-
/** 智控流单例(写控制;与数采对称:模板目录/节点/场景/绑定) */
|
|
1639
|
-
const dcw = useDcwStream();
|
|
1640
|
-
/** 智控模板目录(server 权威;与 daqTemplates 同构投影) */
|
|
1641
|
-
const dcwTemplates = reactive(dcw.templates.map((t) => ({
|
|
1642
|
-
id: t.key,
|
|
1643
|
-
name: t.name,
|
|
1644
|
-
code: t.code,
|
|
1645
|
-
ch: t.ch,
|
|
1646
|
-
unit: t.unit,
|
|
1647
|
-
min: t.min,
|
|
1648
|
-
max: t.max,
|
|
1649
|
-
decimals: t.decimals,
|
|
1650
|
-
icon: t.icon
|
|
1651
|
-
})));
|
|
1652
|
-
watch(() => dcw.templates, (list) => {
|
|
1653
|
-
if (!list?.length) return;
|
|
1654
|
-
dcwTemplates.splice(0, dcwTemplates.length, ...list.map((t) => ({
|
|
1655
|
-
id: t.key,
|
|
1656
|
-
name: t.name,
|
|
1657
|
-
code: t.code,
|
|
1658
|
-
ch: t.ch,
|
|
1659
|
-
unit: t.unit,
|
|
1660
|
-
min: t.min,
|
|
1661
|
-
max: t.max,
|
|
1662
|
-
decimals: t.decimals,
|
|
1663
|
-
icon: t.icon
|
|
1664
|
-
})));
|
|
1665
|
-
}, {
|
|
1666
|
-
immediate: true,
|
|
1667
|
-
deep: true
|
|
1668
|
-
});
|
|
1669
|
-
/** 左轨树形目录:模板 = 可展开分组(不可拖拽),节点 = 可拖入场景的叶子。
|
|
1670
|
-
* 展开状态持久化(aw.twin.treeOpen),拖拽载荷 = 既有节点 id(非模板)。 */
|
|
1671
|
-
const treeOpen = useStorage("aw.twin.treeOpen", {});
|
|
1672
|
-
const daqNodesByTpl = computed(() => {
|
|
1673
|
-
const m = /* @__PURE__ */ new Map();
|
|
1674
|
-
for (const n of daq.nodes) {
|
|
1675
|
-
const key = n.templateRef.startsWith("daq-") ? n.templateRef.slice(4) : n.templateRef;
|
|
1676
|
-
const arr = m.get(key) ?? [];
|
|
1677
|
-
arr.push(n);
|
|
1678
|
-
m.set(key, arr);
|
|
1679
|
-
}
|
|
1680
|
-
for (const arr of m.values()) arr.sort((a, b) => a.name.localeCompare(b.name, void 0, { numeric: true }));
|
|
1681
|
-
return m;
|
|
1682
|
-
});
|
|
1683
|
-
const dcwNodesByTpl = computed(() => {
|
|
1684
|
-
const m = /* @__PURE__ */ new Map();
|
|
1685
|
-
for (const n of dcw.nodes) {
|
|
1686
|
-
const key = n.templateRef.startsWith("dcw-") ? n.templateRef.slice(4) : n.templateRef;
|
|
1687
|
-
const arr = m.get(key) ?? [];
|
|
1688
|
-
arr.push(n);
|
|
1689
|
-
m.set(key, arr);
|
|
1690
|
-
}
|
|
1691
|
-
for (const arr of m.values()) arr.sort((a, b) => a.name.localeCompare(b.name, void 0, { numeric: true }));
|
|
1692
|
-
return m;
|
|
1693
|
-
});
|
|
1694
|
-
/** 叶子状态点(与伪孪生投影同一状态语义):绿=运行/黄=预警/红=告警/空心=离线 */
|
|
1695
|
-
function daqLeafState(n) {
|
|
1696
|
-
if (!daq.controller.running || !n.enabled || n.state === "offline") return "offline";
|
|
1697
|
-
if (n.state === "alarm") return "alarm";
|
|
1698
|
-
if (n.state === "warn") return "warn";
|
|
1699
|
-
return "running";
|
|
1700
|
-
}
|
|
1701
|
-
function dcwLeafState(n) {
|
|
1702
|
-
if (!n.enabled || n.state === "error") return "offline";
|
|
1703
|
-
return "running";
|
|
1704
|
-
}
|
|
1705
|
-
/** 左轨模板目录(server 权威:内置 + 自定义随 REST/WS 收敛;字段名兼容既有轨道模板标记) */
|
|
1706
|
-
const daqTemplates = reactive(DAQ_TEMPLATES.map((t) => ({
|
|
1707
|
-
id: t.key,
|
|
1708
|
-
name: t.name,
|
|
1709
|
-
code: t.code,
|
|
1710
|
-
ch: t.ch,
|
|
1711
|
-
unit: t.unit,
|
|
1712
|
-
base: t.base,
|
|
1713
|
-
amp: t.amp,
|
|
1714
|
-
min: t.min,
|
|
1715
|
-
max: t.max,
|
|
1716
|
-
decimals: t.decimals,
|
|
1717
|
-
icon: t.icon
|
|
1718
|
-
})));
|
|
1719
|
-
watch(() => daq.templates, (list) => {
|
|
1720
|
-
if (!list?.length) return;
|
|
1721
|
-
daqTemplates.splice(0, daqTemplates.length, ...list.map((t) => ({
|
|
1722
|
-
id: t.key,
|
|
1723
|
-
name: t.name,
|
|
1724
|
-
code: t.code,
|
|
1725
|
-
ch: t.ch,
|
|
1726
|
-
unit: t.unit,
|
|
1727
|
-
base: t.base,
|
|
1728
|
-
amp: t.amp,
|
|
1729
|
-
min: t.min,
|
|
1730
|
-
max: t.max,
|
|
1731
|
-
decimals: t.decimals,
|
|
1732
|
-
icon: t.icon
|
|
1733
|
-
})));
|
|
1734
|
-
}, {
|
|
1735
|
-
immediate: true,
|
|
1736
|
-
deep: true
|
|
1737
|
-
});
|
|
1738
|
-
const daqTplById = (ref) => {
|
|
1739
|
-
const key = ref.startsWith("daq-") ? ref.slice(4) : ref;
|
|
1740
|
-
return daqTemplates.find((t) => t.id === key);
|
|
1741
|
-
};
|
|
1742
|
-
const daqTplOf = (n) => daqTplById(n.templateRef);
|
|
1743
|
-
/** 孪生状态映射(node state → DeviceTwin.state 联合;warn 在值卡层表达) */
|
|
1744
|
-
function effectiveTwinState(n) {
|
|
1745
|
-
if (!daq.controller.running || !n.enabled) return "offline";
|
|
1746
|
-
if (n.state === "alarm") return "alarm";
|
|
1747
|
-
return "running";
|
|
1748
|
-
}
|
|
1749
|
-
/** 场景中的数采实例(server Node → 伪孪生投影;与设备孪生同构进 syncDevices/callout 管线) */
|
|
1750
|
-
const isLegacyDaqTwin = (t) => t.kind === "daq" || (t.modelRef ?? "").startsWith("daq-");
|
|
1751
|
-
const daqTwins = computed(() => daq.nodes.map((n) => ({
|
|
1752
|
-
id: n.id,
|
|
1753
|
-
workspaceId: "",
|
|
1754
|
-
name: n.name,
|
|
1755
|
-
modelRef: `daq-${daqTplOf(n)?.id ?? "unknown"}`,
|
|
1756
|
-
boundAgentId: null,
|
|
1757
|
-
kind: "daq",
|
|
1758
|
-
telemetry: { value: n.value ?? 0 },
|
|
1759
|
-
desired: {},
|
|
1760
|
-
controls: [],
|
|
1761
|
-
state: effectiveTwinState(n),
|
|
1762
|
-
posX: n.posX,
|
|
1763
|
-
posZ: n.posZ,
|
|
1764
|
-
lineId: n.lineId || void 0,
|
|
1765
|
-
lineColor: n.lineId ? lineColorOf(n.lineId) : void 0,
|
|
1766
|
-
updatedAt: n.lastAt ?? n.createdAt
|
|
1767
|
-
})));
|
|
1768
|
-
/**
|
|
1769
|
-
* 兼容视图:旧 UI 全部消费 DaqSimState(value/hist/tpl/alarm),保留同形结构。
|
|
1770
|
-
*
|
|
1771
|
-
* 双通道数据消费(与渲染帧率彻底解耦):
|
|
1772
|
-
* - 消费层:WS 读数帧直写 rtcVals/rtcHist(非响应式,帧到即入,零合批延迟),
|
|
1773
|
-
* 告警边沿检测同帧完成(异常事件即时上屏);
|
|
1774
|
-
* - 展示层:daqSim 计算属性消费 rtc 覆盖 + store hist(趋势),帧计数器作失效信号,
|
|
1775
|
-
* Vue 渲染管线自行合批 DOM 更新;场景渲染循环每帧只取「当前最新值」。
|
|
1776
|
-
*/
|
|
1777
|
-
const liveTick = ref(0);
|
|
1778
|
-
const rtcVals = /* @__PURE__ */ new Map();
|
|
1779
|
-
const rtcHist = /* @__PURE__ */ new Map();
|
|
1780
|
-
const daqSim = computed(() => {
|
|
1781
|
-
liveTick.value;
|
|
1782
|
-
const m = /* @__PURE__ */ new Map();
|
|
1783
|
-
for (const n of daq.nodes) {
|
|
1784
|
-
const tpl = daqTplOf(n);
|
|
1785
|
-
if (!tpl) continue;
|
|
1786
|
-
const lv = rtcVals.get(n.id);
|
|
1787
|
-
const fresher = lv && (!n.lastAt || lv.atMs >= Date.parse(n.lastAt));
|
|
1788
|
-
const value = fresher ? lv.value : n.value;
|
|
1789
|
-
if (value == null) continue;
|
|
1790
|
-
const state = fresher ? lv.state : n.state;
|
|
1791
|
-
m.set(n.id, {
|
|
1792
|
-
value,
|
|
1793
|
-
hist: rtcHist.get(n.id) ?? n.hist,
|
|
1794
|
-
phase: 0,
|
|
1795
|
-
tpl,
|
|
1796
|
-
alarm: state === "alarm"
|
|
1797
|
-
});
|
|
1798
|
-
}
|
|
1799
|
-
return m;
|
|
1800
|
-
});
|
|
1801
|
-
const fmtDaq = (st) => st.value.toFixed(st.tpl.decimals);
|
|
1802
|
-
/** 告警推进(server 派生 state 变化 → 场景告警面板;恢复自动消警语义保持)。
|
|
1803
|
-
* prevDaqState 为帧通道(即时)与批量 watch(兜底)共享的去重账本 —— 先到先记。 */
|
|
1804
|
-
const prevDaqState = /* @__PURE__ */ new Map();
|
|
1805
|
-
/** 状态边沿 → 告警文案(crit/warn/恢复 info;label 优先绑定设备名) */
|
|
1806
|
-
function stateEdgeAlarm(nodeId, prevState, nextState, value) {
|
|
1807
|
-
const n = daq.nodeById(nodeId);
|
|
1808
|
-
const tpl = n ? daqTplOf(n) : null;
|
|
1809
|
-
const devIds = n?.deviceIds ?? (n?.deviceBindingId ? [n.deviceBindingId] : []);
|
|
1810
|
-
const label = (devIds.length ? devIds.map((id) => deviceTwins.byId(id)?.name ?? id.slice(0, 8)).join(" / ") : null) ?? n?.name ?? nodeId.slice(0, 8);
|
|
1811
|
-
const val = `${value?.toFixed(tpl?.decimals ?? 2) ?? "--"} ${tpl?.unit ?? ""}`;
|
|
1812
|
-
if (nextState === "alarm") raiseAlarm(t("townView.k113fir9195", {
|
|
1813
|
-
p0: label,
|
|
1814
|
-
p1: tpl?.ch ?? "",
|
|
1815
|
-
p2: val
|
|
1816
|
-
}), "crit", label);
|
|
1817
|
-
else if (nextState === "warn") raiseAlarm(t("townView.k1knv89d196", {
|
|
1818
|
-
p0: label,
|
|
1819
|
-
p1: tpl?.ch ?? "",
|
|
1820
|
-
p2: val
|
|
1821
|
-
}), "warn", label);
|
|
1822
|
-
else if (prevState !== "ok" && nextState === "ok") raiseAlarm(t("townView.ksjancw197", {
|
|
1823
|
-
p0: label,
|
|
1824
|
-
p1: tpl?.ch ?? ""
|
|
1825
|
-
}), "info", label);
|
|
1826
|
-
}
|
|
1827
|
-
/** 批量兜底:REST 快照收敛时捕捉帧通道未见的边沿(如离线判定);帧通道已记的自动去重 */
|
|
1828
|
-
watch(() => daq.nodes.map((n) => `${n.id}:${n.state}`).join("|"), () => {
|
|
1829
|
-
for (const n of daq.nodes) {
|
|
1830
|
-
const prev = prevDaqState.get(n.id);
|
|
1831
|
-
prevDaqState.set(n.id, n.state);
|
|
1832
|
-
if (!prev || prev === n.state) continue;
|
|
1833
|
-
stateEdgeAlarm(n.id, prev, n.state, n.value);
|
|
1834
|
-
}
|
|
1835
|
-
});
|
|
1836
|
-
function approvalRemainingSec(ap) {
|
|
1837
|
-
return Math.max(0, Math.ceil((Date.parse(ap.expiresAt) - Date.now()) / 1e3));
|
|
1838
|
-
}
|
|
1839
|
-
const authHeaders = () => {
|
|
1840
|
-
const token = (void 0).cookie.match(/(?:^|;\s*)token=([^;]+)/)?.[1] ?? "";
|
|
1841
|
-
return {
|
|
1842
|
-
"content-type": "application/json",
|
|
1843
|
-
"authorization": `Bearer ${decodeURIComponent(token)}`
|
|
1844
|
-
};
|
|
1845
|
-
};
|
|
1846
|
-
const agentBindings = ref([]);
|
|
1847
|
-
const agentBindKind = ref("dcw");
|
|
1848
|
-
const agentBindNodeId = ref("");
|
|
1849
|
-
const agentBindMode = ref("auto");
|
|
1850
|
-
const pendingApprovals = ref([]);
|
|
1851
|
-
const approvalComments = reactive({});
|
|
1852
|
-
let approvalPoll = null;
|
|
1853
|
-
async function loadAgentBindings() {
|
|
1854
|
-
const id = selected.value?.id;
|
|
1855
|
-
if (selected.value?.kind !== "agent" || !id) return;
|
|
1856
|
-
try {
|
|
1857
|
-
const r = await fetch(`/api/workshop/agent-tools/bindings?agentId=${encodeURIComponent(id)}`, { headers: authHeaders() }).then((x) => x.json());
|
|
1858
|
-
agentBindings.value = r.data?.bindings ?? [];
|
|
1859
|
-
} catch {}
|
|
1860
|
-
}
|
|
1861
|
-
async function loadPendingApprovals() {
|
|
1862
|
-
const id = selected.value?.id;
|
|
1863
|
-
if (selected.value?.kind !== "agent" || !id) return;
|
|
1864
|
-
try {
|
|
1865
|
-
const r = await fetch(`/api/workshop/agent-tools/approvals?agentId=${encodeURIComponent(id)}`, { headers: authHeaders() }).then((x) => x.json());
|
|
1866
|
-
pendingApprovals.value = r.data?.approvals ?? [];
|
|
1867
|
-
} catch {}
|
|
1868
|
-
}
|
|
1869
|
-
watch(() => selected.value?.id, (id) => {
|
|
1870
|
-
if (approvalPoll) {
|
|
1871
|
-
clearInterval(approvalPoll);
|
|
1872
|
-
approvalPoll = null;
|
|
1873
|
-
}
|
|
1874
|
-
if (selected.value?.kind === "agent" && id) {
|
|
1875
|
-
loadAgentBindings();
|
|
1876
|
-
loadPendingApprovals();
|
|
1877
|
-
approvalPoll = setInterval();
|
|
1878
|
-
}
|
|
1879
|
-
}, { immediate: true });
|
|
1880
|
-
/** 绑定行的节点名(dcw/daq store 解析) */
|
|
1881
|
-
function bindingNodeName(b) {
|
|
1882
|
-
return b.kind === "dcw" ? dcw.nodeById(b.nodeId)?.name ?? b.nodeId : daq.nodeById(b.nodeId)?.name ?? b.nodeId;
|
|
1883
|
-
}
|
|
1884
|
-
/** 数采 → 设备绑定(server 权威:node.deviceBindingId;REST bind 落库 + WS 收敛) */
|
|
1885
|
-
const boundDeviceOf = (daqId) => daq.nodeById(daqId)?.deviceIds?.[0] ?? daq.nodeById(daqId)?.deviceBindingId ?? null;
|
|
1886
|
-
const daqOfDevice = (deviceId) => deviceId ? daq.nodes.filter((n) => (n.deviceIds ?? (n.deviceBindingId ? [n.deviceBindingId] : [])).includes(deviceId)).map((n) => n.id) : [];
|
|
1887
|
-
/** bind-pop:添加数采通道 —— 直接选择节点实例绑定(server 权威 deviceBindingId,双向同源)。
|
|
1888
|
-
* 列出未绑定 + 绑在他设备的节点(按模板分组,显示当前归属);不再隐式创建/就近复用。 */
|
|
1889
|
-
const bindPopOpen = ref(false);
|
|
1890
|
-
const dcwBindPopOpen = ref(false);
|
|
1891
|
-
/** 弹层高度钳制:top 恰好贴住所属 Inspector 卡片顶缘(不越出面板、不顶到页面顶部) */
|
|
1892
|
-
const bindPopMaxH = ref(420);
|
|
1893
|
-
/**
|
|
1894
|
-
* 绑定候选行(数采/智控两个绑定弹层共用)。
|
|
1895
|
-
* tpl 只声明弹层真正读取、且两套模板目录都有的字段:数采侧是 DaqTemplate,
|
|
1896
|
-
* 智控侧是 dcw.templates 的同构投影 —— 后者本就没有 base/amp 等数采专有字段。
|
|
1897
|
-
*/
|
|
1898
|
-
const daqBindChoices = computed(() => {
|
|
1899
|
-
const devId = selected.value?.kind === "device" ? selected.value.id : "";
|
|
1900
|
-
const map = {};
|
|
1901
|
-
if (!devId) return map;
|
|
1902
|
-
for (const n of daq.nodes) {
|
|
1903
|
-
if (n.deviceBindingId === devId) continue;
|
|
1904
|
-
const tpl = daqTplOf(n);
|
|
1905
|
-
if (!tpl) continue;
|
|
1906
|
-
(map[tpl.id] ??= []).push({
|
|
1907
|
-
id: n.id,
|
|
1908
|
-
name: n.name,
|
|
1909
|
-
tpl,
|
|
1910
|
-
devName: n.deviceBindingId ? deviceTwins.byId(n.deviceBindingId)?.name ?? null : null,
|
|
1911
|
-
placed: typeof n.posX === "number"
|
|
1912
|
-
});
|
|
1913
|
-
}
|
|
1914
|
-
return map;
|
|
1915
|
-
});
|
|
1916
|
-
const daqBindChoiceCount = computed(() => Object.values(daqBindChoices.value).reduce((s, a) => s + a.length, 0));
|
|
1917
|
-
/** 场景链路同步:绑定关系 → TownScene3D.syncDaqLinks(虚线 + 脉冲);server 绑定为权威 */
|
|
1918
|
-
watch(() => daq.nodes.map((n) => `${n.id}:${n.posX ?? ""}:${n.posZ ?? ""}:${n.enabled}:${n.state}:${n.deviceBindingId ?? ""}`).join("|"), () => {
|
|
1919
|
-
if (sceneRef.value) syncSceneDevices(sceneRef.value);
|
|
1920
|
-
});
|
|
1921
|
-
watch(() => dcw.nodes.map((n) => `${n.id}:${n.posX ?? ""}:${n.posZ ?? ""}:${n.enabled}:${n.deviceBindingId ?? ""}:${n.value ?? ""}`).join("|"), () => {
|
|
1922
|
-
if (sceneRef.value) syncSceneDevices(sceneRef.value);
|
|
1923
|
-
});
|
|
1924
|
-
watch(() => daq.nodes.map((n) => `${n.id}:${n.deviceBindingId ?? ""}`).join("|"), () => {
|
|
1925
|
-
const s = scene3dRef.value;
|
|
1926
|
-
if (!s || !("syncDaqLinks" in s)) return;
|
|
1927
|
-
s.syncDaqLinks(daq.nodes.filter((n) => n.deviceBindingId).map((n) => ({
|
|
1928
|
-
daqId: n.id,
|
|
1929
|
-
deviceId: n.deviceBindingId
|
|
1930
|
-
})));
|
|
1931
|
-
});
|
|
1932
|
-
/** 选中上下文:是否数采节点 / 其模板 / 实时值 */
|
|
1933
|
-
const selectedIsDaq = computed(() => selected.value?.kind === "device" && (daqOfSelected.value?.modelRef || "").startsWith("daq-"));
|
|
1934
|
-
const daqOfSelected = computed(() => {
|
|
1935
|
-
if (selected.value?.kind !== "device") return null;
|
|
1936
|
-
return sceneTwinById(selected.value?.id) ?? null;
|
|
1937
|
-
});
|
|
1938
|
-
const selectedDaqSim = computed(() => {
|
|
1939
|
-
const id = selected.value?.id;
|
|
1940
|
-
return id ? daqSim.value.get(id) ?? null : null;
|
|
1941
|
-
});
|
|
1942
|
-
/** 绑定选择器:待绑定数采下拉 */
|
|
1943
|
-
const bindPick = ref("");
|
|
1944
|
-
const boundDaqRows = computed(() => {
|
|
1945
|
-
const id = selected.value?.id;
|
|
1946
|
-
if (!id) return [];
|
|
1947
|
-
return daqOfDevice(id).map((daqId) => {
|
|
1948
|
-
const twin = sceneTwinById(daqId);
|
|
1949
|
-
const st = daqSim.value.get(daqId);
|
|
1950
|
-
const tpl = st?.tpl ?? daqTplById(twin?.modelRef ?? "");
|
|
1951
|
-
return {
|
|
1952
|
-
daqId,
|
|
1953
|
-
name: twin?.name ?? daqId,
|
|
1954
|
-
ch: tpl?.ch ?? t("townView.k1ef3cls168"),
|
|
1955
|
-
icon: tpl?.icon ?? "gateway",
|
|
1956
|
-
value: st ? fmtDaq(st) : "--",
|
|
1957
|
-
unit: st?.tpl.unit ?? tpl?.unit ?? "",
|
|
1958
|
-
color: trendColor(daqId)
|
|
1959
|
-
};
|
|
1960
|
-
});
|
|
1961
|
-
});
|
|
1962
|
-
/** 数采节点选中:其绑定设备名 */
|
|
1963
|
-
const daqBoundDeviceName = computed(() => {
|
|
1964
|
-
const id = selected.value?.id;
|
|
1965
|
-
if (!id) return "";
|
|
1966
|
-
const devId = boundDeviceOf(id);
|
|
1967
|
-
if (!devId) return "";
|
|
1968
|
-
return deviceTwins.twins.find((t) => t.id === devId)?.name ?? devId.slice(0, 8);
|
|
1969
|
-
});
|
|
1970
|
-
const dcwOfDevice = (deviceId) => deviceId ? dcw.nodes.filter((n) => n.deviceBindingId === deviceId) : [];
|
|
1971
|
-
/** 活动配方对该智控节点的工艺窗口参数(产线未开跑/未命中 → null = 用节点全局量程) */
|
|
1972
|
-
/** 节点所属产线的活动配方窗口参数(逐产线运行窗;节点级寻址) */
|
|
1973
|
-
function activeRecipeParamOf(dcwId) {
|
|
1974
|
-
const node = dcw.nodeById(dcwId);
|
|
1975
|
-
if (!node || !node.lineId) return null;
|
|
1976
|
-
const run = dcw.lineStateOf(node.lineId);
|
|
1977
|
-
if (!run.active || !run.recipeId) return null;
|
|
1978
|
-
const r = dcw.recipes.find((x) => x.id === run.recipeId);
|
|
1979
|
-
if (!r) return null;
|
|
1980
|
-
return r.params.find((p) => p.nodeId === dcwId) ?? null;
|
|
1981
|
-
}
|
|
1982
|
-
const boundDcwRows = computed(() => {
|
|
1983
|
-
const id = selected.value?.id;
|
|
1984
|
-
if (!id) return [];
|
|
1985
|
-
return dcwOfDevice(id).map((n) => {
|
|
1986
|
-
const key = n.templateRef.startsWith("dcw-") ? n.templateRef.slice(4) : n.templateRef;
|
|
1987
|
-
const tpl = dcw.templates.find((t) => t.key === key);
|
|
1988
|
-
const rp = activeRecipeParamOf(n.id);
|
|
1989
|
-
return {
|
|
1990
|
-
dcwId: n.id,
|
|
1991
|
-
name: n.name,
|
|
1992
|
-
ch: tpl?.ch ?? key,
|
|
1993
|
-
unit: n.unit,
|
|
1994
|
-
icon: tpl?.icon ?? "gateway",
|
|
1995
|
-
value: n.value,
|
|
1996
|
-
state: n.state,
|
|
1997
|
-
decimals: n.decimals,
|
|
1998
|
-
gMin: n.min,
|
|
1999
|
-
gMax: n.max,
|
|
2000
|
-
rMin: rp?.min ?? null,
|
|
2001
|
-
rMax: rp?.max ?? null
|
|
2002
|
-
};
|
|
2003
|
-
});
|
|
2004
|
-
});
|
|
2005
|
-
/** 生效窗口:活动配方窗口优先,否则节点全局量程 */
|
|
2006
|
-
function dcwWindowOf(node) {
|
|
2007
|
-
const rp = activeRecipeParamOf(node.id);
|
|
2008
|
-
if (rp && (rp.min != null || rp.max != null)) return {
|
|
2009
|
-
lo: rp.min ?? Number.NEGATIVE_INFINITY,
|
|
2010
|
-
hi: rp.max ?? Number.POSITIVE_INFINITY,
|
|
2011
|
-
src: "recipe"
|
|
2012
|
-
};
|
|
2013
|
-
return {
|
|
2014
|
-
lo: node.min,
|
|
2015
|
-
hi: node.max,
|
|
2016
|
-
src: "global"
|
|
2017
|
-
};
|
|
2018
|
-
}
|
|
2019
|
-
/** 窗口游标(0~100%):当前设定值在生效窗口带上的位置(越界钳边;∞ 窗口居中) */
|
|
2020
|
-
function dcwMarkPct(r) {
|
|
2021
|
-
const lo = r.rMin ?? r.gMin;
|
|
2022
|
-
const hi = r.rMax ?? r.gMax;
|
|
2023
|
-
if (!Number.isFinite(lo) || !Number.isFinite(hi) || hi <= lo || r.value == null) return 50;
|
|
2024
|
-
return Math.min(100, Math.max(0, (r.value - lo) / (hi - lo) * 100));
|
|
2025
|
-
}
|
|
2026
|
-
const dcwWriteDrafts = reactive({});
|
|
2027
|
-
const dcwWriteErrs = reactive({});
|
|
2028
|
-
/** 添加智控通道 —— 直接选择节点实例绑定(与数采同构;绑定后设备面板可 SET 直写) */
|
|
2029
|
-
const dcwTplById = (ref_) => {
|
|
2030
|
-
const key = ref_.startsWith("dcw-") ? ref_.slice(4) : ref_;
|
|
2031
|
-
return dcwTemplates.find((t) => t.id === key);
|
|
2032
|
-
};
|
|
2033
|
-
const dcwBindChoices = computed(() => {
|
|
2034
|
-
const devId = selected.value?.kind === "device" ? selected.value.id : "";
|
|
2035
|
-
const map = {};
|
|
2036
|
-
if (!devId) return map;
|
|
2037
|
-
for (const n of dcw.nodes) {
|
|
2038
|
-
if (n.deviceBindingId === devId) continue;
|
|
2039
|
-
const tpl = dcwTplById(n.templateRef);
|
|
2040
|
-
if (!tpl) continue;
|
|
2041
|
-
(map[tpl.id] ??= []).push({
|
|
2042
|
-
id: n.id,
|
|
2043
|
-
name: n.name,
|
|
2044
|
-
tpl,
|
|
2045
|
-
devName: n.deviceBindingId ? deviceTwins.byId(n.deviceBindingId)?.name ?? null : null,
|
|
2046
|
-
placed: typeof n.posX === "number"
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
return map;
|
|
2050
|
-
});
|
|
2051
|
-
const dcwBindChoiceCount = computed(() => Object.values(dcwBindChoices.value).reduce((s, a) => s + a.length, 0));
|
|
2052
|
-
/** 选中智控节点(检查器:绑定设备 + 设定值直写) */
|
|
2053
|
-
const selectedIsDcw = computed(() => selected.value?.kind === "device" && (sceneTwinById(selected.value?.id)?.modelRef ?? "").startsWith("dcw-"));
|
|
2054
|
-
const selectedDcwNode = computed(() => {
|
|
2055
|
-
const id = selected.value?.id;
|
|
2056
|
-
return id ? dcw.nodeById(id) ?? null : null;
|
|
2057
|
-
});
|
|
2058
|
-
const selectedDcwWindow = computed(() => {
|
|
2059
|
-
const n = selectedDcwNode.value;
|
|
2060
|
-
return n ? dcwWindowOf(n) : null;
|
|
2061
|
-
});
|
|
2062
|
-
const selectedDcwDeviceName = computed(() => {
|
|
2063
|
-
const n = selectedDcwNode.value;
|
|
2064
|
-
if (!n?.deviceBindingId) return "";
|
|
2065
|
-
return deviceTwins.twins.find((t) => t.id === n.deviceBindingId)?.name ?? n.deviceBindingId.slice(0, 8);
|
|
2066
|
-
});
|
|
2067
|
-
const dcwBindPick = ref("");
|
|
2068
|
-
function dcwWinLabel(n) {
|
|
2069
|
-
if (!n) return "--";
|
|
2070
|
-
const w = dcwWindowOf(n);
|
|
2071
|
-
return `${Number.isFinite(w.lo) ? w.lo : "-∞"} ~ ${Number.isFinite(w.hi) ? w.hi : "+∞"} ${n.unit}`;
|
|
2072
|
-
}
|
|
2073
|
-
function dcwWinInputPh(n) {
|
|
2074
|
-
if (!n) return "";
|
|
2075
|
-
const w = dcwWindowOf(n);
|
|
2076
|
-
return `${Number.isFinite(w.lo) ? w.lo : ""} ~ ${Number.isFinite(w.hi) ? w.hi : ""}`;
|
|
2077
|
-
}
|
|
2078
|
-
/** 选中数采节点的 live 视图(检查器单点控制用:启停/周期/阈值/解绑/删除) */
|
|
2079
|
-
const selectedDaqNode = computed(() => {
|
|
2080
|
-
const id = selected.value?.id;
|
|
2081
|
-
return id ? daq.nodeById(id) ?? null : null;
|
|
2082
|
-
});
|
|
2083
|
-
const daqIntervalDraft = ref(null);
|
|
2084
|
-
watch(selectedDaqNode, (n) => {
|
|
2085
|
-
daqIntervalDraft.value = n ? n.intervalMs ?? daq.controller.defaultIntervalMs : null;
|
|
2086
|
-
}, { immediate: true });
|
|
2087
|
-
/** 标注显隐(设计稿 tPins,默认开) */
|
|
2088
|
-
const showCallouts = ref(true);
|
|
2089
|
-
/** 自动环绕(设计稿 tOrbit) */
|
|
2090
|
-
const orbitOn = ref(false);
|
|
2091
|
-
/** 悬浮标注(绑定设备的实时值;150ms 跟随投影) */
|
|
2092
|
-
const calloutPos = ref({});
|
|
2093
|
-
/** 越近越亮:相机到锚点的 3D 距离阈值(世界单位;用户可在场景控制里调节)。
|
|
2094
|
-
* 只有所注视/飞近的设备亮起数据,邻机与远方节点保持静默 —— 数据属于走近的人。 */
|
|
2095
|
-
const calloutNearDist = useStorage("aw.twin.calloutNear", 1150);
|
|
2096
|
-
/** 设备控制台实时数采(twinId → 相关通道;数采自身 + 绑定设备双挂,随 server 读数流刷新) */
|
|
2097
|
-
const daqLive = computed(() => {
|
|
2098
|
-
const map = {};
|
|
2099
|
-
for (const t of daqTwins.value) {
|
|
2100
|
-
const st = daqSim.value.get(t.id);
|
|
2101
|
-
if (!st) continue;
|
|
2102
|
-
const row = {
|
|
2103
|
-
ch: st.tpl.ch,
|
|
2104
|
-
value: fmtDaq(st),
|
|
2105
|
-
unit: st.tpl.unit,
|
|
2106
|
-
alarm: st.alarm ?? false
|
|
2107
|
-
};
|
|
2108
|
-
(map[t.id] ??= []).push(row);
|
|
2109
|
-
const dev = boundDeviceOf(t.id);
|
|
2110
|
-
if (dev) (map[dev] ??= []).push(row);
|
|
2111
|
-
}
|
|
2112
|
-
return map;
|
|
2113
|
-
});
|
|
2114
|
-
/** 智控设定实时数据(关键设备监控卡片:twinId → 该设备绑定的全部智控通道;
|
|
2115
|
-
* 含当前 set 值与生效上下限(活动配方工艺窗口优先,否则节点全局量程),由 TownView 喂入) */
|
|
2116
|
-
const dcwLive = computed(() => {
|
|
2117
|
-
const map = {};
|
|
2118
|
-
for (const n of dcw.nodes) {
|
|
2119
|
-
if (!n.deviceBindingId) continue;
|
|
2120
|
-
const key = n.templateRef.startsWith("dcw-") ? n.templateRef.slice(4) : n.templateRef;
|
|
2121
|
-
const tpl = dcw.templates.find((t) => t.key === key);
|
|
2122
|
-
const w = dcwWindowOf(n);
|
|
2123
|
-
(map[n.deviceBindingId] ??= []).push({
|
|
2124
|
-
id: n.id,
|
|
2125
|
-
ch: tpl?.ch ?? key,
|
|
2126
|
-
name: n.name,
|
|
2127
|
-
unit: n.unit,
|
|
2128
|
-
value: n.value,
|
|
2129
|
-
readValue: n.readValue,
|
|
2130
|
-
lastReadAt: n.lastReadAt,
|
|
2131
|
-
decimals: n.decimals,
|
|
2132
|
-
lo: w.lo,
|
|
2133
|
-
hi: w.hi,
|
|
2134
|
-
src: w.src
|
|
2135
|
-
});
|
|
2136
|
-
}
|
|
2137
|
-
return map;
|
|
2138
|
-
});
|
|
2139
|
-
/** 同设备多路通道的竖排堆叠间距(px;卡高 ~88 + 间隙) */
|
|
2140
|
-
const camPose = ref({
|
|
2141
|
-
pos: {
|
|
2142
|
-
x: 0,
|
|
2143
|
-
y: 0,
|
|
2144
|
-
z: 0
|
|
2145
|
-
},
|
|
2146
|
-
target: {
|
|
2147
|
-
x: 0,
|
|
2148
|
-
z: 0
|
|
2149
|
-
},
|
|
2150
|
-
yaw: 0,
|
|
2151
|
-
dolly: 1
|
|
2152
|
-
});
|
|
2153
|
-
const callouts = computed(() => {
|
|
2154
|
-
if (!showCallouts.value) return [];
|
|
2155
|
-
const s3 = scene3dRef.value;
|
|
2156
|
-
if (!s3) return [];
|
|
2157
|
-
const nodes = s3.getDeviceNodes();
|
|
2158
|
-
const stageW = stageRef.value?.clientWidth ?? 1600;
|
|
2159
|
-
const rows = [];
|
|
2160
|
-
for (const t of daqTwins.value) {
|
|
2161
|
-
const st = daqSim.value.get(t.id);
|
|
2162
|
-
if (!st) continue;
|
|
2163
|
-
const boundDev = boundDeviceOf(t.id);
|
|
2164
|
-
const anchor = boundDev ? nodes.find((n) => n.twinId === boundDev) : nodes.find((n) => n.twinId === t.id);
|
|
2165
|
-
if (!anchor) continue;
|
|
2166
|
-
const pos = calloutPos.value[t.id];
|
|
2167
|
-
if (!pos) continue;
|
|
2168
|
-
rows.push({
|
|
2169
|
-
t,
|
|
2170
|
-
st,
|
|
2171
|
-
anchor,
|
|
2172
|
-
pos
|
|
2173
|
-
});
|
|
2174
|
-
}
|
|
2175
|
-
const anchorTopY = new Map(rows.map((r) => [r.anchor.twinId, r.anchor.topY]));
|
|
2176
|
-
const byAnchor = /* @__PURE__ */ new Map();
|
|
2177
|
-
for (const r of rows) {
|
|
2178
|
-
const list = byAnchor.get(r.anchor.twinId) ?? [];
|
|
2179
|
-
list.push(r);
|
|
2180
|
-
byAnchor.set(r.anchor.twinId, list);
|
|
2181
|
-
}
|
|
2182
|
-
const out = [];
|
|
2183
|
-
for (const group of byAnchor.values()) {
|
|
2184
|
-
group.sort((a, b) => a.t.id < b.t.id ? -1 : 1);
|
|
2185
|
-
const head = group[0];
|
|
2186
|
-
const near = Math.hypot(camPose.value.pos.x - head.anchor.x, camPose.value.pos.y - (anchorTopY.get(head.anchor.twinId) ?? 60), camPose.value.pos.z - head.anchor.z) < calloutNearDist.value;
|
|
2187
|
-
const cx = Math.min(stageW - 96, Math.max(96, head.pos.x));
|
|
2188
|
-
group.forEach((r, i) => {
|
|
2189
|
-
const { lo, hi } = alarmRange(r.st.tpl.min, r.st.tpl.max);
|
|
2190
|
-
out.push({
|
|
2191
|
-
id: r.t.id,
|
|
2192
|
-
x: cx,
|
|
2193
|
-
y: head.pos.y - i * CALLOUT_STACK,
|
|
2194
|
-
label: `${r.st.tpl.ch} · ${r.anchor.name || r.t.name}`,
|
|
2195
|
-
value: fmtDaq(r.st),
|
|
2196
|
-
unit: r.st.tpl.unit,
|
|
2197
|
-
lo,
|
|
2198
|
-
hi,
|
|
2199
|
-
warn: r.st.alarm ?? false,
|
|
2200
|
-
near,
|
|
2201
|
-
leader: i === 0
|
|
2202
|
-
});
|
|
2203
|
-
});
|
|
2204
|
-
}
|
|
2205
|
-
return out;
|
|
2206
|
-
});
|
|
2207
|
-
/** KPI 条(舞台底部居中浮条) */
|
|
2208
|
-
const deviceCount = computed(() => deviceTwins.twins.length);
|
|
2209
|
-
const runningCount = computed(() => deviceTwins.twins.filter((t) => t.state === "running").length);
|
|
2210
|
-
/** 顶栏用户 */
|
|
2211
|
-
const userStore = useUserStore();
|
|
2212
|
-
/** 舞台引用(全屏)与视角预设 */
|
|
2213
|
-
const stageRef = ref(null);
|
|
2214
|
-
const viewPreset = ref("std");
|
|
2215
|
-
/** 设备健康度(环形图数据) */
|
|
2216
|
-
const idleCount = computed(() => deviceTwins.twins.filter((t) => t.state === "idle").length);
|
|
2217
|
-
const alarmCount = computed(() => deviceTwins.twins.filter((t) => t.state === "alarm").length);
|
|
2218
|
-
const offlineCount = computed(() => deviceTwins.twins.filter((t) => t.state === "offline").length);
|
|
2219
|
-
const healthPct = computed(() => {
|
|
2220
|
-
const total = deviceTwins.twins.length;
|
|
2221
|
-
if (!total) return 100;
|
|
2222
|
-
const healthy = runningCount.value + idleCount.value;
|
|
2223
|
-
return Math.round(healthy / total * 100);
|
|
2224
|
-
});
|
|
2225
|
-
/** 健康分档语义色:中心百分数跟健康走(绿≥90/琥珀≥60/红<60),环保持状态分布语义 */
|
|
2226
|
-
const healthTone = computed(() => healthPct.value >= 90 ? "#35e0a0" : healthPct.value >= 60 ? "#f6c453" : "#ff6b6b");
|
|
2227
|
-
const donutCanvas = ref(null);
|
|
2228
|
-
function drawDonut() {
|
|
2229
|
-
const cv = donutCanvas.value;
|
|
2230
|
-
if (!cv) return;
|
|
2231
|
-
const ctx = cv.getContext("2d");
|
|
2232
|
-
if (!ctx) return;
|
|
2233
|
-
const total = deviceTwins.twins.length || 1;
|
|
2234
|
-
const segs = [
|
|
2235
|
-
{
|
|
2236
|
-
n: runningCount.value,
|
|
2237
|
-
color: "#35e0a0"
|
|
2238
|
-
},
|
|
2239
|
-
{
|
|
2240
|
-
n: idleCount.value,
|
|
2241
|
-
color: "#f6c453"
|
|
2242
|
-
},
|
|
2243
|
-
{
|
|
2244
|
-
n: alarmCount.value,
|
|
2245
|
-
color: "#ff6b6b"
|
|
2246
|
-
},
|
|
2247
|
-
{
|
|
2248
|
-
n: offlineCount.value,
|
|
2249
|
-
color: "#3a4a63"
|
|
2250
|
-
}
|
|
2251
|
-
];
|
|
2252
|
-
ctx.clearRect(0, 0, 118, 118);
|
|
2253
|
-
ctx.lineWidth = 12;
|
|
2254
|
-
let ang = -Math.PI / 2;
|
|
2255
|
-
for (const seg of segs) {
|
|
2256
|
-
if (!seg.n) continue;
|
|
2257
|
-
const sweep = seg.n / total * Math.PI * 2;
|
|
2258
|
-
ctx.beginPath();
|
|
2259
|
-
ctx.strokeStyle = seg.color;
|
|
2260
|
-
ctx.arc(59, 59, 48, ang, ang + sweep);
|
|
2261
|
-
ctx.stroke();
|
|
2262
|
-
ang += sweep;
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
watch(healthPct, () => drawDonut());
|
|
2266
|
-
watch(() => deviceTwins.twins.length, () => drawDonut());
|
|
2267
|
-
const alarms = ref([]);
|
|
2268
|
-
let alarmTid = 0;
|
|
2269
|
-
const ALARM_STATES = [
|
|
2270
|
-
t("townView.k3ng94k170"),
|
|
2271
|
-
t("townView.k3mi2n0171"),
|
|
2272
|
-
t("townView.k3ncnxl172")
|
|
2273
|
-
];
|
|
2274
|
-
function raiseAlarm(txt, level = "warn", src = "SYSTEM") {
|
|
2275
|
-
const d = /* @__PURE__ */ new Date();
|
|
2276
|
-
const time = [
|
|
2277
|
-
d.getHours(),
|
|
2278
|
-
d.getMinutes(),
|
|
2279
|
-
d.getSeconds()
|
|
2280
|
-
].map((n) => String(n).padStart(2, "0")).join(":");
|
|
2281
|
-
alarms.value.unshift({
|
|
2282
|
-
id: ++alarmTid,
|
|
2283
|
-
txt,
|
|
2284
|
-
src,
|
|
2285
|
-
time,
|
|
2286
|
-
state: 0,
|
|
2287
|
-
level
|
|
2288
|
-
});
|
|
2289
|
-
if (alarms.value.length > 30) alarms.value.pop();
|
|
2290
|
-
}
|
|
2291
|
-
const activeAlarmCount = computed(() => alarms.value.filter((a) => a.state < 2).length);
|
|
2292
|
-
/** 告警阈值(设计稿 rThresh 60~120%;>100 收紧,<100 放宽) */
|
|
2293
|
-
const threshPct = ref(100);
|
|
2294
|
-
/** 帧率上限(用户可选 60/120/∞;持久化)。只节流渲染帧,数据消费走帧通道与此无关 */
|
|
2295
|
-
const fpsCap = useStorage("aw.twin.fpsCap", "60");
|
|
2296
|
-
const FPS_OPTIONS = [
|
|
2297
|
-
{
|
|
2298
|
-
v: "60",
|
|
2299
|
-
label: "60"
|
|
2300
|
-
},
|
|
2301
|
-
{
|
|
2302
|
-
v: "120",
|
|
2303
|
-
label: "120"
|
|
2304
|
-
},
|
|
2305
|
-
{
|
|
2306
|
-
v: "0",
|
|
2307
|
-
label: "∞"
|
|
2308
|
-
}
|
|
2309
|
-
];
|
|
2310
|
-
/** 画质(用户可选 自动/普通/高清/超清;持久化)。auto = 帧率自适应阶梯;三档手动固定 */
|
|
2311
|
-
const qualityMode = useStorage("aw.twin.quality", "auto");
|
|
2312
|
-
const QUALITY_OPTIONS = [
|
|
2313
|
-
{
|
|
2314
|
-
v: "auto",
|
|
2315
|
-
label: "townView.qualityAuto"
|
|
2316
|
-
},
|
|
2317
|
-
{
|
|
2318
|
-
v: "normal",
|
|
2319
|
-
label: "townView.qualityNormal"
|
|
2320
|
-
},
|
|
2321
|
-
{
|
|
2322
|
-
v: "hd",
|
|
2323
|
-
label: "townView.qualityHD"
|
|
2324
|
-
},
|
|
2325
|
-
{
|
|
2326
|
-
v: "ultra",
|
|
2327
|
-
label: "townView.qualityUltra"
|
|
2328
|
-
}
|
|
2329
|
-
];
|
|
2330
|
-
/** 量程收紧后的告警上下界(设计稿公式:base ± 按阈值比例的内缩区间) */
|
|
2331
|
-
function alarmRange(min, max) {
|
|
2332
|
-
const t = threshPct.value / 100;
|
|
2333
|
-
const mid = (min + max) / 2;
|
|
2334
|
-
return {
|
|
2335
|
-
lo: mid - (mid - min) * t,
|
|
2336
|
-
hi: mid + (max - mid) * t
|
|
2337
|
-
};
|
|
2338
|
-
}
|
|
2339
|
-
/** E-STOP(设计稿 btnEstop:全线停机态;告警面板置 crit;再次点击解除) */
|
|
2340
|
-
const estop = ref(false);
|
|
2341
|
-
/** 场景控制:曝光/领地染色/重置视角 */
|
|
2342
|
-
const exposure = ref(1.12);
|
|
2343
|
-
const tintOpacity = ref(1);
|
|
2344
|
-
/** 滑杆填充比例(--fill;轨道随值染色,设计稿 setSliderFill) */
|
|
2345
|
-
function sliderPct(v, min, max) {
|
|
2346
|
-
return `${Math.min(100, Math.max(0, (v - min) / (max - min) * 100)).toFixed(1)}%`;
|
|
2347
|
-
}
|
|
2348
|
-
ref(null);
|
|
2349
|
-
const hiddenTrends = ref({});
|
|
2350
|
-
const TREND_COLORS = [
|
|
2351
|
-
"#35e0a0",
|
|
2352
|
-
"#41c8f4",
|
|
2353
|
-
"#f6c453",
|
|
2354
|
-
"#a78bfa",
|
|
2355
|
-
"#ff6b6b",
|
|
2356
|
-
"#4dd0e1"
|
|
2357
|
-
];
|
|
2358
|
-
const trendColor = (id) => TREND_COLORS[Math.abs(id.split("").reduce((a, c) => a * 31 + c.charCodeAt(0), 7)) % TREND_COLORS.length] ?? "#35e0a0";
|
|
2359
|
-
/** 默认只画前 8 路:52 条曲线叠绘成不可读 spaghetti,数据可读性优先;
|
|
2360
|
-
* 用户显式点过 chip 的以 hiddenTrends 覆盖为准 */
|
|
2361
|
-
function trendOn(id, idx) {
|
|
2362
|
-
const v = hiddenTrends.value[id];
|
|
2363
|
-
if (v != null) return !v;
|
|
2364
|
-
return (daqTwins.value.findIndex((t) => t.id === id)) < TREND_VISIBLE_DEFAULT;
|
|
2365
|
-
}
|
|
2366
|
-
/** 信号条折叠:收起时只渲染前 8 枚 chip,余量聚合成「+N」(展开/收起) */
|
|
2367
|
-
const trendExpanded = ref(false);
|
|
2368
|
-
const trendOverflow = computed(() => Math.max(daqTwins.value.length - TREND_VISIBLE_DEFAULT, 0));
|
|
2369
|
-
const trendChips = computed(() => trendExpanded.value ? daqTwins.value : daqTwins.value.slice(0, TREND_VISIBLE_DEFAULT));
|
|
2370
|
-
ref(null);
|
|
2371
|
-
const navScale = computed(() => Math.min(5, Math.max(.4, camPose.value.dolly)));
|
|
2372
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
2373
|
-
const _component_WorkshopAssetLibrary = AssetLibrary_default;
|
|
2374
|
-
const _component_WorkshopDaqTemplateIcon = DaqTemplateIcon_default;
|
|
2375
|
-
const _component_WorkshopDeviceTwinPanel = DeviceTwinPanel_default;
|
|
2376
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "town-view" }, _attrs))} data-v-3e78e101><header class="${ssrRenderClass([{ "sheet-on": unref(sheetOpen) }, "topnav"])}" data-v-3e78e101><div class="brand" data-v-3e78e101><svg class="brand-glyph" viewBox="0 0 32 32" fill="none" aria-hidden="true" data-v-3e78e101><path d="M16 2.5 27.5 9v14L16 29.5 4.5 23V9L16 2.5Z" stroke="#35e0a0" stroke-width="1.6" data-v-3e78e101></path><path d="M16 8.2 22.5 12v8L16 23.8 9.5 20v-8L16 8.2Z" stroke="#41c8f4" stroke-width="1.3" opacity=".85" data-v-3e78e101></path><circle cx="16" cy="16" r="2.4" fill="#35e0a0" data-v-3e78e101></circle><circle cx="25.5" cy="7.5" r="1.6" fill="#41c8f4" data-v-3e78e101></circle></svg><div data-v-3e78e101><div class="brand-name" data-v-3e78e101> DIGITAL <em data-v-3e78e101>TWIN</em></div><div class="brand-sub" data-v-3e78e101> AGENTWORKSHOP · ${ssrInterpolate(_ctx.$t("townView.klyi8yg127"))}</div></div></div><nav class="nav-tabs"${ssrRenderAttr("aria-label", _ctx.$t("townView.k1c9jyta001"))} data-v-3e78e101><div class="seg" data-v-3e78e101><button class="${ssrRenderClass({ on: unref(mode) === "browse" })}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k48dwh027"))}</button><button class="${ssrRenderClass({ on: unref(mode) === "edit" })}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k45eb0028"))}</button></div><button class="nav-action"${ssrIncludeBooleanAttr(unref(mode) !== "edit") ? " disabled" : ""}${ssrRenderAttr("title", unref(mode) === "edit" ? "把全部设备的位置/朝向/缩放写入数据库" : "运行模式只读")} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1b3bk8t029"))}</button>`);
|
|
2377
|
-
if (unref(saveState) && unref(saveState).state !== "idle") _push(`<span class="${ssrRenderClass([`s-${unref(saveState).state}`, "save-chip"])}" data-v-3e78e101>${ssrInterpolate(unref(saveStateLabel))}</span>`);
|
|
2378
|
-
else _push(`<!---->`);
|
|
2379
|
-
_push(`</nav><div class="nav-right" data-v-3e78e101><span class="${ssrRenderClass([{ "nav-bell-warn": unref(activeAlarmCount) > 0 }, "nav-chip mono"])}"${ssrRenderAttr("title", _ctx.$t("townView.k1fsi3ir002"))} data-v-3e78e101>◉ ${ssrInterpolate(unref(activeAlarmCount))}</span><span class="nav-chip mono nav-fps" data-v-3e78e101>${ssrInterpolate(unref(fps))} FPS</span><div class="avatar-chip nav-user"${ssrRenderAttr("title", _ctx.$t("townView.k1demf38003"))} data-v-3e78e101><div class="avatar-fallback" data-v-3e78e101>${ssrInterpolate((unref(userStore).user?.name ?? "OP").slice(0, 2).toUpperCase())}</div><span data-v-3e78e101>${ssrInterpolate(unref(userStore).user?.name || _ctx.$t("townView.k1pub99m139"))}</span></div><button type="button" class="${ssrRenderClass([{ on: unref(sheetOpen) === "left" }, "sheet-btn"])}" aria-controls="town-rail-left"${ssrRenderAttr("aria-expanded", unref(sheetOpen) === "left" ? "true" : "false")}${ssrRenderAttr("title", _ctx.$t("townView.k1k75lzy030"))} data-v-3e78e101><svg class="sheet-ico" viewBox="0 0 24 24" aria-hidden="true" data-v-3e78e101><path d="M4 6h16M4 12h11M4 18h16" data-v-3e78e101></path></svg><span class="sheet-btn-t" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1k75lzy030"))}</span></button><button type="button" class="${ssrRenderClass([{ on: unref(sheetOpen) === "right" }, "sheet-btn"])}" aria-controls="town-rail-right"${ssrRenderAttr("aria-expanded", unref(sheetOpen) === "right" ? "true" : "false")}${ssrRenderAttr("title", _ctx.$t("townView.k17dkhgd112"))} data-v-3e78e101><svg class="sheet-ico" viewBox="0 0 24 24" aria-hidden="true" data-v-3e78e101><path d="M20 6H4M20 12H9M20 18H4" data-v-3e78e101></path></svg><span class="sheet-btn-t" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k17dkhgd112"))}</span></button></div></header><div class="app" data-v-3e78e101><aside id="town-rail-left" class="${ssrRenderClass([{ "sheet-open": unref(sheetOpen) === "left" }, "rail rail-left"])}" data-v-3e78e101><div class="sheet-hd" data-v-3e78e101><span class="sheet-grip" aria-hidden="true" data-v-3e78e101></span><span class="sheet-hd-t" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1k75lzy030"))}</span><button type="button" class="sheet-x" aria-label="关闭" data-v-3e78e101> ✕ </button></div><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1k75lzy030"))}</h3><span class="panel-tag" data-v-3e78e101>${ssrInterpolate(unref(deviceModels).length)}</span></div>`);
|
|
2380
|
-
_push(ssrRenderComponent(_component_WorkshopAssetLibrary, { class: "lib-embed" }, null, _parent));
|
|
2381
|
-
_push(`</section><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2gwyas031"))}</h3><span class="panel-tag" data-v-3e78e101>${ssrInterpolate(unref(daqTwins).length)}</span></div><div class="daq-ctrl" data-v-3e78e101><button class="${ssrRenderClass([{ on: unref(daq).controller.running }, "daq-ctl-btn"])}"${ssrRenderAttr("title", unref(daq).controller.running ? "暂停全部采集:停止所有启用节点的采样(节点级启停独立)" : "恢复全部采集:仅启用节点恢复采集(手动停用的保持停用)")} data-v-3e78e101>${ssrInterpolate(unref(daq).controller.running ? _ctx.$t("townView.k3w3j8f140") : _ctx.$t("townView.k3n93ed175"))}</button><label class="daq-ctl-cycle mono"${ssrRenderAttr("title", _ctx.$t("townView.khzlyf5004"))} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3xg3w032"))} <input type="number" min="200" max="60000" step="100"${ssrRenderAttr("value", unref(daq).controller.defaultIntervalMs)} data-v-3e78e101>ms </label></div><div class="daq-list" data-v-3e78e101><!--[-->`);
|
|
2382
|
-
ssrRenderList(unref(daqTemplates), (tpl) => {
|
|
2383
|
-
_push(`<div class="daq-group" data-v-3e78e101><div class="${ssrRenderClass([{ open: !!unref(treeOpen)[`daq:${tpl.id}`] }, "daq-card tpl"])}" role="button" tabindex="0"${ssrRenderAttr("title", _ctx.$t("townView.k2tplxp0001", {
|
|
2384
|
-
p0: tpl.name,
|
|
2385
|
-
p1: tpl.ch,
|
|
2386
|
-
p2: tpl.min,
|
|
2387
|
-
p3: tpl.max,
|
|
2388
|
-
p4: tpl.unit
|
|
2389
|
-
}))} data-v-3e78e101><span class="daq-caret" data-v-3e78e101>▶</span><span class="daq-ico" data-v-3e78e101>`);
|
|
2390
|
-
_push(ssrRenderComponent(_component_WorkshopDaqTemplateIcon, {
|
|
2391
|
-
class: "daq-svg",
|
|
2392
|
-
icon: tpl.icon
|
|
2393
|
-
}, null, _parent));
|
|
2394
|
-
_push(`</span><div class="daq-meta" data-v-3e78e101><span class="daq-name" data-v-3e78e101>${ssrInterpolate(tpl.name)}</span><span class="daq-code" data-v-3e78e101>${ssrInterpolate(tpl.code)}</span></div>`);
|
|
2395
|
-
if (unref(mode) === "edit") _push(`<button class="daq-add"${ssrRenderAttr("title", _ctx.$t("townView.k2tplxp0002", { p0: tpl.name }))} data-v-3e78e101> + </button>`);
|
|
2396
|
-
else _push(`<!---->`);
|
|
2397
|
-
_push(`<span class="daq-count" data-v-3e78e101>×${ssrInterpolate(unref(daqNodesByTpl).get(tpl.id)?.length ?? 0)}</span></div>`);
|
|
2398
|
-
if (unref(treeOpen)[`daq:${tpl.id}`]) {
|
|
2399
|
-
_push(`<div class="daq-children" data-v-3e78e101><!--[-->`);
|
|
2400
|
-
ssrRenderList(unref(daqNodesByTpl).get(tpl.id) ?? [], (n) => {
|
|
2401
|
-
_push(`<div class="${ssrRenderClass([{ placed: typeof n.posX === "number" }, "daq-node"])}"${ssrRenderAttr("draggable", unref(mode) === "edit")}${ssrRenderAttr("title", typeof n.posX === "number" ? _ctx.$t("townView.k2tplxp0005") : _ctx.$t("townView.k2tplxp0006"))} data-v-3e78e101><span class="${ssrRenderClass([daqLeafState(n), "node-dot"])}" data-v-3e78e101></span><div class="daq-meta" data-v-3e78e101><span class="daq-name" data-v-3e78e101>${ssrInterpolate(n.name)}</span><span class="daq-node-sub" data-v-3e78e101><span class="node-val mono" data-v-3e78e101>${ssrInterpolate(n.value != null ? `${n.value.toFixed(tpl.decimals)} ${tpl.unit}` : "--")}</span><span class="node-dev" data-v-3e78e101>${ssrInterpolate(n.deviceBindingId ? unref(deviceTwins).byId(n.deviceBindingId)?.name ?? _ctx.$t("townView.k3own4q148") : _ctx.$t("townView.k3own4q148"))}</span></span></div>`);
|
|
2402
|
-
if (typeof n.posX === "number") _push(`<span class="scene-cur" data-v-3e78e101>✓</span>`);
|
|
2403
|
-
else _push(`<!---->`);
|
|
2404
|
-
_push(`</div>`);
|
|
2405
|
-
});
|
|
2406
|
-
_push(`<!--]-->`);
|
|
2407
|
-
if (!unref(daqNodesByTpl).get(tpl.id)?.length) _push(`<div class="daq-empty-hint" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2tplxp0003"))}</div>`);
|
|
2408
|
-
else _push(`<!---->`);
|
|
2409
|
-
_push(`</div>`);
|
|
2410
|
-
} else _push(`<!---->`);
|
|
2411
|
-
_push(`</div>`);
|
|
2412
|
-
});
|
|
2413
|
-
_push(`<!--]--></div></section><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.km7ayhi033"))}</h3><span class="panel-tag" data-v-3e78e101>${ssrInterpolate(unref(dcw).nodes.length)}</span></div><div class="daq-list" data-v-3e78e101><!--[-->`);
|
|
2414
|
-
ssrRenderList(unref(dcwTemplates), (tpl) => {
|
|
2415
|
-
_push(`<div class="daq-group" data-v-3e78e101><div class="${ssrRenderClass([{ open: !!unref(treeOpen)[`dcw:${tpl.id}`] }, "daq-card tpl"])}" role="button" tabindex="0"${ssrRenderAttr("title", _ctx.$t("townView.k2tplxp0001", {
|
|
2416
|
-
p0: tpl.name,
|
|
2417
|
-
p1: tpl.ch,
|
|
2418
|
-
p2: tpl.min,
|
|
2419
|
-
p3: tpl.max,
|
|
2420
|
-
p4: tpl.unit
|
|
2421
|
-
}))} data-v-3e78e101><span class="daq-caret" data-v-3e78e101>▶</span><span class="daq-ico" data-v-3e78e101>`);
|
|
2422
|
-
_push(ssrRenderComponent(_component_WorkshopDaqTemplateIcon, {
|
|
2423
|
-
class: "daq-svg",
|
|
2424
|
-
icon: tpl.icon
|
|
2425
|
-
}, null, _parent));
|
|
2426
|
-
_push(`</span><div class="daq-meta" data-v-3e78e101><span class="daq-name" data-v-3e78e101>${ssrInterpolate(tpl.name)}</span><span class="daq-code" data-v-3e78e101>${ssrInterpolate(tpl.code)}</span></div>`);
|
|
2427
|
-
if (unref(mode) === "edit") _push(`<button class="daq-add"${ssrRenderAttr("title", _ctx.$t("townView.k2tplxp0002", { p0: tpl.name }))} data-v-3e78e101> + </button>`);
|
|
2428
|
-
else _push(`<!---->`);
|
|
2429
|
-
_push(`<span class="daq-count" data-v-3e78e101>×${ssrInterpolate(unref(dcwNodesByTpl).get(tpl.id)?.length ?? 0)}</span></div>`);
|
|
2430
|
-
if (unref(treeOpen)[`dcw:${tpl.id}`]) {
|
|
2431
|
-
_push(`<div class="daq-children" data-v-3e78e101><!--[-->`);
|
|
2432
|
-
ssrRenderList(unref(dcwNodesByTpl).get(tpl.id) ?? [], (n) => {
|
|
2433
|
-
_push(`<div class="${ssrRenderClass([{ placed: typeof n.posX === "number" }, "daq-node"])}"${ssrRenderAttr("draggable", unref(mode) === "edit")}${ssrRenderAttr("title", typeof n.posX === "number" ? _ctx.$t("townView.k2tplxp0005") : _ctx.$t("townView.k2tplxp0006"))} data-v-3e78e101><span class="${ssrRenderClass([dcwLeafState(n), "node-dot"])}" data-v-3e78e101></span><div class="daq-meta" data-v-3e78e101><span class="daq-name" data-v-3e78e101>${ssrInterpolate(n.name)}</span><span class="daq-node-sub" data-v-3e78e101><span class="node-val mono" data-v-3e78e101>${ssrInterpolate(n.value != null ? `${n.value.toFixed(tpl.decimals)} ${tpl.unit}` : "--")}</span><span class="node-dev" data-v-3e78e101>${ssrInterpolate(n.deviceBindingId ? unref(deviceTwins).byId(n.deviceBindingId)?.name ?? _ctx.$t("townView.k3own4q148") : _ctx.$t("townView.k3own4q148"))}</span></span></div>`);
|
|
2434
|
-
if (typeof n.posX === "number") _push(`<span class="scene-cur" data-v-3e78e101>✓</span>`);
|
|
2435
|
-
else _push(`<!---->`);
|
|
2436
|
-
_push(`</div>`);
|
|
2437
|
-
});
|
|
2438
|
-
_push(`<!--]-->`);
|
|
2439
|
-
if (!unref(dcwNodesByTpl).get(tpl.id)?.length) _push(`<div class="daq-empty-hint" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2tplxp0003"))}</div>`);
|
|
2440
|
-
else _push(`<!---->`);
|
|
2441
|
-
_push(`</div>`);
|
|
2442
|
-
} else _push(`<!---->`);
|
|
2443
|
-
_push(`</div>`);
|
|
2444
|
-
});
|
|
2445
|
-
_push(`<!--]--></div></section><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1c9n911034"))}</h3><span class="panel-tag" data-v-3e78e101>${ssrInterpolate(unref(dockChannels).length)}</span></div><div class="scene-list" data-v-3e78e101><!--[-->`);
|
|
2446
|
-
ssrRenderList(unref(dockChannels), (ch) => {
|
|
2447
|
-
_push(`<div class="${ssrRenderClass([{ active: ch.placed }, "scene-row"])}"${ssrRenderAttr("draggable", !ch.placed && unref(mode) === "edit")}${ssrRenderAttr("data-channel-id", ch.channelId)}${ssrRenderAttr("title", ch.placed ? "已在场景中,点击定位" : "拖拽到场景放置")} data-v-3e78e101><span class="scene-ico" style="${ssrRenderStyle({ "--ch": ch.color })}" data-v-3e78e101></span><div class="scene-meta-wrap" data-v-3e78e101><span class="scene-name" data-v-3e78e101>${ssrInterpolate(ch.name)}</span><span class="scene-meta" data-v-3e78e101>${ssrInterpolate(ch.agentCount)} ${ssrInterpolate(_ctx.$t("townView.k1brss7t128"))} ${ssrInterpolate(ch.placed ? _ctx.$t("townView.k3n94g3141") : _ctx.$t("townView.k3os7i3176"))}</span></div>`);
|
|
2448
|
-
if (ch.placed) _push(`<span class="scene-cur" data-v-3e78e101>✓</span>`);
|
|
2449
|
-
else _push(`<span class="scene-add" data-v-3e78e101>+</span>`);
|
|
2450
|
-
_push(`</div>`);
|
|
2451
|
-
});
|
|
2452
|
-
_push(`<!--]-->`);
|
|
2453
|
-
if (unref(dockHint)) _push(`<div class="scene-hint" data-v-3e78e101>${ssrInterpolate(unref(dockHint))}</div>`);
|
|
2454
|
-
else _push(`<!---->`);
|
|
2455
|
-
_push(`</div></section></aside><main class="stage-col" data-v-3e78e101><div class="stage" data-v-3e78e101><div id="town-host" class="town-host" data-v-3e78e101></div><div class="stage-vignette" data-v-3e78e101></div><div class="stage-top" data-v-3e78e101><div class="vp-title" data-v-3e78e101><h2 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1b0z4vr035"))}</h2><span class="vp-id" data-v-3e78e101>CH · ${ssrInterpolate(unref(activeChannelName) || _ctx.$t("townView.k3lkuz3142"))}</span></div><div class="vp-tools" data-v-3e78e101><button class="vp-tool"${ssrRenderAttr("title", _ctx.$t("townView.k18d6wnb005"))} data-v-3e78e101><svg class="vp-svg" viewBox="0 0 24 24" data-v-3e78e101><circle cx="12" cy="12" r="7" data-v-3e78e101></circle><path d="M12 2v4M12 18v4M2 12h4M18 12h4" data-v-3e78e101></path></svg></button><button class="${ssrRenderClass([{ on: unref(orbitOn) }, "vp-tool"])}"${ssrRenderAttr("title", _ctx.$t("townView.k1io51dn006"))} data-v-3e78e101><svg class="vp-svg" viewBox="0 0 24 24" data-v-3e78e101><circle cx="12" cy="12" r="3.2" data-v-3e78e101></circle><path d="M20.5 9a10 10 0 0 1 .3 4.5M3.5 15a10 10 0 0 1-.3-4.5" data-v-3e78e101></path></svg></button><button class="${ssrRenderClass([{ on: unref(showCallouts) }, "vp-tool"])}"${ssrRenderAttr("title", _ctx.$t("townView.k1sgjlq8007"))} data-v-3e78e101><svg class="vp-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M4 8h12l4 4-4 4H4z" data-v-3e78e101></path><circle cx="8.5" cy="12" r="1.4" data-v-3e78e101></circle></svg></button><button class="vp-tool"${ssrRenderAttr("title", _ctx.$t("townView.k3wuf0008"))} data-v-3e78e101><svg class="vp-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5" data-v-3e78e101></path></svg></button></div></div><div class="angle-chip" data-v-3e78e101><select${ssrRenderAttr("value", unref(viewPreset))}${ssrRenderAttr("aria-label", _ctx.$t("townView.k1k4j5i7009"))} data-v-3e78e101><option value="std" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kv72860036"))}</option><option value="top" data-v-3e78e101> 俯视 · TOP </option><option value="front" data-v-3e78e101> 前视 · FRONT </option><option value="side" data-v-3e78e101> 侧视 · SIDE </option></select></div>`);
|
|
2456
|
-
if (unref(showCallouts)) {
|
|
2457
|
-
_push(`<!--[--><svg class="leaders" data-v-3e78e101><!--[-->`);
|
|
2458
|
-
ssrRenderList(unref(callouts), (c) => {
|
|
2459
|
-
_push(`<g class="${ssrRenderClass({ near: c.near })}" style="${ssrRenderStyle(c.leader ? null : { display: "none" })}" data-v-3e78e101><path${ssrRenderAttr("d", `M ${c.x} ${c.y - 8} L ${c.x} ${c.y - 2}`)}${ssrRenderAttr("stroke", c.warn ? "rgba(246,196,83,.8)" : "rgba(65,200,244,.55)")} stroke-width="1.3" fill="none" data-v-3e78e101></path><circle${ssrRenderAttr("cx", c.x)}${ssrRenderAttr("cy", c.y)} r="2.6"${ssrRenderAttr("fill", c.warn ? "#f6c453" : "#41c8f4")} data-v-3e78e101></circle></g>`);
|
|
2460
|
-
});
|
|
2461
|
-
_push(`<!--]--></svg><div class="callout-layer" data-v-3e78e101><!--[-->`);
|
|
2462
|
-
ssrRenderList(unref(callouts), (c) => {
|
|
2463
|
-
_push(`<div class="${ssrRenderClass([{
|
|
2464
|
-
warn: c.warn,
|
|
2465
|
-
near: c.near
|
|
2466
|
-
}, "callout"])}" style="${ssrRenderStyle({
|
|
2467
|
-
left: c.x + "px",
|
|
2468
|
-
top: c.y + "px"
|
|
2469
|
-
})}"${ssrRenderAttr("title", _ctx.$t("townView.k1ejxiwp010"))} data-v-3e78e101><div class="co-label" data-v-3e78e101><span class="co-dot" data-v-3e78e101></span>${ssrInterpolate(c.label)}</div><div class="co-val" data-v-3e78e101>${ssrInterpolate(c.value)}<small data-v-3e78e101>${ssrInterpolate(c.unit)}</small></div><div class="co-range" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1faqmjb073"))} ${ssrInterpolate(c.lo.toFixed(Math.min(2, (String(c.lo).split(".")[1] ?? "").length + 1)))} – ${ssrInterpolate(c.hi.toFixed(Math.min(2, (String(c.hi).split(".")[1] ?? "").length + 1)))}</div></div>`);
|
|
2470
|
-
});
|
|
2471
|
-
_push(`<!--]--></div><!--]-->`);
|
|
2472
|
-
} else _push(`<!---->`);
|
|
2473
|
-
_push(`<div class="kpi-strip" data-v-3e78e101><div class="kpi" data-v-3e78e101><span class="kpi-ico c1" data-v-3e78e101><svg class="kpi-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M4 8.5 12 4l8 4.5v7L12 20l-8-4.5v-7Z" data-v-3e78e101></path><path d="M4 8.5l8 4.5 8-4.5M12 13v7" data-v-3e78e101></path></svg></span><div class="kpi-meta" data-v-3e78e101><div class="kpi-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1k6xemt037"))}</div><div class="kpi-val" data-v-3e78e101>${ssrInterpolate(unref(deviceCount))}<small data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k49lh038"))}</small></div></div></div><div class="kpi" data-v-3e78e101><span class="kpi-ico c2" data-v-3e78e101><svg class="kpi-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="m5 12.5 4.5 4.5L19 7.5" data-v-3e78e101></path></svg></span><div class="kpi-meta" data-v-3e78e101><div class="kpi-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1l1a9t2039"))}</div><div class="kpi-val" data-v-3e78e101>${ssrInterpolate(unref(runningCount))}<small data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k49lh038"))}</small></div></div></div><div class="kpi" data-v-3e78e101><span class="kpi-ico c3" data-v-3e78e101><svg class="kpi-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M12 3 22 20H2L12 3Z" data-v-3e78e101></path><path d="M12 10v4M12 17v.2" data-v-3e78e101></path></svg></span><div class="kpi-meta" data-v-3e78e101><div class="kpi-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1fsi3ir002"))}</div><div class="kpi-val" data-v-3e78e101>${ssrInterpolate(unref(activeAlarmCount))}<small data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k4dfq040"))}</small></div></div></div><div class="kpi" data-v-3e78e101><span class="kpi-ico c4" data-v-3e78e101><svg class="kpi-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M9.5 14.5 14.5 9.5" data-v-3e78e101></path><path d="M11 6.5 12.8 4.7a4 4 0 0 1 5.6 5.6L16.5 12" data-v-3e78e101></path><path d="m13 17.5-1.8 1.8a4 4 0 0 1-5.6-5.6L7.5 12" data-v-3e78e101></path></svg></span><div class="kpi-meta" data-v-3e78e101><div class="kpi-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1emsai1041"))}</div><div class="kpi-val" data-v-3e78e101>${ssrInterpolate(unref(daqTwins).length)}<small data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k4l1w042"))}</small></div></div></div><div class="kpi" data-v-3e78e101><span class="kpi-ico c5" data-v-3e78e101><svg class="kpi-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M5 19a9 9 0 1 1 14 0" data-v-3e78e101></path><path d="M12 13l3.5-3.5" data-v-3e78e101></path><circle cx="12" cy="13" r="1.4" data-v-3e78e101></circle></svg></span><div class="kpi-meta" data-v-3e78e101><div class="kpi-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kbrxdq1043"))}</div><div class="kpi-val" data-v-3e78e101>${ssrInterpolate(unref(healthPct))}<small data-v-3e78e101>%</small></div></div></div></div>`);
|
|
2474
|
-
if (unref(sceneEmpty)) _push(`<div class="empty-hint" data-v-3e78e101><b data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3rwxjc044"))}</b><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1sa1eaj045"))}</span></div>`);
|
|
2475
|
-
else _push(`<!---->`);
|
|
2476
|
-
if (unref(selectedChannel) && unref(boundaryDraft)) {
|
|
2477
|
-
_push(`<div class="boundary-panel drag-panel" style="${ssrRenderStyle(unref(panelPos).boundary ? {
|
|
2478
|
-
left: unref(panelPos).boundary.x + "px",
|
|
2479
|
-
top: unref(panelPos).boundary.y + "px",
|
|
2480
|
-
bottom: "auto",
|
|
2481
|
-
transform: "none"
|
|
2482
|
-
} : void 0)}" data-v-3e78e101><div class="bp-title drag-grip"${ssrRenderAttr("title", _ctx.$t("townView.k1d0rl5z011"))} data-v-3e78e101><span class="bp-name" data-v-3e78e101>${ssrInterpolate(unref(entities).channels[unref(selectedChannel)]?.name ?? unref(selectedChannel).slice(0, 8))}</span><span class="bp-sub" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1mehlxs046"))}</span><div class="bp-tabs" data-v-3e78e101><button class="${ssrRenderClass([{ on: unref(channelPanelTab) === "boundary" }, "bp-tab"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k489ka047"))}</button><button class="${ssrRenderClass([{ on: unref(channelPanelTab) === "members" }, "bp-tab"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3ztf1129"))} ${ssrInterpolate(unref(channelMembers).length)}</button></div></div>`);
|
|
2483
|
-
if (unref(channelPanelTab) === "boundary") _push(`<!--[--><div class="bp-row" data-v-3e78e101><span class="bp-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3zhy5048"))}</span><div class="bp-seg" data-v-3e78e101><button class="${ssrRenderClass([{ on: unref(boundaryDraft).shape === "ellipse" }, "seg-btn"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k414bc049"))}</button><button class="${ssrRenderClass([{ on: unref(boundaryDraft).shape === "rect" }, "seg-btn"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k43u0g050"))}</button></div></div><div class="bp-row" data-v-3e78e101><span class="bp-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1fbz4s1051"))}</span><input${ssrRenderAttr("value", unref(boundaryDraft).radiusX)} class="bp-range" type="range" min="80" max="4000" step="8" style="${ssrRenderStyle({ "--fill": sliderPct(unref(boundaryDraft).radiusX, 80, 4e3) })}" data-v-3e78e101><span class="bp-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(boundaryDraft).radiusX))}</span></div><div class="bp-row" data-v-3e78e101><span class="bp-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1ighwgs052"))}</span><input${ssrRenderAttr("value", unref(boundaryDraft).radiusZ)} class="bp-range" type="range" min="60" max="4000" step="8" style="${ssrRenderStyle({ "--fill": sliderPct(unref(boundaryDraft).radiusZ, 60, 4e3) })}" data-v-3e78e101><span class="bp-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(boundaryDraft).radiusZ))}</span></div><div class="bp-row" data-v-3e78e101><span class="bp-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k40qab053"))}</span><input${ssrRenderAttr("value", unref(boundaryDraft).rotationY)} class="bp-range" type="range" min="0" max="360" step="5" style="${ssrRenderStyle({ "--fill": sliderPct(unref(boundaryDraft).rotationY ?? 0, 0, 360) })}" data-v-3e78e101><span class="bp-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(boundaryDraft).rotationY ?? 0))}°</span></div><!--]-->`);
|
|
2484
|
-
else {
|
|
2485
|
-
_push(`<!--[--><div class="bp-hint" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kimxls2054"))}</div><div class="member-list" data-v-3e78e101><!--[-->`);
|
|
2486
|
-
ssrRenderList(unref(channelMembers), (m) => {
|
|
2487
|
-
_push(`<div class="member-row" data-v-3e78e101><span class="member-ava" style="${ssrRenderStyle({ color: hashColor(unref(selectedChannel)) })}" data-v-3e78e101>${ssrInterpolate(m.name.charAt(0).toUpperCase())}</span><div class="member-info" data-v-3e78e101><span class="member-name" data-v-3e78e101>${ssrInterpolate(m.name)}</span><span class="${ssrRenderClass([m.role === "lead" ? "r-lead" : "r-worker", "member-role"])}" data-v-3e78e101>${ssrInterpolate(m.role === "lead" ? "Leader" : "Worker")}</span></div><select class="member-select"${ssrRenderAttr("value", (m.modelRef ?? "") || "hero-3d")} data-v-3e78e101><!--[-->`);
|
|
2488
|
-
ssrRenderList(unref(agentModels), (model) => {
|
|
2489
|
-
_push(`<option${ssrRenderAttr("value", model.id)} data-v-3e78e101>${ssrInterpolate(model.name)}</option>`);
|
|
2490
|
-
});
|
|
2491
|
-
_push(`<!--]--></select></div>`);
|
|
2492
|
-
});
|
|
2493
|
-
_push(`<!--]-->`);
|
|
2494
|
-
if (unref(channelMembers).length === 0) _push(`<div class="bp-hint" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k419rbs055"))}</div>`);
|
|
2495
|
-
else _push(`<!---->`);
|
|
2496
|
-
_push(`</div><!--]-->`);
|
|
2497
|
-
}
|
|
2498
|
-
_push(`<div class="bp-actions" data-v-3e78e101>`);
|
|
2499
|
-
if (unref(channelPanelTab) === "boundary") _push(`<button class="bp-btn save" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1b3kp8f056"))}</button>`);
|
|
2500
|
-
else _push(`<!---->`);
|
|
2501
|
-
_push(`<button class="bp-btn danger" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1hs45qg057"))}</button><button class="bp-btn" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3x62t058"))}</button></div></div>`);
|
|
2502
|
-
} else _push(`<!---->`);
|
|
2503
|
-
if (unref(lastDropText)) _push(`<div class="drop-chip" data-v-3e78e101>${ssrInterpolate(unref(lastDropText))}</div>`);
|
|
2504
|
-
else _push(`<!---->`);
|
|
2505
|
-
if (unref(errorText)) _push(`<div class="error-chip" data-v-3e78e101>${ssrInterpolate(unref(errorText))}</div>`);
|
|
2506
|
-
else _push(`<!---->`);
|
|
2507
|
-
if (!unref(ready)) _push(`<div data-hud="town-loading" class="loading-mask" data-v-3e78e101><div class="loading-spinner" data-v-3e78e101></div><span class="loading-text" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kvjdqfg059"))}</span></div>`);
|
|
2508
|
-
else _push(`<!---->`);
|
|
2509
|
-
_push(`</div><div class="${ssrRenderClass([{ "dock-open": unref(dockOpen) }, "dock"])}" data-v-3e78e101><button type="button" class="dock-toggle" aria-controls="town-dock-controls"${ssrRenderAttr("aria-expanded", unref(dockOpen) ? "true" : "false")} data-v-3e78e101><span class="dock-toggle-t" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1c9iq23060"))}</span><span class="dock-toggle-hint mono" data-v-3e78e101>${ssrInterpolate(unref(mode) === "edit" ? _ctx.$t("townView.k1iipfcs143") : _ctx.$t("townView.k1l147w1177"))}</span><span class="dock-caret" aria-hidden="true" data-v-3e78e101>▾</span></button><section id="town-dock-controls" class="dock-card" data-v-3e78e101><div class="dock-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1c9iq23060"))}</h3><span class="dock-mode" data-v-3e78e101>${ssrInterpolate(unref(mode) === "edit" ? _ctx.$t("townView.k1iipfcs143") : _ctx.$t("townView.k1l147w1177"))}</span></div><p class="ctl-sec" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.secRender"))}</p><div class="ctl-row" data-v-3e78e101><span class="ctl-name"${ssrRenderAttr("title", _ctx.$t("townView.qualityTip"))} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.qualityLabel"))}</span><div class="fps-seg" data-v-3e78e101><!--[-->`);
|
|
2510
|
-
ssrRenderList(QUALITY_OPTIONS, (o) => {
|
|
2511
|
-
_push(`<button class="${ssrRenderClass({ on: unref(qualityMode) === o.v })}" data-v-3e78e101>${ssrInterpolate(_ctx.$t(o.label))}</button>`);
|
|
2512
|
-
});
|
|
2513
|
-
_push(`<!--]--></div><span class="ctl-val" data-v-3e78e101></span></div><div class="ctl-row" data-v-3e78e101><span class="ctl-name"${ssrRenderAttr("title", _ctx.$t("townView.fpsCapTip"))} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.fpsCapLabel"))}</span><div class="fps-seg" data-v-3e78e101><!--[-->`);
|
|
2514
|
-
ssrRenderList(FPS_OPTIONS, (o) => {
|
|
2515
|
-
_push(`<button class="${ssrRenderClass({ on: unref(fpsCap) === o.v })}" data-v-3e78e101>${ssrInterpolate(o.label)}</button>`);
|
|
2516
|
-
});
|
|
2517
|
-
_push(`<!--]--></div><span class="ctl-val" data-v-3e78e101></span></div><p class="ctl-sec" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.secEnv"))}</p><div class="ctl-row" data-v-3e78e101><span class="ctl-name" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1gizopz061"))}</span><input class="ctl-range" type="range" min="30" max="220"${ssrRenderAttr("value", Math.round(unref(exposure) * 100))} style="${ssrRenderStyle({ "--fill": sliderPct(Math.round(unref(exposure) * 100), 30, 220) })}" data-v-3e78e101><span class="ctl-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(exposure) * 100))}%</span></div><div class="ctl-row" data-v-3e78e101><span class="ctl-name" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1bcpqto062"))}</span><input class="ctl-range" type="range" min="10" max="100"${ssrRenderAttr("value", Math.round(unref(tintOpacity) * 100))} style="${ssrRenderStyle({ "--fill": sliderPct(Math.round(unref(tintOpacity) * 100), 10, 100) })}" data-v-3e78e101><span class="ctl-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(tintOpacity) * 100))}%</span></div><div class="ctl-row" data-v-3e78e101><span class="ctl-name" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1bztha1063"))}</span><input class="ctl-range" type="range" min="60" max="120"${ssrRenderAttr("value", unref(threshPct))} style="${ssrRenderStyle({ "--fill": sliderPct(unref(threshPct), 60, 120) })}" data-v-3e78e101><span class="ctl-val" data-v-3e78e101>${ssrInterpolate(unref(threshPct))}%</span></div><div class="ctl-row" data-v-3e78e101><span class="ctl-name"${ssrRenderAttr("title", _ctx.$t("townView.kz71l1f012"))} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.ka4i1s9064"))}</span><input class="ctl-range" type="range" min="0" max="3000" step="50"${ssrRenderAttr("value", unref(calloutNearDist))} style="${ssrRenderStyle({ "--fill": sliderPct(unref(calloutNearDist), 0, 3e3) })}" data-v-3e78e101><span class="ctl-val" data-v-3e78e101>${ssrInterpolate(unref(calloutNearDist) === 0 ? _ctx.$t("townView.k493s144") : `${unref(calloutNearDist)}`)}</span></div><p class="ctl-sec" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.secOps"))}</p><div class="ctl-row" data-v-3e78e101><span class="ctl-name" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1idc6pa065"))}</span><button class="${ssrRenderClass([{ on: unref(snap) }, "snap-toggle"])}" data-v-3e78e101>${ssrInterpolate(unref(snap) ? _ctx.$t("townView.k4bs5145") : _ctx.$t("townView.k493s144"))}</button><span class="ctl-val" data-v-3e78e101></span></div><div class="ctl-btns" data-v-3e78e101><button class="btn btn-primary" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1lap9bs024"))}</button><button class="btn btn-ghost"${ssrIncludeBooleanAttr(unref(mode) !== "edit") ? " disabled" : ""}${ssrRenderAttr("title", unref(mode) === "edit" ? _ctx.$t("townView.ksavetip181") : _ctx.$t("townView.krotip182"))} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1b3bk8t029"))}</button><button class="${ssrRenderClass([{ armed: unref(estop) }, "btn btn-danger"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1i046wf066"))}</button></div></section><section class="dock-card" data-v-3e78e101><div class="dock-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1kfoef9067"))}</h3><span class="dock-count mono" data-v-3e78e101>${ssrInterpolate(unref(daqTwins).length)}</span><div class="${ssrRenderClass([{ expanded: unref(trendExpanded) }, "trend-legend"])}" data-v-3e78e101><!--[-->`);
|
|
2518
|
-
ssrRenderList(unref(trendChips), (chip) => {
|
|
2519
|
-
_push(`<button class="${ssrRenderClass([{ off: !trendOn(chip.id) }, "lg-chip"])}" data-v-3e78e101><span class="lg-dot" style="${ssrRenderStyle({ background: trendColor(chip.id) })}" data-v-3e78e101></span>${ssrInterpolate(chip.name)}</button>`);
|
|
2520
|
-
});
|
|
2521
|
-
_push(`<!--]-->`);
|
|
2522
|
-
if (unref(trendOverflow) > 0) _push(`<button class="lg-chip lg-more mono"${ssrRenderAttr("title", unref(trendExpanded) ? _ctx.$t("townView.trendCollapse") : _ctx.$t("townView.trendExpandAll", { p0: unref(daqTwins).length }))} data-v-3e78e101>${ssrInterpolate(unref(trendExpanded) ? _ctx.$t("townView.trendCollapse") : `+${unref(trendOverflow)}`)}</button>`);
|
|
2523
|
-
else _push(`<!---->`);
|
|
2524
|
-
_push(`</div></div><div class="trend-wrap" data-v-3e78e101><canvas class="trend-cv" data-v-3e78e101></canvas>`);
|
|
2525
|
-
if (!unref(daqTwins).length) _push(`<span class="trend-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1uht2uv068"))}</span>`);
|
|
2526
|
-
else _push(`<!---->`);
|
|
2527
|
-
_push(`</div></section></div></main><aside id="town-rail-right" class="${ssrRenderClass([{ "sheet-open": unref(sheetOpen) === "right" }, "rail rail-right"])}" data-v-3e78e101><div class="sheet-hd" data-v-3e78e101><span class="sheet-grip" aria-hidden="true" data-v-3e78e101></span><span class="sheet-hd-t" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k17dkhgd112"))}</span><button type="button" class="sheet-x" aria-label="关闭" data-v-3e78e101> ✕ </button></div>`);
|
|
2528
|
-
if (unref(selected)) {
|
|
2529
|
-
_push(`<section class="panel inspector" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(unref(selected).kind === "device" ? unref(selectedIsDcw) ? _ctx.$t("townView.k1ekqxlt146") : unref(selectedIsDaq) ? _ctx.$t("townView.k1empnnb178") : _ctx.$t("townView.k1k6wg8j185") : unref(selectedAgentRoleLabel))}</h3><button class="mini-btn"${ssrRenderAttr("title", _ctx.$t("townView.k1bsckft013"))} data-v-3e78e101> ✕ </button></div><div class="ins-chip-row" data-v-3e78e101><span class="ins-chip mono" data-v-3e78e101>${ssrInterpolate(unref(selected).id.slice(0, 8))}</span>`);
|
|
2530
|
-
if (unref(selected).kind === "device" && unref(selectedIsDaq)) _push(`<span class="ins-chip accent" data-v-3e78e101>DAQ</span>`);
|
|
2531
|
-
else if (unref(selected).kind === "device" && unref(selectedIsDcw)) _push(`<span class="ins-chip accent" data-v-3e78e101>DCW</span>`);
|
|
2532
|
-
else _push(`<!---->`);
|
|
2533
|
-
_push(`</div>`);
|
|
2534
|
-
if (unref(selected).kind === "device") {
|
|
2535
|
-
_push(`<!--[-->`);
|
|
2536
|
-
if (unref(selectedIsDcw)) {
|
|
2537
|
-
_push(`<div class="daq-info" data-v-3e78e101><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1deqh0d069"))}</span><b class="cy" data-v-3e78e101>${ssrInterpolate(unref(selectedDcwNode)?.value != null ? unref(selectedDcwNode).value.toFixed(unref(selectedDcwNode).decimals) : "--")} ${ssrInterpolate(unref(selectedDcwNode)?.unit)}</b></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(unref(selectedDcwWindow)?.src === "recipe" ? _ctx.$t("townView.kq2jssk147") : _ctx.$t("townView.k1iwj796179"))}</span><b class="${ssrRenderClass({ amber: unref(selectedDcwWindow)?.src === "recipe" })}" data-v-3e78e101>${ssrInterpolate(dcwWinLabel(unref(selectedDcwNode)))}</b></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1i8rtqt070"))}</span><b data-v-3e78e101>${ssrInterpolate(unref(selectedDcwDeviceName) || _ctx.$t("townView.k3own4q148"))}</b></div><div class="daq-bind-bar" data-v-3e78e101><input${ssrRenderAttr("value", unref(dcwWriteDrafts)[unref(selected).id])} type="number" class="bind-select"${ssrRenderAttr("step", 10 ** -(unref(selectedDcwNode)?.decimals ?? 2))}${ssrRenderAttr("placeholder", dcwWinInputPh(unref(selectedDcwNode)))} data-v-3e78e101><button class="bind-add-btn"${ssrIncludeBooleanAttr(unref(dcwWriteDrafts)[unref(selected).id] == null || unref(dcwWriteDrafts)[unref(selected).id] === "") ? " disabled" : ""} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kwrbtn180"))}</button></div>`);
|
|
2538
|
-
if (unref(dcwWriteErrs)[unref(selected).id]) _push(`<p class="dcw-err" data-v-3e78e101>${ssrInterpolate(unref(dcwWriteErrs)[unref(selected).id])}</p>`);
|
|
2539
|
-
else _push(`<!---->`);
|
|
2540
|
-
if (unref(mode) === "edit") {
|
|
2541
|
-
_push(`<div class="daq-bind-bar" data-v-3e78e101><select class="bind-select" data-v-3e78e101><option value="" data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(dcwBindPick)) ? ssrLooseContain(unref(dcwBindPick), "") : ssrLooseEqual(unref(dcwBindPick), "")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("townView.kjo6ekr071"))}</option><!--[-->`);
|
|
2542
|
-
ssrRenderList(unref(deviceTwins).twins.filter((x) => !isLegacyDaqTwin(x) && x.id !== (unref(selected)?.id ?? "")), (dv) => {
|
|
2543
|
-
_push(`<option${ssrRenderAttr("value", dv.id)} data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(dcwBindPick)) ? ssrLooseContain(unref(dcwBindPick), dv.id) : ssrLooseEqual(unref(dcwBindPick), dv.id)) ? " selected" : ""}>${ssrInterpolate(dv.name)}</option>`);
|
|
2544
|
-
});
|
|
2545
|
-
_push(`<!--]--></select><button class="bind-add-btn"${ssrIncludeBooleanAttr(!unref(selectedDcwDeviceName) && !unref(dcwBindPick)) ? " disabled" : ""} data-v-3e78e101>${ssrInterpolate(unref(selectedDcwDeviceName) ? _ctx.$t("townView.k479eh149") : _ctx.$t("townView.k452a8102"))}</button></div>`);
|
|
2546
|
-
} else _push(`<!---->`);
|
|
2547
|
-
_push(`</div>`);
|
|
2548
|
-
} else if (unref(selectedIsDaq)) {
|
|
2549
|
-
_push(`<div class="daq-info" data-v-3e78e101><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3mv305072"))}</span><b class="cy" data-v-3e78e101>${ssrInterpolate(unref(selectedDaqSim) ? fmtDaq(unref(selectedDaqSim)) : "--")} ${ssrInterpolate(unref(selectedDaqSim)?.tpl.unit)}</b></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1faqmjb073"))}</span><b data-v-3e78e101>${ssrInterpolate(unref(selectedDaqSim)?.tpl.min)} ~ ${ssrInterpolate(unref(selectedDaqSim)?.tpl.max)}</b></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1i8rtqt070"))}</span><b data-v-3e78e101>${ssrInterpolate(unref(daqBoundDeviceName) || _ctx.$t("townView.k3own4q148"))}</b></div>`);
|
|
2550
|
-
if (unref(mode) === "edit") {
|
|
2551
|
-
_push(`<div class="daq-bind-bar" data-v-3e78e101><select class="bind-select" data-v-3e78e101><option value="" data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(bindPick)) ? ssrLooseContain(unref(bindPick), "") : ssrLooseEqual(unref(bindPick), "")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("townView.kjo6ekr071"))}</option><!--[-->`);
|
|
2552
|
-
ssrRenderList(unref(deviceTwins).twins.filter((x) => !isLegacyDaqTwin(x) && x.id !== (unref(selected)?.id ?? "")), (dv) => {
|
|
2553
|
-
_push(`<option${ssrRenderAttr("value", dv.id)} data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(bindPick)) ? ssrLooseContain(unref(bindPick), dv.id) : ssrLooseEqual(unref(bindPick), dv.id)) ? " selected" : ""}>${ssrInterpolate(dv.name)}</option>`);
|
|
2554
|
-
});
|
|
2555
|
-
_push(`<!--]--></select><button class="bind-add-btn"${ssrIncludeBooleanAttr(!unref(daqBoundDeviceName) && !unref(bindPick)) ? " disabled" : ""} data-v-3e78e101>${ssrInterpolate(unref(daqBoundDeviceName) ? _ctx.$t("townView.k479eh149") : _ctx.$t("townView.k452a8102"))}</button></div>`);
|
|
2556
|
-
} else _push(`<!---->`);
|
|
2557
|
-
if (unref(mode) === "edit" && unref(selectedDaqNode)) _push(`<div class="daq-node-ctl" data-v-3e78e101><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1l6g2ga074"))}</span><span class="daq-th-inputs" data-v-3e78e101><input${ssrRenderAttr("value", unref(daqIntervalDraft))} type="number" min="200" max="60000" step="100" class="daq-num" data-v-3e78e101><small data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1or92b075"))}</small></span></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3x5tpx076"))}</span><span class="daq-th-inputs" data-v-3e78e101><input${ssrRenderAttr("value", unref(selectedDaqNode).warnLow)} type="number" step="any" class="daq-num" data-v-3e78e101> ~ <input${ssrRenderAttr("value", unref(selectedDaqNode).warnHigh)} type="number" step="any" class="daq-num" data-v-3e78e101></span></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1hjj0jf077"))}</span><span class="daq-th-inputs" data-v-3e78e101><input${ssrRenderAttr("value", unref(selectedDaqNode).min)} type="number" step="any" class="daq-num" data-v-3e78e101> ~ <input${ssrRenderAttr("value", unref(selectedDaqNode).max)} type="number" step="any" class="daq-num" data-v-3e78e101></span></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k48tki078"))}</span><button class="${ssrRenderClass([{ warn: unref(selectedDaqNode).enabled }, "bind-add-btn"])}" data-v-3e78e101>${ssrInterpolate(unref(selectedDaqNode).enabled ? _ctx.$t("townView.k1wv0nyo150") : _ctx.$t("townView.kh1586b180"))}</button></div><div class="daq-info-row" data-v-3e78e101><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3xakp079"))}</span><button class="bind-add-btn danger"${ssrRenderAttr("title", _ctx.$t("townView.kpwutri014"))} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1bpp30k080"))}</button></div></div>`);
|
|
2558
|
-
else _push(`<div class="ins-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kzk5dfx081"))}</div>`);
|
|
2559
|
-
_push(`</div>`);
|
|
2560
|
-
} else {
|
|
2561
|
-
_push(`<!--[--><div class="obj-row" data-v-3e78e101><span class="obj-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3xhia082"))}</span><input${ssrRenderAttr("value", unref(objNameDraft))} class="obj-input"${ssrRenderAttr("placeholder", _ctx.$t("townView.k1k6vbaf015"))}${ssrIncludeBooleanAttr(unref(mode) !== "edit") ? " disabled" : ""}${ssrRenderAttr("title", unref(mode) === "edit" ? "设备名称" : "运行模式只读")} data-v-3e78e101></div><div class="obj-row" data-v-3e78e101><span class="obj-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k41amp083"))}</span><select class="obj-select"${ssrRenderAttr("value", unref(scene3dRef)?.getDeviceModelRef?.(unref(selected).id) ?? "")}${ssrIncludeBooleanAttr(unref(mode) !== "edit") ? " disabled" : ""} data-v-3e78e101><!--[-->`);
|
|
2562
|
-
ssrRenderList(unref(deviceModels), (m) => {
|
|
2563
|
-
_push(`<option${ssrRenderAttr("value", m.id)} data-v-3e78e101>${ssrInterpolate(m.name)}</option>`);
|
|
2564
|
-
});
|
|
2565
|
-
_push(`<!--]--></select></div><div class="sect-hd" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1vtyk05130"))} ${ssrInterpolate(unref(boundDaqRows).length)} ${ssrInterpolate(_ctx.$t("townView.k3vfpz5138"))}</div><!--[-->`);
|
|
2566
|
-
ssrRenderList(unref(boundDaqRows), (r) => {
|
|
2567
|
-
_push(`<div class="bind-row" data-v-3e78e101><span class="bind-ico" data-v-3e78e101>`);
|
|
2568
|
-
_push(ssrRenderComponent(_component_WorkshopDaqTemplateIcon, {
|
|
2569
|
-
class: "bind-svg",
|
|
2570
|
-
icon: r.icon
|
|
2571
|
-
}, null, _parent));
|
|
2572
|
-
_push(`</span><span class="bind-meta" data-v-3e78e101><span class="bind-label" data-v-3e78e101>${ssrInterpolate(r.ch)}</span><span class="bind-val" data-v-3e78e101><b data-v-3e78e101>${ssrInterpolate(r.value)}</b> ${ssrInterpolate(r.unit)} · ${ssrInterpolate(r.name)}</span></span><canvas class="bind-spark" width="56" height="20" data-v-3e78e101></canvas>`);
|
|
2573
|
-
if (unref(mode) === "edit") _push(`<button class="bind-x"${ssrRenderAttr("title", _ctx.$t("townView.k1k73omv016"))} data-v-3e78e101> ✕ </button>`);
|
|
2574
|
-
else _push(`<!---->`);
|
|
2575
|
-
_push(`</div>`);
|
|
2576
|
-
});
|
|
2577
|
-
_push(`<!--]-->`);
|
|
2578
|
-
if (!unref(boundDaqRows).length) _push(`<div class="ins-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kgpuqhb084"))}</div>`);
|
|
2579
|
-
else _push(`<!---->`);
|
|
2580
|
-
if (unref(mode) === "edit") {
|
|
2581
|
-
_push(`<div class="bind-add-wrap" data-v-3e78e101><button class="bind-add" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kvm0lin085"))}</button>`);
|
|
2582
|
-
if (unref(bindPopOpen)) {
|
|
2583
|
-
_push(`<div class="bind-pop" style="${ssrRenderStyle({ maxHeight: `${unref(bindPopMaxH)}px` })}" data-v-3e78e101><!--[-->`);
|
|
2584
|
-
ssrRenderList(unref(daqTemplates), (tpl) => {
|
|
2585
|
-
_push(`<!--[-->`);
|
|
2586
|
-
if (unref(daqBindChoices)[tpl.id]?.length) {
|
|
2587
|
-
_push(`<div class="bp-group" data-v-3e78e101><span class="bp-tpl" data-v-3e78e101>${ssrInterpolate(tpl.name)} · ${ssrInterpolate(tpl.ch)}</span><!--[-->`);
|
|
2588
|
-
ssrRenderList(unref(daqBindChoices)[tpl.id], (c) => {
|
|
2589
|
-
_push(`<button${ssrRenderAttr("data-node-id", c.id)}${ssrRenderAttr("title", c.devName ? _ctx.$t("townView.k2bindr0007", { p0: c.devName }) : _ctx.$t("townView.k2bindr0008"))} data-v-3e78e101>`);
|
|
2590
|
-
_push(ssrRenderComponent(_component_WorkshopDaqTemplateIcon, {
|
|
2591
|
-
class: "bind-svg",
|
|
2592
|
-
icon: c.tpl.icon
|
|
2593
|
-
}, null, _parent));
|
|
2594
|
-
_push(`<span data-v-3e78e101>${ssrInterpolate(c.name)}`);
|
|
2595
|
-
if (c.devName) _push(`<i class="bp-cur" data-v-3e78e101>→ ${ssrInterpolate(c.devName)}</i>`);
|
|
2596
|
-
else if (!c.placed) _push(`<i class="bp-cur" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2bindr0009"))}</i>`);
|
|
2597
|
-
else _push(`<!---->`);
|
|
2598
|
-
_push(`</span></button>`);
|
|
2599
|
-
});
|
|
2600
|
-
_push(`<!--]--></div>`);
|
|
2601
|
-
} else _push(`<!---->`);
|
|
2602
|
-
_push(`<!--]-->`);
|
|
2603
|
-
});
|
|
2604
|
-
_push(`<!--]-->`);
|
|
2605
|
-
if (!unref(daqBindChoiceCount)) _push(`<div class="bp-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2bindr0010"))}</div>`);
|
|
2606
|
-
else _push(`<!---->`);
|
|
2607
|
-
_push(`</div>`);
|
|
2608
|
-
} else _push(`<!---->`);
|
|
2609
|
-
_push(`</div>`);
|
|
2610
|
-
} else _push(`<!---->`);
|
|
2611
|
-
_push(`<div class="sect-hd" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.ktzir2t131"))} ${ssrInterpolate(unref(boundDcwRows).length)} ${ssrInterpolate(_ctx.$t("townView.k4l1w042"))}</div><!--[-->`);
|
|
2612
|
-
ssrRenderList(unref(boundDcwRows), (r) => {
|
|
2613
|
-
_push(`<div class="dcw-row" data-v-3e78e101><div class="dcw-top" data-v-3e78e101><span class="bind-ico" data-v-3e78e101>`);
|
|
2614
|
-
_push(ssrRenderComponent(_component_WorkshopDaqTemplateIcon, {
|
|
2615
|
-
class: "bind-svg",
|
|
2616
|
-
icon: r.icon
|
|
2617
|
-
}, null, _parent));
|
|
2618
|
-
_push(`</span><span class="dcw-id" data-v-3e78e101><span class="bind-label" data-v-3e78e101>${ssrInterpolate(r.ch)}`);
|
|
2619
|
-
if (r.rMin != null || r.rMax != null) _push(`<i class="dcw-tag" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k48grv086"))}</i>`);
|
|
2620
|
-
else _push(`<!---->`);
|
|
2621
|
-
_push(`</span><span class="dcw-name" data-v-3e78e101>${ssrInterpolate(r.name)}</span></span><span class="dcw-cur" data-v-3e78e101><b data-v-3e78e101>${ssrInterpolate(r.value != null ? r.value.toFixed(r.decimals) : "--")}</b><i data-v-3e78e101>${ssrInterpolate(r.unit)}</i></span>`);
|
|
2622
|
-
if (unref(mode) === "edit") _push(`<button class="bind-x"${ssrRenderAttr("title", _ctx.$t("townView.k1k73omv016"))} data-v-3e78e101> ✕ </button>`);
|
|
2623
|
-
else _push(`<!---->`);
|
|
2624
|
-
_push(`</div><div class="${ssrRenderClass([{ recipe: r.rMin != null || r.rMax != null }, "dcw-win"])}" data-v-3e78e101><em data-v-3e78e101>${ssrInterpolate(r.rMin != null || r.rMax != null ? _ctx.$t("townView.k1l3m0hx151") : _ctx.$t("townView.k1bc6rqf181"))}</em><span class="dcw-win-num" data-v-3e78e101>${ssrInterpolate(r.rMin ?? "-∞")}</span><span class="dcw-win-track" data-v-3e78e101><i style="${ssrRenderStyle({ left: `${dcwMarkPct(r)}%` })}" data-v-3e78e101></i></span><span class="dcw-win-num" data-v-3e78e101>${ssrInterpolate(r.rMax ?? "+∞")}</span></div><div class="dcw-write" data-v-3e78e101><input${ssrRenderAttr("value", unref(dcwWriteDrafts)[r.dcwId])} type="number"${ssrRenderAttr("step", 10 ** -r.decimals)}${ssrRenderAttr("placeholder", `${r.rMin ?? r.gMin} ~ ${r.rMax ?? r.gMax}`)} data-v-3e78e101><button class="dcw-send"${ssrIncludeBooleanAttr(unref(dcwWriteDrafts)[r.dcwId] == null || unref(dcwWriteDrafts)[r.dcwId] === "") ? " disabled" : ""}${ssrRenderAttr("title", _ctx.$t("townView.k15t7izc017"))} data-v-3e78e101> write </button></div>`);
|
|
2625
|
-
if (unref(dcwWriteErrs)[r.dcwId]) _push(`<small class="dcw-err" data-v-3e78e101>${ssrInterpolate(unref(dcwWriteErrs)[r.dcwId])}</small>`);
|
|
2626
|
-
else _push(`<!---->`);
|
|
2627
|
-
_push(`</div>`);
|
|
2628
|
-
});
|
|
2629
|
-
_push(`<!--]-->`);
|
|
2630
|
-
if (!unref(boundDcwRows).length) _push(`<div class="ins-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k10smf24087"))}</div>`);
|
|
2631
|
-
else _push(`<!---->`);
|
|
2632
|
-
if (unref(mode) === "edit") {
|
|
2633
|
-
_push(`<div class="bind-add-wrap" data-v-3e78e101><button class="bind-add" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kvk1vh5088"))}</button>`);
|
|
2634
|
-
if (unref(dcwBindPopOpen)) {
|
|
2635
|
-
_push(`<div class="bind-pop" style="${ssrRenderStyle({ maxHeight: `${unref(bindPopMaxH)}px` })}" data-v-3e78e101><!--[-->`);
|
|
2636
|
-
ssrRenderList(unref(dcwTemplates), (tpl) => {
|
|
2637
|
-
_push(`<!--[-->`);
|
|
2638
|
-
if (unref(dcwBindChoices)[tpl.id]?.length) {
|
|
2639
|
-
_push(`<div class="bp-group" data-v-3e78e101><span class="bp-tpl" data-v-3e78e101>${ssrInterpolate(tpl.name)} · ${ssrInterpolate(tpl.ch)}</span><!--[-->`);
|
|
2640
|
-
ssrRenderList(unref(dcwBindChoices)[tpl.id], (c) => {
|
|
2641
|
-
_push(`<button${ssrRenderAttr("data-node-id", c.id)}${ssrRenderAttr("title", c.devName ? _ctx.$t("townView.k2bindr0007", { p0: c.devName }) : _ctx.$t("townView.k2bindr0008"))} data-v-3e78e101>`);
|
|
2642
|
-
_push(ssrRenderComponent(_component_WorkshopDaqTemplateIcon, {
|
|
2643
|
-
class: "bind-svg",
|
|
2644
|
-
icon: c.tpl.icon
|
|
2645
|
-
}, null, _parent));
|
|
2646
|
-
_push(`<span data-v-3e78e101>${ssrInterpolate(c.name)}`);
|
|
2647
|
-
if (c.devName) _push(`<i class="bp-cur" data-v-3e78e101>→ ${ssrInterpolate(c.devName)}</i>`);
|
|
2648
|
-
else if (!c.placed) _push(`<i class="bp-cur" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2bindr0009"))}</i>`);
|
|
2649
|
-
else _push(`<!---->`);
|
|
2650
|
-
_push(`</span></button>`);
|
|
2651
|
-
});
|
|
2652
|
-
_push(`<!--]--></div>`);
|
|
2653
|
-
} else _push(`<!---->`);
|
|
2654
|
-
_push(`<!--]-->`);
|
|
2655
|
-
});
|
|
2656
|
-
_push(`<!--]-->`);
|
|
2657
|
-
if (!unref(dcwBindChoiceCount)) _push(`<div class="bp-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2bindr0010"))}</div>`);
|
|
2658
|
-
else _push(`<!---->`);
|
|
2659
|
-
_push(`</div>`);
|
|
2660
|
-
} else _push(`<!---->`);
|
|
2661
|
-
_push(`</div>`);
|
|
2662
|
-
} else _push(`<!---->`);
|
|
2663
|
-
if (unref(mode) === "edit") _push(`<!--[--><div class="sect-hd" data-v-3e78e101> 变换 · BLENDER </div><div class="xz-seg" data-v-3e78e101><button class="${ssrRenderClass([{ on: unref(tMode) === "translate" }, "seg-btn"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1hg3167089"))}</button><button class="${ssrRenderClass([{ on: unref(tMode) === "rotate" }, "seg-btn"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1enlg7i090"))}</button><button class="${ssrRenderClass([{ on: unref(tMode) === "scale" }, "seg-btn"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1ibjg3j091"))}</button></div><div class="scale-row" data-v-3e78e101><span class="scale-min" data-v-3e78e101>0.2×</span><input class="scale-range" type="range" min="0.2" max="5" step="0.05"${ssrRenderAttr("value", unref(selected).scale)} data-v-3e78e101><span class="scale-max" data-v-3e78e101>5×</span></div><div class="scale-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(selected).scale * 100))}% </div><div class="ins-foot" data-v-3e78e101><button class="${ssrRenderClass([{ armed: unref(deviceDeleteArmed) === unref(selected).id }, "btn btn-danger ins-del"])}" data-v-3e78e101>${ssrInterpolate(unref(deviceDeleteArmed) === unref(selected).id ? _ctx.$t("townView.k1w10xa5152") : _ctx.$t("townView.k121kfef182"))}</button></div><!--]-->`);
|
|
2664
|
-
else _push(`<div class="ins-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kt0i3y2092"))}</div>`);
|
|
2665
|
-
_push(`<!--]-->`);
|
|
2666
|
-
}
|
|
2667
|
-
_push(`<!--]-->`);
|
|
2668
|
-
} else if (unref(selected).kind === "agent") {
|
|
2669
|
-
_push(`<!--[--><div class="chat-id-row" data-v-3e78e101><span class="chat-badge" style="${ssrRenderStyle({ "--p-acc": unref(agentChatColor) })}" data-v-3e78e101>${ssrInterpolate(unref(agentChatTitle).slice(0, 1).toUpperCase())}</span><div class="chat-nameplate" data-v-3e78e101><span class="chat-name" data-v-3e78e101>${ssrInterpolate(unref(agentChatTitle))}</span><span class="chat-meta" data-v-3e78e101><span class="${ssrRenderClass([unref(selectedAgentMeta)?.role === "lead" ? "r-lead" : "r-worker", "chat-role"])}" data-v-3e78e101>${ssrInterpolate(unref(selectedAgentRoleTag))}</span><span class="${ssrRenderClass([`s-${unref(selectedAgentMeta)?.state ?? "idle"}`, "chat-state"])}" data-v-3e78e101>${ssrInterpolate(unref(agentChatStateLabel))}</span>`);
|
|
2670
|
-
if (unref(selectedAgentMeta)?.harness) _push(`<span class="chat-harness" data-v-3e78e101>${ssrInterpolate(unref(selectedAgentMeta).harness.toUpperCase())}</span>`);
|
|
2671
|
-
else _push(`<!---->`);
|
|
2672
|
-
_push(`<span class="chat-count" data-v-3e78e101>${ssrInterpolate(unref(agentHistory).length + unref(agentChatRows).length)} ${ssrInterpolate(_ctx.$t("townView.k4dfq040"))}</span></span></div></div><div class="obj-row" data-v-3e78e101><span class="obj-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k41amp083"))}</span><select class="obj-select"${ssrRenderAttr("value", (unref(scene3dRef)?.getAgentModel?.(unref(selected).id) ?? "") || "hero-3d")}${ssrIncludeBooleanAttr(unref(mode) !== "edit") ? " disabled" : ""} data-v-3e78e101><!--[-->`);
|
|
2673
|
-
ssrRenderList(unref(agentModels), (m) => {
|
|
2674
|
-
_push(`<option${ssrRenderAttr("value", m.id)} data-v-3e78e101>${ssrInterpolate(m.name)}</option>`);
|
|
2675
|
-
});
|
|
2676
|
-
_push(`<!--]--></select></div><div class="obj-sep" data-v-3e78e101></div><div class="obj-row" data-v-3e78e101><span class="obj-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1fix3hb093"))}</span><span class="range-status" data-v-3e78e101>${ssrInterpolate(unref(agentRangeStatusText))}</span>`);
|
|
2677
|
-
if (unref(mode) === "edit") _push(`<button class="${ssrRenderClass([{ on: unref(agentDrawingRange) }, "obj-mini"])}"${ssrRenderAttr("title", _ctx.$t("townView.k13enoy3018"))} data-v-3e78e101>${ssrInterpolate(unref(agentDrawingRange) ? _ctx.$t("townView.k3slzhc153") : _ctx.$t("townView.k1f1xmci183"))}</button>`);
|
|
2678
|
-
else _push(`<!---->`);
|
|
2679
|
-
_push(`</div><div class="obj-sep" data-v-3e78e101></div><div class="sect-hd" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1p7nru2094"))}</div><!--[-->`);
|
|
2680
|
-
ssrRenderList(unref(agentBindings), (b) => {
|
|
2681
|
-
_push(`<div class="bind-row" data-v-3e78e101><span class="${ssrRenderClass([b.kind === "dcw" ? "accent" : "", "ins-chip"])}" style="${ssrRenderStyle({ "flex": "none" })}" data-v-3e78e101>${ssrInterpolate(b.kind === "dcw" ? _ctx.$t("townView.k40ifw097") : _ctx.$t("townView.k40rjw098"))}</span><span class="bind-meta" data-v-3e78e101><span class="bind-label" data-v-3e78e101>${ssrInterpolate(bindingNodeName(b))}</span><select class="bind-select" style="${ssrRenderStyle({ "margin-top": "3px" })}"${ssrRenderAttr("value", b.mode)}${ssrRenderAttr("title", _ctx.$t("townView.khqvwix019"))} data-v-3e78e101><option value="auto" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1io1ylm095"))}</option><option value="manual" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1duyr8q096"))}</option></select></span><button class="bind-x"${ssrRenderAttr("title", _ctx.$t("townView.k1k73omv016"))} data-v-3e78e101> ✕ </button></div>`);
|
|
2682
|
-
});
|
|
2683
|
-
_push(`<!--]-->`);
|
|
2684
|
-
if (!unref(agentBindings).length) _push(`<div class="ins-empty" data-v-3e78e101> 未绑定工业节点 —— 绑定后 Agent 可用 dcw_control / daq_query 工具 </div>`);
|
|
2685
|
-
else _push(`<!---->`);
|
|
2686
|
-
if (unref(mode) === "edit") {
|
|
2687
|
-
_push(`<div class="daq-bind-bar" style="${ssrRenderStyle({ "margin-bottom": "8px" })}" data-v-3e78e101><select class="bind-select" style="${ssrRenderStyle({
|
|
2688
|
-
"flex": "none",
|
|
2689
|
-
"width": "62px"
|
|
2690
|
-
})}" data-v-3e78e101><option value="dcw" data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(agentBindKind)) ? ssrLooseContain(unref(agentBindKind), "dcw") : ssrLooseEqual(unref(agentBindKind), "dcw")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("townView.k40ifw097"))}</option><option value="daq" data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(agentBindKind)) ? ssrLooseContain(unref(agentBindKind), "daq") : ssrLooseEqual(unref(agentBindKind), "daq")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("townView.k40rjw098"))}</option></select><select class="bind-select" data-v-3e78e101><option value="" data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(agentBindNodeId)) ? ssrLooseContain(unref(agentBindNodeId), "") : ssrLooseEqual(unref(agentBindNodeId), "")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("townView.kurjldk099"))}</option>`);
|
|
2691
|
-
if (unref(agentBindKind) === "dcw") {
|
|
2692
|
-
_push(`<!--[-->`);
|
|
2693
|
-
ssrRenderList(unref(dcw).nodes, (n) => {
|
|
2694
|
-
_push(`<option${ssrRenderAttr("value", n.id)} data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(agentBindNodeId)) ? ssrLooseContain(unref(agentBindNodeId), n.id) : ssrLooseEqual(unref(agentBindNodeId), n.id)) ? " selected" : ""}>${ssrInterpolate(n.name)}</option>`);
|
|
2695
|
-
});
|
|
2696
|
-
_push(`<!--]-->`);
|
|
2697
|
-
} else {
|
|
2698
|
-
_push(`<!--[-->`);
|
|
2699
|
-
ssrRenderList(unref(daq).nodes, (n) => {
|
|
2700
|
-
_push(`<option${ssrRenderAttr("value", n.id)} data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(agentBindNodeId)) ? ssrLooseContain(unref(agentBindNodeId), n.id) : ssrLooseEqual(unref(agentBindNodeId), n.id)) ? " selected" : ""}>${ssrInterpolate(n.name)}</option>`);
|
|
2701
|
-
});
|
|
2702
|
-
_push(`<!--]-->`);
|
|
2703
|
-
}
|
|
2704
|
-
_push(`</select><select class="bind-select" style="${ssrRenderStyle({
|
|
2705
|
-
"flex": "none",
|
|
2706
|
-
"width": "76px"
|
|
2707
|
-
})}" data-v-3e78e101><option value="auto" data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(agentBindMode)) ? ssrLooseContain(unref(agentBindMode), "auto") : ssrLooseEqual(unref(agentBindMode), "auto")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("townView.k45kpj100"))}</option><option value="manual" data-v-3e78e101${ssrIncludeBooleanAttr(Array.isArray(unref(agentBindMode)) ? ssrLooseContain(unref(agentBindMode), "manual") : ssrLooseEqual(unref(agentBindMode), "manual")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("townView.k3zul4101"))}</option></select><button class="bind-add-btn"${ssrIncludeBooleanAttr(!unref(agentBindNodeId)) ? " disabled" : ""} data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k452a8102"))}</button></div>`);
|
|
2708
|
-
} else _push(`<!---->`);
|
|
2709
|
-
if (unref(pendingApprovals).length) {
|
|
2710
|
-
_push(`<!--[--><div class="sect-hd" style="${ssrRenderStyle({ "color": "var(--hud-amber)" })}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1gk2jg7132"))} ${ssrInterpolate(unref(pendingApprovals).length)}</div><!--[-->`);
|
|
2711
|
-
ssrRenderList(unref(pendingApprovals), (ap) => {
|
|
2712
|
-
_push(`<div class="approval-card" data-v-3e78e101><div class="approval-detail" data-v-3e78e101>${ssrInterpolate(ap.detail)}</div><div class="${ssrRenderClass([{ urgent: approvalRemainingSec(ap) <= 30 }, "approval-ttl"])}" data-v-3e78e101> ⏱ ${ssrInterpolate(approvalRemainingSec(ap))}s ${ssrInterpolate(_ctx.$t("townView.hitlAutoReject"))}</div><input${ssrRenderAttr("value", unref(approvalComments)[ap.id])} class="dcw-write input-inline" style="${ssrRenderStyle({
|
|
2713
|
-
"width": "100%",
|
|
2714
|
-
"margin-top": "5px"
|
|
2715
|
-
})}"${ssrRenderAttr("placeholder", _ctx.$t("townView.keztqrn020"))} data-v-3e78e101><div class="daq-bind-bar" style="${ssrRenderStyle({ "margin-top": "5px" })}" data-v-3e78e101><button class="bind-add-btn" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kslcozu103"))}</button><button class="bind-add-btn danger" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k14gu3rd104"))}</button></div></div>`);
|
|
2716
|
-
});
|
|
2717
|
-
_push(`<!--]--><!--]-->`);
|
|
2718
|
-
} else _push(`<!---->`);
|
|
2719
|
-
if (unref(agentRangeDraft) && unref(mode) === "edit") _push(`<!--[--><div class="obj-row" data-v-3e78e101><span class="obj-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3zhy5048"))}</span><div class="bp-seg" data-v-3e78e101><button class="${ssrRenderClass([{ on: unref(agentRangeDraft).shape === "ellipse" }, "seg-btn"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k414bc049"))}</button><button class="${ssrRenderClass([{ on: unref(agentRangeDraft).shape === "rect" }, "seg-btn"])}" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k43u0g050"))}</button></div></div><div class="obj-row" data-v-3e78e101><span class="obj-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k41lwj105"))}</span><input${ssrRenderAttr("value", unref(agentRangeDraft).radiusX)} class="obj-range" type="range" min="40" max="4000" step="8" data-v-3e78e101><span class="bp-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(agentRangeDraft).radiusX))}</span></div><div class="obj-row" data-v-3e78e101><span class="obj-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k45bta106"))}</span><input${ssrRenderAttr("value", unref(agentRangeDraft).radiusZ)} class="obj-range" type="range" min="40" max="4000" step="8" data-v-3e78e101><span class="bp-val" data-v-3e78e101>${ssrInterpolate(Math.round(unref(agentRangeDraft).radiusZ))}</span></div><button class="obj-mini danger" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1w45mzc107"))}</button><!--]-->`);
|
|
2720
|
-
else _push(`<div class="ins-empty" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k14s8urm108"))}</div>`);
|
|
2721
|
-
_push(`<div class="obj-sep" data-v-3e78e101></div><div class="sect-hd chat-sect" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1ghjbfc133"))} ${ssrInterpolate(unref(agentChatTitle))} <button class="mini-btn chat-refresh"${ssrRenderAttr("title", _ctx.$t("townView.k15avt7g021"))} data-v-3e78e101>${ssrInterpolate(unref(historyLoading) ? "…" : "↻")}</button></div><div class="rpg-lines chat-embed" data-v-3e78e101>`);
|
|
2722
|
-
if (unref(historyLoading)) _push(`<div class="rpg-note" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kkhlx5h109"))}</div>`);
|
|
2723
|
-
else _push(`<!---->`);
|
|
2724
|
-
if (unref(agentHistory).length) {
|
|
2725
|
-
_push(`<!--[--><div class="rpg-divider" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k768cnt134"))} ${ssrInterpolate(unref(agentHistory).length)}</div><!--[-->`);
|
|
2726
|
-
ssrRenderList(unref(agentHistory), (r) => {
|
|
2727
|
-
_push(`<div class="rpg-line hist" data-v-3e78e101><span class="rpg-time" data-v-3e78e101>${ssrInterpolate(fmtTime(r.at))}</span><div class="rpg-bubble" data-v-3e78e101>`);
|
|
2728
|
-
if (chatKindLabel(r.kind)) _push(`<span class="${ssrRenderClass([`k-${r.kind}`, "rpg-kind"])}" data-v-3e78e101>${ssrInterpolate(chatKindLabel(r.kind))}</span>`);
|
|
2729
|
-
else _push(`<!---->`);
|
|
2730
|
-
_push(`<span class="rpg-text" data-v-3e78e101>${ssrInterpolate(r.text)}</span></div></div>`);
|
|
2731
|
-
});
|
|
2732
|
-
_push(`<!--]--><!--]-->`);
|
|
2733
|
-
} else _push(`<!---->`);
|
|
2734
|
-
if (unref(agentChatRows).length) _push(`<div class="rpg-divider live" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1cwz73k135"))} ${ssrInterpolate(unref(agentChatRows).length)}</div>`);
|
|
2735
|
-
else _push(`<!---->`);
|
|
2736
|
-
_push(`<!--[-->`);
|
|
2737
|
-
ssrRenderList(unref(agentChatRows), (r) => {
|
|
2738
|
-
_push(`<div class="rpg-line live" data-v-3e78e101><span class="rpg-time" data-v-3e78e101>${ssrInterpolate(fmtTime(r.at))}</span><div class="rpg-bubble" data-v-3e78e101><span class="rpg-text" data-v-3e78e101>${ssrInterpolate(r.text)}</span></div></div>`);
|
|
2739
|
-
});
|
|
2740
|
-
_push(`<!--]-->`);
|
|
2741
|
-
if (unref(selectedAgentMeta)?.state === "busy") _push(`<div class="rpg-typing" data-v-3e78e101><span class="ty-dot" data-v-3e78e101></span><span class="ty-dot" data-v-3e78e101></span><span class="ty-dot" data-v-3e78e101></span><span class="ty-label" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k3o5tz9110"))}</span></div>`);
|
|
2742
|
-
else _push(`<!---->`);
|
|
2743
|
-
if (!unref(historyLoading) && !unref(agentHistory).length && !unref(agentChatRows).length) _push(`<div class="rpg-note" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1qkqld7111"))}</div>`);
|
|
2744
|
-
else _push(`<!---->`);
|
|
2745
|
-
_push(`</div><!--]-->`);
|
|
2746
|
-
} else _push(`<!---->`);
|
|
2747
|
-
_push(`</section>`);
|
|
2748
|
-
} else _push(`<!---->`);
|
|
2749
|
-
_push(`<section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k17dkhgd112"))}</h3></div><div class="health-body" data-v-3e78e101><div class="donut-wrap" data-v-3e78e101><canvas width="118" height="118" data-v-3e78e101></canvas><div class="donut-center" data-v-3e78e101><b style="${ssrRenderStyle({ color: unref(healthTone) })}" data-v-3e78e101>${ssrInterpolate(unref(healthPct))}%</b><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k7h1nxo113"))}</span></div></div><div class="health-legend" data-v-3e78e101><div class="hl-row" data-v-3e78e101><span class="hl-dot" style="${ssrRenderStyle({ background: "var(--hud-accent)" })}" data-v-3e78e101></span> ${ssrInterpolate(_ctx.$t("townView.k3vp67i114"))} <span class="n" data-v-3e78e101>${ssrInterpolate(unref(runningCount))}</span></div><div class="hl-row" data-v-3e78e101><span class="hl-dot" style="${ssrRenderStyle({ background: "var(--hud-amber)" })}" data-v-3e78e101></span> ${ssrInterpolate(_ctx.$t("townView.k3zcvb115"))} <span class="n" data-v-3e78e101>${ssrInterpolate(unref(idleCount))}</span></div><div class="hl-row" data-v-3e78e101><span class="hl-dot" style="${ssrRenderStyle({ background: "var(--hud-danger)" })}" data-v-3e78e101></span> ${ssrInterpolate(_ctx.$t("townView.k3xmid116"))} <span class="n" data-v-3e78e101>${ssrInterpolate(unref(alarmCount))}</span></div><div class="hl-row" data-v-3e78e101><span class="hl-dot" style="${ssrRenderStyle({ background: "#3a4a63" })}" data-v-3e78e101></span> ${ssrInterpolate(_ctx.$t("townView.statesOffline"))} <span class="n" data-v-3e78e101>${ssrInterpolate(unref(offlineCount))}</span></div></div></div></section><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1q247fn117"))}</h3><span class="panel-tag" data-v-3e78e101>${ssrInterpolate(unref(deviceTwins).twins.length)}</span></div>`);
|
|
2750
|
-
_push(ssrRenderComponent(_component_WorkshopDeviceTwinPanel, {
|
|
2751
|
-
class: "kd-embed",
|
|
2752
|
-
"daq-live": unref(daqLive),
|
|
2753
|
-
"dcw-live": unref(dcwLive),
|
|
2754
|
-
onFocusDevice
|
|
2755
|
-
}, null, _parent));
|
|
2756
|
-
_push(`</section><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1cxf749118"))}</h3><span class="panel-tag" data-v-3e78e101>${ssrInterpolate(unref(activeAlarmCount))} ${ssrInterpolate(_ctx.$t("townView.k4dfq040"))}</span><button class="mini-btn"${ssrRenderAttr("title", _ctx.$t("townView.k1bkswpz022"))} data-v-3e78e101> ✓ </button></div><div class="alarm-list" data-v-3e78e101><!--[-->`);
|
|
2757
|
-
ssrRenderList(unref(alarms).slice(0, 8), (a) => {
|
|
2758
|
-
_push(`<div class="al-row" data-v-3e78e101><span class="${ssrRenderClass([a.state === 2 ? "info" : a.state === 1 ? "warn" : "crit", "al-ico"])}" data-v-3e78e101><svg class="al-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M12 3 22 20H2L12 3Z" data-v-3e78e101></path><path d="M12 10v4M12 17v.2" data-v-3e78e101></path></svg></span><div class="al-body" data-v-3e78e101><div class="al-txt" data-v-3e78e101>${ssrInterpolate(a.txt)}</div><div class="al-src" data-v-3e78e101>${ssrInterpolate(a.src)} · ${ssrInterpolate(a.time)}</div></div><button class="${ssrRenderClass([`s${a.state}`, "al-state"])}" data-v-3e78e101>${ssrInterpolate(ALARM_STATES[a.state])}</button></div>`);
|
|
2759
|
-
});
|
|
2760
|
-
_push(`<!--]-->`);
|
|
2761
|
-
if (!unref(alarms).length) _push(`<div class="rail-empty" data-v-3e78e101><svg class="re-ico" viewBox="0 0 24 24" data-v-3e78e101><path d="M12 3l7 3v5c0 4.6-3 8.2-7 10-4-1.8-7-5.4-7-10V6l7-3Z" data-v-3e78e101></path><path d="m9.2 12.2 2 2 3.6-4" data-v-3e78e101></path></svg><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kjz544r119"))}</span></div>`);
|
|
2762
|
-
else _push(`<!---->`);
|
|
2763
|
-
_push(`</div></section><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1cxdtq2120"))}</h3><span class="panel-tag" data-v-3e78e101>${ssrInterpolate(unref(ticker).length)}</span></div><div class="event-list" data-v-3e78e101><!--[-->`);
|
|
2764
|
-
ssrRenderList([...unref(ticker)].reverse(), (ev, i) => {
|
|
2765
|
-
_push(`<div class="event-row" data-v-3e78e101><span class="ev-time" data-v-3e78e101>${ssrInterpolate(fmtTime(ev.at))}</span><span class="ev-name"${ssrRenderAttr("title", ev.agentName)} data-v-3e78e101>${ssrInterpolate(ev.agentName)}</span><span class="ev-text"${ssrRenderAttr("title", ev.text)} data-v-3e78e101>${ssrInterpolate(ev.text)}</span></div>`);
|
|
2766
|
-
});
|
|
2767
|
-
_push(`<!--]-->`);
|
|
2768
|
-
if (!unref(ticker).length) _push(`<div class="rail-empty" data-v-3e78e101><svg class="re-ico" viewBox="0 0 24 24" data-v-3e78e101><path d="M3 12h3l2.5-6 4 12L15 12h6" data-v-3e78e101></path></svg><span data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k2uk6ua121"))}</span></div>`);
|
|
2769
|
-
else _push(`<!---->`);
|
|
2770
|
-
_push(`</div></section><section class="panel" data-v-3e78e101><div class="panel-hd" data-v-3e78e101><h3 data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kjug2jq122"))}</h3></div><div class="mm-body" data-v-3e78e101><div class="mm-wrap"${ssrRenderAttr("title", _ctx.$t("townView.klfwiqg023"))} data-v-3e78e101><canvas class="nav-cv" data-v-3e78e101></canvas></div><div class="mm-col" data-v-3e78e101><button class="vp-tool"${ssrRenderAttr("title", _ctx.$t("townView.k1lap9bs024"))} data-v-3e78e101><svg class="vp-svg" viewBox="0 0 24 24" data-v-3e78e101><path d="M3 12a9 9 0 1 0 3-6.7M3 4v5h5" data-v-3e78e101></path></svg></button><button class="vp-tool"${ssrRenderAttr("title", _ctx.$t("townView.kav8a8k025"))} data-v-3e78e101><svg class="vp-svg" viewBox="0 0 24 24" data-v-3e78e101><circle cx="11" cy="11" r="6.5" data-v-3e78e101></circle><path d="m16 16 4.5 4.5M8.5 11h5" data-v-3e78e101></path></svg></button><button class="vp-tool"${ssrRenderAttr("title", _ctx.$t("townView.k1u7uce9026"))} data-v-3e78e101><svg class="vp-svg" viewBox="0 0 24 24" data-v-3e78e101><circle cx="11" cy="11" r="6.5" data-v-3e78e101></circle><path d="m16 16 4.5 4.5M8.5 11h5M11 8.5v5" data-v-3e78e101></path></svg></button></div></div><div class="mm-meta mono" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k1gaaodq136"))}${ssrInterpolate(unref(navScale).toFixed(1))} · ${ssrInterpolate(unref(minimap)?.devices?.length ?? 0)} ${ssrInterpolate(_ctx.$t("townView.k47e16126"))}</div></section></aside></div><footer class="statusbar" data-v-3e78e101><span data-v-3e78e101><span class="${ssrRenderClass([{ red: unref(conn).state !== "open" }, "sb-dot"])}" data-v-3e78e101></span>${ssrInterpolate(_ctx.$t("townView.k1i4g246123"))} <b data-v-3e78e101>${ssrInterpolate(unref(conn).state === "open" ? _ctx.$t("townView.k41k5c154") : unref(syncing) ? _ctx.$t("townView.k3lmtk3184") : _ctx.$t("townView.k44c2n186"))}</b></span><span class="sb-stats" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.k4a0jt124"))} <b data-v-3e78e101>${ssrInterpolate(unref(blockCount))}</b><i data-v-3e78e101>·</i>${ssrInterpolate(_ctx.$t("townView.k3xdvm125"))} <b data-v-3e78e101>${ssrInterpolate(unref(agentCount))}</b><i data-v-3e78e101>·</i>${ssrInterpolate(_ctx.$t("townView.k47e16126"))} <b data-v-3e78e101>${ssrInterpolate(unref(deviceCount))}</b></span><span class="sb-lat mono" data-v-3e78e101>${ssrInterpolate(unref(fps))} FPS </span><span class="copy" data-v-3e78e101> © 2026 ABO · DIGITAL TWIN · ${ssrInterpolate(_ctx.$t("townView.k1h5gxpf137"))}</span></footer>`);
|
|
2771
|
-
if (unref(sheetOpen)) _push(`<div class="sheet-mask" data-v-3e78e101></div>`);
|
|
2772
|
-
else _push(`<!---->`);
|
|
2773
|
-
if (!unref(ready)) _push(`<div data-hud="town-loading" class="loading-mask" data-v-3e78e101><div class="loading-spinner" data-v-3e78e101></div><span class="loading-text" data-v-3e78e101>${ssrInterpolate(_ctx.$t("townView.kvjdqfg059"))}</span></div>`);
|
|
2774
|
-
else _push(`<!---->`);
|
|
2775
|
-
_push(`</div>`);
|
|
2776
|
-
};
|
|
2777
|
-
}
|
|
2778
|
-
});
|
|
2779
|
-
//#endregion
|
|
2780
|
-
//#region app/components/workshop/town/TownView.vue
|
|
2781
|
-
var _sfc_setup = TownView_vue_vue_type_script_setup_true_lang_default.setup;
|
|
2782
|
-
TownView_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
2783
|
-
const ssrContext = useSSRContext();
|
|
2784
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/workshop/town/TownView.vue");
|
|
2785
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
2786
|
-
};
|
|
2787
|
-
var TownView_default = /*#__PURE__*/ Object.assign(_plugin_vue_export_helper_default(TownView_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3e78e101"]]), { __name: "WorkshopTownView" });
|
|
2788
|
-
|
|
2789
|
-
export { TownView_default as T, useStorage as u };
|
|
2790
|
-
//# sourceMappingURL=TownView--otsnr_7.mjs.map
|