agentworkshop 0.7.6 → 0.7.8
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 +1 -1
- package/.output/.AgentWorkShop/prompts/host-tools.json +1 -1
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{rzGB_ojX.js → 3612gD2V.js} +2 -2
- package/.output/public/_nuxt/8eIQAVlb.js +1 -0
- package/.output/public/_nuxt/Ah9qOv1m.js +1 -0
- package/.output/public/_nuxt/{DdPeifHR.js → B4Fia4FB.js} +1 -1
- package/.output/public/_nuxt/B7aqqzkY.js +1 -0
- package/.output/public/_nuxt/BJ-fxrSw.js +1 -0
- package/.output/public/_nuxt/{DPDqAD1e.js → BSXx2vqR.js} +1 -1
- package/.output/public/_nuxt/{CdSgfcYR.js → BVZjSVs2.js} +1 -1
- package/.output/public/_nuxt/{DP6bdyIp.js → BVzDoF8t.js} +1 -1
- package/.output/public/_nuxt/BYL0Rjqj.js +7 -0
- package/.output/public/_nuxt/{CXmkVXS5.js → BjVLsC3M.js} +1 -1
- package/.output/public/_nuxt/{7ZABjMRh2.js → BkfchkK62.js} +1 -1
- package/.output/public/_nuxt/BnVoQ74r.js +1 -0
- package/.output/public/_nuxt/Bnp4vIAf.js +1 -0
- package/.output/public/_nuxt/BsMpJf7S.js +70 -0
- package/.output/public/_nuxt/{Z8k0uMSI.js → Bt_HDizI.js} +1 -1
- package/.output/public/_nuxt/Bu-P92Pe.js +18 -0
- package/.output/public/_nuxt/ButLXkjo.js +2 -0
- package/.output/public/_nuxt/{D8DDDzV62.js → C2iWjzEC2.js} +1 -1
- package/.output/public/_nuxt/{HWXLx5Hz.js → C8dxXc6K.js} +5 -5
- package/.output/public/_nuxt/CGdPdJPP.js +1 -0
- package/.output/public/_nuxt/{CN7Zh8GQ.js → CRGlf1Gb.js} +1 -1
- package/.output/public/_nuxt/{DSBfvCi5.js → CblLEiCZ.js} +7 -7
- package/.output/public/_nuxt/Cd15nPnG2.js +1 -0
- package/.output/public/_nuxt/{OwJ1LJkF.js → CsCpu2Zh.js} +1 -1
- package/.output/public/_nuxt/CvbHIGQY2.js +1 -0
- package/.output/public/_nuxt/Cyk3du4K2.js +1 -0
- package/.output/public/_nuxt/{DVQAz9WI.js → D4qXvjuV.js} +2 -2
- package/.output/public/_nuxt/{CfIXY-ET.js → DCEyMaN-.js} +1 -1
- package/.output/public/_nuxt/{BFYNhG9S.js → DCXIGxzT.js} +1 -1
- package/.output/public/_nuxt/{B9aPoQvt.js → DM8DS9MA.js} +1 -1
- package/.output/public/_nuxt/{ChnfyQHz.js → DNzaswei.js} +1 -1
- package/.output/public/_nuxt/{CrFGZYVB2.js → DYZBdSSg2.js} +1 -1
- package/.output/public/_nuxt/{dObsRdSQ.js → DZk24ego.js} +1 -1
- package/.output/public/_nuxt/{CyygA0q4.js → Dc46i75T.js} +4 -4
- package/.output/public/_nuxt/DeYsUzhr.js +1 -0
- package/.output/public/_nuxt/Dk6pq9JB2.js +1 -0
- package/.output/public/_nuxt/{ByGNWgAr.js → Do88WZG2.js} +3 -3
- package/.output/public/_nuxt/{R_WxTozV2.js → Du-eSpo2.js} +1 -1
- package/.output/public/_nuxt/OmpTerminalPanel.B_Pl5Ynm.css +1 -0
- package/.output/public/_nuxt/R_Wv_Nd9.js +1 -0
- package/.output/public/_nuxt/{Bsc69G4x.js → VnIWJ0ts.js} +3 -3
- package/.output/public/_nuxt/_id_.BzKMZnLe.css +1 -0
- package/.output/public/_nuxt/_id_.CbpDAWRh.css +1 -0
- package/.output/public/_nuxt/{_wsId_.DET_GinP.css → _wsId_.COUzMXpP.css} +1 -1
- package/.output/public/_nuxt/agents.BlejnOOC.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/e5bb1803-86d9-43b3-85be-dc787dc9a978.json +1 -0
- package/.output/public/_nuxt/daq.zZ8GR433.css +1 -0
- package/.output/public/_nuxt/{default.D17kXlD6.css → default.V3_hUJq1.css} +1 -1
- package/.output/public/_nuxt/{entry.DvlXlPwx.css → entry.5qf6EqfN.css} +1 -1
- package/.output/public/_nuxt/{B4GHHF6d2.js → fQUs58kX2.js} +1 -1
- package/.output/public/_nuxt/p7wSGMtc.js +1 -0
- package/.output/public/_nuxt/tRBT-plo.js +1 -0
- package/.output/public/_nuxt/workshop.3kAcLB_M.css +1 -0
- package/.output/server/chunks/_/SearchOutlined.mjs +4 -4
- package/.output/server/chunks/_/SearchOutlined.mjs.map +1 -1
- package/.output/server/chunks/_/character-asset.repo.mjs +3 -6
- package/.output/server/chunks/_/character-asset.repo.mjs.map +1 -1
- package/.output/server/chunks/_/host-bindings.mjs +1 -1
- package/.output/server/chunks/_/nitro.mjs +12807 -9814
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/_/scene-layout.repo.mjs +4 -10
- package/.output/server/chunks/_/scene-layout.repo.mjs.map +1 -1
- package/.output/server/chunks/build/{Col-D7fjGDF6.mjs → Col-biaNnEPf.mjs} +2 -2
- package/.output/server/chunks/build/{Col-D7fjGDF6.mjs.map → Col-biaNnEPf.mjs.map} +1 -1
- package/.output/server/chunks/build/{OmpTerminalPanel-B_SYhmgb.mjs → OmpTerminalPanel-COphA1br.mjs} +20 -19
- package/.output/server/chunks/build/OmpTerminalPanel-COphA1br.mjs.map +1 -0
- package/.output/server/chunks/build/{TownView-Bl8Gkcxi.mjs → TownView-B5KifIaT.mjs} +5 -5
- package/.output/server/chunks/build/{TownView-Bl8Gkcxi.mjs.map → TownView-B5KifIaT.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-GnRJPykX.mjs → _id_-C-ewLgfl.mjs} +120 -120
- package/.output/server/chunks/build/{_id_-GnRJPykX.mjs.map → _id_-C-ewLgfl.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-CWLFGZjV.mjs → _id_-Ct4Jhvl1.mjs} +43 -39
- package/.output/server/chunks/build/_id_-Ct4Jhvl1.mjs.map +1 -0
- package/.output/server/chunks/build/{_wsId_-BhQMjyHG.mjs → _wsId_-CanI_6Su.mjs} +591 -53
- package/.output/server/chunks/build/{_wsId_-BhQMjyHG.mjs.map → _wsId_-CanI_6Su.mjs.map} +1 -1
- package/.output/server/chunks/build/{agents-D4l1icvn.mjs → agents-DSOptxXA.mjs} +146 -91
- package/.output/server/chunks/build/agents-DSOptxXA.mjs.map +1 -0
- package/.output/server/chunks/build/{alert-gH-s7yIh.mjs → alert-qJnjyRcP.mjs} +3 -3
- package/.output/server/chunks/build/{alert-gH-s7yIh.mjs.map → alert-qJnjyRcP.mjs.map} +1 -1
- package/.output/server/chunks/build/{button-BhbX5ACI.mjs → button-DEcZFcqN.mjs} +3 -3
- package/.output/server/chunks/build/{button-BhbX5ACI.mjs.map → button-DEcZFcqN.mjs.map} +1 -1
- package/.output/server/chunks/build/{card-l4BbX67w.mjs → card-Dipvaykh.mjs} +5 -5
- package/.output/server/chunks/build/{card-l4BbX67w.mjs.map → card-Dipvaykh.mjs.map} +1 -1
- package/.output/server/chunks/build/{channel-templates-DqjtC-R0.mjs → channel-templates-BK0KuPOd.mjs} +13 -12
- package/.output/server/chunks/build/channel-templates-BK0KuPOd.mjs.map +1 -0
- package/.output/server/chunks/build/{checkbox-BF11p3dH.mjs → checkbox-dzcpU_Cd.mjs} +4 -4
- package/.output/server/chunks/build/{checkbox-BF11p3dH.mjs.map → checkbox-dzcpU_Cd.mjs.map} +1 -1
- package/.output/server/chunks/build/{daq-BOgpn9sl.mjs → daq-D9RA_uze.mjs} +103 -103
- package/.output/server/chunks/build/{daq-BOgpn9sl.mjs.map → daq-D9RA_uze.mjs.map} +1 -1
- package/.output/server/chunks/build/dcw-BTM5YU-B.mjs +2 -2
- package/.output/server/chunks/build/{default-CKJWhkot.mjs → default-BfWGTlbj.mjs} +81 -23
- package/.output/server/chunks/build/{default-CKJWhkot.mjs.map → default-BfWGTlbj.mjs.map} +1 -1
- package/.output/server/chunks/build/{drawer-CVValqoh.mjs → drawer-Cmh90erI.mjs} +3 -3
- package/.output/server/chunks/build/{drawer-CVValqoh.mjs.map → drawer-Cmh90erI.mjs.map} +1 -1
- package/.output/server/chunks/build/{dropdown-ByCsEWlQ.mjs → dropdown-CGQ0KAzA.mjs} +2 -2
- package/.output/server/chunks/build/{dropdown-ByCsEWlQ.mjs.map → dropdown-CGQ0KAzA.mjs.map} +1 -1
- package/.output/server/chunks/build/{dropdown-Dex8PXu6.mjs → dropdown-vhn1NPFs.mjs} +4 -4
- package/.output/server/chunks/build/{dropdown-Dex8PXu6.mjs.map → dropdown-vhn1NPFs.mjs.map} +1 -1
- package/.output/server/chunks/build/{input-number-BBlRoAJ7.mjs → input-number-Bd55elNN.mjs} +5 -5
- package/.output/server/chunks/build/{input-number-BBlRoAJ7.mjs.map → input-number-Bd55elNN.mjs.map} +1 -1
- package/.output/server/chunks/build/{input--KMeLYqZ.mjs → input-sf_BT6o6.mjs} +3 -3
- package/.output/server/chunks/build/{input--KMeLYqZ.mjs.map → input-sf_BT6o6.mjs.map} +1 -1
- package/.output/server/chunks/build/logs-Dyk0I2I9.mjs +1 -1
- package/.output/server/chunks/build/{menu-xN-SXb9Q.mjs → menu-WCrlpYVh.mjs} +3 -3
- package/.output/server/chunks/build/{menu-xN-SXb9Q.mjs.map → menu-WCrlpYVh.mjs.map} +1 -1
- package/.output/server/chunks/build/{modal-DrCOcjrl.mjs → modal-yvUquPj5.mjs} +4 -4
- package/.output/server/chunks/build/{modal-DrCOcjrl.mjs.map → modal-yvUquPj5.mjs.map} +1 -1
- package/.output/server/chunks/build/{monitor-KW8WLOJd.mjs → monitor-MIOvsyLa.mjs} +21 -21
- package/.output/server/chunks/build/{monitor-KW8WLOJd.mjs.map → monitor-MIOvsyLa.mjs.map} +1 -1
- package/.output/server/chunks/build/pages-DR2bzczM.mjs +1 -1
- package/.output/server/chunks/build/{plugins-B-ZNey0Z.mjs → plugins-DnOBIWGg.mjs} +7 -7
- package/.output/server/chunks/build/{plugins-B-ZNey0Z.mjs.map → plugins-DnOBIWGg.mjs.map} +1 -1
- package/.output/server/chunks/build/{popconfirm-C5H1Qoh3.mjs → popconfirm-CRaHcz5O.mjs} +4 -4
- package/.output/server/chunks/build/{popconfirm-C5H1Qoh3.mjs.map → popconfirm-CRaHcz5O.mjs.map} +1 -1
- package/.output/server/chunks/build/{useWorkshopApi-Bh5VUHWu.mjs → segmented-DPe9ZzLO.mjs} +7 -78
- package/.output/server/chunks/build/segmented-DPe9ZzLO.mjs.map +1 -0
- package/.output/server/chunks/build/{select-D7H2ysgT.mjs → select-D-CeE5vY.mjs} +3 -3
- package/.output/server/chunks/build/{select-D7H2ysgT.mjs.map → select-D-CeE5vY.mjs.map} +1 -1
- package/.output/server/chunks/build/{settings-Cr06lbRy.mjs → settings-DA8IkGLo.mjs} +11 -11
- package/.output/server/chunks/build/{settings-Cr06lbRy.mjs.map → settings-DA8IkGLo.mjs.map} +1 -1
- package/.output/server/chunks/build/{space-DCwIlnkI.mjs → space-CCBYAkXt.mjs} +2 -2
- package/.output/server/chunks/build/{space-DCwIlnkI.mjs.map → space-CCBYAkXt.mjs.map} +1 -1
- package/.output/server/chunks/build/{switch-VC0m9ede.mjs → switch-CelRXpcy.mjs} +3 -3
- package/.output/server/chunks/build/{switch-VC0m9ede.mjs.map → switch-CelRXpcy.mjs.map} +1 -1
- package/.output/server/chunks/build/{table-BksLg3Q_.mjs → table-Cswq-l2r.mjs} +10 -10
- package/.output/server/chunks/build/{table-BksLg3Q_.mjs.map → table-Cswq-l2r.mjs.map} +1 -1
- package/.output/server/chunks/build/{tabs-CzUfD3iX.mjs → tabs-BM3tAh_J.mjs} +5 -5
- package/.output/server/chunks/build/{tabs-CzUfD3iX.mjs.map → tabs-BM3tAh_J.mjs.map} +1 -1
- package/.output/server/chunks/build/{tag-oQI3VtqM.mjs → tag-NO9jEqKy.mjs} +4 -4
- package/.output/server/chunks/build/{tag-oQI3VtqM.mjs.map → tag-NO9jEqKy.mjs.map} +1 -1
- package/.output/server/chunks/build/{teams-QR3BBF7A.mjs → teams-BhSKBBBM.mjs} +15 -14
- package/.output/server/chunks/build/teams-BhSKBBBM.mjs.map +1 -0
- package/.output/server/chunks/build/{tokens-DFvr_TLj.mjs → tokens-D_eyxmcv.mjs} +16 -16
- package/.output/server/chunks/build/{tokens-DFvr_TLj.mjs.map → tokens-D_eyxmcv.mjs.map} +1 -1
- package/.output/server/chunks/build/town-BUqRobze.mjs +1 -1
- package/.output/server/chunks/build/{town-_4tEEEVW.mjs → town-DPtOPRRO.mjs} +4 -4
- package/.output/server/chunks/build/{town-_4tEEEVW.mjs.map → town-DPtOPRRO.mjs.map} +1 -1
- package/.output/server/chunks/build/useDaqStream-hwkhJHFU.mjs +1 -1
- package/.output/server/chunks/build/useDcwStream-Bdew_yrr.mjs +1 -1
- package/.output/server/chunks/build/useLocalTime-9a4B-aHv.mjs +42 -0
- package/.output/server/chunks/build/useLocalTime-9a4B-aHv.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkshopApi-D2gq06N2.mjs +81 -0
- package/.output/server/chunks/build/useWorkshopApi-D2gq06N2.mjs.map +1 -0
- package/.output/server/chunks/build/useWorkshopWs-B3j5wIAK.mjs +1 -1
- package/.output/server/chunks/build/user-Dk-ytEUV.mjs +1 -1
- package/.output/server/chunks/build/{users-4FZ0yFUO.mjs → users-CmVvb1oq.mjs} +16 -16
- package/.output/server/chunks/build/{users-4FZ0yFUO.mjs.map → users-CmVvb1oq.mjs.map} +1 -1
- package/.output/server/chunks/build/{workshop-k0XZTFKg.mjs → workshop-D5CQj2A8.mjs} +53 -47
- package/.output/server/chunks/build/workshop-D5CQj2A8.mjs.map +1 -0
- package/.output/server/chunks/build/workspaces-IfORCDJE.mjs +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/mcp/workshop.mjs +1 -1
- package/.output/server/chunks/routes/api/metrics.mjs +1 -1
- package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs +1 -1
- package/.output/server/chunks/routes/api/plugins/client/_name_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/plugins/manifest.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/config.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/index.get.mjs +3 -3
- package/.output/server/chunks/routes/api/system/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/index.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/system/monitor/terminal/ws.mjs +1 -1
- package/.output/server/chunks/routes/api/system/monitor/terminate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/system/monitor.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/settings/events.get.mjs +1 -1
- package/.output/server/chunks/routes/api/system/settings/reset.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/_id_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/users/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/login.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/logout.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/me.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/register.post.mjs +1 -1
- package/.output/server/chunks/routes/api/users/setup-status.get.mjs +25 -0
- package/.output/server/chunks/routes/api/users/setup-status.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/users/tokens/_id/token.get.mjs +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/_...path_.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/send.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/approvals/_id/decide.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs +6 -14
- package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs +39 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/agents/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/subscribe.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/approvals/_id/decide.post.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/assets/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/audit.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/caller.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +3 -3
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/from-channel.post.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/_memoryId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/search.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/model.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/position.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/range.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/stop.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/events.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/queue.get.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +9 -2
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs +3 -3
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.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 +7 -4
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs.map +1 -1
- 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/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/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/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/rollback-good.post.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/_id_.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 +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +1 -1
- 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 +247 -0
- package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +27 -0
- package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +20 -8
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index10.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.get.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/index7.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index7.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index9.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/mailbox/all.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/mailbox.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/memories/maintenance.post.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/runtime.get.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/complete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/dispatch.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/report.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/retry.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks.get.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/members/_agentId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/users/me.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/users/register.post.mjs +1 -1
- 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 +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/virtual/entry.mjs +132 -114
- package/.output/server/chunks/virtual/entry.mjs.map +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README-zh.md +27 -7
- package/README.md +455 -435
- package/app/components/AppHeader.vue +56 -2
- package/app/components/workshop/ChannelSessionList.vue +703 -593
- package/app/components/workshop/terminal/OmpTerminalPanel.vue +2 -1
- package/app/composables/workshop/useLocalTime.ts +16 -0
- package/app/composables/workshop/useSceneLayouts.ts +2 -1
- package/app/composables/workshop/useWorkshopApi.ts +249 -224
- package/app/pages/daq/[id].vue +7 -6
- package/app/pages/daq/index.vue +2 -2
- package/app/pages/dcw/[id].vue +3 -3
- package/app/pages/workshop/agents.vue +432 -382
- package/app/pages/workshop/index.vue +25 -6
- package/bin/aw.mjs +0 -0
- package/cli/aw.mjs +8 -1
- package/cli/commands/stop.mjs +7 -4
- package/cli/commands/tui.mjs +10 -1
- package/cli/core/registry.mjs +5 -3
- package/config.yml +144 -134
- package/docs/tui.md +1 -1
- package/i18n/dicts/settings.json +4 -0
- package/i18n/locales/en.ts +9 -0
- package/i18n/locales/zh-CN.ts +9 -0
- package/package.json +148 -140
- package/scripts/_dbg-catalog-smoke.ts +20 -0
- package/scripts/_dbg-codex-handshake.ts +30 -0
- package/scripts/_dbg-codex-probe.mjs +58 -0
- package/scripts/_dbg-codex-sandbox.ts +58 -0
- package/scripts/_dbg-codex-turn.ts +65 -0
- package/scripts/_dbg-dsh-probe.mjs +31 -0
- package/scripts/_dbg-interval-config.mjs +145 -0
- package/scripts/_dbg-interval-scenario.mjs +126 -0
- package/scripts/_dbg-line-spawn.ts +31 -0
- package/scripts/_dbg-live-engine-probe.mjs +80 -0
- package/scripts/_dbg-mcp-bridge-probe.mjs +147 -0
- package/scripts/_dbg-opencode-sse.mjs +101 -0
- package/scripts/_dbg-opencode-start.ts +57 -0
- package/scripts/_dbg-plugin-matrix.mjs +212 -0
- package/scripts/_dbg-protocol-matrix.mjs +425 -0
- package/scripts/_dbg-real-scenario-timeline.log +123 -0
- package/scripts/_dbg-registry-smoke.ts +14 -0
- package/scripts/_dbg-setup-e2e.mjs +88 -0
- package/scripts/_dbg-sim-keeper.mjs +100 -0
- package/scripts/_dbg-team-drill.mjs +173 -0
- package/scripts/dev-guard.mjs +11 -3
- package/scripts/dev-protocol-simulators.mjs +28 -1
- package/scripts/e2e-harness-provider-task.mjs +126 -0
- package/scripts/e2e-multi-harness.ts +374 -0
- package/scripts/e2e-multiharness-team.mjs +319 -0
- package/scripts/e2e-plc-scenario.mjs +292 -0
- package/scripts/e2e-real-scenario.mjs +452 -0
- package/scripts/migrate-local-time.mjs +123 -0
- package/scripts/start.mjs +30 -2
- package/server/api/system/settings/index.get.ts +3 -3
- package/server/api/users/setup-status.get.ts +8 -0
- package/server/api/workshop/agent-tools/invoke.post.ts +27 -41
- package/server/api/workshop/agent-tools/list.get.ts +25 -0
- package/server/api/workshop/channels/[id]/index.patch.ts +38 -30
- package/server/api/workshop/daq/[id]/samples.get.ts +8 -3
- package/server/api/workshop/harnesses/[id]/providers.get.ts +16 -0
- package/server/api/workshop/harnesses.get.ts +12 -0
- package/server/api/workshop/hitl/respond.post.ts +87 -67
- package/server/api/workshop/ws.ts +13 -0
- package/server/data/daqs.json +1421 -19
- package/server/data/dcw-lines.json +273 -0
- package/server/data/dcw-products.json +224 -0
- package/server/data/dcw-recipes.json +868 -0
- package/server/data/dcw-rollback.json +1177 -1
- package/server/data/dcw-runs.json +3032 -2834
- package/server/data/dcw-writes.json +1116 -0
- package/server/data/dcws.json +3447 -297
- package/server/data/line-runs.json +52 -2
- package/server/harness/aw-mcp-bridge.mjs +153 -0
- package/server/plugins/00-local-time.ts +10 -0
- package/server/plugins/aw-plugins.ts +3 -0
- package/server/plugins/backup.ts +116 -97
- package/server/plugins/dev-stability-guard.ts +24 -15
- package/server/plugins/retention.ts +1 -0
- package/server/plugins/security.ts +46 -29
- package/server/plugins/workshop.ts +156 -153
- package/server/repositories/user.repository.ts +15 -22
- package/server/services/system-config.ts +32 -6
- package/server/services/user.service.ts +8 -3
- package/server/services/workshop/.mimosa/hook-state/sess_fed429fb-c8b7-4a50-bbd6-45afc580893f.json +1 -0
- package/server/services/workshop/.mimosa/hook-status/sess_fed429fb-c8b7-4a50-bbd6-45afc580893f-e6b75bbfe6.json +14 -0
- package/server/services/workshop/agents/adapters/line-spawn.ts +111 -0
- package/server/services/workshop/agents/adapters/stdio-jsonrpc.ts +316 -0
- package/server/services/workshop/agents/agent-interface.ts +17 -0
- package/server/services/workshop/agents/codex-agent.ts +822 -0
- package/server/services/workshop/agents/dsh-agent.ts +670 -0
- package/server/services/workshop/agents/factory.ts +4 -16
- package/server/services/workshop/agents/harness-env.ts +54 -0
- package/server/services/workshop/agents/harness-models.ts +270 -0
- package/server/services/workshop/agents/host-tool-bridge.ts +612 -0
- package/server/services/workshop/agents/industrial-tools.ts +7 -1
- package/server/services/workshop/agents/node-bindings.repo.ts +4 -5
- package/server/services/workshop/agents/omp-agent.ts +1178 -1957
- package/server/services/workshop/agents/opencode-agent.ts +987 -0
- package/server/services/workshop/agents/prompt-builder.ts +393 -0
- package/server/services/workshop/agents/registry.ts +125 -0
- package/server/services/workshop/assets/character-asset.repo.ts +3 -5
- package/server/services/workshop/assets/device-twin.repo.ts +3 -5
- package/server/services/workshop/daq/daq-controller.ts +38 -6
- package/server/services/workshop/daq/daq-node.repo.ts +3 -5
- package/server/services/workshop/daq/daq-node.ts +3 -3
- package/server/services/workshop/daq/daq-runtime.ts +4 -3
- package/server/services/workshop/daq/daq-templates.ts +3 -5
- package/server/services/workshop/daq/drivers.ts +41 -12
- package/server/services/workshop/daq/storage/sqlite.adapter.ts +313 -309
- package/server/services/workshop/db/backup-registry.ts +33 -0
- package/server/services/workshop/db/channel.repo.ts +104 -101
- package/server/services/workshop/db/database.ts +956 -949
- package/server/services/workshop/dcw/dcw-controller.ts +5 -1
- package/server/services/workshop/dcw/dcw-line.repo.ts +4 -11
- package/server/services/workshop/dcw/dcw-node.repo.ts +3 -5
- package/server/services/workshop/dcw/dcw-node.ts +13 -1
- package/server/services/workshop/dcw/dcw-product.repo.ts +3 -4
- package/server/services/workshop/dcw/dcw-recipe.repo.ts +3 -19
- package/server/services/workshop/dcw/dcw-templates.ts +3 -5
- package/server/services/workshop/dcw/drivers.ts +37 -13
- package/server/services/workshop/dcw/line-run.ts +3 -5
- package/server/services/workshop/dcw/recipe-rollback.repo.ts +4 -10
- package/server/services/workshop/json-store.mjs +72 -0
- package/server/services/workshop/plugins/host.mjs +2 -1
- package/server/services/workshop/runtime/agent-runtime.ts +44 -0
- package/server/services/workshop/runtime/manager.ts +2953 -2868
- package/server/services/workshop/scene/scene-layout.repo.ts +4 -11
- package/server/services/workshop/settings.ts +30 -0
- package/shared/config/schema.json +9 -0
- package/shared/config/single-instance.mjs +5 -1
- package/shared/local-time.mjs +36 -0
- package/shared/workshop-protocol.ts +11 -5
- package/tui/aw-tui.mjs +28 -10
- package/tui/components/hitl-card.mjs +47 -36
- package/tui/lib/ws.mjs +2 -1
- package/.output/public/_nuxt/9X0fVBD7.js +0 -57
- package/.output/public/_nuxt/B6M2WJWm2.js +0 -1
- package/.output/public/_nuxt/B9Yie5HN.js +0 -2
- package/.output/public/_nuxt/BF9XPEuw.js +0 -1
- package/.output/public/_nuxt/BbQornXa.js +0 -1
- package/.output/public/_nuxt/Bxgaym6j.js +0 -1
- package/.output/public/_nuxt/Bxh5nf8j.js +0 -1
- package/.output/public/_nuxt/CXLI50Sq.js +0 -1
- package/.output/public/_nuxt/CdfAP_IH2.js +0 -1
- package/.output/public/_nuxt/Ce1zyNYu.js +0 -1
- package/.output/public/_nuxt/D-Ne4C9a.js +0 -1
- package/.output/public/_nuxt/DEHNjlTq2.js +0 -1
- package/.output/public/_nuxt/DFnGFEav.js +0 -18
- package/.output/public/_nuxt/DYWgGHNo.js +0 -7
- package/.output/public/_nuxt/OmpTerminalPanel.Bc9GjNU5.css +0 -1
- package/.output/public/_nuxt/W1E3-5ML.js +0 -14
- package/.output/public/_nuxt/XVB9_zwP.js +0 -1
- package/.output/public/_nuxt/Xaf_HIR3.js +0 -1
- package/.output/public/_nuxt/_id_.BeqSLvl_.css +0 -1
- package/.output/public/_nuxt/_id_.DN3U6EF9.css +0 -1
- package/.output/public/_nuxt/agents.BJwgTLFZ.css +0 -1
- package/.output/public/_nuxt/builds/meta/55c10854-ee0e-4be4-924b-a1b0e100fe11.json +0 -1
- package/.output/public/_nuxt/daq.BXsnevQv.css +0 -1
- package/.output/public/_nuxt/workshop.B98sHiJq.css +0 -1
- package/.output/public/_nuxt/yIKY_V1P.js +0 -1
- package/.output/server/chunks/build/OmpTerminalPanel-B_SYhmgb.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-CWLFGZjV.mjs.map +0 -1
- package/.output/server/chunks/build/agents-D4l1icvn.mjs.map +0 -1
- package/.output/server/chunks/build/channel-templates-DqjtC-R0.mjs.map +0 -1
- package/.output/server/chunks/build/interval-WlxgjTzO.mjs +0 -9
- package/.output/server/chunks/build/interval-WlxgjTzO.mjs.map +0 -1
- package/.output/server/chunks/build/teams-QR3BBF7A.mjs.map +0 -1
- package/.output/server/chunks/build/useWorkshopApi-Bh5VUHWu.mjs.map +0 -1
- package/.output/server/chunks/build/workshop-k0XZTFKg.mjs.map +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// 首启自注册(setup-flow)E2E 验证:_dbg-setup-e2e.mjs <baseURL>
|
|
3
|
+
// 断言链:setup-status=true → 登录门呈现"创建管理员账号"(仅注册页签) →
|
|
4
|
+
// 浏览器真实填表注册 → 进入 workspace → setup-status=false → 登录/me 均 admin。
|
|
5
|
+
// 用法:node scripts/_dbg-setup-e2e.mjs http://127.0.0.1:3002
|
|
6
|
+
// ============================================================
|
|
7
|
+
import puppeteer from 'puppeteer-core'
|
|
8
|
+
import { mkdirSync } from 'node:fs'
|
|
9
|
+
|
|
10
|
+
const BASE = process.argv[2] ?? 'http://127.0.0.1:3002'
|
|
11
|
+
const CREDS = { name: 'admin', email: 'admin@awshop.local', password: 'Awshop2026' }
|
|
12
|
+
const SHOT_DIR = '.e2e-shots'
|
|
13
|
+
mkdirSync(SHOT_DIR, { recursive: true })
|
|
14
|
+
|
|
15
|
+
const results = []
|
|
16
|
+
const check = (name, ok, detail = '') => {
|
|
17
|
+
results.push({ name, ok, detail })
|
|
18
|
+
console.log(`${ok ? '✔' : '✖'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const api = async (path, opts = {}) => {
|
|
22
|
+
const res = await fetch(`${BASE}${path}`, { ...opts, headers: { 'content-type': 'application/json', ...opts.headers } })
|
|
23
|
+
return { status: res.status, body: await res.json().catch(() => null) }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// ---- 1. API:初始状态应 needsSetup=true ----
|
|
27
|
+
const s0 = await api('/api/users/setup-status')
|
|
28
|
+
check('setup-status 初始 needsSetup=true', s0.status === 200 && s0.body?.data?.needsSetup === true, JSON.stringify(s0.body?.data))
|
|
29
|
+
|
|
30
|
+
// ---- 2. 浏览器:登录门 setup 模式 + 真实注册 ----
|
|
31
|
+
const browser = await puppeteer.launch({
|
|
32
|
+
executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
|
|
33
|
+
headless: 'new',
|
|
34
|
+
args: ['--no-sandbox', '--disable-gpu', '--no-proxy-server', '--window-size=1600,1000'],
|
|
35
|
+
})
|
|
36
|
+
try {
|
|
37
|
+
const page = await browser.newPage()
|
|
38
|
+
await page.setViewport({ width: 1600, height: 1000, deviceScaleFactor: 1.25 })
|
|
39
|
+
await page.goto(`${BASE}/workshop`, { waitUntil: 'networkidle2', timeout: 60000 })
|
|
40
|
+
|
|
41
|
+
await page.waitForFunction(() => document.body.innerText.includes('创建管理员账号'), { timeout: 30000 })
|
|
42
|
+
const gateText = await page.evaluate(() => document.body.innerText)
|
|
43
|
+
check('登录门呈现 setup 模式(创建管理员账号)', gateText.includes('创建管理员账号'))
|
|
44
|
+
check('setup 模式隐藏登录页签', !gateText.includes('账号登录') || gateText.indexOf('注册管理员') < gateText.indexOf('账号登录'))
|
|
45
|
+
check('setup 模式隐藏 Token 登录页签', !gateText.includes('Token 登录'))
|
|
46
|
+
check('提示首个注册账号成为管理员', gateText.includes('首个注册的账号将成为管理员'))
|
|
47
|
+
await page.screenshot({ path: `${SHOT_DIR}/setup-1-form.png` })
|
|
48
|
+
|
|
49
|
+
// 填表:auth-card 内 第1个input=用户名, type=email=邮箱, type=password=密码
|
|
50
|
+
await page.waitForSelector('.auth-card input')
|
|
51
|
+
const nameInput = (await page.$$('.auth-card input'))[0]
|
|
52
|
+
await nameInput.click({ clickCount: 3 })
|
|
53
|
+
await nameInput.type(CREDS.name)
|
|
54
|
+
const emailInput = await page.$('.auth-card input[type="email"]')
|
|
55
|
+
await emailInput.click({ clickCount: 3 })
|
|
56
|
+
await emailInput.type(CREDS.email)
|
|
57
|
+
const pwInput = await page.$('.auth-card input[type="password"]')
|
|
58
|
+
await pwInput.click({ clickCount: 3 })
|
|
59
|
+
await pwInput.type(CREDS.password)
|
|
60
|
+
await pwInput.keyboard.press('Enter')
|
|
61
|
+
|
|
62
|
+
// 注册成功 → store 置登录态 → 登录门消失,workspace 出现
|
|
63
|
+
await page.waitForFunction(() => document.body.innerText.includes('Workshop'), { timeout: 30000 })
|
|
64
|
+
await new Promise(r => setTimeout(r, 1500))
|
|
65
|
+
const afterText = await page.evaluate(() => document.body.innerText)
|
|
66
|
+
check('注册后放行进入项目(workspace 呈现)', afterText.includes('Workshop') && !afterText.includes('创建管理员账号'))
|
|
67
|
+
await page.screenshot({ path: `${SHOT_DIR}/setup-2-entered.png` })
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
await browser.close()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// ---- 3. API:注册后状态收敛 + 新管理员可登录 ----
|
|
74
|
+
const s1 = await api('/api/users/setup-status')
|
|
75
|
+
check('注册后 setup-status=false', s1.status === 200 && s1.body?.data?.needsSetup === false, JSON.stringify(s1.body?.data))
|
|
76
|
+
|
|
77
|
+
const login = await api('/api/users/login', { method: 'POST', body: JSON.stringify({ email: CREDS.email, password: CREDS.password }) })
|
|
78
|
+
check('新管理员密码登录成功', login.status === 200 && login.body?.data?.user?.role === 'admin', JSON.stringify(login.body?.data?.user))
|
|
79
|
+
const me = await api('/api/users/me', { headers: { authorization: `Bearer ${login.body?.data?.token}` } })
|
|
80
|
+
check('/api/users/me 返回 admin 身份', me.status === 200 && me.body?.data?.role === 'admin')
|
|
81
|
+
|
|
82
|
+
// ---- 4. 注册页签收敛后再注册第二账号应降为普通 user ----
|
|
83
|
+
const reg2 = await api('/api/users/register', { method: 'POST', body: JSON.stringify({ name: 'plainuser', email: 'plain@awshop.local', password: 'Plain2026' }) })
|
|
84
|
+
check('后续注册为普通 user 角色', reg2.status === 200 && reg2.body?.data?.user?.role === 'user', JSON.stringify(reg2.body?.data?.user))
|
|
85
|
+
|
|
86
|
+
const failed = results.filter(r => !r.ok)
|
|
87
|
+
console.log(`\n===== setup-flow E2E: ${results.length - failed.length}/${results.length} 通过 =====`)
|
|
88
|
+
process.exit(failed.length ? 1 : 0)
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模拟工况看护:每 5s 探测各模拟器端口,死亡则以 detached 方式重启。
|
|
3
|
+
* node scripts/_dbg-sim-keeper.mjs (常驻;Ctrl+C 退出,不影响已拉起的模拟器)
|
|
4
|
+
* node scripts/_dbg-sim-keeper.mjs --once (单轮自愈后退出;供 schtasks 每分钟调度)
|
|
5
|
+
* 附带 dev server(:3000)看护:死亡且锁 pid 不存活 → 清陈旧锁后重启。
|
|
6
|
+
*/
|
|
7
|
+
import net from 'node:net'
|
|
8
|
+
import { spawn, spawnSync } from 'node:child_process'
|
|
9
|
+
import { openSync, existsSync, readFileSync, unlinkSync } from 'node:fs'
|
|
10
|
+
import { dirname, resolve } from 'node:path'
|
|
11
|
+
import { fileURLToPath } from 'node:url'
|
|
12
|
+
|
|
13
|
+
/** Windows 可靠的 pid 存活探测(process.kill(pid,0) 在 Windows 对死 pid 常误报存活) */
|
|
14
|
+
function pidAlive(pid) {
|
|
15
|
+
if (!Number.isInteger(pid) || pid <= 0) return false
|
|
16
|
+
const out = spawnSync('tasklist', ['/FI', `PID eq ${pid}`, '/FO', 'CSV', '/NH'], { encoding: 'utf-8' })
|
|
17
|
+
const line = (out.stdout ?? '').trim()
|
|
18
|
+
return line.length > 0 && !/INFO:\s*no tasks/i.test(line)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const repo = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
|
22
|
+
const out = resolve(repo, '.AgentWorkShop', 'data')
|
|
23
|
+
const ONCE = process.argv.includes('--once')
|
|
24
|
+
|
|
25
|
+
const SIMS = [
|
|
26
|
+
{ name: 'mqtt-http', port: 18830, cmd: 'scripts/dev-protocol-simulators.mjs', env: { MQTT_SIM_PORT: '18830', HTTP_SIM_PORT: '1889' }, log: 'sim-mqtt-http.log' },
|
|
27
|
+
{ name: 'http-sim', port: 1889, cmd: null },
|
|
28
|
+
{ name: 'modbus-tcp', port: 1502, cmd: 'scripts/dev-modbus-simulator.mjs', env: {}, log: 'sim-modbus-tcp.log' },
|
|
29
|
+
{ name: 'opcua', port: 4840, cmd: 'scripts/dev-opcua-simulator.mjs', env: { OPCUA_SIM_PORT: '4840' }, log: 'sim-opcua.log' },
|
|
30
|
+
{ name: 'plc', port: 15040, cmd: 'scripts/dev-plc-simulator.mjs', env: {}, args: ['--port', '15040'], log: 'sim-plc.log' },
|
|
31
|
+
{ name: 'rtu', port: 15030, cmd: 'scripts/_rtu-mini-slave.mjs', env: {}, log: 'sim-rtu.log' },
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
function portUp(port) {
|
|
35
|
+
return new Promise((resolveDone) => {
|
|
36
|
+
const s = net.connect(port, '127.0.0.1')
|
|
37
|
+
const t = setTimeout(() => { s.destroy(); resolveDone(false) }, 1200)
|
|
38
|
+
s.on('connect', () => { clearTimeout(t); s.destroy(); resolveDone(true) })
|
|
39
|
+
s.on('error', () => { clearTimeout(t); resolveDone(false) })
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function launch(sim) {
|
|
44
|
+
if (!sim.cmd) return
|
|
45
|
+
const fd = openSync(resolve(out, sim.log), 'a')
|
|
46
|
+
const child = spawn(process.execPath, [resolve(repo, sim.cmd), ...(sim.args ?? [])], {
|
|
47
|
+
cwd: repo,
|
|
48
|
+
env: { ...process.env, NO_PROXY: '127.0.0.1,localhost', no_proxy: '127.0.0.1,localhost', ...sim.env },
|
|
49
|
+
detached: true,
|
|
50
|
+
stdio: ['ignore', fd, fd],
|
|
51
|
+
})
|
|
52
|
+
child.unref()
|
|
53
|
+
console.log(`[keeper ${new Date().toISOString()}] ${sim.name} down → respawn pid=${child.pid}`)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function tick() {
|
|
57
|
+
for (const sim of SIMS) {
|
|
58
|
+
const up = await portUp(sim.port)
|
|
59
|
+
if (!up) launch(sim)
|
|
60
|
+
}
|
|
61
|
+
// dev server 看护:down → 锁 pid 活着(启动中)等它;锁 pid 死/无锁 → 清锁重启
|
|
62
|
+
const devUp = await portUp(3000)
|
|
63
|
+
if (!devUp) {
|
|
64
|
+
const lockPath = resolve(repo, '.AgentWorkShop', '.runtime', 'aw.lock')
|
|
65
|
+
let lockPid = 0
|
|
66
|
+
try {
|
|
67
|
+
if (existsSync(lockPath)) {
|
|
68
|
+
const lock = JSON.parse(readFileSync(lockPath, 'utf-8'))
|
|
69
|
+
lockPid = Number(lock.pid ?? 0)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch { /* 无锁/坏锁 */ }
|
|
73
|
+
if (lockPid && pidAlive(lockPid)) {
|
|
74
|
+
// 僵尸 guard:占锁不服务(worker 被外部击杀后 guard 悬挂)→ 强杀进程树再重启
|
|
75
|
+
spawnSync('taskkill', ['/PID', String(lockPid), '/T', '/F'])
|
|
76
|
+
console.log(`[keeper ${new Date().toISOString()}] dev-server 僵尸 guard(pid=${lockPid})已强杀`)
|
|
77
|
+
}
|
|
78
|
+
try { unlinkSync(lockPath) } catch { /* 无锁 */ }
|
|
79
|
+
const fd = openSync(resolve(out, 'dev-server.log'), 'a')
|
|
80
|
+
const child = spawn(process.execPath, ['bin/aw.mjs', 'dev'], {
|
|
81
|
+
cwd: repo,
|
|
82
|
+
env: { ...process.env, NO_PROXY: '127.0.0.1,localhost', no_proxy: '127.0.0.1,localhost' },
|
|
83
|
+
detached: true,
|
|
84
|
+
stdio: ['ignore', fd, fd],
|
|
85
|
+
})
|
|
86
|
+
child.unref()
|
|
87
|
+
console.log(`[keeper ${new Date().toISOString()}] dev-server down(锁已清)→ respawn pid=${child.pid}`)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
92
|
+
console.log(`[keeper] watching(once=${ONCE}):`, SIMS.map(s => `${s.name}:${s.port}`).join(' '), '+ dev:3000')
|
|
93
|
+
if (ONCE) {
|
|
94
|
+
try { await tick() } catch (err) { console.error('[keeper] tick error:', err?.message ?? err) }
|
|
95
|
+
} else {
|
|
96
|
+
for (;;) {
|
|
97
|
+
try { await tick() } catch (err) { console.error('[keeper] tick error:', err?.message ?? err) }
|
|
98
|
+
await sleep(5000)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 四引擎班组精简演练(真实服务 + 模拟工况数据):
|
|
3
|
+
* lead=omp;worker-dsh=数采(daq_query);worker-codex=数控写入(dcw_control,HITL)+复读;
|
|
4
|
+
* worker-opencode=数控读(dcw_read)。单 goal 任务,审批到达即批准,最小 token 消耗。
|
|
5
|
+
* 运行:node scripts/_dbg-team-drill.mjs
|
|
6
|
+
*/
|
|
7
|
+
const BASE = process.env.AW_BASE ?? 'http://127.0.0.1:3000'
|
|
8
|
+
let failures = 0
|
|
9
|
+
const check = (name, ok, detail = '') => {
|
|
10
|
+
console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
11
|
+
if (ok) passed += 1
|
|
12
|
+
else failures += 1
|
|
13
|
+
}
|
|
14
|
+
let passed = 0
|
|
15
|
+
const sleep = (ms) => new Promise(r => setTimeout(r, ms))
|
|
16
|
+
const log = (l) => console.log(`[${new Date().toISOString().slice(11, 19)}] ${l}`)
|
|
17
|
+
|
|
18
|
+
const reg = await fetch(`${BASE}/api/workshop/users/register`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ name: 'drill-' + Math.random().toString(36).slice(2, 8) }) }).then(r => r.json())
|
|
19
|
+
const T = reg?.data?.token
|
|
20
|
+
if (!T) { console.error('注册失败(服务未启动?)'); process.exit(1) }
|
|
21
|
+
const sleep2 = (ms) => new Promise(r => setTimeout(r, ms))
|
|
22
|
+
const api = async (method, path, body, attempt = 0) => {
|
|
23
|
+
try {
|
|
24
|
+
const res = await fetch(`${BASE}${path}`, { method, headers: { 'content-type': 'application/json', authorization: `Bearer ${T}` }, body: body !== undefined ? JSON.stringify(body) : undefined })
|
|
25
|
+
return await res.json().catch(() => ({}))
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
if (attempt < 3) {
|
|
29
|
+
await sleep2(1500)
|
|
30
|
+
return await api(method, path, body, attempt + 1)
|
|
31
|
+
}
|
|
32
|
+
throw e
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ── WS 录制流(事件持久化由首个订阅触发)──
|
|
37
|
+
const { createRequire } = await import('node:module')
|
|
38
|
+
const { WebSocket } = createRequire(import.meta.url)('D:/codes/ABO/AgentWorkShop/node_modules/.pnpm/ws@8.21.3/node_modules/ws')
|
|
39
|
+
|
|
40
|
+
const seen = []
|
|
41
|
+
let lastSeq = 0
|
|
42
|
+
let ws = null
|
|
43
|
+
function startWs(channelId) {
|
|
44
|
+
ws = new WebSocket(BASE.replace(/^http/, 'ws') + '/api/workshop/ws')
|
|
45
|
+
ws.on('open', () => ws.send(JSON.stringify({ type: 'sub', channelId, token: T })))
|
|
46
|
+
ws.on('message', (raw) => {
|
|
47
|
+
try {
|
|
48
|
+
const f = JSON.parse(String(raw))
|
|
49
|
+
if (f.type === 'hitl.request') log(`[WS] HITL ${f.payload?.kind}: ${String(f.payload?.detail ?? f.payload?.title ?? '').slice(0, 90)}`)
|
|
50
|
+
if (f.type === 'hitl.resolved') log(`[WS] HITL resolved outcome=${f.payload?.outcome}`)
|
|
51
|
+
if (f.type === 'task.status') log(`[WS] task ${f.payload?.state} ${(f.payload?.title ?? '').slice(0, 40)}`)
|
|
52
|
+
}
|
|
53
|
+
catch { /* ignore */ }
|
|
54
|
+
})
|
|
55
|
+
ws.on('error', () => {})
|
|
56
|
+
}
|
|
57
|
+
async function pollEvents(channelId) {
|
|
58
|
+
const res = await api('GET', `/api/workshop/channels/${channelId}/events?limit=500`)
|
|
59
|
+
for (const f of (res?.data?.items ?? [])) {
|
|
60
|
+
if (Number(f.seq ?? 0) > lastSeq) {
|
|
61
|
+
lastSeq = Number(f.seq)
|
|
62
|
+
seen.push(f)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async function waitUntil(cond, timeoutMs, intervalMs = 1500) {
|
|
67
|
+
const deadline = Date.now() + timeoutMs
|
|
68
|
+
while (Date.now() < deadline) {
|
|
69
|
+
try {
|
|
70
|
+
if (await cond()) return true
|
|
71
|
+
}
|
|
72
|
+
catch { /* 瞬态网络/重载抖动,按条件未满足继续轮询 */ }
|
|
73
|
+
await sleep(intervalMs)
|
|
74
|
+
}
|
|
75
|
+
return false
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ── 1. 产线 + 模拟工况节点 ──
|
|
79
|
+
const line = await api('POST', '/api/workshop/dcw/lines', { name: '四引擎演练线' })
|
|
80
|
+
const dcw = await api('POST', '/api/workshop/dcw', { templateRef: 'dcw-temp-sp', name: '演练温度设定器', driver: 'mock', lineId: line?.data?.line?.id })
|
|
81
|
+
const daq = await api('POST', '/api/workshop/daq', { templateRef: 'daq-temp-tc', name: '演练温度采集', driver: 'mock', lineId: line?.data?.line?.id, intervalMs: 1000 })
|
|
82
|
+
const dcwId = dcw?.data?.node?.id
|
|
83
|
+
const daqId = daq?.data?.node?.id
|
|
84
|
+
check('产线+数控节点+数采节点(mock 工况)创建', !!dcwId && !!daqId, `dcw=${dcwId} daq=${daqId}`)
|
|
85
|
+
|
|
86
|
+
// ── 2. 四引擎班组 ──
|
|
87
|
+
const ch = await api('POST', '/api/workshop/channels', {
|
|
88
|
+
name: '四引擎班组演练',
|
|
89
|
+
leadAgent: { name: 'lead-omp', harness: 'omp', config: { provider: 'zhipu-coding-plan', model: 'glm-5.2' } },
|
|
90
|
+
})
|
|
91
|
+
const cid = ch?.data?.channelId
|
|
92
|
+
check('创建班组(lead=omp)', !!cid)
|
|
93
|
+
startWs(cid)
|
|
94
|
+
|
|
95
|
+
async function addWorker(name, harness, config) {
|
|
96
|
+
const w = await api('POST', `/api/workshop/channels/${cid}/agents`, { name, harness, role: 'worker', config })
|
|
97
|
+
return w?.data?.id ?? null
|
|
98
|
+
}
|
|
99
|
+
const dsh = await addWorker('worker-dsh', 'dsh', { promptTimeoutMs: 480_000 })
|
|
100
|
+
// codex 需 per-agent CODEX_HOME(种子化全局凭据/网关配置;impl 追加 [mcp_servers.aw] 平台工具面)
|
|
101
|
+
const { mkdtempSync, copyFileSync, existsSync } = await import('node:fs')
|
|
102
|
+
const { tmpdir, homedir } = await import('node:os')
|
|
103
|
+
const { join } = await import('node:path')
|
|
104
|
+
const codexHome = mkdtempSync(join(tmpdir(), 'aw-drill-codex-'))
|
|
105
|
+
for (const f of ['auth.json', 'config.toml', 'cc-switch-model-catalog.json']) {
|
|
106
|
+
try { if (existsSync(join(homedir(), '.codex', f))) copyFileSync(join(homedir(), '.codex', f), join(codexHome, f)) } catch { /* ignore */ }
|
|
107
|
+
}
|
|
108
|
+
const codex = await addWorker('worker-codex', 'codex', { codexHome, approvalPolicy: 'on-request', sandbox: 'workspace-write', promptTimeoutMs: 480_000, systemPromptPrefix: '执行要直接:按指令调用平台工具并汇报,不探索文件系统。' })
|
|
109
|
+
const ocTmp = (await import('node:fs')).mkdtempSync((await import('node:os')).tmpdir() + '/aw-drill-oc-')
|
|
110
|
+
const ocCfg = (await import('node:fs')).mkdtempSync((await import('node:os')).tmpdir() + '/aw-drill-occ-')
|
|
111
|
+
try { (await import('node:fs')).mkdirSync(ocTmp + '/opencode', { recursive: true }); (await import('node:fs')).copyFileSync((await import('node:os')).homedir() + '/.local/share/opencode/auth.json', ocTmp + '/opencode/auth.json') } catch { /* ignore */ }
|
|
112
|
+
const opencode = await addWorker('worker-opencode', 'opencode', { promptTimeoutMs: 480_000, model: 'zhipuai-coding-plan/glm-5.3-flash', dataDir: ocTmp, configDir: ocCfg, baseUrl: BASE })
|
|
113
|
+
check('三 worker 入组(dsh/codex/opencode)', !!dsh && !!codex && !!opencode, `dsh=${dsh?.slice(0, 8)} codex=${codex?.slice(0, 8)} oc=${opencode?.slice(0, 8)}`)
|
|
114
|
+
|
|
115
|
+
// ── 3. 绑定工业节点 ──
|
|
116
|
+
await api('POST', '/api/workshop/agent-tools/bindings', { agentId: dsh, nodeId: daqId, kind: 'daq', mode: 'auto' })
|
|
117
|
+
await api('POST', '/api/workshop/agent-tools/bindings', { agentId: codex, nodeId: dcwId, kind: 'dcw', mode: 'manual' })
|
|
118
|
+
await api('POST', '/api/workshop/agent-tools/bindings', { agentId: opencode, nodeId: dcwId, kind: 'dcw', mode: 'manual' })
|
|
119
|
+
check('绑定完成(dsh↔DAQ auto;codex/opencode↔DCW manual)', true)
|
|
120
|
+
|
|
121
|
+
// ── 4. 团队作业(单 goal,三步,指令点对点到人)──
|
|
122
|
+
const task = await api('POST', `/api/workshop/channels/${cid}/tasks`, {
|
|
123
|
+
title: '四引擎数采数控联调',
|
|
124
|
+
mode: 'goal',
|
|
125
|
+
description: [
|
|
126
|
+
'按以下分工执行,每步只做一次,不要额外发挥:',
|
|
127
|
+
'1. worker-dsh:用 daq_query 工具查询你绑定的温度采集节点最近 5 分钟数据,把样本数与均值汇报给 lead;',
|
|
128
|
+
'2. worker-codex:用 dcw_control 工具把你绑定的「演练温度设定器」写入 172.0(会触发人工审批,等待批准后再继续),然后用 dcw_read 复读并把读数汇报给 lead;',
|
|
129
|
+
'3. worker-opencode:用 dcw_read 工具读取你绑定的「演练温度设定器」当前设定值,汇报给 lead;',
|
|
130
|
+
'4. lead:三项结果齐后调用 complete_task 汇总。',
|
|
131
|
+
].join('\n'),
|
|
132
|
+
})
|
|
133
|
+
const taskId = task?.data?.id
|
|
134
|
+
check('团队作业 goal 已提交', !!taskId, `taskId=${taskId?.slice(0, 8)}`)
|
|
135
|
+
|
|
136
|
+
// ── 5. HITL:审批到达即批准 ──
|
|
137
|
+
const approvalsDone = new Set()
|
|
138
|
+
const approved = await waitUntil(async () => {
|
|
139
|
+
const p = await api('GET', '/api/workshop/hitl/pending')
|
|
140
|
+
const items = (p?.data?.items ?? []).filter(i => i.kind === 'dcw-approval' && !approvalsDone.has(i.id))
|
|
141
|
+
for (const item of items) {
|
|
142
|
+
log(`审批到达: ${String(item.detail ?? '').slice(0, 80)} → 批准`)
|
|
143
|
+
const r = await api('POST', '/api/workshop/hitl/respond', { kind: 'dcw-approval', id: item.id, confirmed: true, comment: '演练批准' })
|
|
144
|
+
approvalsDone.add(item.id)
|
|
145
|
+
if (r?.data?.ok) log(`已批准 ${item.id}`)
|
|
146
|
+
}
|
|
147
|
+
return approvalsDone.size > 0 && (pollEvents(), seen.some(f => f.type === 'hitl.resolved' && f.payload?.outcome === 'answered'))
|
|
148
|
+
}, 600_000)
|
|
149
|
+
check('数控写入审批触发并批准', approved, `批准数=${approvalsDone.size}`)
|
|
150
|
+
|
|
151
|
+
// ── 6. 任务闭环 + 写入落地 ──
|
|
152
|
+
const done = await waitUntil(async () => {
|
|
153
|
+
const t = await api('GET', `/api/workshop/tasks/${taskId}`)
|
|
154
|
+
const st = t?.data?.state
|
|
155
|
+
if (st === 'COMPLETED' || st === 'FAILED' || st === 'CANCELED') return st
|
|
156
|
+
await pollEvents(cid)
|
|
157
|
+
return null
|
|
158
|
+
}, 900_000)
|
|
159
|
+
check('团队任务闭环 COMPLETED', done === 'COMPLETED', `state=${done}`)
|
|
160
|
+
|
|
161
|
+
const read = await api('POST', '/api/workshop/agent-tools/invoke', { agentId: codex, tool: 'dcw_read', args: { node_id: dcwId } })
|
|
162
|
+
const rb = String(read?.data?.result?.text ?? '')
|
|
163
|
+
check('写入物理生效(读回 ~172)', /17[12]/.test(rb), rb.replace(/\n/g, ' ').slice(0, 110))
|
|
164
|
+
|
|
165
|
+
await pollEvents(cid)
|
|
166
|
+
const byType = {}
|
|
167
|
+
for (const f of seen) byType[f.type] = (byType[f.type] ?? 0) + 1
|
|
168
|
+
console.log('事件帧分布:', JSON.stringify(byType))
|
|
169
|
+
check('事件流覆盖(task/message/hitl)', (byType['task.status'] ?? 0) > 0 && (byType['a2a.message'] ?? 0) > 0)
|
|
170
|
+
|
|
171
|
+
console.log(`\n━━━ 演练结论:PASS=${passed} FAIL=${failures} ━━━`)
|
|
172
|
+
try { ws?.close() } catch { /* ignore */ }
|
|
173
|
+
process.exit(failures === 0 ? 0 : 1)
|
package/scripts/dev-guard.mjs
CHANGED
|
@@ -29,6 +29,10 @@ const { existsSync, readFileSync } = await import('node:fs')
|
|
|
29
29
|
const { dirname, resolve } = await import('node:path')
|
|
30
30
|
const { fileURLToPath: u2f } = await import('node:url')
|
|
31
31
|
|
|
32
|
+
// dev 进程时间输出统一本地时区(重入实例同样生效;nitro worker 由 00-local-time 插件覆盖)
|
|
33
|
+
const { installLocalIso } = await import('../shared/local-time.mjs')
|
|
34
|
+
installLocalIso()
|
|
35
|
+
|
|
32
36
|
const root = resolve(dirname(u2f(import.meta.url)), '..')
|
|
33
37
|
|
|
34
38
|
// --- 预载 .env(与 start.mjs 同策略;已导出环境变量优先) ---
|
|
@@ -43,9 +47,13 @@ if (existsSync(envPath)) {
|
|
|
43
47
|
|
|
44
48
|
// --- 共享配置引擎:计算有效开发端口/主机 ---
|
|
45
49
|
const { loadEffective } = await import('../shared/config/engine.mjs')
|
|
50
|
+
// 模式感知路径单一入口:settings/锁根必须与 start/CLI 同源,
|
|
51
|
+
// 否则"检出内无 .AgentWorkShop"场景下 dev 写 data/、start 锁 home,互斥与设置双双失效。
|
|
52
|
+
const { resolveRunMode } = await import('../shared/config/home.mjs')
|
|
53
|
+
const rmDev = resolveRunMode({ cwd: process.cwd(), packageRoot: root, env: process.env })
|
|
46
54
|
const eff = loadEffective({
|
|
47
|
-
configPath:
|
|
48
|
-
settingsPath:
|
|
55
|
+
configPath: rmDev.configPath,
|
|
56
|
+
settingsPath: rmDev.settingsPath,
|
|
49
57
|
env: process.env,
|
|
50
58
|
mode: 'dev',
|
|
51
59
|
})
|
|
@@ -76,7 +84,7 @@ console.log(`[config] worker PORT env -> ${effectivePort}`)
|
|
|
76
84
|
// --- 单实例互斥 + 端口占用显式报错(hardening ST-1/ST-4):不再静默换端口 ---
|
|
77
85
|
{
|
|
78
86
|
const { acquireLock, checkPort } = await import('../shared/config/single-instance.mjs')
|
|
79
|
-
const lock = acquireLock(
|
|
87
|
+
const lock = acquireLock(rmDev.configRoot, { mode: 'dev', port: effectivePort })
|
|
80
88
|
if (!lock.ok) {
|
|
81
89
|
const h = lock.holder
|
|
82
90
|
console.error(`✖ 已有实例在运行(pid=${h.pid}${h.port ? `,端口=${h.port}` : ''},启动于 ${h.startedAt ?? '未知'},模式=${h.mode ?? '未知'})`)
|
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
import net from 'node:net'
|
|
9
9
|
import http from 'node:http'
|
|
10
10
|
import { createRequire } from 'node:module'
|
|
11
|
+
import { appendFileSync } from 'node:fs'
|
|
12
|
+
import { join } from 'node:path'
|
|
13
|
+
import { installLocalIso } from '../shared/local-time.mjs'
|
|
14
|
+
|
|
15
|
+
// 模拟器日志时间统一本地时区(覆盖 node-opcua 等库内部的 toISOString 输出)
|
|
16
|
+
installLocalIso()
|
|
11
17
|
|
|
12
18
|
const reqRoot = createRequire(import.meta.url)
|
|
13
19
|
// pnpm 严格布局:mqtt-packet 是 mqtt 的传递依赖,从 mqtt 包入口路径解析
|
|
@@ -31,6 +37,14 @@ const clients = new Set()
|
|
|
31
37
|
|
|
32
38
|
function brokerPublish(topic, payload) {
|
|
33
39
|
const frame = mqttPacket.generate({ cmd: 'publish', topic, payload, qos: 0 })
|
|
40
|
+
console.log(`[mqtt-sim] route topic=${topic} clients=${clients.size} filters=[${[...clients].map(c => c.filters.join('|')).join(' ; ')}]`)
|
|
41
|
+
// 控制下行审计:broker 真实收到的路由落盘(供 e2e 做确定性验收,不依赖订阅端时序)
|
|
42
|
+
if (topic.startsWith('aw/sim/setpoint')) {
|
|
43
|
+
try {
|
|
44
|
+
appendFileSync(join(process.env.AW_SIM_AUDIT_DIR ?? '.AgentWorkShop/data', 'sim-setpoint-routes.log'), `${new Date().toISOString()} ${topic} ${payload.toString()}\n`)
|
|
45
|
+
}
|
|
46
|
+
catch { /* 审计失败不影响路由 */ }
|
|
47
|
+
}
|
|
34
48
|
for (const c of clients) {
|
|
35
49
|
if (c.filters.some(f => topicMatch(f, topic))) {
|
|
36
50
|
try {
|
|
@@ -45,7 +59,20 @@ const mqttServer = net.createServer((sock) => {
|
|
|
45
59
|
const client = { sock, filters: [] }
|
|
46
60
|
clients.add(client)
|
|
47
61
|
const parser = mqttPacket.parser({ protocolVersion: 4 })
|
|
48
|
-
sock.on('data', d =>
|
|
62
|
+
sock.on('data', (d) => {
|
|
63
|
+
// 畸形帧(截断/坏头字节)只弃帧断该链,不许杀掉整个模拟工况
|
|
64
|
+
try {
|
|
65
|
+
parser.parse(d)
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
console.error('[mqtt-sim] 弃帧(解析异常):', err instanceof Error ? err.message : err)
|
|
69
|
+
try {
|
|
70
|
+
sock.destroy()
|
|
71
|
+
}
|
|
72
|
+
catch { /* 已断 */ }
|
|
73
|
+
clients.delete(client)
|
|
74
|
+
}
|
|
75
|
+
})
|
|
49
76
|
sock.on('error', () => clients.delete(client))
|
|
50
77
|
sock.on('close', () => clients.delete(client))
|
|
51
78
|
parser.on('packet', (packet) => {
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 多 Harness + 自定义 LLM provider 简单任务 E2E(一个 Channel,四种引擎)。
|
|
3
|
+
* NO_PROXY='127.0.0.1,localhost' node scripts/e2e-harness-provider-task.mjs [--base http://127.0.0.1:3001]
|
|
4
|
+
*
|
|
5
|
+
* P1 provider 目录:四引擎目录均含 glm-5.3-flash(可选)
|
|
6
|
+
* P2 同 Channel 四 harness worker(omp=zhipu-coding-plan / codex=cc-switch /
|
|
7
|
+
* opencode=zhipuai-coding-plan / dsh=ustc;模型均 glm-5.3-flash)
|
|
8
|
+
* P3 简单任务×4:真实 LLM 回合执行并 complete_task → 全部 COMPLETED(可用)
|
|
9
|
+
*/
|
|
10
|
+
const BASE = (() => {
|
|
11
|
+
const i = process.argv.indexOf('--base')
|
|
12
|
+
return i > 0 ? process.argv[i + 1] : 'http://127.0.0.1:3001'
|
|
13
|
+
})()
|
|
14
|
+
const TAG = Date.now().toString(36)
|
|
15
|
+
let failures = 0
|
|
16
|
+
let passed = 0
|
|
17
|
+
const results = []
|
|
18
|
+
const check = (id, name, ok, detail = '') => {
|
|
19
|
+
console.log(` ${ok ? 'PASS' : 'FAIL'} ${id} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
20
|
+
results.push({ id, name, ok, detail })
|
|
21
|
+
ok ? passed++ : failures++
|
|
22
|
+
}
|
|
23
|
+
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
24
|
+
const api = async (method, path, { body, token } = {}, attempt = 0) => {
|
|
25
|
+
try {
|
|
26
|
+
const res = await fetch(`${BASE}${path}`, {
|
|
27
|
+
method,
|
|
28
|
+
headers: { 'content-type': 'application/json', ...(token ? { authorization: `Bearer ${token}` } : {}) },
|
|
29
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
30
|
+
})
|
|
31
|
+
return { status: res.status, ...(await res.json().catch(() => ({}))) }
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
if (attempt < 10) {
|
|
35
|
+
await sleep(3000)
|
|
36
|
+
return api(method, path, { body, token }, attempt + 1)
|
|
37
|
+
}
|
|
38
|
+
throw err
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const ENGINES = [
|
|
43
|
+
{ key: 'omp', harness: 'omp', cfg: { provider: 'zhipu-coding-plan', model: 'glm-5.3-flash' } },
|
|
44
|
+
{ key: 'codex', harness: 'codex', cfg: { model: 'glm-5.3-flash', approvalPolicy: 'never' } },
|
|
45
|
+
{ key: 'dsh', harness: 'dsh', cfg: { provider: 'ustc', model: 'glm-5.3-flash' } },
|
|
46
|
+
{ key: 'opencode', harness: 'opencode', cfg: { model: 'zhipuai-coding-plan/glm-5.3-flash' } },
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
async function main() {
|
|
50
|
+
console.log(`\n━━━ 多 Harness + provider 简单任务 E2E @ ${BASE} (tag=${TAG}) ━━━`)
|
|
51
|
+
const reg = await api('POST', '/api/users/register', { body: { email: `hp-${TAG}@test.local`, password: 'Passw0rd!123', name: `hp-${TAG}` } })
|
|
52
|
+
const token = reg.data?.token
|
|
53
|
+
if (!token) throw new Error('注册失败')
|
|
54
|
+
const auth = { token }
|
|
55
|
+
|
|
56
|
+
// ── P1 provider 目录(可选性) ──
|
|
57
|
+
for (const e of ENGINES) {
|
|
58
|
+
const r = await api('GET', `/api/workshop/harnesses/${e.harness}/providers`, auth)
|
|
59
|
+
const provs = r.data?.catalog?.providers ?? []
|
|
60
|
+
const has = provs.some(p => p.models.some(m => m.id === 'glm-5.3-flash'))
|
|
61
|
+
check(`P1.${e.key}`, `${e.harness} 目录含 glm-5.3-flash(可选)`, has, provs.map(p => p.id).join(',').slice(0, 60))
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ── P2 同 Channel 组建(不同 harness worker + 自定义 provider/model) ──
|
|
65
|
+
const ch = (await api('POST', '/api/workshop/channels', {
|
|
66
|
+
body: {
|
|
67
|
+
name: `harness-mix-${TAG}`,
|
|
68
|
+
leadAgent: { name: `lead-${TAG}`, harness: 'mock', config: { delayMs: 60 } },
|
|
69
|
+
}, ...auth,
|
|
70
|
+
})).data
|
|
71
|
+
const channelId = ch?.channelId
|
|
72
|
+
check('P2.1', 'Channel 创建(mock lead)', Boolean(channelId))
|
|
73
|
+
const workers = {}
|
|
74
|
+
for (const e of ENGINES) {
|
|
75
|
+
const c = await api('POST', '/api/workshop/agents', {
|
|
76
|
+
body: { name: `${e.key}-${TAG}`, harness: e.harness, config: { ...e.cfg, systemPromptPrefix: '你是测试执行员:严格按任务完成,完成后立即调用 complete_task。' } }, ...auth,
|
|
77
|
+
})
|
|
78
|
+
workers[e.key] = c.data
|
|
79
|
+
check(`P2.${e.key}-tpl`, `${e.harness} 模板(provider=${e.cfg.provider ?? 'default'},model=${e.cfg.model})`, Boolean(c.data?.id))
|
|
80
|
+
const join = await api('POST', `/api/workshop/channels/${channelId}/agents`, { body: { agentId: c.data.id, role: 'worker' }, ...auth })
|
|
81
|
+
if (join.code !== 0) check(`P2.${e.key}-join`, `${e.key} 入队`, false, join.message ?? '')
|
|
82
|
+
}
|
|
83
|
+
const members = (await api('GET', `/api/workshop/channels/${channelId}/agents`, auth)).data ?? []
|
|
84
|
+
check('P2.join', '四引擎 worker 全部入队(5 成员)', members.length >= 5, `members=${members.length}`)
|
|
85
|
+
|
|
86
|
+
// ── P3 简单任务×4(真实 LLM 回合) ──
|
|
87
|
+
const tasks = {}
|
|
88
|
+
for (const e of ENGINES) {
|
|
89
|
+
const t = await api('POST', `/api/workshop/channels/${channelId}/tasks`, {
|
|
90
|
+
body: {
|
|
91
|
+
title: `smoke-${e.key}-${TAG}`,
|
|
92
|
+
parts: [{ text: '请直接汇报「 Harness 冒烟测试完成」六个字所在的环境时间,然后立即调用 complete_task。不要执行任何其它操作。' }],
|
|
93
|
+
assigneeId: workers[e.key].id,
|
|
94
|
+
}, ...auth,
|
|
95
|
+
})
|
|
96
|
+
tasks[e.key] = t.data?.task?.id ?? t.data?.id
|
|
97
|
+
}
|
|
98
|
+
check('P3.1', '四路简单任务下发', Object.values(tasks).every(Boolean))
|
|
99
|
+
|
|
100
|
+
const states = {}
|
|
101
|
+
const deadline = Date.now() + 16 * 60_000
|
|
102
|
+
while (Date.now() < deadline && Object.keys(states).length < 4) {
|
|
103
|
+
const list = await api('GET', `/api/workshop/channels/${channelId}/tasks`, auth)
|
|
104
|
+
for (const [k, id] of Object.entries(tasks)) {
|
|
105
|
+
if (states[k]) continue
|
|
106
|
+
const me = (list.data ?? []).find(x => x.id === id)
|
|
107
|
+
if (me && ['COMPLETED', 'FAILED', 'CANCELED'].includes(me.state)) states[k] = me.state
|
|
108
|
+
}
|
|
109
|
+
await sleep(6000)
|
|
110
|
+
}
|
|
111
|
+
for (const e of ENGINES) {
|
|
112
|
+
check(`P3.${e.key}`, `${e.harness}(glm-5.3-flash) 简单任务 COMPLETED`, states[e.key] === 'COMPLETED', `state=${states[e.key] ?? 'RUNNING'}`)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ── 清理 ──
|
|
116
|
+
await api('DELETE', `/api/workshop/channels/${channelId}?purge=1`, auth).catch(() => {})
|
|
117
|
+
|
|
118
|
+
console.log(`\n━━━ 多 Harness provider E2E: ${passed} passed / ${failures} failed ━━━`)
|
|
119
|
+
if (failures) for (const r of results.filter(x => !x.ok)) console.log(` ${r.id} ${r.name} — ${r.detail}`)
|
|
120
|
+
process.exit(failures === 0 ? 0 : 1)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
main().catch((err) => {
|
|
124
|
+
console.error('FATAL', err)
|
|
125
|
+
process.exit(1)
|
|
126
|
+
})
|