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
|
@@ -0,0 +1,1782 @@
|
|
|
1
|
+
import { e as useUserStore } from '../virtual/entry.mjs';
|
|
2
|
+
import { n as narrowFetch } from './narrow-fetch-CcG-BPxc.mjs';
|
|
3
|
+
import { a as apiErrorMessage } from './api-error-BwAQLw44.mjs';
|
|
4
|
+
import { u as useTownBus } from './useTownBus-D9SoIsAN.mjs';
|
|
5
|
+
import { ref, watch, reactive } from 'vue';
|
|
6
|
+
import { defineStore } from 'pinia';
|
|
7
|
+
|
|
8
|
+
//#region app/stores/workshop/notifications.ts
|
|
9
|
+
/**
|
|
10
|
+
* 用户级通知 store(v17 主计划 §6)。
|
|
11
|
+
*
|
|
12
|
+
* 事实源是服务端 `user_notifications` 表:`notification.created` 帧只负责"到达",
|
|
13
|
+
* 游标补拉(REST / WS subNotifications)负责"补齐"。因此本 store 的关键不是推送本身,
|
|
14
|
+
* 而是**幂等 + 断线可补**:
|
|
15
|
+
* - `eventId` 是唯一幂等键 —— 同一条通知既可能经频道流副本、也可能经用户定向帧到达,
|
|
16
|
+
* 重复 eventId 一律丢弃(绝不产生第二行、也不弹第二次);
|
|
17
|
+
* - `notification.*` 帧的 `seq` 恒为 0 且 `channelId` 可能是空串,不能参与频道 seq 去重,
|
|
18
|
+
* 幂等只能落在本 store 的 eventId 集合上;
|
|
19
|
+
* - 重连/刷新后按游标向**后**补拉,与直播帧按 id 合并,不丢不重。
|
|
20
|
+
*/
|
|
21
|
+
/** seenEventIds 上限(防长会话内存无限增长;淘汰最旧一半) */
|
|
22
|
+
var SEEN_CAP = 2e3;
|
|
23
|
+
var useNotificationsStore = defineStore("workshop.notifications", () => {
|
|
24
|
+
/** 新→旧 */
|
|
25
|
+
const items = ref([]);
|
|
26
|
+
const unreadCount = ref(0);
|
|
27
|
+
/** 最新一条的游标(断线补拉的起点) */
|
|
28
|
+
const cursor = ref(null);
|
|
29
|
+
/** 已消费的 eventId(幂等键;直播帧与补拉帧共用) */
|
|
30
|
+
const seenEventIds = ref(/* @__PURE__ */ new Set());
|
|
31
|
+
/** 快照是否已加载(重连时的路径选择:未加载 → 快照;已加载 → 游标补拉) */
|
|
32
|
+
const loaded = ref(false);
|
|
33
|
+
/** 最近一条**实时**通知(不含补拉/快照):NotificationCenter 据此弹窗,避免重连补发刷屏 */
|
|
34
|
+
const liveItem = ref(null);
|
|
35
|
+
const liveSeq = ref(0);
|
|
36
|
+
/**
|
|
37
|
+
* 补发窗口标志:服务端 subNotifications 会把游标之后的历史通知**以
|
|
38
|
+
* notification.created 帧逐条直发**(ws.ts 的补发循环),与直播帧形状完全一致。
|
|
39
|
+
* 若不区分,重连补发 200 条就会弹 200 个提示 —— 这里在发出订阅帧时开窗、
|
|
40
|
+
* 收到 notification.snapshot 收尾帧时关窗;窗口内照常入库,只是不弹窗。
|
|
41
|
+
*/
|
|
42
|
+
const replaying = ref(false);
|
|
43
|
+
let replayTimer = null;
|
|
44
|
+
function beginReplay(timeoutMs = 5e3) {
|
|
45
|
+
replaying.value = true;
|
|
46
|
+
if (replayTimer) clearTimeout(replayTimer);
|
|
47
|
+
replayTimer = setTimeout(() => {
|
|
48
|
+
replaying.value = false;
|
|
49
|
+
replayTimer = null;
|
|
50
|
+
}, timeoutMs);
|
|
51
|
+
}
|
|
52
|
+
function endReplay() {
|
|
53
|
+
replaying.value = false;
|
|
54
|
+
if (replayTimer) {
|
|
55
|
+
clearTimeout(replayTimer);
|
|
56
|
+
replayTimer = null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function markSeen(eventId) {
|
|
60
|
+
if (!eventId) return;
|
|
61
|
+
const seen = seenEventIds.value;
|
|
62
|
+
if (!seen.has(eventId)) seen.add(eventId);
|
|
63
|
+
if (seen.size > SEEN_CAP) {
|
|
64
|
+
const keep = [...seen].slice(-Math.floor(SEEN_CAP / 2));
|
|
65
|
+
seenEventIds.value = new Set(keep);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** 按 createdAt 降序插入(同毫秒保持先到先排 => 后到者更靠前) */
|
|
69
|
+
function insertDesc(n) {
|
|
70
|
+
const list = items.value;
|
|
71
|
+
let idx = 0;
|
|
72
|
+
while (idx < list.length && list[idx].createdAt >= n.createdAt) idx++;
|
|
73
|
+
list.splice(idx, 0, n);
|
|
74
|
+
}
|
|
75
|
+
/** 幂等入库;返回是否为**新增**(重复帧返回 false —— 不重复弹窗、不重复计数) */
|
|
76
|
+
function upsertNotification(n, opts = {}) {
|
|
77
|
+
if (!n?.id) return false;
|
|
78
|
+
const idx = items.value.findIndex((x) => x.id === n.id);
|
|
79
|
+
if (idx >= 0) {
|
|
80
|
+
items.value[idx] = {
|
|
81
|
+
...items.value[idx],
|
|
82
|
+
...n
|
|
83
|
+
};
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (n.eventId && seenEventIds.value.has(n.eventId)) return false;
|
|
87
|
+
markSeen(n.eventId);
|
|
88
|
+
insertDesc(n);
|
|
89
|
+
if (!n.readAt) unreadCount.value += 1;
|
|
90
|
+
advanceCursor(n);
|
|
91
|
+
if (opts.live) {
|
|
92
|
+
liveItem.value = n;
|
|
93
|
+
liveSeq.value += 1;
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
/** 游标只朝"更新"方向推进(补拉回来的旧行不倒退游标) */
|
|
98
|
+
function advanceCursor(n) {
|
|
99
|
+
const cur = cursor.value;
|
|
100
|
+
if (!cur || n.createdAt > cur.createdAt || n.createdAt === cur.createdAt && n.id > cur.id) cursor.value = {
|
|
101
|
+
createdAt: n.createdAt,
|
|
102
|
+
id: n.id
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** 帧消费(由 useWorkshopWs 在频道 seq 守卫之外调用:seq=0 / channelId 可能为空) */
|
|
106
|
+
function applyEnvelope(e) {
|
|
107
|
+
if (e.type === "notification.created") {
|
|
108
|
+
upsertNotification(e.payload, { live: !replaying.value });
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (e.type === "notification.read") applyRead(e.payload);
|
|
112
|
+
}
|
|
113
|
+
/** 已读帧(多标签页同步):按单条 / 频道范围 / 全部收敛 */
|
|
114
|
+
function applyRead(p) {
|
|
115
|
+
const at = p.readAt || (/* @__PURE__ */ new Date()).toISOString();
|
|
116
|
+
for (const n of items.value) {
|
|
117
|
+
if (n.readAt) continue;
|
|
118
|
+
if (p.id && n.id !== p.id) continue;
|
|
119
|
+
if (!p.id && p.channelId && n.channelId !== p.channelId) continue;
|
|
120
|
+
n.readAt = at;
|
|
121
|
+
}
|
|
122
|
+
unreadCount.value = items.value.filter((n) => !n.readAt).length;
|
|
123
|
+
}
|
|
124
|
+
/** 首屏/刷新快照:替换式(以 DB 为准收敛 WS 期间的可能漂移) */
|
|
125
|
+
async function loadSnapshot() {}
|
|
126
|
+
/**
|
|
127
|
+
* 断线/重连补拉:以本端游标向**后**取,按 id/eventId 合并(幂等)。
|
|
128
|
+
* 未加载过快照时退化为 loadSnapshot()。
|
|
129
|
+
*
|
|
130
|
+
* **必须循环排空**:服务端单页上限 200,而本端每页只取 PAGE_LIMIT;
|
|
131
|
+
* 原实现只抓一页就返回 —— 断线期间积压超过一页时,游标只推进一页,
|
|
132
|
+
* 其余通知要等**下一次**重连才可能补上(计划 §11.11「重连后通知不丢」)。
|
|
133
|
+
* 这里按"返回满页即有更多"排空,并设页数上限兜底(防服务端 bug 导致死循环)。
|
|
134
|
+
*/
|
|
135
|
+
async function backfill() {
|
|
136
|
+
return 0;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* WS 重连收尾帧(`notification.snapshot`)携带的服务端游标。
|
|
140
|
+
* 服务端按 200 条/页重放,超过一页时只靠帧是补不全的 —— 用它把游标推到
|
|
141
|
+
* 服务端最后重放的位置,再交给 `backfill()` 继续排空。
|
|
142
|
+
*/
|
|
143
|
+
function applyReplayCursor(next) {
|
|
144
|
+
if (!next) return;
|
|
145
|
+
if (!cursor.value || next.createdAt > cursor.value.createdAt || next.createdAt === cursor.value.createdAt && next.id > cursor.value.id) cursor.value = next;
|
|
146
|
+
}
|
|
147
|
+
/** 标记已读(REST 为准;先请求后本地收敛,失败抛出交给调用方提示) */
|
|
148
|
+
async function markRead(opts) {
|
|
149
|
+
const token = useUserStore().token;
|
|
150
|
+
const res = await narrowFetch("/api/workshop/notifications/read", {
|
|
151
|
+
method: "POST",
|
|
152
|
+
body: { ...opts },
|
|
153
|
+
headers: token ? { authorization: `Bearer ${token}` } : {}
|
|
154
|
+
});
|
|
155
|
+
if (res.code !== 0 || !res.data) throw new Error(res.message ?? "标记已读失败");
|
|
156
|
+
const at = (/* @__PURE__ */ new Date()).toISOString();
|
|
157
|
+
for (const n of items.value) {
|
|
158
|
+
if (n.readAt) continue;
|
|
159
|
+
if (opts.id && n.id !== opts.id) continue;
|
|
160
|
+
if (!opts.id && !opts.all && opts.channelId && n.channelId !== opts.channelId) continue;
|
|
161
|
+
n.readAt = at;
|
|
162
|
+
}
|
|
163
|
+
unreadCount.value = res.data.unreadCount ?? items.value.filter((n) => !n.readAt).length;
|
|
164
|
+
return res.data.count ?? 0;
|
|
165
|
+
}
|
|
166
|
+
/** 退出登录:清空本用户可见内容(防串号) */
|
|
167
|
+
function clear() {
|
|
168
|
+
items.value = [];
|
|
169
|
+
unreadCount.value = 0;
|
|
170
|
+
cursor.value = null;
|
|
171
|
+
seenEventIds.value = /* @__PURE__ */ new Set();
|
|
172
|
+
loaded.value = false;
|
|
173
|
+
liveItem.value = null;
|
|
174
|
+
endReplay();
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
items,
|
|
178
|
+
unreadCount,
|
|
179
|
+
cursor,
|
|
180
|
+
seenEventIds,
|
|
181
|
+
loaded,
|
|
182
|
+
liveItem,
|
|
183
|
+
liveSeq,
|
|
184
|
+
replaying,
|
|
185
|
+
beginReplay,
|
|
186
|
+
endReplay,
|
|
187
|
+
applyEnvelope,
|
|
188
|
+
applyRead,
|
|
189
|
+
upsertNotification,
|
|
190
|
+
loadSnapshot,
|
|
191
|
+
backfill,
|
|
192
|
+
applyReplayCursor,
|
|
193
|
+
markRead,
|
|
194
|
+
clear
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region app/stores/workshop/connection.ts
|
|
199
|
+
/**
|
|
200
|
+
* WS 连接管理:单条 WebSocket 复用订阅多 channel(sub/unsub),
|
|
201
|
+
* 指数退避重连 + lastSeq 断线续传;连接态/seq 供状态条渲染。
|
|
202
|
+
*/
|
|
203
|
+
/** 半死连接阈值:超过该时长无任何帧(pong/事件)→ 主动断开重连 */
|
|
204
|
+
var STALE_MS = 45e3;
|
|
205
|
+
/**
|
|
206
|
+
* 数据级失联阈值:pong 仍应答但长期无数据帧(服务端 HMR 后 hub 失联等)→ 主动重连恢复订阅。
|
|
207
|
+
* 需与心跳周期(30s)联动:检测延迟最坏为阈值 + 一个心跳周期。阈值须显著大于
|
|
208
|
+
* 空闲 channel 的正常静默(无活动即无数据帧),避免健康空闲连接被反复重连。
|
|
209
|
+
*/
|
|
210
|
+
var DATA_STALE_MS = 9e4;
|
|
211
|
+
var useWsConnectionStore = defineStore("workshop.connection", { state: () => ({
|
|
212
|
+
state: "closed",
|
|
213
|
+
/** 已订阅 channel → 最近 seq(断线续传游标) */
|
|
214
|
+
cursors: {},
|
|
215
|
+
/** 最近一次数据帧到达时间(ms;0 = 尚无数据)——状态条"最后已知更新"依据(open-tag 规范:断连时不假装在线) */
|
|
216
|
+
lastDataAt: 0,
|
|
217
|
+
/** 断线期间是否有已订阅 channel 游标待对齐(重连后收到首帧清零) */
|
|
218
|
+
pendingReplay: false,
|
|
219
|
+
lastError: "",
|
|
220
|
+
retryCount: 0
|
|
221
|
+
}) });
|
|
222
|
+
/** WS 会话对象(非 store:持原生 WebSocket,事件回调注入消费方) */
|
|
223
|
+
var WorkshopWsSession = class {
|
|
224
|
+
onEvent;
|
|
225
|
+
onStateChange;
|
|
226
|
+
onPendingReplay;
|
|
227
|
+
onDataRecovered;
|
|
228
|
+
ws = null;
|
|
229
|
+
retry = 0;
|
|
230
|
+
closedByUser = false;
|
|
231
|
+
subscribed = /* @__PURE__ */ new Set();
|
|
232
|
+
/** 每 channel 订阅引用计数:多组件(总览页/控制台/抽屉)共享同一订阅,最后一个引用释放才真正退订 */
|
|
233
|
+
refCounts = /* @__PURE__ */ new Map();
|
|
234
|
+
/** 每 channel 最近 seq(重连续传游标;由事件回调 updateCursor 持续推进) */
|
|
235
|
+
lastSeqByChannel = /* @__PURE__ */ new Map();
|
|
236
|
+
/** 最近收帧时间(半死连接检测基准) */
|
|
237
|
+
lastFrameAt = 0;
|
|
238
|
+
/** 最近收数据帧时间(pong 除外;数据级失联检测基准) */
|
|
239
|
+
lastDataAt = 0;
|
|
240
|
+
/** 用户 token(用户级隔离:sub 帧鉴权;由消费方注入) */
|
|
241
|
+
userToken = "";
|
|
242
|
+
constructor(onEvent, onStateChange, onPendingReplay = () => {}, onDataRecovered = () => {}) {
|
|
243
|
+
this.onEvent = onEvent;
|
|
244
|
+
this.onStateChange = onStateChange;
|
|
245
|
+
this.onPendingReplay = onPendingReplay;
|
|
246
|
+
this.onDataRecovered = onDataRecovered;
|
|
247
|
+
}
|
|
248
|
+
/** 事件消费方推进游标(供重连 lastSeq 续传) */
|
|
249
|
+
updateCursor(channelId, seq) {
|
|
250
|
+
if (Number.isFinite(seq)) this.lastSeqByChannel.set(channelId, seq);
|
|
251
|
+
}
|
|
252
|
+
url() {
|
|
253
|
+
return "ws://localhost/api/workshop/ws";
|
|
254
|
+
}
|
|
255
|
+
connect() {}
|
|
256
|
+
/** 半死连接检测(心跳窗口):无任何帧超阈值 → 主动断开;pong-only 无数据帧超阈值(HMR 后 hub 失联)→ 主动断开重连恢复订阅 */
|
|
257
|
+
checkStale() {
|
|
258
|
+
const ws = this.ws;
|
|
259
|
+
if (!ws || ws.readyState !== WebSocket.OPEN) return;
|
|
260
|
+
if (Date.now() - this.lastFrameAt > STALE_MS) ws.close();
|
|
261
|
+
else if (Date.now() - this.lastDataAt > DATA_STALE_MS) ws.close();
|
|
262
|
+
}
|
|
263
|
+
sendSub(channelId, lastSeq) {
|
|
264
|
+
const frame = {
|
|
265
|
+
type: "sub",
|
|
266
|
+
channelId,
|
|
267
|
+
token: this.userToken
|
|
268
|
+
};
|
|
269
|
+
if (typeof lastSeq === "number") frame.lastSeq = lastSeq;
|
|
270
|
+
this.ws?.send(JSON.stringify(frame));
|
|
271
|
+
}
|
|
272
|
+
subscribe(channelId, lastSeq) {
|
|
273
|
+
const prev = this.refCounts.get(channelId) ?? 0;
|
|
274
|
+
this.refCounts.set(channelId, prev + 1);
|
|
275
|
+
if (prev > 0) return;
|
|
276
|
+
this.subscribed.add(channelId);
|
|
277
|
+
if (typeof lastSeq === "number") this.lastSeqByChannel.set(channelId, lastSeq);
|
|
278
|
+
if (this.ws?.readyState === WebSocket.OPEN) this.sendSub(channelId, this.lastSeqByChannel.get(channelId));
|
|
279
|
+
else if (!this.ws) this.connect();
|
|
280
|
+
}
|
|
281
|
+
/** 建连但不订阅任何 channel:纯场景事件消费方(daq 实时帧)用。
|
|
282
|
+
* 服务端在连接层注册 scene peer,连上即收 daq.reading 等无频道广播。 */
|
|
283
|
+
ensureConnected() {}
|
|
284
|
+
unsubscribe(channelId) {
|
|
285
|
+
const prev = this.refCounts.get(channelId) ?? 0;
|
|
286
|
+
if (prev <= 1) {
|
|
287
|
+
this.refCounts.delete(channelId);
|
|
288
|
+
this.subscribed.delete(channelId);
|
|
289
|
+
if (this.ws?.readyState === WebSocket.OPEN) this.ws?.send(JSON.stringify({
|
|
290
|
+
type: "unsub",
|
|
291
|
+
channelId
|
|
292
|
+
}));
|
|
293
|
+
} else this.refCounts.set(channelId, prev - 1);
|
|
294
|
+
}
|
|
295
|
+
/** 当前 channel 的订阅引用数(0 = 会话已不持有;消费方据此决定是否清本地缓冲) */
|
|
296
|
+
refCount(channelId) {
|
|
297
|
+
return this.refCounts.get(channelId) ?? 0;
|
|
298
|
+
}
|
|
299
|
+
ping() {
|
|
300
|
+
try {
|
|
301
|
+
this.ws?.send(JSON.stringify({ type: "ping" }));
|
|
302
|
+
} catch {
|
|
303
|
+
try {
|
|
304
|
+
this.ws?.close();
|
|
305
|
+
} catch {}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
close() {
|
|
309
|
+
this.closedByUser = true;
|
|
310
|
+
this.ws?.close();
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region app/composables/workshop/event-blocks/classify.ts
|
|
315
|
+
var TOOL_PREFIX = /^🔧\s*\S+/;
|
|
316
|
+
/** 事件 → 聚合类别 */
|
|
317
|
+
function classifyEvent(e) {
|
|
318
|
+
switch (e.type) {
|
|
319
|
+
case "agent.status.message": return TOOL_PREFIX.test(String(e.payload.text ?? "")) ? "tool" : "status";
|
|
320
|
+
case "agent.status": return "life";
|
|
321
|
+
case "a2a.message": return "route";
|
|
322
|
+
case "agent.delta":
|
|
323
|
+
case "agent.message": return "stream";
|
|
324
|
+
case "task.status":
|
|
325
|
+
case "task.progress": return "task";
|
|
326
|
+
case "a2a.artifact": return "artifact";
|
|
327
|
+
case "agent.member": return "member";
|
|
328
|
+
case "memory.saved": return "memory";
|
|
329
|
+
case "error": return "error";
|
|
330
|
+
default: return "other";
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
/** agent 稳定配色(id hash → hue;无 id 灰。饱和度/亮度压低:白字首字母可达 AA 对比;
|
|
334
|
+
* 同一色相供头像/泳道头/提及悬停卡共用 —— 身份色全站同源,不另造配色) */
|
|
335
|
+
function agentHueColor(agentId) {
|
|
336
|
+
if (!agentId) return "#6e6e77";
|
|
337
|
+
let h = 0;
|
|
338
|
+
for (const ch of agentId) h = (h * 31 + ch.charCodeAt(0)) % 360;
|
|
339
|
+
return `hsl(${h}, 42%, 34%)`;
|
|
340
|
+
}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region app/composables/workshop/event-blocks/attention.ts
|
|
343
|
+
var TIER_ORDER = {
|
|
344
|
+
silent: 0,
|
|
345
|
+
status: 1,
|
|
346
|
+
attention: 2,
|
|
347
|
+
terminal: 3
|
|
348
|
+
};
|
|
349
|
+
/** 事件 → 注意力档位 */
|
|
350
|
+
function envelopeTier(e) {
|
|
351
|
+
switch (e.type) {
|
|
352
|
+
case "error": return "attention";
|
|
353
|
+
case "a2a.artifact":
|
|
354
|
+
case "agent.message": return "terminal";
|
|
355
|
+
case "task.status": {
|
|
356
|
+
const s = String(e.payload.state ?? "");
|
|
357
|
+
if (s === "COMPLETED" || s === "FAILED" || s === "CANCELED") return "terminal";
|
|
358
|
+
if (s === "WAITING") return "attention";
|
|
359
|
+
return "status";
|
|
360
|
+
}
|
|
361
|
+
case "a2a.message": return (e.payload.metadata ?? {})["x-aw-require-reply"] === "true" ? "attention" : "status";
|
|
362
|
+
case "agent.delta":
|
|
363
|
+
case "agent.status.message":
|
|
364
|
+
case "task.progress":
|
|
365
|
+
case "memory.saved": return "silent";
|
|
366
|
+
default: return "status";
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/** 块 → 注意力档位(块内最高档;终局产出块不被同块 silent 帧拉低) */
|
|
370
|
+
function blockTier(events) {
|
|
371
|
+
let best = "silent";
|
|
372
|
+
for (const e of events) {
|
|
373
|
+
const t = envelopeTier(e);
|
|
374
|
+
if (TIER_ORDER[t] > TIER_ORDER[best]) best = t;
|
|
375
|
+
}
|
|
376
|
+
return best;
|
|
377
|
+
}
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region app/composables/workshop/event-blocks/text-utils.ts
|
|
380
|
+
/** 统一化空白比较 */
|
|
381
|
+
function normText(s) {
|
|
382
|
+
return s.replace(/\s+/g, " ").trim();
|
|
383
|
+
}
|
|
384
|
+
/** 流块当前是否处于打字机状态(尾巴是 delta 且未落定) */
|
|
385
|
+
function isStreaming(block) {
|
|
386
|
+
const ev = block.events[block.events.length - 1];
|
|
387
|
+
if (!ev) return false;
|
|
388
|
+
return ev.type === "agent.delta" && !block.settled;
|
|
389
|
+
}
|
|
390
|
+
/** 任务语义类的 taskId(信封 taskId 优先) */
|
|
391
|
+
function taskIdOf(e) {
|
|
392
|
+
if (e.taskId) return e.taskId;
|
|
393
|
+
switch (e.type) {
|
|
394
|
+
case "task.status":
|
|
395
|
+
case "task.progress": return String(e.payload.taskId ?? "") || null;
|
|
396
|
+
case "a2a.artifact": return String(e.payload.taskId ?? "") || null;
|
|
397
|
+
default: return null;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
/** 合并键内 taskId 兼容:单侧缺省视为无约束 */
|
|
401
|
+
function taskCompatible(a, b) {
|
|
402
|
+
return a == null || b == null || a === b;
|
|
403
|
+
}
|
|
404
|
+
/** 落定文本与累计水路的关系 */
|
|
405
|
+
function foldRelation(trail, short) {
|
|
406
|
+
const t = trail.trim();
|
|
407
|
+
const s = short.trim();
|
|
408
|
+
if (!t || !s) return "none";
|
|
409
|
+
if (t === s || normText(t) === normText(s)) return "dup";
|
|
410
|
+
if (s.startsWith(t)) return "extend";
|
|
411
|
+
return "none";
|
|
412
|
+
}
|
|
413
|
+
/** 事件正文(delta/status.text/message.parts/artifact.parts) */
|
|
414
|
+
function textOf(e) {
|
|
415
|
+
switch (e.type) {
|
|
416
|
+
case "agent.delta": return String(e.payload.delta ?? "");
|
|
417
|
+
case "agent.status.message": return String(e.payload.text ?? "");
|
|
418
|
+
case "agent.message":
|
|
419
|
+
case "a2a.message": return (e.payload.parts ?? []).map((p) => p.text ?? "").join("\n");
|
|
420
|
+
case "a2a.artifact": return (e.payload.artifact?.parts ?? []).map((p) => p.text ?? "").join("\n");
|
|
421
|
+
default: return "";
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
/** 流块的最终可见文本(delta 累计;落定帧不重复该文) */
|
|
425
|
+
function buildStreamText(block) {
|
|
426
|
+
if (block.overrideText) return block.overrideText;
|
|
427
|
+
let acc = "";
|
|
428
|
+
for (const e of block.events) {
|
|
429
|
+
if (e.type === "agent.delta") {
|
|
430
|
+
acc += textOf(e);
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
if (e.type === "agent.status.message") continue;
|
|
434
|
+
if (e.type === "agent.message") {
|
|
435
|
+
const t = textOf(e).trim();
|
|
436
|
+
if (t) acc = `${acc ? `${acc}\n` : ""}${t}`;
|
|
437
|
+
continue;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return acc;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* 打字光标可见性(空光标闪烁修复的权威语义):
|
|
444
|
+
* 仅当"已有文本 &&(流式未落定 || 揭示未追平)"时显示;空文本块绝不显示光标。
|
|
445
|
+
*/
|
|
446
|
+
function streamCursorVisible(fullLen, visibleLen, streaming) {
|
|
447
|
+
return fullLen > 0 && (streaming || visibleLen < fullLen);
|
|
448
|
+
}
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region app/composables/workshop/event-blocks/clusterer.ts
|
|
451
|
+
/**
|
|
452
|
+
* 增量聚类器:块对象身份稳定,只处理新增帧。
|
|
453
|
+
*
|
|
454
|
+
* 与旧版差异:
|
|
455
|
+
* - 增量聚类:只处理新增帧,块对象身份稳定(Vue 按 key 复用组件,流式更新不整树重建)
|
|
456
|
+
* - 内容智能去重:落定全文(status.message/agent.message)与已累计 delta 相同或为前缀扩展时
|
|
457
|
+
* 绝不重复渲染第二遍——修复"连续两次重复渲染"(omp 消息流 delta 与 message_end 全文重复)
|
|
458
|
+
* - 跨块落定折回:工具调用把流切段时,deltas 累计跨块跟踪,message_end 全文按内容比对折回
|
|
459
|
+
* 最后一段流块;先前流片段标记 coveredBy 折叠为一行提示(OpenHands 风格)
|
|
460
|
+
*/
|
|
461
|
+
var BlockClusterer = class {
|
|
462
|
+
arr = [];
|
|
463
|
+
last = null;
|
|
464
|
+
tracks = /* @__PURE__ */ new Map();
|
|
465
|
+
trail = Object.create(null);
|
|
466
|
+
idSeq = 0;
|
|
467
|
+
processed = 0;
|
|
468
|
+
/** 上次同步时列表头部事件的 seq(头部变化 = 历史回填插入/ring 裁剪/过滤切换 → 必须全量重建,否则索引错位重复聚类) */
|
|
469
|
+
headSeq = void 0;
|
|
470
|
+
get blocks() {
|
|
471
|
+
return this.arr;
|
|
472
|
+
}
|
|
473
|
+
get processedCount() {
|
|
474
|
+
return this.processed;
|
|
475
|
+
}
|
|
476
|
+
reset() {
|
|
477
|
+
this.arr.length = 0;
|
|
478
|
+
this.last = null;
|
|
479
|
+
this.tracks.clear();
|
|
480
|
+
this.trail = Object.create(null);
|
|
481
|
+
this.processed = 0;
|
|
482
|
+
this.headSeq = void 0;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* 序列同步:只处理新增帧。列表头部 seq 变化(loadHistory 头部插入历史帧并整体
|
|
486
|
+
* 排序 / ring 容量裁剪 / 过滤切换)时,已处理事件整体右移——按索引继续会把已
|
|
487
|
+
* 聚类事件重复成块,故检测到头部变化即全量重建(一次重建,确定性无重复)。
|
|
488
|
+
*/
|
|
489
|
+
sync(events) {
|
|
490
|
+
const head = events.length > 0 ? events[0]?.seq : void 0;
|
|
491
|
+
if (events.length < this.processed || head !== this.headSeq) this.reset();
|
|
492
|
+
for (let i = this.processed; i < events.length; i++) this.push(events[i]);
|
|
493
|
+
this.processed = events.length;
|
|
494
|
+
this.headSeq = events.length > 0 ? events[0]?.seq : void 0;
|
|
495
|
+
}
|
|
496
|
+
push(e) {
|
|
497
|
+
if (e.type === "channel.snapshot" || e.type === "pong") return this.last;
|
|
498
|
+
if (e.type === "agent.delta" && !textOf(e)) return this.last;
|
|
499
|
+
if ((e.type === "agent.status.message" || e.type === "agent.message") && !textOf(e).trim()) return this.last;
|
|
500
|
+
const agentId = e.agentId ?? null;
|
|
501
|
+
const taskId = taskIdOf(e);
|
|
502
|
+
const agentKey = agentId ?? "";
|
|
503
|
+
const trackKey = `${agentKey}\u0000${taskId ?? ""}`;
|
|
504
|
+
const baseKind = classifyEvent(e);
|
|
505
|
+
if (e.type === "agent.status.message" && baseKind === "status") {
|
|
506
|
+
const t = textOf(e).trim();
|
|
507
|
+
const track = this.tracks.get(trackKey);
|
|
508
|
+
if (t && track && track.text) {
|
|
509
|
+
const rel = foldRelation(track.text, t);
|
|
510
|
+
if (rel === "dup" || rel === "extend") return this.foldInto(track, e, t);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
if (e.type === "agent.message") {
|
|
514
|
+
const t = textOf(e).trim();
|
|
515
|
+
const track = this.tracks.get(trackKey);
|
|
516
|
+
if (t && track && track.text) {
|
|
517
|
+
const rel = foldRelation(track.text, t);
|
|
518
|
+
if (rel === "dup" || rel === "extend") return this.foldInto(track, e, t);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
let kind = baseKind;
|
|
522
|
+
if (e.type === "agent.delta") kind = "stream";
|
|
523
|
+
else if (e.type === "agent.message") kind = "stream";
|
|
524
|
+
else if (baseKind === "status") {
|
|
525
|
+
const lb = this.last;
|
|
526
|
+
if (lb !== null && lb.kind === "stream" && e.agentId === lb.agentId && taskCompatible(lb.taskId, taskId) && !lb.settled) kind = "stream";
|
|
527
|
+
}
|
|
528
|
+
if (this.last !== null && this.last.kind === kind && this.last.agentId === e.agentId && agentId !== null && taskCompatible(this.last.taskId, taskId) && !(kind === "stream" && this.last.settled) && !(kind === "task" && this.last.taskId && taskId && this.last.taskId !== taskId) && !(kind === "artifact" && this.last.taskId && taskId && this.last.taskId !== taskId) && this.last) {
|
|
529
|
+
const b = this.last;
|
|
530
|
+
b.events.push(e);
|
|
531
|
+
b.lastAt = e.at;
|
|
532
|
+
if (kind === "stream") {
|
|
533
|
+
if (e.type === "agent.delta") {
|
|
534
|
+
b.settled = false;
|
|
535
|
+
const t = this.tracks.get(trackKey);
|
|
536
|
+
if (t) {
|
|
537
|
+
t.text += textOf(e);
|
|
538
|
+
t.last = b;
|
|
539
|
+
this.setTrail(agentKey, taskId, t.text);
|
|
540
|
+
} else {
|
|
541
|
+
b.settled = false;
|
|
542
|
+
this.setTrail(agentKey, taskId, textOf(e));
|
|
543
|
+
}
|
|
544
|
+
} else {
|
|
545
|
+
b.settled = true;
|
|
546
|
+
this.setTrail(agentKey, taskId, `${textOf(e)}`);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
return b;
|
|
550
|
+
}
|
|
551
|
+
const block = reactive({
|
|
552
|
+
id: `b${++this.idSeq}`,
|
|
553
|
+
kind,
|
|
554
|
+
agentId,
|
|
555
|
+
taskId,
|
|
556
|
+
events: [e],
|
|
557
|
+
firstAt: e.at,
|
|
558
|
+
lastAt: e.at,
|
|
559
|
+
settled: kind === "stream" ? e.type !== "agent.delta" : false,
|
|
560
|
+
folded: 0,
|
|
561
|
+
overrideText: null,
|
|
562
|
+
coveredBy: null,
|
|
563
|
+
dupStream: false
|
|
564
|
+
});
|
|
565
|
+
this.arr.push(block);
|
|
566
|
+
this.last = block;
|
|
567
|
+
if (kind === "stream") {
|
|
568
|
+
const tk = this.tracks.get(trackKey);
|
|
569
|
+
if (tk && tk.pieces.length > 0 && !tk.pieces.includes(block)) {
|
|
570
|
+
tk.pieces.push(block);
|
|
571
|
+
tk.last = block;
|
|
572
|
+
} else if (!tk) this.tracks.set(trackKey, {
|
|
573
|
+
text: "",
|
|
574
|
+
pieces: [block],
|
|
575
|
+
last: block
|
|
576
|
+
});
|
|
577
|
+
if (e.type === "agent.delta") {
|
|
578
|
+
const t = this.tracks.get(trackKey);
|
|
579
|
+
if (t) {
|
|
580
|
+
t.text += textOf(e);
|
|
581
|
+
this.setTrail(agentKey, taskId, t.text);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
if (kind === "artifact") {
|
|
586
|
+
const t = textOf(e);
|
|
587
|
+
const prior = this.trail[trackKey] ?? this.trail[`${agentKey}\u0000`];
|
|
588
|
+
if (prior && t && normText(prior) === normText(t)) block.dupStream = true;
|
|
589
|
+
}
|
|
590
|
+
return block;
|
|
591
|
+
}
|
|
592
|
+
/** 内容重复折回:已累计流足够覆盖时不再成块;折回块重渲染一律以落定全文为准
|
|
593
|
+
* (跨工具切段折回时,目标块只含尾部 delta,不覆盖全文则文本被截断) */
|
|
594
|
+
foldInto(track, e, text) {
|
|
595
|
+
const target = track.last;
|
|
596
|
+
target.events.push(e);
|
|
597
|
+
target.folded += 1;
|
|
598
|
+
target.lastAt = e.at;
|
|
599
|
+
target.settled = true;
|
|
600
|
+
target.overrideText = text;
|
|
601
|
+
for (const p of track.pieces) if (p !== target) p.coveredBy = target.id;
|
|
602
|
+
track.text = "";
|
|
603
|
+
track.pieces = [target];
|
|
604
|
+
track.last = target;
|
|
605
|
+
this.setTrail(target.agentId ?? "", target.taskId, text);
|
|
606
|
+
return target;
|
|
607
|
+
}
|
|
608
|
+
setTrail(agentKey, taskId, text) {
|
|
609
|
+
this.trail[`${agentKey}\u0000${taskId ?? ""}`] = text;
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
//#endregion
|
|
613
|
+
//#region app/stores/workshop/events.ts
|
|
614
|
+
/**
|
|
615
|
+
* AEP 事件缓冲:per-channel 环形(ring 5000,与服务端 RING_CAP 同量级)+
|
|
616
|
+
* lastSeq 游标 + 派生 selectors。全部渲染组件从本 store 派生,不直接持有事件。
|
|
617
|
+
*/
|
|
618
|
+
var RING_CAP = 5e3;
|
|
619
|
+
/** 过滤器 → 允许的事件类型集合(key = 档位过滤:只看注意级+终局级,open-tag deliveryTier)。导出供回归测试复用。 */
|
|
620
|
+
var FILTER_TYPES = {
|
|
621
|
+
all: null,
|
|
622
|
+
messages: [
|
|
623
|
+
"agent.message",
|
|
624
|
+
"agent.delta",
|
|
625
|
+
"agent.status.message",
|
|
626
|
+
"a2a.message"
|
|
627
|
+
],
|
|
628
|
+
tasks: [
|
|
629
|
+
"task.status",
|
|
630
|
+
"task.progress",
|
|
631
|
+
"a2a.artifact"
|
|
632
|
+
],
|
|
633
|
+
team: ["agent.member", "task.status"],
|
|
634
|
+
errors: ["error"],
|
|
635
|
+
key: null
|
|
636
|
+
};
|
|
637
|
+
/**
|
|
638
|
+
* 单帧是否命中时间线过滤 —— **唯一事实源**。
|
|
639
|
+
* 全量重算(computeTimeline)与增量追加(timeline getter)必须共用本函数,
|
|
640
|
+
* 否则两条路径的语义会悄悄分叉(表现为"刷新后少了/多了几条")。
|
|
641
|
+
*
|
|
642
|
+
* 导出供回归测试使用:测试要验证的是「增量维护 ⊆ 与全量重算等价」,
|
|
643
|
+
* 参照实现必须调用同一个谓词,否则测的是参照写得对不对,而不是实现是否等价。
|
|
644
|
+
*
|
|
645
|
+
* 注意 `filter === 'key'` 是**提前返回**:该档位只看注意级/终局级,
|
|
646
|
+
* 刻意不受 focus 影响(聚焦是"看某人的流",key 是"只看需要我介入的",两者正交)。
|
|
647
|
+
*/
|
|
648
|
+
function matchesTimeline(e, filter, allow, focus) {
|
|
649
|
+
if (e.type === "channel.snapshot") return false;
|
|
650
|
+
if (filter === "key") {
|
|
651
|
+
const t = envelopeTier(e);
|
|
652
|
+
return t === "attention" || t === "terminal";
|
|
653
|
+
}
|
|
654
|
+
if (allow && !allow.includes(e.type)) return false;
|
|
655
|
+
if (focus && e.type !== "task.status" && e.type !== "task.progress") {
|
|
656
|
+
if (e.agentId === focus) return true;
|
|
657
|
+
if (e.type === "a2a.message") return e.payload.metadata?.["x-aw-target-agent"] === focus;
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
return true;
|
|
661
|
+
}
|
|
662
|
+
/** 时间线过滤纯函数(全量重算路径;增量路径见 matchesTimeline) */
|
|
663
|
+
function computeTimeline(items, filter, allow, focus) {
|
|
664
|
+
return items.filter((e) => matchesTimeline(e, filter, allow, focus));
|
|
665
|
+
}
|
|
666
|
+
/** 稳定空数组:让"无数据"返回同一引用,避免下游 computed 每帧产出新数组触发重渲染 */
|
|
667
|
+
var EMPTY_ITEMS = Object.freeze([]);
|
|
668
|
+
var timelineCache = /* @__PURE__ */ new Map();
|
|
669
|
+
/** 在按 seq 升序的数组里找第一个 seq > 目标值 的下标(二分,O(log n)) */
|
|
670
|
+
function firstIndexAfterSeq(items, seq) {
|
|
671
|
+
let lo = 0;
|
|
672
|
+
let hi = items.length;
|
|
673
|
+
while (lo < hi) {
|
|
674
|
+
const mid = lo + hi >>> 1;
|
|
675
|
+
if ((items[mid]?.seq ?? 0) > seq) hi = mid;
|
|
676
|
+
else lo = mid + 1;
|
|
677
|
+
}
|
|
678
|
+
return lo;
|
|
679
|
+
}
|
|
680
|
+
var EMPTY_RING = () => ({
|
|
681
|
+
lastSeq: 0,
|
|
682
|
+
items: [],
|
|
683
|
+
consumed: /* @__PURE__ */ new Set(),
|
|
684
|
+
byAgent: /* @__PURE__ */ new Map()
|
|
685
|
+
});
|
|
686
|
+
/** 尾部追加建档(与 items.push 配对) */
|
|
687
|
+
function indexAppend(ring, e) {
|
|
688
|
+
const key = e.agentId;
|
|
689
|
+
if (!key) return;
|
|
690
|
+
const bucket = ring.byAgent.get(key);
|
|
691
|
+
if (bucket) bucket.push(e);
|
|
692
|
+
else ring.byAgent.set(key, [e]);
|
|
693
|
+
}
|
|
694
|
+
/** 头部淘汰出档(与 items.splice(0, n) 配对);按引用查找,防同 seq 重放误删 */
|
|
695
|
+
function indexEvict(ring, dropped) {
|
|
696
|
+
for (const e of dropped) {
|
|
697
|
+
const bucket = ring.byAgent.get(e.agentId ?? "");
|
|
698
|
+
if (!bucket) continue;
|
|
699
|
+
const idx = bucket.indexOf(e);
|
|
700
|
+
if (idx >= 0) bucket.splice(idx, 1);
|
|
701
|
+
if (bucket.length === 0) ring.byAgent.delete(e.agentId ?? "");
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
var useEventsStore = defineStore("workshop.events", {
|
|
705
|
+
state: () => ({
|
|
706
|
+
rings: {},
|
|
707
|
+
filters: {},
|
|
708
|
+
/** 时间线聚焦的 agent(只看该 agent 的流;null = 全部) */
|
|
709
|
+
focusAgents: {},
|
|
710
|
+
/** lane 历史已回填的 agent(channelId → agentId 集合;防视图切换重复拉取) */
|
|
711
|
+
laneLoaded: {}
|
|
712
|
+
}),
|
|
713
|
+
getters: {
|
|
714
|
+
ring(state) {
|
|
715
|
+
return (channelId) => state.rings[channelId] ?? EMPTY_RING();
|
|
716
|
+
},
|
|
717
|
+
/** 应用过滤 + agent 聚焦后的时间线(虚拟滚动/自动吸底消费;per-channel 增量缓存) */
|
|
718
|
+
timeline(state) {
|
|
719
|
+
return (channelId) => {
|
|
720
|
+
const ring = state.rings[channelId];
|
|
721
|
+
if (!ring) return EMPTY_ITEMS;
|
|
722
|
+
const filter = state.filters[channelId] ?? "all";
|
|
723
|
+
const focus = state.focusAgents[channelId] ?? null;
|
|
724
|
+
const items = ring.items;
|
|
725
|
+
const allow = FILTER_TYPES[filter];
|
|
726
|
+
const maxSeq = items.length > 0 ? items[items.length - 1]?.seq ?? 0 : -1;
|
|
727
|
+
const prev = timelineCache.get(channelId);
|
|
728
|
+
if (!prev || prev.filter !== filter || prev.focus !== focus || items.length === 0 && prev.result.length > 0 || prev.lastSeq > maxSeq) {
|
|
729
|
+
const result = computeTimeline(items, filter, allow, focus);
|
|
730
|
+
timelineCache.set(channelId, {
|
|
731
|
+
filter,
|
|
732
|
+
focus,
|
|
733
|
+
lastSeq: maxSeq,
|
|
734
|
+
result
|
|
735
|
+
});
|
|
736
|
+
return result;
|
|
737
|
+
}
|
|
738
|
+
const headSeq = items[0]?.seq ?? 0;
|
|
739
|
+
const res = prev.result;
|
|
740
|
+
if (res.length > 0 && (res[0]?.seq ?? 0) < headSeq) {
|
|
741
|
+
let drop = 0;
|
|
742
|
+
while (drop < res.length && (res[drop]?.seq ?? 0) < headSeq) drop++;
|
|
743
|
+
res.splice(0, drop);
|
|
744
|
+
}
|
|
745
|
+
if (maxSeq > prev.lastSeq) {
|
|
746
|
+
const from = firstIndexAfterSeq(items, prev.lastSeq);
|
|
747
|
+
for (let i = from; i < items.length; i++) {
|
|
748
|
+
const e = items[i];
|
|
749
|
+
if (matchesTimeline(e, filter, allow, focus)) res.push(e);
|
|
750
|
+
}
|
|
751
|
+
prev.lastSeq = maxSeq;
|
|
752
|
+
}
|
|
753
|
+
return res;
|
|
754
|
+
};
|
|
755
|
+
},
|
|
756
|
+
/**
|
|
757
|
+
* 某 agent 的事件子序列(增量索引,O(1) 取用)。
|
|
758
|
+
* lane 视图用它替代 `items.filter(e => e.agentId === id)` —— 后者每帧对每个成员
|
|
759
|
+
* 各扫一遍整条 ring(见 ChannelRing.byAgent 的说明)。
|
|
760
|
+
* 无数据时返回**同一个冻结空数组**,避免下游 computed 每帧产出新引用而触发重渲染。
|
|
761
|
+
*/
|
|
762
|
+
agentEvents(state) {
|
|
763
|
+
return (channelId, agentId) => {
|
|
764
|
+
if (!agentId) return EMPTY_ITEMS;
|
|
765
|
+
return state.rings[channelId]?.byAgent.get(agentId) ?? EMPTY_ITEMS;
|
|
766
|
+
};
|
|
767
|
+
},
|
|
768
|
+
lastSeq(state) {
|
|
769
|
+
return (channelId) => state.rings[channelId]?.lastSeq ?? 0;
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
actions: {
|
|
773
|
+
/** 消费一帧 AEP(连接回调入口):快照重建 ring,增量追加并推进游标 */
|
|
774
|
+
ingest(e) {
|
|
775
|
+
if (!e.channelId) return;
|
|
776
|
+
const ring = this.rings[e.channelId] ?? EMPTY_RING();
|
|
777
|
+
if (e.type === "channel.snapshot") {
|
|
778
|
+
this.rings[e.channelId] = {
|
|
779
|
+
lastSeq: e.seq,
|
|
780
|
+
items: [],
|
|
781
|
+
consumed: /* @__PURE__ */ new Set([e.seq]),
|
|
782
|
+
byAgent: /* @__PURE__ */ new Map()
|
|
783
|
+
};
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
if (typeof e.seq === "number" && e.seq > ring.lastSeq) {
|
|
787
|
+
ring.consumed.add(e.seq);
|
|
788
|
+
if (e.type === "agent.delta") {
|
|
789
|
+
const last = ring.items[ring.items.length - 1];
|
|
790
|
+
if (last && last.type === "agent.delta" && last.agentId === e.agentId && (last.taskId ?? null) === (e.taskId ?? null) && last) {
|
|
791
|
+
const prev = last.payload.delta;
|
|
792
|
+
last.payload.delta = prev + e.payload.delta;
|
|
793
|
+
ring.lastSeq = e.seq;
|
|
794
|
+
this.rings[e.channelId] = ring;
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
ring.items.push(e);
|
|
799
|
+
indexAppend(ring, e);
|
|
800
|
+
if (ring.items.length > RING_CAP) indexEvict(ring, ring.items.splice(0, ring.items.length - RING_CAP));
|
|
801
|
+
ring.lastSeq = e.seq;
|
|
802
|
+
if (ring.consumed.size > 2e4) ring.consumed = new Set(ring.items.map((i) => i.seq));
|
|
803
|
+
this.rings[e.channelId] = ring;
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
setFilter(channelId, filter) {
|
|
807
|
+
this.filters[channelId] = filter;
|
|
808
|
+
},
|
|
809
|
+
/**
|
|
810
|
+
* 持久化历史拉取(server 驱动):刷新后从 DB 拉最近事件并填充 ring。
|
|
811
|
+
* 与 WS 增量无缝衔接:仅接受 seq ≤ 当前游标的帧;已消费过的 seq
|
|
812
|
+
* (含被 delta 合并吃掉的中间 seq,经 consumed 集合识别)绝不重复插入。
|
|
813
|
+
* 剔除 agent.delta 过程帧:落定 agent.message 携带全文,历史窗口
|
|
814
|
+
* 不被单 agent 的打字机帧淹没(其他 agent 的消息才能进窗口)。
|
|
815
|
+
*/
|
|
816
|
+
async loadHistory(channelId, limit = 200) {},
|
|
817
|
+
/**
|
|
818
|
+
* 向上翻页加载更早历史(beforeSeq 游标;时间线"加载更早"按钮驱动)。
|
|
819
|
+
* 仅接受 seq < 当前 ring 最小 seq 的帧,插入头部;consumed 去重防御。
|
|
820
|
+
* 返回 false 表示已无更早历史(按钮隐藏)。
|
|
821
|
+
*/
|
|
822
|
+
async loadEarlier(channelId, limit = 200) {
|
|
823
|
+
return false;
|
|
824
|
+
},
|
|
825
|
+
/**
|
|
826
|
+
* lane 历史按需回填:按 agent 维度拉取该成员的全部事件(剔除 delta 过程帧),
|
|
827
|
+
* 合并进 channel ring —— lanes 谓词按 agentId 过滤,时间线同样受益。
|
|
828
|
+
* laneLoaded 守卫保证每订阅生命周期内每 agent 只回填一次(视图切换不重复拉取;
|
|
829
|
+
* clear 随 ring 一并重置);拉取失败移除守卫,下次挂载可重试。
|
|
830
|
+
* 快照竞态防御:ring 未建立(lastSeq=0,channel.snapshot 未到)时先有界等待 ——
|
|
831
|
+
* 过早合并会被快照全量重建整环覆盖,等价于白拉。
|
|
832
|
+
*/
|
|
833
|
+
async loadLaneHistory(channelId, agentId, limit = 200) {},
|
|
834
|
+
/**
|
|
835
|
+
* lane 向上翻页:该 agent 在 ring 内的最小 seq 为游标,拉更早一段。
|
|
836
|
+
* 返回 false 表示该 agent 已无更早历史(lane"加载更早"按钮隐藏)。
|
|
837
|
+
*/
|
|
838
|
+
async loadLaneEarlier(channelId, agentId, limit = 200) {
|
|
839
|
+
return false;
|
|
840
|
+
},
|
|
841
|
+
setFocusAgent(channelId, agentId) {
|
|
842
|
+
this.focusAgents[channelId] = agentId;
|
|
843
|
+
},
|
|
844
|
+
clear(channelId) {
|
|
845
|
+
Reflect.deleteProperty(this.rings, channelId);
|
|
846
|
+
Reflect.deleteProperty(this.laneLoaded, channelId);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
//#endregion
|
|
851
|
+
//#region app/stores/workshop/entities.ts
|
|
852
|
+
/**
|
|
853
|
+
* 实体归一化:channel/agent/task 快照 + AEP 增量 upsert(幂等)。
|
|
854
|
+
* REST 命令后的状态以 WS 事件回流为准(REST 返回值不直接写状态,避免双源)。
|
|
855
|
+
*/
|
|
856
|
+
/** 终态判定(与后端 TERMINAL_TASK_STATES 同口径) */
|
|
857
|
+
function isTerminalState(state) {
|
|
858
|
+
return state === "COMPLETED" || state === "FAILED" || state === "CANCELED";
|
|
859
|
+
}
|
|
860
|
+
/** 空根队列投影(未收到快照/队列帧时的安全缺省) */
|
|
861
|
+
function emptyRootQueue() {
|
|
862
|
+
return {
|
|
863
|
+
activeRootId: null,
|
|
864
|
+
queuedRoots: [],
|
|
865
|
+
completedRoots: 0,
|
|
866
|
+
activeRootCount: 0,
|
|
867
|
+
queuedRootCount: 0
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* 快照缺 rootQueue 字段时的兜底推导(旧服务端帧/测试)。
|
|
872
|
+
* 排序口径与后端一致:rootQueueSeq ASC,再 created_at ASC。
|
|
873
|
+
*/
|
|
874
|
+
function deriveRootQueue(tasks) {
|
|
875
|
+
const roots = tasks.filter((t) => !t.parentId && t.rootQueueSeq != null).sort((a, b) => (a.rootQueueSeq ?? 0) - (b.rootQueueSeq ?? 0) || String(a.createdAt).localeCompare(String(b.createdAt)));
|
|
876
|
+
const open = roots.filter((t) => !isTerminalState(t.state));
|
|
877
|
+
return {
|
|
878
|
+
activeRootId: open[0]?.id ?? null,
|
|
879
|
+
queuedRoots: open.slice(1).map((t, i) => ({
|
|
880
|
+
taskId: t.id,
|
|
881
|
+
title: t.title,
|
|
882
|
+
position: i + 2,
|
|
883
|
+
state: t.state,
|
|
884
|
+
createdAt: t.createdAt
|
|
885
|
+
})),
|
|
886
|
+
completedRoots: roots.length - open.length,
|
|
887
|
+
activeRootCount: open.length > 0 ? 1 : 0,
|
|
888
|
+
queuedRootCount: Math.max(0, open.length - 1)
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
var useEntitiesStore = defineStore("workshop.entities", {
|
|
892
|
+
state: () => ({
|
|
893
|
+
channels: {},
|
|
894
|
+
agents: {},
|
|
895
|
+
tasks: {},
|
|
896
|
+
/**
|
|
897
|
+
* 根任务队列(§2.2/§8):**后端权威投影**,前端不再自行推导 active root。
|
|
898
|
+
* 来源 = channel.snapshot.rootQueue + `root.queue` 增量帧。
|
|
899
|
+
*/
|
|
900
|
+
rootQueues: {},
|
|
901
|
+
/** refreshTasks 进行中标志(节流) */
|
|
902
|
+
refreshing: {},
|
|
903
|
+
/** refreshAgents 进行中标志(节流) */
|
|
904
|
+
refreshingAgents: {}
|
|
905
|
+
}),
|
|
906
|
+
getters: {
|
|
907
|
+
agentById(state) {
|
|
908
|
+
return (channelId, agentId) => state.agents[channelId]?.find((a) => a.agentId === agentId);
|
|
909
|
+
},
|
|
910
|
+
/** agent 名字解析(事件渲染用):已知成员取名字,否则 id 前 8 位 */
|
|
911
|
+
agentName(state) {
|
|
912
|
+
return (channelId, agentId) => {
|
|
913
|
+
if (!agentId) return "system";
|
|
914
|
+
return (state.agents[channelId]?.find((x) => x.agentId === agentId))?.name ?? agentId.slice(0, 8);
|
|
915
|
+
};
|
|
916
|
+
},
|
|
917
|
+
/** 任务标题解析(事件渲染用):已知任务取标题,否则 id 前 8 位 */
|
|
918
|
+
taskTitle(state) {
|
|
919
|
+
return (channelId, taskId) => {
|
|
920
|
+
if (!taskId) return "";
|
|
921
|
+
return (state.tasks[channelId]?.find((x) => x.id === taskId))?.title ?? taskId.slice(0, 8);
|
|
922
|
+
};
|
|
923
|
+
},
|
|
924
|
+
rootTasks(state) {
|
|
925
|
+
return (channelId) => (state.tasks[channelId] ?? []).filter((t) => !t.parentId);
|
|
926
|
+
},
|
|
927
|
+
taskById(state) {
|
|
928
|
+
return (channelId, taskId) => state.tasks[channelId]?.find((t) => t.id === taskId);
|
|
929
|
+
},
|
|
930
|
+
busyCount(state) {
|
|
931
|
+
return (channelId) => (state.agents[channelId] ?? []).filter((a) => a.state === "busy").length;
|
|
932
|
+
},
|
|
933
|
+
/** 根任务队列(§2.2;后端权威投影 + 本地兜底推导) */
|
|
934
|
+
rootQueue(state) {
|
|
935
|
+
return (channelId) => state.rootQueues[channelId] ?? emptyRootQueue();
|
|
936
|
+
},
|
|
937
|
+
/** active root id(前端所有"当前根任务"判断的**唯一**来源) */
|
|
938
|
+
activeRootId(state) {
|
|
939
|
+
return (channelId) => state.rootQueues[channelId]?.activeRootId ?? (state.tasks[channelId] ?? []).filter((t) => !t.parentId && !isTerminalState(t.state))[0]?.id ?? null;
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
actions: {
|
|
943
|
+
applySnapshot(payload) {
|
|
944
|
+
const { channelId } = payload;
|
|
945
|
+
this.channels[channelId] = {
|
|
946
|
+
...payload.channel,
|
|
947
|
+
loadedAt: Date.now()
|
|
948
|
+
};
|
|
949
|
+
this.agents[channelId] = payload.agents.map((a) => ({
|
|
950
|
+
...a,
|
|
951
|
+
modelRef: a.config?.modelRef ?? a.modelRef ?? null
|
|
952
|
+
}));
|
|
953
|
+
this.tasks[channelId] = payload.tasks.map((t) => this.toTaskView(t));
|
|
954
|
+
this.rootQueues[channelId] = payload.rootQueue ?? deriveRootQueue(payload.tasks);
|
|
955
|
+
},
|
|
956
|
+
applyEvent(e) {
|
|
957
|
+
const cid = e.channelId;
|
|
958
|
+
switch (e.type) {
|
|
959
|
+
case "agent.status": {
|
|
960
|
+
const list = this.agents[cid] ?? [];
|
|
961
|
+
const raw = e.payload;
|
|
962
|
+
const p = {
|
|
963
|
+
agentId: raw.agentId,
|
|
964
|
+
state: raw.state,
|
|
965
|
+
currentTaskId: raw.currentTaskId ?? null,
|
|
966
|
+
currentTaskTitle: raw.currentTaskTitle ?? null,
|
|
967
|
+
currentTaskProgress: raw.currentTaskProgress ?? null,
|
|
968
|
+
queued: raw.queued ?? raw.queuedCount ?? 0,
|
|
969
|
+
completed: raw.completed ?? raw.completedCount ?? 0,
|
|
970
|
+
/** §8:监督 / 连续性帧必须落 store —— 旧实现丢弃 supervision,watchdog 只闪首帧 */
|
|
971
|
+
...raw.context !== void 0 ? { context: raw.context } : {},
|
|
972
|
+
...raw.supervision ? { supervision: raw.supervision } : {},
|
|
973
|
+
...raw.continuity ? { continuity: raw.continuity } : {}
|
|
974
|
+
};
|
|
975
|
+
const idx = list.findIndex((a) => a.agentId === p.agentId);
|
|
976
|
+
if (idx >= 0) list[idx] = {
|
|
977
|
+
...list[idx],
|
|
978
|
+
...p
|
|
979
|
+
};
|
|
980
|
+
else {
|
|
981
|
+
const fresh = {
|
|
982
|
+
agentId: p.agentId,
|
|
983
|
+
state: p.state,
|
|
984
|
+
currentTaskId: p.currentTaskId ?? null,
|
|
985
|
+
queued: p.queued,
|
|
986
|
+
completed: p.completed,
|
|
987
|
+
name: p.agentId.slice(0, 8),
|
|
988
|
+
role: "worker",
|
|
989
|
+
harness: "-",
|
|
990
|
+
...raw.supervision ? { supervision: raw.supervision } : {},
|
|
991
|
+
...raw.continuity ? { continuity: raw.continuity } : {}
|
|
992
|
+
};
|
|
993
|
+
list.push(fresh);
|
|
994
|
+
this.refreshAgents(cid);
|
|
995
|
+
}
|
|
996
|
+
this.agents[cid] = [...list];
|
|
997
|
+
break;
|
|
998
|
+
}
|
|
999
|
+
case "agent.member": {
|
|
1000
|
+
const p = e.payload;
|
|
1001
|
+
const list = this.agents[cid] ?? [];
|
|
1002
|
+
const idx = list.findIndex((a) => a.agentId === p.agentId);
|
|
1003
|
+
if (p.op === "added") {
|
|
1004
|
+
if (idx < 0) list.push({
|
|
1005
|
+
agentId: p.agentId,
|
|
1006
|
+
name: p.name,
|
|
1007
|
+
role: p.role,
|
|
1008
|
+
harness: p.harness,
|
|
1009
|
+
enabled: p.enabled,
|
|
1010
|
+
config: p.config,
|
|
1011
|
+
modelRef: p.config?.modelRef ?? null,
|
|
1012
|
+
state: "idle",
|
|
1013
|
+
currentTaskId: null,
|
|
1014
|
+
queued: 0,
|
|
1015
|
+
completed: 0
|
|
1016
|
+
});
|
|
1017
|
+
} else if (p.op === "updated") {
|
|
1018
|
+
if (idx >= 0) {
|
|
1019
|
+
const prev = list[idx];
|
|
1020
|
+
const nextConfig = p.config ?? prev.config;
|
|
1021
|
+
list[idx] = {
|
|
1022
|
+
...prev,
|
|
1023
|
+
name: p.name ?? prev.name,
|
|
1024
|
+
role: p.role ?? prev.role,
|
|
1025
|
+
harness: p.harness ?? prev.harness,
|
|
1026
|
+
enabled: p.enabled ?? prev.enabled,
|
|
1027
|
+
config: nextConfig,
|
|
1028
|
+
modelRef: nextConfig?.modelRef ?? prev.modelRef ?? null
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
} else if (p.op === "removed") {
|
|
1032
|
+
if (idx >= 0) list.splice(idx, 1);
|
|
1033
|
+
}
|
|
1034
|
+
this.agents[cid] = [...list];
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
case "task.status": {
|
|
1038
|
+
const p = e.payload;
|
|
1039
|
+
const list = this.tasks[cid] ?? [];
|
|
1040
|
+
const idx = list.findIndex((t) => t.id === p.taskId);
|
|
1041
|
+
if (idx >= 0) {
|
|
1042
|
+
const prev = list[idx];
|
|
1043
|
+
list[idx] = {
|
|
1044
|
+
...prev,
|
|
1045
|
+
state: p.state,
|
|
1046
|
+
assigneeId: p.assigneeId ?? prev.assigneeId,
|
|
1047
|
+
title: p.title ?? prev.title,
|
|
1048
|
+
parentId: p.parentId ?? prev.parentId,
|
|
1049
|
+
rootQueueSeq: p.rootQueueSeq ?? prev.rootQueueSeq,
|
|
1050
|
+
progress: Math.max(prev.progress, p.progress ?? 0),
|
|
1051
|
+
routeReason: p.routeReason ?? prev.routeReason,
|
|
1052
|
+
closeReason: p.closeReason ?? prev.closeReason,
|
|
1053
|
+
deadlineAt: p.deadlineAt ?? prev.deadlineAt,
|
|
1054
|
+
retryCount: p.retryCount ?? prev.retryCount,
|
|
1055
|
+
createdAt: p.createdAt ?? prev.createdAt,
|
|
1056
|
+
artifacts: Math.max(prev.artifacts, p.artifacts ?? 0)
|
|
1057
|
+
};
|
|
1058
|
+
} else {
|
|
1059
|
+
const fresh = {
|
|
1060
|
+
id: p.taskId,
|
|
1061
|
+
title: p.title ?? p.taskId.slice(0, 8),
|
|
1062
|
+
state: p.state,
|
|
1063
|
+
progress: p.progress ?? 0,
|
|
1064
|
+
assigneeId: p.assigneeId ?? "",
|
|
1065
|
+
artifacts: p.artifacts ?? 0
|
|
1066
|
+
};
|
|
1067
|
+
if (p.parentId) fresh.parentId = p.parentId;
|
|
1068
|
+
if (p.rootQueueSeq != null) fresh.rootQueueSeq = p.rootQueueSeq;
|
|
1069
|
+
if (p.routeReason) fresh.routeReason = p.routeReason;
|
|
1070
|
+
if (p.closeReason) fresh.closeReason = p.closeReason;
|
|
1071
|
+
if (p.deadlineAt) fresh.deadlineAt = p.deadlineAt;
|
|
1072
|
+
if (p.retryCount != null) fresh.retryCount = p.retryCount;
|
|
1073
|
+
if (p.createdAt) fresh.createdAt = p.createdAt;
|
|
1074
|
+
list.push(fresh);
|
|
1075
|
+
if (p.title === void 0) this.refreshTasks(cid);
|
|
1076
|
+
}
|
|
1077
|
+
this.tasks[cid] = [...list];
|
|
1078
|
+
break;
|
|
1079
|
+
}
|
|
1080
|
+
case "task.progress": {
|
|
1081
|
+
const p = e.payload;
|
|
1082
|
+
const list = this.tasks[cid] ?? [];
|
|
1083
|
+
const idx = list.findIndex((t) => t.id === p.taskId);
|
|
1084
|
+
const prev = idx >= 0 ? list[idx] : void 0;
|
|
1085
|
+
if (prev) list[idx] = {
|
|
1086
|
+
...prev,
|
|
1087
|
+
progress: p.progress
|
|
1088
|
+
};
|
|
1089
|
+
this.tasks[cid] = [...list];
|
|
1090
|
+
break;
|
|
1091
|
+
}
|
|
1092
|
+
case "root.queue":
|
|
1093
|
+
this.rootQueues[cid] = e.payload;
|
|
1094
|
+
break;
|
|
1095
|
+
case "a2a.artifact": {
|
|
1096
|
+
const p = e.payload;
|
|
1097
|
+
if (!p.taskId) break;
|
|
1098
|
+
const list = this.tasks[cid] ?? [];
|
|
1099
|
+
const idx = list.findIndex((t) => t.id === p.taskId);
|
|
1100
|
+
const prev = idx >= 0 ? list[idx] : void 0;
|
|
1101
|
+
if (prev) list[idx] = {
|
|
1102
|
+
...prev,
|
|
1103
|
+
artifacts: prev.artifacts + 1
|
|
1104
|
+
};
|
|
1105
|
+
this.tasks[cid] = [...list];
|
|
1106
|
+
break;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
toTaskView(t) {
|
|
1111
|
+
return {
|
|
1112
|
+
id: t.id,
|
|
1113
|
+
parentId: t.parentId,
|
|
1114
|
+
rootQueueSeq: t.rootQueueSeq,
|
|
1115
|
+
title: t.title,
|
|
1116
|
+
state: t.state,
|
|
1117
|
+
progress: t.progress,
|
|
1118
|
+
assigneeId: t.assigneeId,
|
|
1119
|
+
artifacts: t.artifacts.length,
|
|
1120
|
+
routeReason: t.routeReason,
|
|
1121
|
+
sourceChatMessageId: t.sourceChatMessageId,
|
|
1122
|
+
sourceChatDeliveryId: t.sourceChatDeliveryId,
|
|
1123
|
+
retryCount: t.retryCount,
|
|
1124
|
+
closeReason: t.closeReason,
|
|
1125
|
+
deadlineAt: t.deadlineAt,
|
|
1126
|
+
createdAt: t.createdAt,
|
|
1127
|
+
updatedAt: t.updatedAt
|
|
1128
|
+
};
|
|
1129
|
+
},
|
|
1130
|
+
/** WS 断连后的 REST 兜底刷新(命令后立即对齐用) */
|
|
1131
|
+
refreshChannel(channelId, snapshot) {
|
|
1132
|
+
this.applySnapshot(snapshot);
|
|
1133
|
+
},
|
|
1134
|
+
/**
|
|
1135
|
+
* 节流 REST 成员对齐:事件流里冒出的未知 agent 缺 name/role/harness 元信息,
|
|
1136
|
+
* 拉一次成员列表 upsert(以 REST 为准;事件流继续增量更新 state)。
|
|
1137
|
+
*/
|
|
1138
|
+
refreshAgents(channelId) {
|
|
1139
|
+
if (this.refreshingAgents[channelId]) return;
|
|
1140
|
+
this.refreshingAgents[channelId] = true;
|
|
1141
|
+
narrowFetch(`/api/workshop/channels/${channelId}/agents`, { headers: { authorization: `Bearer ${useUserStore().token}` } }).then((res) => {
|
|
1142
|
+
const fresh = res.data ?? [];
|
|
1143
|
+
const merged = [...this.agents[channelId] ?? []];
|
|
1144
|
+
for (const m of fresh) {
|
|
1145
|
+
const idx = merged.findIndex((a) => a.agentId === m.id);
|
|
1146
|
+
if (idx >= 0) merged[idx] = {
|
|
1147
|
+
...merged[idx],
|
|
1148
|
+
name: m.name,
|
|
1149
|
+
role: m.role,
|
|
1150
|
+
harness: m.harness,
|
|
1151
|
+
config: m.config
|
|
1152
|
+
};
|
|
1153
|
+
else merged.push({
|
|
1154
|
+
agentId: m.id,
|
|
1155
|
+
name: m.name,
|
|
1156
|
+
role: m.role,
|
|
1157
|
+
harness: m.harness,
|
|
1158
|
+
config: m.config,
|
|
1159
|
+
state: "idle",
|
|
1160
|
+
currentTaskId: null,
|
|
1161
|
+
queued: 0,
|
|
1162
|
+
completed: 0
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
this.agents[channelId] = merged;
|
|
1166
|
+
}).catch(() => {}).finally(() => {
|
|
1167
|
+
this.refreshingAgents[channelId] = false;
|
|
1168
|
+
});
|
|
1169
|
+
},
|
|
1170
|
+
/**
|
|
1171
|
+
* 节流 REST 任务对齐:订阅后新建任务从事件构建时缺标题/父子关系,
|
|
1172
|
+
* 拉一次任务列表 upsert(以 REST 为准;事件流继续增量更新)。
|
|
1173
|
+
*/
|
|
1174
|
+
refreshTasks(channelId) {
|
|
1175
|
+
if (this.refreshing[channelId]) return;
|
|
1176
|
+
this.refreshing[channelId] = true;
|
|
1177
|
+
narrowFetch(`/api/workshop/channels/${channelId}/tasks`, { headers: { authorization: `Bearer ${useUserStore().token}` } }).then((res) => {
|
|
1178
|
+
const fresh = res.data ?? [];
|
|
1179
|
+
const current = this.tasks[channelId] ?? [];
|
|
1180
|
+
const byId = new Map(current.map((t) => [t.id, t]));
|
|
1181
|
+
const freshIds = new Set(fresh.map((t) => t.id));
|
|
1182
|
+
const merged = fresh.map((t) => {
|
|
1183
|
+
const prev = byId.get(t.id);
|
|
1184
|
+
const next = this.toTaskView(t);
|
|
1185
|
+
return prev && prev.progress > next.progress ? {
|
|
1186
|
+
...next,
|
|
1187
|
+
progress: prev.progress
|
|
1188
|
+
} : next;
|
|
1189
|
+
});
|
|
1190
|
+
for (const t of current) if (!freshIds.has(t.id)) merged.push(t);
|
|
1191
|
+
this.tasks[channelId] = merged;
|
|
1192
|
+
}).catch(() => {}).finally(() => {
|
|
1193
|
+
this.refreshing[channelId] = false;
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
});
|
|
1198
|
+
//#endregion
|
|
1199
|
+
//#region app/stores/workshop/hitl.ts
|
|
1200
|
+
/**
|
|
1201
|
+
* HITL 全局待办 store:omp ask 对话框 + dcw 工具审批 + 各 harness 原生提问/审批的统一待答视图。
|
|
1202
|
+
*
|
|
1203
|
+
* 数据源:
|
|
1204
|
+
* - AEP hitl.request/hitl.resolved 帧(v17 起服务端按用户定向推送;频道流 seq 帧与
|
|
1205
|
+
* channelId='' 直推帧各到一次,upsert 按 kind+id 幂等去重;徽标不依赖 channel 订阅)
|
|
1206
|
+
* - GET /api/workshop/hitl/pending 快照(页面挂载/重连后的基线对齐)—— **快照是权威**:
|
|
1207
|
+
* 替换式写入,WS 期间漂移的陈旧条目不会残留(例如他端已决策但本端漏帧)
|
|
1208
|
+
*
|
|
1209
|
+
* 应答统一走 `answer()`(REST /workshop/hitl/respond):
|
|
1210
|
+
* - 409 ALREADY_RESOLVED(他端/引擎已处理)→ 重拉快照收敛,UI 提示"已被他人处理";
|
|
1211
|
+
* - 403 APPROVAL_FORBIDDEN(审批策略 owner_only 或资格快照不收)→ 原样上抛策略文案。
|
|
1212
|
+
* 终端面板(omp)另有直连 WS 应答路径,与本 store 互不影响。
|
|
1213
|
+
*/
|
|
1214
|
+
var keyOf = (i) => `${i.kind}:${i.id}`;
|
|
1215
|
+
/** 从 FetchError/Error 中取业务码(信封 code 优先,其次 HTTP 状态映射) */
|
|
1216
|
+
function outcomeOf(err) {
|
|
1217
|
+
const e = err ?? {};
|
|
1218
|
+
const raw = e.data?.code ?? e.response?.data?.code;
|
|
1219
|
+
const status = Number(e.statusCode ?? e.status ?? e.response?.status ?? 0);
|
|
1220
|
+
return {
|
|
1221
|
+
ok: false,
|
|
1222
|
+
code: raw !== void 0 && raw !== null ? String(raw) : status === 409 ? "ALREADY_RESOLVED" : status === 403 ? "APPROVAL_FORBIDDEN" : status ? `HTTP_${status}` : "",
|
|
1223
|
+
message: apiErrorMessage(err)
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
var useHitlStore = defineStore("workshop.hitl", {
|
|
1227
|
+
state: () => ({
|
|
1228
|
+
/** 当前待人工处理条目(kind+id 幂等;v17 可选字段 method/options/questions/policy 原样透传) */
|
|
1229
|
+
items: [],
|
|
1230
|
+
/** 快照已加载(防重复拉取;WS 掉线重连后由 invalidate 重置) */
|
|
1231
|
+
snapshotLoaded: false,
|
|
1232
|
+
/** 正在提交的条目 `${kind}:${id}`(按钮 loading / 防重复点击) */
|
|
1233
|
+
answering: null
|
|
1234
|
+
}),
|
|
1235
|
+
getters: {
|
|
1236
|
+
count: (state) => state.items.length,
|
|
1237
|
+
/** 按 agent 分组(徽标下拉/跳转用) */
|
|
1238
|
+
byAgent: (state) => {
|
|
1239
|
+
const map = /* @__PURE__ */ new Map();
|
|
1240
|
+
for (const i of state.items) {
|
|
1241
|
+
const list = map.get(i.agentId) ?? [];
|
|
1242
|
+
list.push(i);
|
|
1243
|
+
map.set(i.agentId, list);
|
|
1244
|
+
}
|
|
1245
|
+
return map;
|
|
1246
|
+
},
|
|
1247
|
+
/** 单条查询(页头按 kind+id 定位当前条目状态) */
|
|
1248
|
+
byKey: (state) => (kind, id) => state.items.find((i) => i.kind === kind && i.id === id)
|
|
1249
|
+
},
|
|
1250
|
+
actions: {
|
|
1251
|
+
/** AEP 帧消费(hitl.request / hitl.resolved;幂等 upsert/remove) */
|
|
1252
|
+
applyEnvelope(e) {
|
|
1253
|
+
if (e.type === "hitl.request") {
|
|
1254
|
+
const item = e.payload;
|
|
1255
|
+
const key = keyOf(item);
|
|
1256
|
+
const idx = this.items.findIndex((i) => keyOf(i) === key);
|
|
1257
|
+
if (idx >= 0) this.items[idx] = item;
|
|
1258
|
+
else this.items.push(item);
|
|
1259
|
+
} else if (e.type === "hitl.resolved") {
|
|
1260
|
+
const r = e.payload;
|
|
1261
|
+
this.items = this.items.filter((i) => keyOf(i) !== keyOf(r));
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
/** 快照对齐(挂载/重连;替换式 —— 以 REST 为准收敛 WS 期间的可能漂移) */
|
|
1265
|
+
async loadSnapshot() {},
|
|
1266
|
+
/**
|
|
1267
|
+
* 统一应答(REST;页头 ask/审批表单与任何非终端入口共用)。
|
|
1268
|
+
* 409/403 不抛出:调用方按 code 渲染"已被他人处理 / 无审批权限"专用提示。
|
|
1269
|
+
*/
|
|
1270
|
+
async answer(item, payload) {
|
|
1271
|
+
const key = keyOf(item);
|
|
1272
|
+
if (this.answering) return {
|
|
1273
|
+
ok: false,
|
|
1274
|
+
code: "BUSY",
|
|
1275
|
+
message: "已有应答提交中"
|
|
1276
|
+
};
|
|
1277
|
+
this.answering = key;
|
|
1278
|
+
const token = useUserStore().token;
|
|
1279
|
+
try {
|
|
1280
|
+
const res = await narrowFetch("/api/workshop/hitl/respond", {
|
|
1281
|
+
method: "POST",
|
|
1282
|
+
body: {
|
|
1283
|
+
kind: item.kind,
|
|
1284
|
+
id: item.id,
|
|
1285
|
+
...payload
|
|
1286
|
+
},
|
|
1287
|
+
headers: token ? { authorization: `Bearer ${token}` } : {}
|
|
1288
|
+
});
|
|
1289
|
+
if (res.code !== 0) {
|
|
1290
|
+
await this.loadSnapshot();
|
|
1291
|
+
return {
|
|
1292
|
+
ok: false,
|
|
1293
|
+
code: String(res.code ?? ""),
|
|
1294
|
+
message: res.message ?? "应答失败"
|
|
1295
|
+
};
|
|
1296
|
+
}
|
|
1297
|
+
this.items = this.items.filter((i) => keyOf(i) !== key);
|
|
1298
|
+
await this.loadSnapshot();
|
|
1299
|
+
return {
|
|
1300
|
+
ok: true,
|
|
1301
|
+
code: "",
|
|
1302
|
+
message: res.message ?? "ok"
|
|
1303
|
+
};
|
|
1304
|
+
} catch (err) {
|
|
1305
|
+
const out = outcomeOf(err);
|
|
1306
|
+
if (out.code === "ALREADY_RESOLVED" || out.code === "APPROVAL_FORBIDDEN" || out.code === "NOT_RESPONDABLE") await this.loadSnapshot();
|
|
1307
|
+
return out;
|
|
1308
|
+
} finally {
|
|
1309
|
+
this.answering = null;
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
/** WS 断线重连后重新对齐 */
|
|
1313
|
+
invalidate() {
|
|
1314
|
+
this.snapshotLoaded = false;
|
|
1315
|
+
},
|
|
1316
|
+
clear() {
|
|
1317
|
+
this.items = [];
|
|
1318
|
+
this.snapshotLoaded = false;
|
|
1319
|
+
this.answering = null;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
//#endregion
|
|
1324
|
+
//#region app/stores/workshop/chat.ts
|
|
1325
|
+
/**
|
|
1326
|
+
* 群聊 store(v17 主计划 §5-§7 的前端事实层)。
|
|
1327
|
+
*
|
|
1328
|
+
* 数据来源三路,共用同一份状态:
|
|
1329
|
+
* ① 频道流 chat.* 帧(chat.message / chat.delivery.status / chat.member / chat.settings);
|
|
1330
|
+
* ② channel.snapshot 的群聊侧基线(payload.chat:成员/最近消息/设置/能力);
|
|
1331
|
+
* ③ REST 历史/名册/权限(断线后补齐 WS 窗口外的数据)。
|
|
1332
|
+
*
|
|
1333
|
+
* **幂等是硬约束**:同一条 chat.message 可能同时来自实时帧、快照重放与 REST 回填,
|
|
1334
|
+
* 三路一律按消息 `id` 去重(投递按 deliveryId、成员按 userId、通知按 eventId),
|
|
1335
|
+
* 重复帧绝不产生第二行 —— 否则刷新/重连后时间线会整体翻倍。
|
|
1336
|
+
*
|
|
1337
|
+
* 排序:createdAt 升序 + 插入序稳定(同毫秒消息保持先到先排)。
|
|
1338
|
+
*/
|
|
1339
|
+
/** 业务错误码(VERSION_CONFLICT / CHAT_DISABLED / ALREADY_RESOLVED …) */
|
|
1340
|
+
function chatErrorCode(err) {
|
|
1341
|
+
const e = err ?? {};
|
|
1342
|
+
const code = e.response?.data?.code ?? e.data?.code;
|
|
1343
|
+
return code === void 0 || code === null ? "" : String(code);
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* 统一错误文案:axios 把服务端信封放在 `response.data`,ofetch 放在 `data`,
|
|
1347
|
+
* 项目的 `apiErrorMessage` 只识别后者 —— 这里先补 axios 分支再回落到它。
|
|
1348
|
+
*/
|
|
1349
|
+
function chatErrorMessage(err) {
|
|
1350
|
+
const e = err ?? {};
|
|
1351
|
+
const msg = e.response?.data?.message ?? e.data?.message;
|
|
1352
|
+
if (typeof msg === "string" && msg.trim()) return msg.trim();
|
|
1353
|
+
return apiErrorMessage(err);
|
|
1354
|
+
}
|
|
1355
|
+
/** 同一 createdAt 时保持插入序:找到第一个「严格更晚」的下标插入 */
|
|
1356
|
+
function insertSorted(list, msg) {
|
|
1357
|
+
let idx = list.length;
|
|
1358
|
+
for (let i = list.length - 1; i >= 0; i--) {
|
|
1359
|
+
if (list[i].createdAt <= msg.createdAt) {
|
|
1360
|
+
idx = i + 1;
|
|
1361
|
+
break;
|
|
1362
|
+
}
|
|
1363
|
+
idx = i;
|
|
1364
|
+
}
|
|
1365
|
+
list.splice(idx, 0, msg);
|
|
1366
|
+
}
|
|
1367
|
+
var useChatStore = defineStore("workshop.chat", () => {
|
|
1368
|
+
const messages = ref({});
|
|
1369
|
+
const members = ref({});
|
|
1370
|
+
const settings = ref({});
|
|
1371
|
+
const deliveries = ref({});
|
|
1372
|
+
const permissions = ref({});
|
|
1373
|
+
/**
|
|
1374
|
+
* 已成功拉过历史的频道集合。
|
|
1375
|
+
*
|
|
1376
|
+
* 注意:「还能不能继续往前拉」由 `hasMoreHistory` 决定,本集合只表示"至少拉过一次"
|
|
1377
|
+
* (用于跳过重复的首屏加载)。两者语义不同,不要互相替代。
|
|
1378
|
+
*/
|
|
1379
|
+
const loadedChannels = ref(/* @__PURE__ */ new Set());
|
|
1380
|
+
/** 每频道「还有更早历史」标志(loadHistory/loadEarlier 判定为空后置 false) */
|
|
1381
|
+
const hasMoreHistory = ref({});
|
|
1382
|
+
const loadingHistory = ref({});
|
|
1383
|
+
/** 回复目标(引用链;Composer 消费,发完即清) */
|
|
1384
|
+
const replyTarget = ref(null);
|
|
1385
|
+
function listOf(channelId) {
|
|
1386
|
+
return messages.value[channelId] ??= [];
|
|
1387
|
+
}
|
|
1388
|
+
/** 幂等 upsert:同 id 只保留一行(实时帧 / 快照重放 / REST 回填三路共用) */
|
|
1389
|
+
function upsertMessage(msg, channelId) {
|
|
1390
|
+
const cid = channelId || msg.channelId;
|
|
1391
|
+
if (!cid || !msg?.id) return false;
|
|
1392
|
+
const list = listOf(cid);
|
|
1393
|
+
const idx = list.findIndex((m) => m.id === msg.id);
|
|
1394
|
+
if (idx >= 0) {
|
|
1395
|
+
list[idx] = {
|
|
1396
|
+
...list[idx],
|
|
1397
|
+
...msg
|
|
1398
|
+
};
|
|
1399
|
+
return false;
|
|
1400
|
+
}
|
|
1401
|
+
insertSorted(list, msg);
|
|
1402
|
+
return true;
|
|
1403
|
+
}
|
|
1404
|
+
function upsertDelivery(d) {
|
|
1405
|
+
const cid = d.channelId;
|
|
1406
|
+
if (!cid || !d.deliveryId) return;
|
|
1407
|
+
const byChannel = deliveries.value[cid] ??= {};
|
|
1408
|
+
byChannel[d.deliveryId] = {
|
|
1409
|
+
...byChannel[d.deliveryId],
|
|
1410
|
+
...d
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
/** 频道流 chat.* 帧消费(由 useWorkshopWs 在 seq 守卫之后调用,重复 seq 帧不会到这里) */
|
|
1414
|
+
function applyEnvelope(e) {
|
|
1415
|
+
switch (e.type) {
|
|
1416
|
+
case "chat.message":
|
|
1417
|
+
upsertMessage(e.payload, e.channelId || void 0);
|
|
1418
|
+
break;
|
|
1419
|
+
case "chat.delivery.status":
|
|
1420
|
+
upsertDelivery(e.payload);
|
|
1421
|
+
break;
|
|
1422
|
+
case "chat.member": {
|
|
1423
|
+
const m = e.payload;
|
|
1424
|
+
const cid = e.channelId;
|
|
1425
|
+
if (!cid || !m?.userId) break;
|
|
1426
|
+
const list = members.value[cid] ??= [];
|
|
1427
|
+
const idx = list.findIndex((x) => x.userId === m.userId);
|
|
1428
|
+
const next = {
|
|
1429
|
+
userId: m.userId,
|
|
1430
|
+
displayName: m.displayName ?? null,
|
|
1431
|
+
role: m.role,
|
|
1432
|
+
status: m.status,
|
|
1433
|
+
joinedAt: m.joinedAt,
|
|
1434
|
+
leftAt: m.leftAt ?? null
|
|
1435
|
+
};
|
|
1436
|
+
if (idx >= 0) list[idx] = next;
|
|
1437
|
+
else list.push(next);
|
|
1438
|
+
break;
|
|
1439
|
+
}
|
|
1440
|
+
case "chat.settings": {
|
|
1441
|
+
const s = e.payload;
|
|
1442
|
+
const cid = s?.id || e.channelId;
|
|
1443
|
+
if (cid) settings.value[cid] = s;
|
|
1444
|
+
break;
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* channel.snapshot 的群聊侧基线(payload.chat / payload.permissions)。
|
|
1450
|
+
* 消息走 upsert(不 replace):重连快照只含最近 50 条,替换会抹掉已翻页加载的更早历史。
|
|
1451
|
+
*/
|
|
1452
|
+
function applySnapshot(channelId, chat, perms) {
|
|
1453
|
+
if (!channelId) return;
|
|
1454
|
+
if (chat?.channel) settings.value[channelId] = chat.channel;
|
|
1455
|
+
if (Array.isArray(chat?.members)) members.value[channelId] = chat.members.map((m) => ({ ...m }));
|
|
1456
|
+
for (const msg of chat?.chatMessages ?? []) upsertMessage(msg, channelId);
|
|
1457
|
+
if (chat?.permissions) permissions.value[channelId] = chat.permissions;
|
|
1458
|
+
else if (perms !== void 0) permissions.value[channelId] = perms ?? null;
|
|
1459
|
+
loadedChannels.value.add(channelId);
|
|
1460
|
+
}
|
|
1461
|
+
async function request(path, init = {}) {
|
|
1462
|
+
const token = useUserStore().token;
|
|
1463
|
+
const qs = init.query ? `?${Object.entries(init.query).filter(([, v]) => v !== void 0 && v !== "").map(([k, v]) => `${k}=${encodeURIComponent(String(v))}`).join("&")}` : "";
|
|
1464
|
+
const res = await narrowFetch(`${path}${qs}`, {
|
|
1465
|
+
method: init.method ?? "GET",
|
|
1466
|
+
body: init.body,
|
|
1467
|
+
headers: token ? { authorization: `Bearer ${token}` } : {}
|
|
1468
|
+
});
|
|
1469
|
+
if (res.code !== 0 || res.data == null) throw new Error(res.message ?? "群聊请求失败");
|
|
1470
|
+
return res.data;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* 拉取群聊历史(`before` = 上一页最旧消息 id;缺省拉最新一页)。
|
|
1474
|
+
* 只 upsert 不替换 —— 与 WS 实时帧并存时不做"谁覆盖谁"的假设。
|
|
1475
|
+
* @returns 是否可能还有更早历史
|
|
1476
|
+
*/
|
|
1477
|
+
async function loadHistory(channelId, opts = {}) {
|
|
1478
|
+
return false;
|
|
1479
|
+
}
|
|
1480
|
+
/** 名册(成员可见;非成员会被 403 拒绝 → 保持空名册,不抛给 UI) */
|
|
1481
|
+
async function loadMembers(channelId) {}
|
|
1482
|
+
/** 能力视图(非成员也可调用;ChatMemberPanel/Composer 的按钮可用性据此渲染) */
|
|
1483
|
+
async function loadPermissions(channelId) {
|
|
1484
|
+
return null;
|
|
1485
|
+
}
|
|
1486
|
+
/** 群聊发言(唯一入站口;mentions 只是意图提示,服务端会重新解析文本) */
|
|
1487
|
+
async function send(input) {
|
|
1488
|
+
const data = await request(`/api/workshop/channels/${input.channelId}/chat/messages`, {
|
|
1489
|
+
method: "POST",
|
|
1490
|
+
body: {
|
|
1491
|
+
text: input.text,
|
|
1492
|
+
mentions: input.mentions ?? [],
|
|
1493
|
+
replyToId: input.replyToId ?? null,
|
|
1494
|
+
clientMessageId: input.clientMessageId
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
if (data.message) upsertMessage(data.message, input.channelId);
|
|
1498
|
+
for (const d of data.deliveries ?? []) upsertDelivery({
|
|
1499
|
+
deliveryId: d.deliveryId,
|
|
1500
|
+
chatMessageId: data.message?.id ?? "",
|
|
1501
|
+
channelId: input.channelId,
|
|
1502
|
+
targetAgentId: d.agentId,
|
|
1503
|
+
mailboxMessageId: null,
|
|
1504
|
+
status: d.status,
|
|
1505
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1506
|
+
});
|
|
1507
|
+
return data;
|
|
1508
|
+
}
|
|
1509
|
+
async function join(channelId) {
|
|
1510
|
+
const data = await request(`/api/workshop/channels/${channelId}/members/join`, {
|
|
1511
|
+
method: "POST",
|
|
1512
|
+
body: {}
|
|
1513
|
+
});
|
|
1514
|
+
if (data.permissions) permissions.value[channelId] = data.permissions;
|
|
1515
|
+
await Promise.all([loadMembers().catch(() => {}), loadHistory().catch(() => {})]);
|
|
1516
|
+
return data.status;
|
|
1517
|
+
}
|
|
1518
|
+
async function leave(channelId) {
|
|
1519
|
+
await request(`/api/workshop/channels/${channelId}/members/leave`, {
|
|
1520
|
+
method: "POST",
|
|
1521
|
+
body: {}
|
|
1522
|
+
});
|
|
1523
|
+
await loadPermissions();
|
|
1524
|
+
}
|
|
1525
|
+
/** owner 移除成员 / owner 批准待审成员 */
|
|
1526
|
+
async function removeMember(channelId, userId) {
|
|
1527
|
+
await request(`/api/workshop/channels/${channelId}/members/${encodeURIComponent(userId)}`, { method: "DELETE" });
|
|
1528
|
+
await loadMembers();
|
|
1529
|
+
}
|
|
1530
|
+
async function approveMember(channelId, userId) {
|
|
1531
|
+
await request(`/api/workshop/channels/${channelId}/members/${encodeURIComponent(userId)}/approve`, {
|
|
1532
|
+
method: "POST",
|
|
1533
|
+
body: {}
|
|
1534
|
+
});
|
|
1535
|
+
await loadMembers();
|
|
1536
|
+
}
|
|
1537
|
+
/** 群聊设置(owner-only;必须带 version 乐观锁 → 409 VERSION_CONFLICT) */
|
|
1538
|
+
async function updateSettings(channelId, patch) {
|
|
1539
|
+
const version = settings.value[channelId]?.version;
|
|
1540
|
+
const data = await request(`/api/workshop/channels/${channelId}`, {
|
|
1541
|
+
method: "PATCH",
|
|
1542
|
+
body: {
|
|
1543
|
+
...patch,
|
|
1544
|
+
version
|
|
1545
|
+
}
|
|
1546
|
+
});
|
|
1547
|
+
const prev = settings.value[channelId];
|
|
1548
|
+
settings.value[channelId] = {
|
|
1549
|
+
id: data.id ?? channelId,
|
|
1550
|
+
name: data.name ?? prev?.name ?? "",
|
|
1551
|
+
description: data.description ?? prev?.description ?? "",
|
|
1552
|
+
visibility: data.visibility ?? prev?.visibility ?? "private",
|
|
1553
|
+
joinPolicy: data.joinPolicy ?? prev?.joinPolicy ?? "owner_approve",
|
|
1554
|
+
approvalPolicy: data.approvalPolicy ?? prev?.approvalPolicy ?? "owner_only",
|
|
1555
|
+
chatEnabled: data.chatEnabled ?? prev?.chatEnabled ?? 0,
|
|
1556
|
+
version: data.version ?? prev?.version ?? 0,
|
|
1557
|
+
legacy: data.ownerUserId === void 0 ? prev?.legacy ?? false : data.ownerUserId === null
|
|
1558
|
+
};
|
|
1559
|
+
await loadPermissions();
|
|
1560
|
+
}
|
|
1561
|
+
function setReplyTarget(target) {
|
|
1562
|
+
replyTarget.value = target;
|
|
1563
|
+
}
|
|
1564
|
+
function clearReplyTarget() {
|
|
1565
|
+
replyTarget.value = null;
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* 某频道全部投递台账(扁平数组)。
|
|
1569
|
+
*
|
|
1570
|
+
* 渲染方需要"按消息分组",而按消息逐个 `deliveriesOf(channelId, messageId)` 会让
|
|
1571
|
+
* 每条消息都全量扫一遍投递表(未虚拟滚动时是 O(消息数 × 投递数));
|
|
1572
|
+
* 因此暴露这个"取一次、调用方自己建索引"的入口。
|
|
1573
|
+
*/
|
|
1574
|
+
function deliveriesOfChannel(channelId) {
|
|
1575
|
+
const byChannel = deliveries.value[channelId];
|
|
1576
|
+
if (!byChannel) return [];
|
|
1577
|
+
return Object.values(byChannel);
|
|
1578
|
+
}
|
|
1579
|
+
/** 单条消息的投递台账(低频调用方用;高频渲染请用 deliveriesOfChannel 自建索引) */
|
|
1580
|
+
function deliveriesOf(channelId, messageId) {
|
|
1581
|
+
return deliveriesOfChannel(channelId).filter((d) => d.chatMessageId === messageId);
|
|
1582
|
+
}
|
|
1583
|
+
function clear(channelId) {
|
|
1584
|
+
Reflect.deleteProperty(messages.value, channelId);
|
|
1585
|
+
Reflect.deleteProperty(members.value, channelId);
|
|
1586
|
+
Reflect.deleteProperty(deliveries.value, channelId);
|
|
1587
|
+
loadedChannels.value.delete(channelId);
|
|
1588
|
+
}
|
|
1589
|
+
return {
|
|
1590
|
+
messages,
|
|
1591
|
+
members,
|
|
1592
|
+
settings,
|
|
1593
|
+
deliveries,
|
|
1594
|
+
permissions,
|
|
1595
|
+
loadedChannels,
|
|
1596
|
+
hasMoreHistory,
|
|
1597
|
+
loadingHistory,
|
|
1598
|
+
replyTarget,
|
|
1599
|
+
applyEnvelope,
|
|
1600
|
+
applySnapshot,
|
|
1601
|
+
loadHistory,
|
|
1602
|
+
loadMembers,
|
|
1603
|
+
loadPermissions,
|
|
1604
|
+
send,
|
|
1605
|
+
join,
|
|
1606
|
+
leave,
|
|
1607
|
+
removeMember,
|
|
1608
|
+
approveMember,
|
|
1609
|
+
updateSettings,
|
|
1610
|
+
setReplyTarget,
|
|
1611
|
+
clearReplyTarget,
|
|
1612
|
+
deliveriesOf,
|
|
1613
|
+
deliveriesOfChannel,
|
|
1614
|
+
clear
|
|
1615
|
+
};
|
|
1616
|
+
});
|
|
1617
|
+
//#endregion
|
|
1618
|
+
//#region app/composables/workshop/useWorkshopWs.ts
|
|
1619
|
+
var hookGlobal = globalThis;
|
|
1620
|
+
hookGlobal.__workshopWsHeartbeat ??= null;
|
|
1621
|
+
hookGlobal.__workshopWsHeartbeatUsers ??= 0;
|
|
1622
|
+
hookGlobal.__workshopWsNotifHosts ??= 0;
|
|
1623
|
+
hookGlobal.__workshopWsNotifSubscribed ??= false;
|
|
1624
|
+
/**
|
|
1625
|
+
* 频道流帧的单调 seq 守卫。
|
|
1626
|
+
* @returns true = 该帧应被**丢弃**(重复/倒退)
|
|
1627
|
+
*/
|
|
1628
|
+
function channelSeqGuard(e, appliedSeq) {
|
|
1629
|
+
if (!e.channelId || typeof e.seq !== "number" || e.seq <= 0 || e.type === "channel.snapshot") return false;
|
|
1630
|
+
const last = appliedSeq.get(e.channelId) ?? 0;
|
|
1631
|
+
if (e.seq <= last) return true;
|
|
1632
|
+
appliedSeq.set(e.channelId, e.seq);
|
|
1633
|
+
return false;
|
|
1634
|
+
}
|
|
1635
|
+
function useWorkshopWs() {
|
|
1636
|
+
const conn = useWsConnectionStore();
|
|
1637
|
+
const userStore = useUserStore();
|
|
1638
|
+
const townBus = useTownBus();
|
|
1639
|
+
/** 模块级单例:多组件共享一条连接 */
|
|
1640
|
+
let session = hookGlobal.__workshopWs ?? null;
|
|
1641
|
+
const appliedSeq = /* @__PURE__ */ new Map();
|
|
1642
|
+
if (!session) {
|
|
1643
|
+
const s = new WorkshopWsSession((e) => {
|
|
1644
|
+
const events = useEventsStore();
|
|
1645
|
+
const entities = useEntitiesStore();
|
|
1646
|
+
const chat = useChatStore();
|
|
1647
|
+
const hitl = useHitlStore();
|
|
1648
|
+
const notifications = useNotificationsStore();
|
|
1649
|
+
if (channelSeqGuard(e, appliedSeq)) return;
|
|
1650
|
+
if (e.channelId && typeof e.seq === "number" && e.seq > 0) {
|
|
1651
|
+
if (conn.pendingReplay) conn.pendingReplay = false;
|
|
1652
|
+
}
|
|
1653
|
+
if (e.type === "channel.snapshot" && e.channelId) {
|
|
1654
|
+
appliedSeq.set(e.channelId, typeof e.seq === "number" ? e.seq : 0);
|
|
1655
|
+
conn.pendingReplay = false;
|
|
1656
|
+
events.ingest(e);
|
|
1657
|
+
entities.applyEvent(e);
|
|
1658
|
+
entities.applySnapshot(e.payload);
|
|
1659
|
+
const payload = e.payload;
|
|
1660
|
+
chat.applySnapshot(e.channelId, payload.chat ?? null, payload.permissions);
|
|
1661
|
+
events.loadHistory(e.channelId);
|
|
1662
|
+
} else {
|
|
1663
|
+
events.ingest(e);
|
|
1664
|
+
entities.applyEvent(e);
|
|
1665
|
+
if (typeof e.type === "string" && e.type.startsWith("chat.")) chat.applyEnvelope(e);
|
|
1666
|
+
}
|
|
1667
|
+
if (e.type === "hitl.request" || e.type === "hitl.resolved") hitl.applyEnvelope(e);
|
|
1668
|
+
if (e.type === "notification.created" || e.type === "notification.read") notifications.applyEnvelope(e);
|
|
1669
|
+
if (e.type === "notification.snapshot") {
|
|
1670
|
+
notifications.applyReplayCursor(e.payload?.nextCursor ?? null);
|
|
1671
|
+
notifications.endReplay();
|
|
1672
|
+
}
|
|
1673
|
+
if (typeof e.seq === "number" && e.seq > 0 && e.channelId) {
|
|
1674
|
+
conn.cursors[e.channelId] = e.seq;
|
|
1675
|
+
s.updateCursor(e.channelId, e.seq);
|
|
1676
|
+
}
|
|
1677
|
+
townBus.emit(e);
|
|
1678
|
+
}, (state, retry) => {
|
|
1679
|
+
conn.state = state;
|
|
1680
|
+
conn.retryCount = retry;
|
|
1681
|
+
if (state === "open") useNotificationsStore().backfill();
|
|
1682
|
+
}, () => {
|
|
1683
|
+
conn.pendingReplay = true;
|
|
1684
|
+
}, () => {
|
|
1685
|
+
conn.lastDataAt = Date.now();
|
|
1686
|
+
const notifications = useNotificationsStore();
|
|
1687
|
+
if (hookGlobal.__workshopWsNotifSubscribed) sendNotificationsSub();
|
|
1688
|
+
notifications.backfill();
|
|
1689
|
+
});
|
|
1690
|
+
session = s;
|
|
1691
|
+
hookGlobal.__workshopWs = session;
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* 发送一条上行帧。
|
|
1695
|
+
*
|
|
1696
|
+
* `WorkshopWsSession` 只暴露 sub/unsub/ping 三个语义方法(该类由连接层独占维护),
|
|
1697
|
+
* 通知订阅帧没有对应方法 —— 这里以最小侵入方式取底层 socket 直发,
|
|
1698
|
+
* 不改动连接层的实现与 seq/重连语义。若后续连接层开放通用 `send()`,
|
|
1699
|
+
* 本函数应替换为对该方法的调用。
|
|
1700
|
+
*/
|
|
1701
|
+
const sendFrame = (frame) => {
|
|
1702
|
+
const socket = session?.ws;
|
|
1703
|
+
if (!socket || socket.readyState !== WebSocket.OPEN) return;
|
|
1704
|
+
try {
|
|
1705
|
+
socket.send(JSON.stringify(frame));
|
|
1706
|
+
} catch {}
|
|
1707
|
+
};
|
|
1708
|
+
const sendNotificationsSub = () => {
|
|
1709
|
+
const notifications = useNotificationsStore();
|
|
1710
|
+
const cursor = notifications.cursor;
|
|
1711
|
+
notifications.beginReplay();
|
|
1712
|
+
sendFrame(cursor ? {
|
|
1713
|
+
type: "subNotifications",
|
|
1714
|
+
cursor
|
|
1715
|
+
} : { type: "subNotifications" });
|
|
1716
|
+
};
|
|
1717
|
+
/**
|
|
1718
|
+
* 宿主用户级通知订阅(引用计数;返回释放函数)。
|
|
1719
|
+
* 未登录时不发送(服务端要求已认证 peer);登录后由 token watcher 补发。
|
|
1720
|
+
*/
|
|
1721
|
+
const hostNotifications = () => {
|
|
1722
|
+
const notifications = useNotificationsStore();
|
|
1723
|
+
hookGlobal.__workshopWsNotifHosts = (hookGlobal.__workshopWsNotifHosts ?? 0) + 1;
|
|
1724
|
+
if (!hookGlobal.__workshopWsNotifSubscribed && userStore.token) {
|
|
1725
|
+
hookGlobal.__workshopWsNotifSubscribed = true;
|
|
1726
|
+
sendNotificationsSub();
|
|
1727
|
+
notifications.loadSnapshot();
|
|
1728
|
+
}
|
|
1729
|
+
let done = false;
|
|
1730
|
+
return () => {
|
|
1731
|
+
if (done) return;
|
|
1732
|
+
done = true;
|
|
1733
|
+
const left = (hookGlobal.__workshopWsNotifHosts ?? 1) - 1;
|
|
1734
|
+
hookGlobal.__workshopWsNotifHosts = left > 0 ? left : 0;
|
|
1735
|
+
if (left <= 0) {
|
|
1736
|
+
hookGlobal.__workshopWsNotifSubscribed = false;
|
|
1737
|
+
if (userStore.token) sendFrame({ type: "unsubNotifications" });
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
};
|
|
1741
|
+
watch(() => userStore.token, (t) => {
|
|
1742
|
+
const notifications = useNotificationsStore();
|
|
1743
|
+
if (session instanceof WorkshopWsSession) session.userToken = t;
|
|
1744
|
+
if (t) {
|
|
1745
|
+
if ((hookGlobal.__workshopWsNotifHosts ?? 0) > 0) {
|
|
1746
|
+
hookGlobal.__workshopWsNotifSubscribed = true;
|
|
1747
|
+
sendNotificationsSub();
|
|
1748
|
+
}
|
|
1749
|
+
notifications.loadSnapshot();
|
|
1750
|
+
} else {
|
|
1751
|
+
if (hookGlobal.__workshopWsNotifSubscribed) {
|
|
1752
|
+
hookGlobal.__workshopWsNotifSubscribed = false;
|
|
1753
|
+
sendFrame({ type: "unsubNotifications" });
|
|
1754
|
+
}
|
|
1755
|
+
notifications.clear();
|
|
1756
|
+
}
|
|
1757
|
+
}, { immediate: true });
|
|
1758
|
+
const subscribe = (channelId) => {
|
|
1759
|
+
const lastSeq = useEventsStore().lastSeq(channelId);
|
|
1760
|
+
session?.subscribe(channelId, lastSeq > 0 ? lastSeq : void 0);
|
|
1761
|
+
};
|
|
1762
|
+
const unsubscribe = (channelId) => {
|
|
1763
|
+
if (!session) return;
|
|
1764
|
+
session.unsubscribe(channelId);
|
|
1765
|
+
if (session.refCount(channelId) === 0) useEventsStore().clear(channelId);
|
|
1766
|
+
};
|
|
1767
|
+
/** 建连但不订阅 channel:纯场景事件消费方(daq 实时帧)用。
|
|
1768
|
+
* 服务端在连接层注册 scene peer,连上即收 daq.reading 等无频道广播。 */
|
|
1769
|
+
const ensureConnected = () => {
|
|
1770
|
+
session?.ensureConnected();
|
|
1771
|
+
};
|
|
1772
|
+
return {
|
|
1773
|
+
subscribe,
|
|
1774
|
+
unsubscribe,
|
|
1775
|
+
ensureConnected,
|
|
1776
|
+
hostNotifications,
|
|
1777
|
+
conn
|
|
1778
|
+
};
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
export { BlockClusterer as B, useWorkshopWs as a, agentHueColor as b, useEventsStore as c, useChatStore as d, useNotificationsStore as e, chatErrorCode as f, chatErrorMessage as g, useWsConnectionStore as h, blockTier as i, buildStreamText as j, isStreaming as k, useHitlStore as l, streamCursorVisible as s, useEntitiesStore as u };
|
|
1782
|
+
//# sourceMappingURL=useWorkshopWs-B-Es2Xg3.mjs.map
|