agentworkshop 0.7.33 → 0.7.37
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/.output/.AgentWorkShop/aml-python/aml_eval.py +171 -0
- package/.output/.AgentWorkShop/aml-python/amlkit.py +120 -0
- package/.output/.AgentWorkShop/aml-python/requirements.txt +7 -0
- package/.output/.AgentWorkShop/aml-python/train-example.py +92 -0
- package/.output/.AgentWorkShop/schema.json +2 -1
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{DLljr7g0.js → 45zuyAso.js} +1 -1
- package/.output/public/_nuxt/4sIEbgcl.js +42 -0
- package/.output/public/_nuxt/8NMOXZOV.js +1 -0
- package/.output/public/_nuxt/BCGafdXT.js +2 -0
- package/.output/public/_nuxt/BDNMzG2s2.js +1 -0
- package/.output/public/_nuxt/{C-mDhyEd.js → BDmh31hl.js} +1 -1
- package/.output/public/_nuxt/BFkgkW8u.js +4 -0
- package/.output/public/_nuxt/BG8sCcwx.js +14 -0
- package/.output/public/_nuxt/{D8CqF0yy.js → BHA40aHa.js} +1 -1
- package/.output/public/_nuxt/BJHKLJJU.js +1 -0
- package/.output/public/_nuxt/{DoTdlVVe2.js → BN6iuJEg2.js} +1 -1
- package/.output/public/_nuxt/BNT8gYU92.js +4 -0
- package/.output/public/_nuxt/BU83-NnX.js +106 -0
- package/.output/public/_nuxt/BYhEUx8t.js +17 -0
- package/.output/public/_nuxt/BzHEilTt.js +1 -0
- package/.output/public/_nuxt/{Ct-WOVr4.js → C3J6FYKa.js} +1 -1
- package/.output/public/_nuxt/C3gwHTz0.js +1 -0
- package/.output/public/_nuxt/C4DWUZ6d2.js +1 -0
- package/.output/public/_nuxt/C5gUkRwn.js +1 -0
- package/.output/public/_nuxt/CClOy-Hz2.js +1 -0
- package/.output/public/_nuxt/{CUXCQXjG.js → CM12FuB42.js} +1 -1
- package/.output/public/_nuxt/{BSCpFtzG.js → CSkxz2NX.js} +1 -1
- package/.output/public/_nuxt/CWoJjWmZ.js +1 -0
- package/.output/public/_nuxt/CY9LbPCI.js +1 -0
- package/.output/public/_nuxt/CYWVXZTS.js +7 -0
- package/.output/public/_nuxt/CZiw7sEV.js +1 -0
- package/.output/public/_nuxt/C_OLzD09.js +1 -0
- package/.output/public/_nuxt/C__m4EhR.js +1 -0
- package/.output/public/_nuxt/Cbq-mryP.js +1 -0
- package/.output/public/_nuxt/{C4OAdbVK2.js → Cc_9VzD42.js} +1 -1
- package/.output/public/_nuxt/{BASN8nZ0.js → CdPzkOMV.js} +1 -1
- package/.output/public/_nuxt/Cec0Ua3F.js +1 -0
- package/.output/public/_nuxt/{DYKVPzN-.js → CoNpEq5X.js} +1 -1
- package/.output/public/_nuxt/CojCTLKD.js +1 -0
- package/.output/public/_nuxt/{B7wL3pDk.js → Crod5z2f.js} +1 -1
- package/.output/public/_nuxt/CzlMDL5H.js +13 -0
- package/.output/public/_nuxt/{G0qIw7Gq2.js → D0ZBQrN_2.js} +1 -1
- package/.output/public/_nuxt/{Lp7Ll94I.js → D1YDxZpZ.js} +1 -1
- package/.output/public/_nuxt/{Bc0AmjfT.js → D20Yamr4.js} +1 -1
- package/.output/public/_nuxt/D6uzXueg.js +2 -0
- package/.output/public/_nuxt/D9Oidm5I.js +1 -0
- package/.output/public/_nuxt/DAe0h2MB.js +1 -0
- package/.output/public/_nuxt/DBHNsT1Y.js +23 -0
- package/.output/public/_nuxt/DDShH71m.js +1 -0
- package/.output/public/_nuxt/DDgJcSET.js +19 -0
- package/.output/public/_nuxt/DHFrCUxA2.js +13 -0
- package/.output/public/_nuxt/{BcrN7QEl2.js → DIaZ2PTo2.js} +1 -1
- package/.output/public/_nuxt/DPnwL14Y.js +1 -0
- package/.output/public/_nuxt/DR12_WCA.js +3 -0
- package/.output/public/_nuxt/{B9nXmjSB.js → DUrecWPx.js} +4 -4
- package/.output/public/_nuxt/DVsjtsvZ2.js +1 -0
- package/.output/public/_nuxt/DYr1VMiQ.js +6 -0
- package/.output/public/_nuxt/DZtm4l-P2.js +1 -0
- package/.output/public/_nuxt/DdD9mCHM.js +1 -0
- package/.output/public/_nuxt/DeJykBFf.js +9 -0
- package/.output/public/_nuxt/{DoMxCWN52.js → DeyBFhKH2.js} +1 -1
- package/.output/public/_nuxt/DkGQ7lnb2.js +1 -0
- package/.output/public/_nuxt/DmqknNvV.js +18 -0
- package/.output/public/_nuxt/DnUuIR83.js +1 -0
- package/.output/public/_nuxt/DrYV5i68.js +1 -0
- package/.output/public/_nuxt/{B5S_UyaC.js → DtYHUi5Z.js} +1 -1
- package/.output/public/_nuxt/Dz_Q3Lpw2.js +1 -0
- package/.output/public/_nuxt/DzbFpZRk.js +3 -0
- package/.output/public/_nuxt/HBLJ-wei.js +1 -0
- package/.output/public/_nuxt/JCoYF4IJ.js +31 -0
- package/.output/public/_nuxt/JTLM-kqr2.js +1 -0
- package/.output/public/_nuxt/{BeIfu4N3.js → KZQX7xoM.js} +2 -2
- package/.output/public/_nuxt/S_fVQwJK.js +1 -0
- package/.output/public/_nuxt/TownView.0oLiQgTC.css +1 -0
- package/.output/public/_nuxt/YnQxK3eG.js +1 -0
- package/.output/public/_nuxt/_id_.D-SYuyZb.css +1 -0
- package/.output/public/_nuxt/_id_.hma_BU6T.css +1 -0
- package/.output/public/_nuxt/_wsId_.B12v3PhY.css +1 -0
- package/.output/public/_nuxt/aLLjF2K-2.js +1 -0
- package/.output/public/_nuxt/aWWIh8YL.js +24 -0
- package/.output/public/_nuxt/ahgEJu2R.js +1 -0
- package/.output/public/_nuxt/aml.COEKNNqK.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a66fdef7-dcfd-453b-b1f6-543c7dfd98d5.json +1 -0
- package/.output/public/_nuxt/daq.B3265ZDn.css +1 -0
- package/.output/public/_nuxt/dcw.DLYZqEhT.css +1 -0
- package/.output/public/_nuxt/default.DE_vT238.css +1 -0
- package/.output/public/_nuxt/entry.BB-Eeh-J.css +1 -0
- package/.output/public/_nuxt/jZsY8yYz.js +1 -0
- package/.output/public/_nuxt/logs.CqFyMrJw.css +1 -0
- package/.output/public/_nuxt/pages.ooEzrMm9.css +1 -0
- package/.output/public/_nuxt/pdk8jLGT.js +1 -0
- package/.output/public/_nuxt/plugins.5e5chZ67.css +1 -0
- package/.output/public/_nuxt/pz2JDAM7.js +2 -0
- package/.output/public/_nuxt/settings.Dm3M0RLy.css +1 -0
- package/.output/public/_nuxt/town.DKIAhKnx.css +1 -0
- package/.output/public/_nuxt/users.CXnP2E08.css +1 -0
- package/.output/public/_nuxt/vRTjoWqd.js +1 -0
- package/.output/public/_nuxt/workshop.Jk5HxWPE.css +1 -0
- package/.output/public/_nuxt/zIGh7R49.js +75 -0
- package/.output/public/_nuxt/zq5t1vyX.js +1 -0
- package/.output/server/chunks/_/character-asset.repo.mjs +1 -1
- package/.output/server/chunks/_/entity.mjs +174 -0
- package/.output/server/chunks/_/entity.mjs.map +1 -0
- package/.output/server/chunks/_/env-manager.mjs +162 -0
- package/.output/server/chunks/_/env-manager.mjs.map +1 -0
- package/.output/server/chunks/_/host-bindings.mjs +1 -1
- package/.output/server/chunks/_/nitro.mjs +1568 -1043
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/_/scene-layout.repo.mjs +1 -1
- package/.output/server/chunks/build/{TownView-BdHnAilw.mjs → TownView-jVazYOjN.mjs} +141 -141
- package/.output/server/chunks/build/{TownView-BdHnAilw.mjs.map → TownView-jVazYOjN.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-Cb845FHR.mjs → _id_-CfVosNg3.mjs} +136 -136
- package/.output/server/chunks/build/{_id_-Cb845FHR.mjs.map → _id_-CfVosNg3.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-fadFPl2i.mjs → _id_-Hwr4rZpr.mjs} +32 -32
- package/.output/server/chunks/build/{_id_-fadFPl2i.mjs.map → _id_-Hwr4rZpr.mjs.map} +1 -1
- package/.output/server/chunks/build/{_wsId_-CTZswnm5.mjs → _wsId_-BVg3bB77.mjs} +175 -165
- package/.output/server/chunks/build/{_wsId_-CTZswnm5.mjs.map → _wsId_-BVg3bB77.mjs.map} +1 -1
- package/.output/server/chunks/build/aml-BCSJCdX7.mjs +588 -0
- package/.output/server/chunks/build/aml-BCSJCdX7.mjs.map +1 -0
- package/.output/server/chunks/build/{daq-BvihjQyW.mjs → daq-C03Uu5UE.mjs} +108 -106
- package/.output/server/chunks/build/daq-C03Uu5UE.mjs.map +1 -0
- package/.output/server/chunks/build/{dcw-Ks2vJ4PF.mjs → dcw-6vEYVeje.mjs} +44 -44
- package/.output/server/chunks/build/{dcw-Ks2vJ4PF.mjs.map → dcw-6vEYVeje.mjs.map} +1 -1
- package/.output/server/chunks/build/{default-GgHt4O2R.mjs → default-hseyOqBT.mjs} +30 -27
- package/.output/server/chunks/build/{default-GgHt4O2R.mjs.map → default-hseyOqBT.mjs.map} +1 -1
- package/.output/server/chunks/build/{logs-CYBhkQwh.mjs → logs-B-xhuqln.mjs} +35 -35
- package/.output/server/chunks/build/{logs-CYBhkQwh.mjs.map → logs-B-xhuqln.mjs.map} +1 -1
- package/.output/server/chunks/build/{pages-C-6BRtv8.mjs → pages-BO7yZsXA.mjs} +18 -27
- package/.output/server/chunks/build/pages-BO7yZsXA.mjs.map +1 -0
- package/.output/server/chunks/build/{plugins-dZRegC7m.mjs → plugins-CUWmMdyt.mjs} +17 -17
- package/.output/server/chunks/build/{plugins-dZRegC7m.mjs.map → plugins-CUWmMdyt.mjs.map} +1 -1
- package/.output/server/chunks/build/{settings-CgDLkP3s.mjs → settings-DoQ2Oq3P.mjs} +43 -43
- package/.output/server/chunks/build/{settings-CgDLkP3s.mjs.map → settings-DoQ2Oq3P.mjs.map} +1 -1
- package/.output/server/chunks/build/{town-DJ-V5G9U.mjs → town-BOl6hs9B.mjs} +7 -7
- package/.output/server/chunks/build/{town-DJ-V5G9U.mjs.map → town-BOl6hs9B.mjs.map} +1 -1
- package/.output/server/chunks/build/useDaqStream-CIBaiGAl.mjs +1 -1
- package/.output/server/chunks/build/useDcwStream-CBbiYnWe.mjs +1 -1
- package/.output/server/chunks/build/{useWorkshopWs-CprkZEdq.mjs → useWorkshopWs-C_I7q9As.mjs} +110 -32
- package/.output/server/chunks/build/{useWorkshopWs-CprkZEdq.mjs.map → useWorkshopWs-C_I7q9As.mjs.map} +1 -1
- package/.output/server/chunks/build/{users-4nzxTjFT.mjs → users-fohSmF-J.mjs} +6 -6
- package/.output/server/chunks/build/{users-4nzxTjFT.mjs.map → users-fohSmF-J.mjs.map} +1 -1
- package/.output/server/chunks/build/{workshop-81xhz368.mjs → workshop-DX5-ldc4.mjs} +15 -15
- package/.output/server/chunks/build/{workshop-81xhz368.mjs.map → workshop-DX5-ldc4.mjs.map} +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +21 -8
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs.map +1 -1
- 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 +58 -0
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.get.mjs +27 -6
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.patch.mjs +49 -0
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.patch.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/entities/prune.post.mjs +45 -0
- package/.output/server/chunks/routes/api/workshop/aml/entities/prune.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/env/recheck.post.mjs +30 -0
- package/.output/server/chunks/routes/api/workshop/aml/env/recheck.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/env/uv.post.mjs +40 -0
- package/.output/server/chunks/routes/api/workshop/aml/env/uv.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/env/venv.post.mjs +42 -0
- package/.output/server/chunks/routes/api/workshop/aml/env/venv.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index2.get.mjs +4 -22
- package/.output/server/chunks/routes/api/workshop/aml/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index3.get.mjs +4 -16
- package/.output/server/chunks/routes/api/workshop/aml/index3.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index4.get.mjs +19 -34
- package/.output/server/chunks/routes/api/workshop/aml/index4.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs +41 -0
- package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/index6.get.mjs +62 -0
- package/.output/server/chunks/routes/api/workshop/aml/index6.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/cancel.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/logs.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/retry.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.delete.mjs +63 -0
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/models/_id/predict.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/models/_id/promote.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.delete.mjs +54 -0
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.patch.mjs +46 -0
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.patch.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.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/terminals.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs +4 -4
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/bindings.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bindings.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs +12 -1
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index5.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index5.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +2 -2
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/virtual/entry.mjs +103 -17
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README-zh.md +578 -507
- package/README.md +125 -51
- package/app/assets/css/main.css +329 -22
- package/app/components/AppHeader.vue +5 -4
- package/app/components/AppSidebar.vue +5 -4
- package/app/components/AwChart.vue +17 -0
- package/app/components/workshop/AgentLanesView.vue +2 -2
- package/app/components/workshop/ChannelSessionList.vue +3 -3
- package/app/components/workshop/CommandPalette.vue +1 -2
- package/app/components/workshop/Composer.vue +4 -4
- package/app/components/workshop/DaqNodeRow.vue +20 -1
- package/app/components/workshop/EventBlock.vue +3 -3
- package/app/components/workshop/MentionHoverCard.vue +1 -1
- package/app/components/workshop/MultiChannelView.vue +1 -1
- package/app/components/workshop/TaskBoardView.vue +5 -5
- package/app/components/workshop/TranscriptTimeline.vue +3 -3
- package/app/components/workshop/blocks/ClusterRoute.vue +3 -3
- package/app/components/workshop/blocks/ClusterStream.vue +1 -1
- package/app/components/workshop/blocks/ClusterTool.vue +1 -1
- package/app/components/workshop/lanes/LaneBlocks.vue +5 -2
- package/app/components/workshop/town/TownView.vue +0 -7
- package/app/composables/workshop/useClusteredBlocks.ts +22 -3
- package/app/composables/workshop/useEscClose.ts +44 -0
- package/app/config/index.ts +2 -1
- package/app/layouts/default.vue +25 -8
- package/app/pages/aml/index.vue +626 -4
- package/app/pages/daq/[id].vue +1 -1
- package/app/pages/daq/index.vue +10 -12
- package/app/pages/dcw/[id].vue +2 -2
- package/app/pages/dcw/index.vue +7 -11
- package/app/pages/index.vue +24 -6
- package/app/pages/logs/index.vue +2 -6
- package/app/pages/plugins/index.vue +1 -1
- package/app/pages/settings.vue +2 -2
- package/app/pages/town.vue +0 -2
- package/app/pages/users.vue +1 -1
- package/app/pages/workshop/index.vue +2 -2
- package/app/plugins/esc-close.client.ts +31 -0
- package/app/stores/workshop/events.ts +186 -36
- package/bin/aw.mjs +7 -2
- package/cli/aw.mjs +19 -34
- package/cli/commands/build.mjs +18 -1
- package/cli/commands/config.mjs +2 -0
- package/cli/commands/plugin.mjs +45 -18
- package/cli/commands/register.mjs +6 -2
- package/cli/commands/status.mjs +2 -1
- package/cli/commands/update.mjs +1 -1
- package/cli/commands/version.mjs +1 -1
- package/cli/core/args.mjs +76 -4
- package/cli/core/help.mjs +3 -1
- package/cli/core/meta.mjs +38 -0
- package/cli/core/post-build.mjs +96 -0
- package/cli/core/registry.mjs +6 -3
- package/config.yml +28 -26
- package/docs/aml.md +99 -0
- package/docs/cli.en.md +445 -0
- package/docs/cli.md +410 -220
- package/docs/full-test-plan.md +174 -0
- package/docs/multi-harness-architecture.md +248 -0
- package/docs/plugins.en.md +534 -0
- package/docs/plugins.md +531 -179
- package/docs/sdk.en.md +922 -0
- package/docs/sdk.md +725 -129
- package/i18n/dicts/aml.json +43 -1
- package/i18n/locales/en.ts +1928 -1885
- package/i18n/locales/zh-CN.ts +1928 -1885
- package/nuxt.config.ts +27 -2
- package/package.json +164 -153
- package/scripts/.mimosa/hook-status/sess_aeaecb58-8833-4b83-b93c-050467d21e03-d944d71bb3.json +14 -0
- package/scripts/_audit/aml-layout-diag.mjs +83 -0
- package/scripts/_audit/bump-version.mjs +51 -0
- package/scripts/_audit/channel-inspect.mjs +49 -0
- package/scripts/_audit/cleanup-apply.mjs +89 -0
- package/scripts/_audit/cleanup-plan.mjs +82 -0
- package/scripts/_audit/contrast-check.mjs +43 -0
- package/scripts/_audit/dcw-unrecorded-write.ts +1 -1
- package/scripts/_audit/design-shots.mjs +145 -0
- package/scripts/_audit/docs-font-probe.mjs +68 -0
- package/scripts/_audit/docs-probe.mjs +107 -0
- package/scripts/_audit/docs-shots.mjs +171 -0
- package/scripts/_audit/docs-v3-verify.mjs +255 -0
- package/scripts/_audit/docs-vue-lint.mjs +81 -0
- package/scripts/_audit/docs-vue-lint2.mjs +91 -0
- package/scripts/_audit/exp-cost-scaling.mjs +4 -1
- package/scripts/_audit/exp-envelope-and-png.mjs +2 -1
- package/scripts/_audit/exp-sweep-fairness.mjs +4 -2
- package/scripts/_audit/fix-settings-count.mjs +57 -0
- package/scripts/_audit/glass-verify.mjs +155 -0
- package/scripts/_audit/hydration-diff.mjs +104 -0
- package/scripts/_audit/hydration-head.mjs +36 -0
- package/scripts/_audit/hydration-probe.mjs +59 -0
- package/scripts/_audit/lead-matrix-test.mjs +172 -0
- package/scripts/_audit/plc-agent-task.mjs +74 -0
- package/scripts/_audit/plc-clean-scenario.mjs +434 -0
- package/scripts/_audit/plc-clean-shots.mjs +161 -0
- package/scripts/_audit/plc-fc10-probe.mjs +30 -0
- package/scripts/_audit/probe-binding.mjs +114 -103
- package/scripts/_audit/review-fix-verify.mjs +158 -0
- package/scripts/_audit/seed-demo.mjs +165 -0
- package/scripts/_audit/town-focus-shot.mjs +129 -0
- package/scripts/_audit/town-reposition.mjs +85 -0
- package/scripts/_audit/ts-resolve-hook.mjs +57 -22
- package/scripts/_audit/verify-cleanup.mjs +67 -0
- package/scripts/_audit/verify-release-pack.mjs +82 -0
- package/scripts/_audit/watchdog-recovery-test.mjs +127 -0
- package/scripts/_dbg-audit-all-pages.mjs +43 -43
- package/scripts/_dbg-configroot-audit.mjs +84 -84
- package/scripts/_dbg-daq-intervals-func.mjs +94 -94
- package/scripts/_dbg-daq-rowstyle-verify.mjs +112 -112
- package/scripts/_dbg-groups-ui-verify.mjs +122 -122
- package/scripts/_dbg-harness-e2e.mjs +92 -92
- package/scripts/_dbg-harness-ui-e2e.py +97 -97
- package/scripts/_dbg-hitl-timeout-e2e.mjs +93 -93
- package/scripts/_dbg-multiharness-live-e2e.mjs +254 -254
- package/scripts/_dbg-opslog-agent-e2e.mjs +194 -191
- package/scripts/_dbg-opt-team-e2e.mjs +133 -133
- package/scripts/_dbg-recipe-e2e.mjs +176 -176
- package/scripts/_dbg-recipe-stale-e2e.mjs +135 -135
- package/scripts/_dbg-render-perf.mjs +142 -142
- package/scripts/_dbg-render-regression.mjs +130 -130
- package/scripts/_dbg-town-smoke.mjs +54 -54
- package/scripts/aw-start-smoke.mjs +27 -8
- package/scripts/check-docs-sync.mjs +367 -0
- package/scripts/e2e-full-closedloop.mjs +36 -18
- package/scripts/production-closed-loop-e2e.mjs +300 -300
- package/scripts/test-cli-exit.mjs +129 -21
- package/scripts/test-daq-frame-race.mjs +144 -96
- package/scripts/test-events-index.mjs +176 -0
- package/scripts/test-lru.mjs +34 -11
- package/scripts/test-memory-month-query.mjs +11 -3
- package/scripts/test-plugin-hardening.mjs +7 -2
- package/scripts/test-plugin-lifecycle.mjs +173 -0
- package/scripts/test-rollback-index.mjs +76 -18
- package/scripts/test-sdk-surface.mjs +6 -3
- package/sdk/client.mjs +16 -7
- package/sdk/context.mjs +21 -9
- package/sdk/examples/line-sentinel/client.mjs +13 -6
- package/sdk/examples/line-sentinel/index.mjs +5 -2
- package/sdk/examples/ops-notifier/client.mjs +3 -1
- package/sdk/examples/sample-insight/client.mjs +4 -2
- package/sdk/index.d.mts +133 -16
- package/sdk/index.mjs +3 -2
- package/sdk/lifecycle.mjs +8 -3
- package/server/api/workshop/agent-tools/bindings/index.post.ts +22 -7
- package/server/api/workshop/aml/datasets/[id].delete.ts +39 -0
- package/server/api/workshop/aml/datasets/[id].get.ts +31 -9
- package/server/api/workshop/aml/datasets/[id].patch.ts +30 -0
- package/server/api/workshop/aml/entities/index.get.ts +13 -0
- package/server/api/workshop/aml/entities/prune.post.ts +28 -0
- package/server/api/workshop/aml/env/index.get.ts +13 -0
- package/server/api/workshop/aml/env/recheck.post.ts +14 -0
- package/server/api/workshop/aml/env/uv.post.ts +21 -0
- package/server/api/workshop/aml/env/venv.post.ts +24 -0
- package/server/api/workshop/aml/index.get.ts +14 -1
- package/server/api/workshop/aml/jobs/[id].delete.ts +44 -0
- package/server/api/workshop/aml/models/[id].delete.ts +35 -0
- package/server/api/workshop/aml/models/[id].patch.ts +30 -0
- package/server/services/workshop/agents/agent-interface.ts +3 -0
- package/server/services/workshop/agents/base-agent.ts +9 -0
- package/server/services/workshop/agents/codex-agent.ts +743 -729
- package/server/services/workshop/agents/dsh-agent.ts +4 -7
- package/server/services/workshop/agents/opencode-agent.ts +5 -7
- package/server/services/workshop/aml/aml.repo.ts +18 -0
- package/server/services/workshop/aml/dataset-builder.ts +4 -0
- package/server/services/workshop/aml/entity.ts +365 -0
- package/server/services/workshop/aml/env-manager.ts +242 -0
- package/server/services/workshop/aml/job-orchestrator.ts +4 -15
- package/server/services/workshop/aml/model-registry.ts +6 -0
- package/server/services/workshop/aml/python-runtime.ts +396 -62
- package/server/services/workshop/aml/runtime.ts +95 -4
- package/server/services/workshop/daq/bus/mqtt.adapter.ts +3 -1
- package/server/services/workshop/daq/daq-controller.ts +95 -47
- package/server/services/workshop/daq/daq-node.repo.ts +0 -10
- package/server/services/workshop/daq/daq-runtime.ts +0 -5
- package/server/services/workshop/json-store.mjs +35 -2
- package/server/services/workshop/plugins/host.mjs +18 -12
- package/server/services/workshop/runtime/agent-runtime.ts +32 -3
- package/server/services/workshop/runtime/manager.ts +28 -1
- package/server/services/workshop/runtime/scheduler-loop.ts +10 -1
- package/server/services/workshop/settings.ts +2 -0
- package/shared/config/home.mjs +58 -0
- package/shared/config/schema.json +2 -1
- package/shared/lru.mjs +4 -1
- package/.output/public/_nuxt/-6OnbLFb.js +0 -1
- package/.output/public/_nuxt/-nb2uqVg.js +0 -1
- package/.output/public/_nuxt/4bHdIqEg.js +0 -18
- package/.output/public/_nuxt/6PZPfFcO.js +0 -17
- package/.output/public/_nuxt/BBBtwOpo.js +0 -9
- package/.output/public/_nuxt/BBwMH_hG.js +0 -7
- package/.output/public/_nuxt/BDUjyaF4.js +0 -42
- package/.output/public/_nuxt/BNXfwXpE.js +0 -1
- package/.output/public/_nuxt/BN_PdN3J.js +0 -24
- package/.output/public/_nuxt/BSSUlJnx2.js +0 -1
- package/.output/public/_nuxt/BWSE6hR6.js +0 -1
- package/.output/public/_nuxt/BZGNTgTQ2.js +0 -1
- package/.output/public/_nuxt/BZv4RFYN.js +0 -1
- package/.output/public/_nuxt/BcmbLh2z2.js +0 -1
- package/.output/public/_nuxt/BfGc7TJp.js +0 -1
- package/.output/public/_nuxt/BgTB6h_q.js +0 -2
- package/.output/public/_nuxt/BkLJA9J5.js +0 -1
- package/.output/public/_nuxt/Bp5luxkg2.js +0 -1
- package/.output/public/_nuxt/BuCHayqN.js +0 -1
- package/.output/public/_nuxt/BuvcLKh1.js +0 -19
- package/.output/public/_nuxt/C3tCneTM.js +0 -1
- package/.output/public/_nuxt/C77oC8yC2.js +0 -7
- package/.output/public/_nuxt/C9f8QMp12.js +0 -1
- package/.output/public/_nuxt/CKfhtOt7.js +0 -13
- package/.output/public/_nuxt/CQvmN-Mi.js +0 -1
- package/.output/public/_nuxt/CUDrOuW7.js +0 -1
- package/.output/public/_nuxt/CZcC-gpk.js +0 -1
- package/.output/public/_nuxt/CbzsPO5H.js +0 -1
- package/.output/public/_nuxt/CdSOrh2c.js +0 -1
- package/.output/public/_nuxt/Cgx818r-.js +0 -1
- package/.output/public/_nuxt/Cjm7VogC.js +0 -1
- package/.output/public/_nuxt/Cm5mDxzH.js +0 -1
- package/.output/public/_nuxt/CmHzfVc5.js +0 -3
- package/.output/public/_nuxt/Cn3J3NXR.js +0 -23
- package/.output/public/_nuxt/Cno6kYiO2.js +0 -1
- package/.output/public/_nuxt/Cp6z0RN7.js +0 -1
- package/.output/public/_nuxt/CwqIxJGj.js +0 -2
- package/.output/public/_nuxt/D-Ca4BGY.js +0 -70
- package/.output/public/_nuxt/D0fhp-Ga.js +0 -75
- package/.output/public/_nuxt/D1z7i2UP.js +0 -31
- package/.output/public/_nuxt/DIaTPH1M.js +0 -1
- package/.output/public/_nuxt/DTYBfjRY.js +0 -1
- package/.output/public/_nuxt/DXRZPxGs.js +0 -1
- package/.output/public/_nuxt/DZzGarBE2.js +0 -13
- package/.output/public/_nuxt/DaMCzQhv.js +0 -1
- package/.output/public/_nuxt/DoLasgPj2.js +0 -1
- package/.output/public/_nuxt/DpojD719.js +0 -1
- package/.output/public/_nuxt/DsVcWfyR.js +0 -1
- package/.output/public/_nuxt/DtBu71ev.js +0 -32
- package/.output/public/_nuxt/Dy-mxvXY2.js +0 -1
- package/.output/public/_nuxt/DzuC31-i.js +0 -2
- package/.output/public/_nuxt/FQri3dV3.js +0 -1
- package/.output/public/_nuxt/ORt9oDIy2.js +0 -1
- package/.output/public/_nuxt/TownView.CtskuMXS.css +0 -1
- package/.output/public/_nuxt/VLI2Zy4t.js +0 -5
- package/.output/public/_nuxt/_id_.MbzdFygI.css +0 -1
- package/.output/public/_nuxt/_id_.hRYo-EAB.css +0 -1
- package/.output/public/_nuxt/_wsId_.gXMEOYgX.css +0 -1
- package/.output/public/_nuxt/aml.WU_bh87J.css +0 -1
- package/.output/public/_nuxt/arUY5dyq2.js +0 -4
- package/.output/public/_nuxt/builds/meta/291ef3e6-fa6a-4dee-8f46-05da1aeab815.json +0 -1
- package/.output/public/_nuxt/daq.Bb6l44-O.css +0 -1
- package/.output/public/_nuxt/dcw.rXH2fc2Z.css +0 -1
- package/.output/public/_nuxt/default.jNT73_hq.css +0 -1
- package/.output/public/_nuxt/ekuGmQ7R.js +0 -1
- package/.output/public/_nuxt/entry.jFrFAWuA.css +0 -1
- package/.output/public/_nuxt/logs.DMOM-iHe.css +0 -1
- package/.output/public/_nuxt/niDwBOZW.js +0 -3
- package/.output/public/_nuxt/pMoIO6rr.js +0 -14
- package/.output/public/_nuxt/pages.Cc8GX9T1.css +0 -1
- package/.output/public/_nuxt/plugins.wIPyfPn-.css +0 -1
- package/.output/public/_nuxt/rqZ-1SoP.js +0 -2
- package/.output/public/_nuxt/settings.BCm4NZIc.css +0 -1
- package/.output/public/_nuxt/town.C_DsNW0J.css +0 -1
- package/.output/public/_nuxt/users.DuAt_Zwf.css +0 -1
- package/.output/public/_nuxt/vJ4FPb-_.js +0 -1
- package/.output/public/_nuxt/workshop.BJg84pOK.css +0 -1
- package/.output/server/chunks/build/aml-uBNIppIf.mjs +0 -508
- package/.output/server/chunks/build/aml-uBNIppIf.mjs.map +0 -1
- package/.output/server/chunks/build/daq-BvihjQyW.mjs.map +0 -1
- package/.output/server/chunks/build/pages-C-6BRtv8.mjs.map +0 -1
- package/scripts/_audit/.tmp/audit-data/dcws.json +0 -28
- package/scripts/_audit/.tmp/dcw-writes.json +0 -15650
- package/scripts/_audit/.tmp/dcws.json +0 -9033
- package/scripts/_audit/.tmp/pollution-backup/dcw-rollback.polluted.json +0 -470006
- package/scripts/_audit/.tmp/pollution-backup/dcws.polluted.json +0 -9085
- package/scripts/_audit/.tmp/probe-cwd.txt +0 -1
- package/scripts/_audit/awhome/commands/README.md +0 -3
- package/scripts/_audit/awhome/commands/hello.mjs +0 -12
- package/scripts/_audit/diag-cwd.ts +0 -20
- package/scripts/_audit/diag-cwd2.ts +0 -19
- package/scripts/_audit/hello.mjs +0 -12
- package/scripts/_audit/ndjson-partial-line-repro.mjs +0 -77
- package/scripts/_audit/opencode-await-ternary-repro.mjs +0 -20
- package/scripts/_audit/part-frag.txt +0 -84
- package/scripts/_audit/part-head.txt +0 -45
- package/scripts/_audit/probe-child.mjs +0 -17
- package/scripts/_audit/probe-envelope.mjs +0 -49
- package/scripts/_audit/probe-packlist.mjs +0 -67
- package/scripts/_audit/probe-routes.mjs +0 -47
- package/scripts/_audit/probe-routes2.mjs +0 -38
- package/scripts/_audit/probe.ts +0 -9
- package/scripts/_audit/probe2.ts +0 -6
- package/scripts/_audit/probe3.ts +0 -3
- package/scripts/_audit/probe4.ts +0 -3
- package/scripts/_audit/proj/.AgentWorkShop/commands/echoargs.mjs +0 -13
- package/scripts/_audit/proj/config.yml +0 -1
- package/scripts/_audit/run.mjs +0 -30
- package/scripts/_audit/tsconfig.probe.json +0 -24
- package/scripts/_audit/typecheck-out.txt +0 -466
- package/scripts/_daq-realtime-probe.mjs +0 -68
- package/scripts/_daq-warn-probe.mjs +0 -50
- package/scripts/_dbg-acc-1-setup.mjs +0 -57
- package/scripts/_dbg-acc-2-diag.mjs +0 -14
- package/scripts/_dbg-acc-2-intervals.mjs +0 -81
- package/scripts/_dbg-acc-3-daq.mjs +0 -48
- package/scripts/_dbg-acc-4-team.mjs +0 -92
- package/scripts/_dbg-acc-5-visual.mjs +0 -63
- package/scripts/_dbg-acc-5b-ws-town.mjs +0 -18
- package/scripts/_dbg-acc-5c-town.mjs +0 -12
- package/scripts/_dbg-acc-6-i18n.mjs +0 -19
- package/scripts/_dbg-agent-tools-audit.mjs +0 -154
- package/scripts/_dbg-agent-workflow-audit.mjs +0 -177
- package/scripts/_dbg-agents-dropdown-shot.py +0 -33
- package/scripts/_dbg-anim-verify.mjs +0 -81
- package/scripts/_dbg-app-shot.mjs +0 -48
- package/scripts/_dbg-autoframe.mjs +0 -103
- package/scripts/_dbg-availability-probe.ts +0 -11
- package/scripts/_dbg-beacon-final.mjs +0 -181
- package/scripts/_dbg-bind-bidi-e2e.mjs +0 -239
- package/scripts/_dbg-callout-near.mjs +0 -108
- package/scripts/_dbg-catalog-smoke.ts +0 -20
- package/scripts/_dbg-cf-line-shot.mjs +0 -18
- package/scripts/_dbg-chan-focus.mjs +0 -49
- package/scripts/_dbg-channel-plugin-ui.mjs +0 -94
- package/scripts/_dbg-cleanup.mjs +0 -31
- package/scripts/_dbg-closedloop-ui-shot.mjs +0 -61
- package/scripts/_dbg-codex-handshake.ts +0 -30
- package/scripts/_dbg-codex-probe.mjs +0 -58
- package/scripts/_dbg-codex-sandbox.ts +0 -58
- package/scripts/_dbg-codex-turn.ts +0 -65
- package/scripts/_dbg-collab-scenario-e2e.mjs +0 -185
- package/scripts/_dbg-config-smoke.ts +0 -28
- package/scripts/_dbg-console-audit.mjs +0 -61
- package/scripts/_dbg-console-probe.mjs +0 -23
- package/scripts/_dbg-context-inject-audit.mjs +0 -231
- package/scripts/_dbg-cpu-profile.mjs +0 -53
- package/scripts/_dbg-crash-recovery.mjs +0 -143
- package/scripts/_dbg-crop-shot.mjs +0 -16
- package/scripts/_dbg-cross-channel-e2e.mjs +0 -157
- package/scripts/_dbg-cross-team-visibility-e2e.mjs +0 -129
- package/scripts/_dbg-crush-probe.sh +0 -21
- package/scripts/_dbg-crush-spawn-probe.ts +0 -22
- package/scripts/_dbg-daq-acc-probe.mjs +0 -24
- package/scripts/_dbg-daq-attrib.mjs +0 -34
- package/scripts/_dbg-daq-bind-audit.mjs +0 -119
- package/scripts/_dbg-daq-cadence.mjs +0 -104
- package/scripts/_dbg-daq-debug.mjs +0 -22
- package/scripts/_dbg-daq-diag.mjs +0 -33
- package/scripts/_dbg-daq-e2e.mjs +0 -171
- package/scripts/_dbg-daq-film.mjs +0 -136
- package/scripts/_dbg-daq-filter-e2e.mjs +0 -109
- package/scripts/_dbg-daq-filter-e2e2.mjs +0 -62
- package/scripts/_dbg-daq-final-regression.mjs +0 -78
- package/scripts/_dbg-daq-frame-alarm.mjs +0 -49
- package/scripts/_dbg-daq-frame-ui.mjs +0 -62
- package/scripts/_dbg-daq-frame-ws.mjs +0 -72
- package/scripts/_dbg-daq-full-check.mjs +0 -179
- package/scripts/_dbg-daq-line-note-verify.mjs +0 -61
- package/scripts/_dbg-daq-linebanner-audit.mjs +0 -107
- package/scripts/_dbg-daq-pages-shot.mjs +0 -37
- package/scripts/_dbg-daq-perf.mjs +0 -61
- package/scripts/_dbg-daq-probe.mjs +0 -27
- package/scripts/_dbg-daq-recipe-e2e.mjs +0 -30
- package/scripts/_dbg-daq-redesign-shot.mjs +0 -88
- package/scripts/_dbg-daq-rows-probe.mjs +0 -26
- package/scripts/_dbg-daq-rowstate-e2e.mjs +0 -152
- package/scripts/_dbg-daq-rowstate-shot.mjs +0 -45
- package/scripts/_dbg-daq-rowstate-shot2.mjs +0 -38
- package/scripts/_dbg-daq-tpl.mjs +0 -144
- package/scripts/_dbg-dash-console-check.mjs +0 -49
- package/scripts/_dbg-dash-deep-probe.mjs +0 -61
- package/scripts/_dbg-dash-hitpoint.mjs +0 -44
- package/scripts/_dbg-dash-live-shot.mjs +0 -36
- package/scripts/_dbg-dash-shot.mjs +0 -21
- package/scripts/_dbg-dashboard-shot.mjs +0 -35
- package/scripts/_dbg-dcw-audit.mjs +0 -126
- package/scripts/_dbg-dcw-card-e2e.mjs +0 -108
- package/scripts/_dbg-dcw-channel-ui.mjs +0 -144
- package/scripts/_dbg-dcw-examples.mjs +0 -81
- package/scripts/_dbg-dcw-light-shot.mjs +0 -19
- package/scripts/_dbg-dcw-line-audit.mjs +0 -107
- package/scripts/_dbg-dcw-pause-tpl-audit.mjs +0 -161
- package/scripts/_dbg-dcw-pause-ui.mjs +0 -175
- package/scripts/_dbg-dcw-read-toolface.ts +0 -13
- package/scripts/_dbg-dcw-read-ui.mjs +0 -74
- package/scripts/_dbg-dcw-scene.mjs +0 -72
- package/scripts/_dbg-dcw-shot2.mjs +0 -14
- package/scripts/_dbg-dcw-twin-e2e.mjs +0 -192
- package/scripts/_dbg-diag-mock-loop.mjs +0 -89
- package/scripts/_dbg-diag-watch.mjs +0 -95
- package/scripts/_dbg-docs-site-shot.mjs +0 -32
- package/scripts/_dbg-dsh-probe.mjs +0 -31
- package/scripts/_dbg-dt-interact.mjs +0 -193
- package/scripts/_dbg-error-probe.mjs +0 -54
- package/scripts/_dbg-filter-light-verify.mjs +0 -54
- package/scripts/_dbg-final-acceptance-2.mjs +0 -72
- package/scripts/_dbg-final-acceptance.mjs +0 -192
- package/scripts/_dbg-final-agent-e2e.mjs +0 -151
- package/scripts/_dbg-final-features.mjs +0 -155
- package/scripts/_dbg-final-fixups.mjs +0 -62
- package/scripts/_dbg-final-full-e2e.mjs +0 -218
- package/scripts/_dbg-final-line-e2e.mjs +0 -173
- package/scripts/_dbg-final-shots.mjs +0 -32
- package/scripts/_dbg-final-t6-hitl.mjs +0 -38
- package/scripts/_dbg-final-visual.mjs +0 -29
- package/scripts/_dbg-fix-unused-imports.py +0 -41
- package/scripts/_dbg-focus-range.mjs +0 -115
- package/scripts/_dbg-fresh-scene-e2e.mjs +0 -125
- package/scripts/_dbg-fullchain-e2e.mjs +0 -178
- package/scripts/_dbg-gate-debug.mjs +0 -37
- package/scripts/_dbg-gif-encode.mjs +0 -111
- package/scripts/_dbg-gizmo.mjs +0 -95
- package/scripts/_dbg-glass-probe.mjs +0 -57
- package/scripts/_dbg-glass-shot.mjs +0 -50
- package/scripts/_dbg-glass-sweep.mjs +0 -25
- package/scripts/_dbg-glb-probe.mjs +0 -43
- package/scripts/_dbg-goose-probe.mjs +0 -33
- package/scripts/_dbg-goose-probe.sh +0 -10
- package/scripts/_dbg-hardening-probe.mjs +0 -90
- package/scripts/_dbg-harness-ui-dbg.py +0 -49
- package/scripts/_dbg-harness-ui-shot.py +0 -109
- package/scripts/_dbg-hero-btn-probe.mjs +0 -21
- package/scripts/_dbg-hidden-check.mjs +0 -21
- package/scripts/_dbg-hmi-audit.mjs +0 -164
- package/scripts/_dbg-home-repro.mjs +0 -24
- package/scripts/_dbg-home-stack.mjs +0 -13
- package/scripts/_dbg-host.mjs +0 -16
- package/scripts/_dbg-huashu-survey.mjs +0 -31
- package/scripts/_dbg-huashu-survey2.mjs +0 -35
- package/scripts/_dbg-huashu-verify.mjs +0 -25
- package/scripts/_dbg-huashu-verify2.mjs +0 -26
- package/scripts/_dbg-hydration-detail.mjs +0 -18
- package/scripts/_dbg-i18n-debug.mjs +0 -27
- package/scripts/_dbg-i18n-debug2.mjs +0 -26
- package/scripts/_dbg-i18n-final.mjs +0 -42
- package/scripts/_dbg-i18n-scan.mjs +0 -38
- package/scripts/_dbg-infra-lifecycle.mjs +0 -44
- package/scripts/_dbg-interval-config.mjs +0 -156
- package/scripts/_dbg-interval-scenario.mjs +0 -126
- package/scripts/_dbg-kicker-check.mjs +0 -11
- package/scripts/_dbg-line-aura-shots.mjs +0 -54
- package/scripts/_dbg-line-control-e2e.mjs +0 -120
- package/scripts/_dbg-line-gate-audit.mjs +0 -108
- package/scripts/_dbg-line-live-e2e.mjs +0 -144
- package/scripts/_dbg-line-repo-test.ts +0 -10
- package/scripts/_dbg-line-scenario-e2e.mjs +0 -256
- package/scripts/_dbg-line-spawn.ts +0 -31
- package/scripts/_dbg-live-engine-probe.mjs +0 -80
- package/scripts/_dbg-login-debug.py +0 -23
- package/scripts/_dbg-login-e2e.mjs +0 -26
- package/scripts/_dbg-logs-ui-e2e.py +0 -126
- package/scripts/_dbg-mcp-bridge-probe.mjs +0 -147
- package/scripts/_dbg-modbus-latency.mjs +0 -22
- package/scripts/_dbg-mqtt-chain-e2e.mjs +0 -90
- package/scripts/_dbg-mqtt-publisher.mjs +0 -17
- package/scripts/_dbg-nav-rpg.mjs +0 -84
- package/scripts/_dbg-nav-shot.mjs +0 -28
- package/scripts/_dbg-nav.mjs +0 -27
- package/scripts/_dbg-oneshot-impl-probe.ts +0 -67
- package/scripts/_dbg-opencode-sse.mjs +0 -101
- package/scripts/_dbg-opencode-start.ts +0 -57
- package/scripts/_dbg-opslog-e2e.mjs +0 -121
- package/scripts/_dbg-opslog-shots.mjs +0 -62
- package/scripts/_dbg-optimization-e2e.mjs +0 -94
- package/scripts/_dbg-orbit.mjs +0 -58
- package/scripts/_dbg-overview-probe.sh +0 -31
- package/scripts/_dbg-panesplitter-fix-check.mjs +0 -62
- package/scripts/_dbg-perms-visual.mjs +0 -36
- package/scripts/_dbg-pg-tcp-probe.cjs +0 -27
- package/scripts/_dbg-phase-e3-monitor.mjs +0 -25
- package/scripts/_dbg-pi-spawn-probe.ts +0 -33
- package/scripts/_dbg-plc-agent-loop.ts +0 -102
- package/scripts/_dbg-plc-e2e.mjs +0 -171
- package/scripts/_dbg-plugin-agent-read.ts +0 -56
- package/scripts/_dbg-plugin-config-ui.mjs +0 -111
- package/scripts/_dbg-plugin-matrix.mjs +0 -212
- package/scripts/_dbg-plugin-panels-ui.mjs +0 -54
- package/scripts/_dbg-plugin-sink-rest.mjs +0 -70
- package/scripts/_dbg-plugin-sink-ui.mjs +0 -81
- package/scripts/_dbg-plugin-tools-inject.ts +0 -80
- package/scripts/_dbg-plugin-ui-wizard.mjs +0 -125
- package/scripts/_dbg-plugin-verify-e2e.mjs +0 -123
- package/scripts/_dbg-plugins-e2e.mjs +0 -101
- package/scripts/_dbg-pop-clamp-verify.mjs +0 -77
- package/scripts/_dbg-preset-e2e.mjs +0 -116
- package/scripts/_dbg-preview-console.mjs +0 -28
- package/scripts/_dbg-preview-minrepro.mjs +0 -156
- package/scripts/_dbg-preview-pixels.mjs +0 -93
- package/scripts/_dbg-prompts-hotreload-test.ts +0 -76
- package/scripts/_dbg-prompts-resolve-test.ts +0 -39
- package/scripts/_dbg-quality-pages-e2e.mjs +0 -84
- package/scripts/_dbg-query-cancel.ts +0 -12
- package/scripts/_dbg-qwen-acp-probe.mjs +0 -30
- package/scripts/_dbg-qwen-capture.mjs +0 -21
- package/scripts/_dbg-rail-tree-e2e.mjs +0 -183
- package/scripts/_dbg-real-driver-e2e.mjs +0 -55
- package/scripts/_dbg-redesign-shots.mjs +0 -34
- package/scripts/_dbg-registry-smoke.ts +0 -14
- package/scripts/_dbg-release-smoke.mjs +0 -104
- package/scripts/_dbg-repo-setup-verify.mjs +0 -31
- package/scripts/_dbg-resolve-probe.ts +0 -6
- package/scripts/_dbg-restart-persist.mjs +0 -41
- package/scripts/_dbg-retention-test.ts +0 -25
- package/scripts/_dbg-rollback-mgr-audit.mjs +0 -169
- package/scripts/_dbg-rpg.mjs +0 -71
- package/scripts/_dbg-sc001-dispatch.mjs +0 -63
- package/scripts/_dbg-scenario-final-shot.mjs +0 -24
- package/scripts/_dbg-scenario-phase-e2.mjs +0 -75
- package/scripts/_dbg-scenario-phase-e3.mjs +0 -96
- package/scripts/_dbg-scenario-phase1.mjs +0 -90
- package/scripts/_dbg-scenario-phase2.mjs +0 -105
- package/scripts/_dbg-scenario-phase3-monitor.mjs +0 -48
- package/scripts/_dbg-scenario-phase3.mjs +0 -111
- package/scripts/_dbg-scene-polish-shot.mjs +0 -118
- package/scripts/_dbg-selring-probe.mjs +0 -47
- package/scripts/_dbg-settings-draft-probe.mjs +0 -39
- package/scripts/_dbg-settings-probe.mjs +0 -33
- package/scripts/_dbg-setup-e2e.mjs +0 -88
- package/scripts/_dbg-sideinfo.mjs +0 -101
- package/scripts/_dbg-sim-keeper.mjs +0 -100
- package/scripts/_dbg-splitter.mjs +0 -88
- package/scripts/_dbg-swatch-check.mjs +0 -10
- package/scripts/_dbg-task-cancel-probe.mjs +0 -66
- package/scripts/_dbg-team-drill.mjs +0 -173
- package/scripts/_dbg-town-alarm-e2e.mjs +0 -40
- package/scripts/_dbg-town-beauty-shots.mjs +0 -54
- package/scripts/_dbg-town-daq-shot.mjs +0 -26
- package/scripts/_dbg-town-full-e2e.mjs +0 -104
- package/scripts/_dbg-town-gate.mjs +0 -44
- package/scripts/_dbg-town-ins-probe.mjs +0 -37
- package/scripts/_dbg-town-perf.mjs +0 -50
- package/scripts/_dbg-town-polish-shots.mjs +0 -82
- package/scripts/_dbg-town-realtime.mjs +0 -42
- package/scripts/_dbg-town-shot.py +0 -25
- package/scripts/_dbg-town-shot3.mjs +0 -17
- package/scripts/_dbg-town-truth.mjs +0 -37
- package/scripts/_dbg-town-truth2.mjs +0 -27
- package/scripts/_dbg-transform-audit.mjs +0 -98
- package/scripts/_dbg-trend-expand-test.mjs +0 -38
- package/scripts/_dbg-twindaq-focus.mjs +0 -81
- package/scripts/_dbg-ui-polish-shot.mjs +0 -43
- package/scripts/_dbg-ui-polish-verify1.mjs +0 -92
- package/scripts/_dbg-ui-polish-verify2.mjs +0 -50
- package/scripts/_dbg-ui-polish-verify3.mjs +0 -51
- package/scripts/_dbg-ui-polish-verify4.mjs +0 -50
- package/scripts/_dbg-ui-shot.mjs +0 -26
- package/scripts/_dbg-ui-shots.mjs +0 -28
- package/scripts/_dbg-ui-survey.py +0 -52
- package/scripts/_dbg-unify-shot.mjs +0 -43
- package/scripts/_dbg-uplink-probe.mjs +0 -36
- package/scripts/_dbg-wizard-preview-shot.mjs +0 -58
- package/scripts/_dbg-wizard-ui-e2e.mjs +0 -93
- package/scripts/_dbg-ws-probe.mjs +0 -86
- package/scripts/_dbg-ws-shot2.mjs +0 -23
- package/scripts/_dbg-wsdot-sanity.mjs +0 -25
- package/scripts/_dev-stack.mjs +0 -46
- package/scripts/_http-driver-probe.mjs +0 -30
- package/scripts/_mqtt-driver-probe.mjs +0 -30
- package/scripts/_newdriver-rest-probe.mjs +0 -100
- package/scripts/_node-state-probe.mjs +0 -5
- package/scripts/_opcua-driver-probe.mjs +0 -31
- package/scripts/_rtu-debug.mjs +0 -41
- package/scripts/_rtu-direct.mjs +0 -6
- package/scripts/_rtu-driver-probe.mjs +0 -53
- package/scripts/_spike-pitui.mjs +0 -116
- package/scripts/_tmp-args-probe.mjs +0 -20
- package/scripts/_tmp-cyc-entry.mjs +0 -8
- package/scripts/_tmp-cyc-main.mjs +0 -5
- package/scripts/_tmp-cyc-mod.mjs +0 -2
- package/scripts/_tmp-cycle-a.mjs +0 -6
- package/scripts/_tmp-cycle-b.mjs +0 -2
- package/scripts/_tmp-cycle-probe.mjs +0 -4
- package/scripts/_tmp-entry-variant.mjs +0 -2
- package/scripts/_tmp-help-probe.mjs +0 -19
- package/scripts/_tmp-help-probe2.mjs +0 -2
- package/scripts/_tmp-trace-preload.mjs +0 -1
- package/scripts/_wizard-shots.mjs +0 -90
- package/scripts/acceptance-suite.py +0 -207
- package/scripts/aml-agent-bridge.ts +0 -230
- package/scripts/aml-industrial-loop.ts +0 -232
- package/scripts/build-film-devices.mjs +0 -227
- package/scripts/collab-live-test.py +0 -177
- package/scripts/debug-mcp-http.ts +0 -64
- package/scripts/demo-lead-worker.ts +0 -256
- package/scripts/demo-modes.ts +0 -415
- package/scripts/demo-omp-channel.ts +0 -135
- package/scripts/design-preflight.mjs +0 -223
- package/scripts/design-verify-templates.mjs +0 -110
- package/scripts/design-verify.mjs +0 -170
- package/scripts/dev-window.cmd +0 -6
- package/scripts/device-line-restore.mjs +0 -34
- package/scripts/diag-lead-status.ts +0 -101
- package/scripts/e2e-a2a-steer-live.mjs +0 -193
- package/scripts/e2e-dual-drive-comm.ts +0 -259
- package/scripts/e2e-full-scenario.ts +0 -321
- package/scripts/e2e-harness-consistency.ts +0 -204
- package/scripts/e2e-harness-provider-task.mjs +0 -126
- package/scripts/e2e-line-live.mjs +0 -144
- package/scripts/e2e-memory-persistence.ts +0 -320
- package/scripts/e2e-omp-modes.ts +0 -274
- package/scripts/e2e-omp-realtime.ts +0 -258
- package/scripts/e2e-plc-scenario.mjs +0 -292
- package/scripts/e2e-real-scenario.mjs +0 -466
- package/scripts/e2e-tab-close.mjs +0 -136
- package/scripts/e2e-token-ui.mjs +0 -149
- package/scripts/final-soup-run.py +0 -192
- package/scripts/final-soup-watch.py +0 -83
- package/scripts/i18n-codemod.mjs +0 -173
- package/scripts/i18n-fix-en.py +0 -28
- package/scripts/i18n-fix-en2.py +0 -31
- package/scripts/i18n-merge.mjs +0 -191
- package/scripts/migrate-local-time.mjs +0 -123
- package/scripts/omp-real-test.py +0 -328
- package/scripts/team-plugins-api-smoke.mjs +0 -149
- package/scripts/test-a2a-relay.mjs +0 -222
- package/scripts/test-aml-integration.ts +0 -159
- package/scripts/test-aml-job.ts +0 -174
- package/scripts/test-aml-unit.ts +0 -184
- package/scripts/test-api-client.ts +0 -108
- package/scripts/test-api-suite.mjs +0 -271
- package/scripts/test-block-consumption.mjs +0 -194
- package/scripts/test-cmd-render.mjs +0 -218
- package/scripts/test-collab-omp.mjs +0 -192
- package/scripts/test-config-precedence.ts +0 -124
- package/scripts/test-context-governor.ts +0 -176
- package/scripts/test-daq-frames.ts +0 -180
- package/scripts/test-daq-minio.ts +0 -77
- package/scripts/test-dedup-logic.ts +0 -132
- package/scripts/test-e2e-collaboration.ts +0 -262
- package/scripts/test-e2e-monitor.ts +0 -192
- package/scripts/test-event-history.ts +0 -112
- package/scripts/test-exec-modes.ts +0 -316
- package/scripts/test-fifo-realtime.mjs +0 -193
- package/scripts/test-final-e2e.mjs +0 -290
- package/scripts/test-goal-summary.ts +0 -202
- package/scripts/test-harness-liveness.ts +0 -109
- package/scripts/test-harness-terminal.ts +0 -164
- package/scripts/test-header-trail.mjs +0 -95
- package/scripts/test-hitl.ts +0 -360
- package/scripts/test-koda-restyle.mjs +0 -105
- package/scripts/test-lane-raw.ts +0 -67
- package/scripts/test-lanes-history-render.mjs +0 -138
- package/scripts/test-loop-omp.mjs +0 -154
- package/scripts/test-mdlite.ts +0 -53
- package/scripts/test-memory-brief-chronicle.ts +0 -180
- package/scripts/test-memory-rrf-mmr.ts +0 -114
- package/scripts/test-mock-collab.mjs +0 -226
- package/scripts/test-modern-render.mjs +0 -174
- package/scripts/test-omp-terminal.mjs +0 -187
- package/scripts/test-plugin-ext.ts +0 -173
- package/scripts/test-prompts-loader.ts +0 -56
- package/scripts/test-real-scenario.mjs +0 -290
- package/scripts/test-stream-render.ts +0 -37
- package/scripts/test-task-drawer.mjs +0 -204
- package/scripts/test-task-invariants.mjs +0 -169
- package/scripts/test-town-3d.mjs +0 -121
- package/scripts/test-town-layout.mjs +0 -200
- package/scripts/test-town-page.mjs +0 -136
- package/scripts/test-town-scene-math.ts +0 -169
- package/scripts/test-town-twin.mjs +0 -121
- package/scripts/test-town-upload.mjs +0 -89
- package/scripts/test-town-user-flow.mjs +0 -619
- package/scripts/test-town-world.mjs +0 -76
- package/scripts/test-town-wuwa.mjs +0 -198
- package/scripts/test-user-isolation.mjs +0 -193
- package/scripts/test-workshop-entries.ts +0 -370
- package/scripts/test-workspace-api.ts +0 -329
- package/scripts/test-ws-aep.mjs +0 -187
- package/scripts/test-ws-protocol.ts +0 -134
- package/scripts/town-demo-seed.mjs +0 -75
- package/scripts/town-scene-clear.mjs +0 -56
- package/scripts/verify-exec-modes-report.ts +0 -248
- package/scripts/verify-lead-mail.ts +0 -188
- package/scripts/verify-page-smoke.mjs +0 -87
- package/scripts/ws-test.mjs +0 -176
- package/scripts/ws-test.py +0 -4
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 跨 Channel 通信端到端验证(针对运行中的环境,默认 http://127.0.0.1:3000)。
|
|
3
|
-
* 覆盖:lead→异 channel lead 投递(metadata 盖章/落对方 mailbox)→ mock lead 消费并
|
|
4
|
-
* 自动回执(跨 channel 回信)→ 回信到达源 channel lead → 权限(worker 拒)→
|
|
5
|
-
* 边界(自指/停用/无 lead channel)。
|
|
6
|
-
* 运行: node scripts/_dbg-cross-channel-e2e.mjs (AW_BASE 可覆盖目标)
|
|
7
|
-
*/
|
|
8
|
-
const ROOT = process.env.AW_BASE ?? 'http://127.0.0.1:3000'
|
|
9
|
-
let TOKEN = process.env.AW_E2E_TOKEN ?? ''
|
|
10
|
-
const H = () => ({ authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' })
|
|
11
|
-
const sleep = (ms) => new Promise(r => setTimeout(r, ms))
|
|
12
|
-
let failures = 0
|
|
13
|
-
const check = (name, ok, detail = '') => {
|
|
14
|
-
console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
15
|
-
if (!ok) failures++
|
|
16
|
-
}
|
|
17
|
-
const fail = (m) => { console.error('FATAL:', m); process.exit(1) }
|
|
18
|
-
|
|
19
|
-
async function api(method, path, body) {
|
|
20
|
-
const res = await fetch(ROOT + path, { method, headers: H(), body: body !== undefined ? JSON.stringify(body) : undefined })
|
|
21
|
-
const json = await res.json().catch(() => ({}))
|
|
22
|
-
return { status: res.status, ...json }
|
|
23
|
-
}
|
|
24
|
-
const jpost = (u, b) => api('POST', u, b ?? {})
|
|
25
|
-
const jget = (u) => api('GET', u)
|
|
26
|
-
const cleanup = []
|
|
27
|
-
const tag = Math.random().toString(36).slice(2, 8)
|
|
28
|
-
|
|
29
|
-
async function deployTeam(channelName, extraWorkers = []) {
|
|
30
|
-
const chRes = (await jpost('/api/workshop/channels', { name: channelName, description: '跨Channel验证' })).data
|
|
31
|
-
cleanup.push(['channel', chRes.channelId])
|
|
32
|
-
const team = (await jpost('/api/workshop/teams', { name: channelName + '-组', description: '跨Channel验证' })).data
|
|
33
|
-
cleanup.push(['team', team.id])
|
|
34
|
-
// 成员先入队再一次 deploy(重复 deploy 不会同步新增成员)
|
|
35
|
-
await jpost(`/api/workshop/teams/${team.id}/members`, { agentId: 'tpl-default-lead', role: 'lead' })
|
|
36
|
-
for (const w of extraWorkers) {
|
|
37
|
-
await jpost(`/api/workshop/teams/${team.id}/members`, { agentId: w.id, role: 'worker' })
|
|
38
|
-
}
|
|
39
|
-
await jpost(`/api/workshop/teams/${team.id}/deploy`, { channelId: chRes.channelId })
|
|
40
|
-
const agents = (await jget(`/api/workshop/channels/${chRes.channelId}/agents`)).data
|
|
41
|
-
const lead = agents.find(a => a.role === 'lead')
|
|
42
|
-
const worker = agents.find(a => a.role === 'worker')
|
|
43
|
-
cleanup.push(['channel-agent', `${chRes.channelId}:${lead?.id}`])
|
|
44
|
-
if (worker) cleanup.push(['channel-agent', `${chRes.channelId}:${worker.id}`])
|
|
45
|
-
return { channelId: chRes.channelId, lead, worker, teamId: team.id }
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async function main() {
|
|
49
|
-
console.log('━━━ 0. 用户注册 ━━━')
|
|
50
|
-
const reg = await jpost('/api/workshop/users/register', { name: 'xcc-' + tag })
|
|
51
|
-
TOKEN = reg.data?.token
|
|
52
|
-
if (!TOKEN) fail('用户注册失败: ' + JSON.stringify(reg).slice(0, 120))
|
|
53
|
-
check('用户注册并取得 token', !!TOKEN)
|
|
54
|
-
|
|
55
|
-
// ===== 1. 两个团队:西线(lead mock + worker mock)/ 东线(lead mock)=====
|
|
56
|
-
console.log('\n━━━ 1. 双 channel 部署 ━━━')
|
|
57
|
-
const workerTpl = (await jpost('/api/workshop/agents', { name: '西线worker-' + tag, harness: 'mock', config: {} })).data
|
|
58
|
-
cleanup.push(['agent-tpl', workerTpl.id])
|
|
59
|
-
const west = await deployTeam('西线团队-' + tag, [workerTpl])
|
|
60
|
-
check('西线 channel + mock lead 就绪', !!west.channelId && !!west.lead?.id)
|
|
61
|
-
const east = await deployTeam('东线团队-' + tag)
|
|
62
|
-
check('东线 channel + mock lead 就绪', !!east.channelId && !!east.lead?.id)
|
|
63
|
-
const westWorker = west.worker
|
|
64
|
-
check('西线 worker 就绪(权限反证用)', !!westWorker?.id)
|
|
65
|
-
|
|
66
|
-
// ===== 2. 跨 Channel 发送(REST,lead 身份)=====
|
|
67
|
-
console.log('\n━━━ 2. 跨 Channel 投递(lead → 对方 lead)━━━')
|
|
68
|
-
const ask = '东线请注意:西线请求支援——请分析你们 channel 的负载情况,并把结论回执给我。'
|
|
69
|
-
const sent = await jpost(`/api/workshop/channels/${west.channelId}/messages`, {
|
|
70
|
-
toChannelId: east.channelId,
|
|
71
|
-
fromAgentId: west.lead.id,
|
|
72
|
-
text: ask,
|
|
73
|
-
requireReply: true,
|
|
74
|
-
})
|
|
75
|
-
check('跨 Channel 发送成功(回执含目标 channel/lead)',
|
|
76
|
-
sent.status === 200 && sent.data?.toChannelId === east.channelId && sent.data?.toLeadAgentId === east.lead.id,
|
|
77
|
-
`messageId=${String(sent.data?.messageId ?? '').slice(0, 8)} toChannel=${String(sent.data?.toChannelName ?? '')}`)
|
|
78
|
-
const crossMsgId = sent.data?.messageId
|
|
79
|
-
cleanup.push(['cross-message', crossMsgId])
|
|
80
|
-
|
|
81
|
-
// 落库断言:消息出现在东线历史,盖章齐全,收件人=东线 lead
|
|
82
|
-
const eastMsgs = (await jget(`/api/workshop/channels/${east.channelId}/messages?limit=20`)).data
|
|
83
|
-
const list = Array.isArray(eastMsgs) ? eastMsgs : eastMsgs?.messages ?? []
|
|
84
|
-
const delivered = list.find(m => m.id === crossMsgId)
|
|
85
|
-
const meta = delivered?.metadata ?? {}
|
|
86
|
-
check('东线 mailbox 可见该消息(收件人=东线 lead)', !!delivered && delivered.toAgentId === east.lead.id)
|
|
87
|
-
check('跨 Channel 盖章齐全(cross-channel/from-channel/from-label)',
|
|
88
|
-
meta['x-aw-cross-channel'] === 'true'
|
|
89
|
-
&& meta['x-aw-from-channel'] === west.channelId
|
|
90
|
-
&& String(meta['x-aw-from-label'] ?? '').includes('西线团队'),
|
|
91
|
-
`label=${String(meta['x-aw-from-label'] ?? '')}`)
|
|
92
|
-
|
|
93
|
-
// ===== 3. 东线 lead 消费并自动回执(跨 channel 回信到西线 lead)=====
|
|
94
|
-
console.log('\n━━━ 3. 对方 lead 消费并回信(闭环)━━━')
|
|
95
|
-
let reply = null
|
|
96
|
-
for (let i = 0; i < 20; i++) {
|
|
97
|
-
await sleep(1500)
|
|
98
|
-
const westMsgs = (await jget(`/api/workshop/channels/${west.channelId}/messages?limit=20`)).data
|
|
99
|
-
const wlist = Array.isArray(westMsgs) ? westMsgs : westMsgs?.messages ?? []
|
|
100
|
-
reply = wlist.find(m => m.metadata?.['x-aw-in-reply-to'] === crossMsgId
|
|
101
|
-
&& m.metadata?.['x-aw-cross-channel'] === 'true'
|
|
102
|
-
&& m.toAgentId === west.lead.id)
|
|
103
|
-
if (reply) break
|
|
104
|
-
}
|
|
105
|
-
check('东线 lead 自动回信到达西线 lead(in_reply_to 关联)', !!reply,
|
|
106
|
-
reply ? `text=${String(reply.parts?.[0]?.text ?? '').slice(0, 50)}…` : '30s 内未收到回信')
|
|
107
|
-
if (reply) cleanup.push(['cross-message', reply.id])
|
|
108
|
-
|
|
109
|
-
// 回信已被西线 lead 消费?(mock 收到无需回执的信件仅登记;此处只验投递与可见性)
|
|
110
|
-
|
|
111
|
-
// ===== 4. 权限:worker 跨 Channel 被拒 =====
|
|
112
|
-
console.log('\n━━━ 4. 权限反证 ━━━')
|
|
113
|
-
const denied = await jpost(`/api/workshop/channels/${west.channelId}/messages`, {
|
|
114
|
-
toChannelId: east.channelId,
|
|
115
|
-
fromAgentId: westWorker.id,
|
|
116
|
-
text: 'worker 试图跨 Channel(应被拒)',
|
|
117
|
-
})
|
|
118
|
-
check('worker 跨 Channel 被拒(403 ROLE_FORBIDDEN)',
|
|
119
|
-
denied.status === 403 && String(denied.message ?? '').includes('Leader'),
|
|
120
|
-
`status=${denied.status} msg=${String(denied.message ?? '').slice(0, 60)}`)
|
|
121
|
-
|
|
122
|
-
// 无 fromAgentId(人类身份)跨 Channel 同样拒绝
|
|
123
|
-
const anon = await jpost(`/api/workshop/channels/${west.channelId}/messages`, {
|
|
124
|
-
toChannelId: east.channelId,
|
|
125
|
-
text: '匿名跨 Channel(应被拒)',
|
|
126
|
-
})
|
|
127
|
-
check('无 Leader 身份被拒(403)', anon.status === 403, `status=${anon.status}`)
|
|
128
|
-
|
|
129
|
-
// ===== 5. 边界:自指 / 停用 / 不存在 =====
|
|
130
|
-
console.log('\n━━━ 5. 边界用例 ━━━')
|
|
131
|
-
const selfRef = await jpost(`/api/workshop/channels/${west.channelId}/messages`, {
|
|
132
|
-
toChannelId: west.channelId, fromAgentId: west.lead.id, text: 'self',
|
|
133
|
-
})
|
|
134
|
-
check('目标=本 channel 被拒(404)', selfRef.status === 404, `status=${selfRef.status}`)
|
|
135
|
-
const ghost = await jpost(`/api/workshop/channels/${west.channelId}/messages`, {
|
|
136
|
-
toChannelId: 'ch-not-exists-' + tag, fromAgentId: west.lead.id, text: 'ghost',
|
|
137
|
-
})
|
|
138
|
-
check('目标不存在被拒(404)', ghost.status === 404, `status=${ghost.status}`)
|
|
139
|
-
|
|
140
|
-
// ===== 清理 =====
|
|
141
|
-
console.log('\n━━━ 清理 ━━━')
|
|
142
|
-
for (const [kind, id] of cleanup.reverse()) {
|
|
143
|
-
if (kind === 'channel') await api('DELETE', `/api/workshop/channels/${id}`)
|
|
144
|
-
else if (kind === 'team') await api('DELETE', `/api/workshop/teams/${id}`)
|
|
145
|
-
else if (kind === 'agent-tpl') await api('DELETE', `/api/workshop/agents/${id}`)
|
|
146
|
-
else if (kind === 'channel-agent') {
|
|
147
|
-
const [cid, aid] = String(id).split(':')
|
|
148
|
-
if (cid && aid) await api('DELETE', `/api/workshop/channels/${cid}/agents/${aid}`)
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
console.log('清理完成')
|
|
152
|
-
|
|
153
|
-
console.log(failures === 0 ? '\nE2E ALL PASS' : `\nE2E ${failures} FAILED`)
|
|
154
|
-
if (failures > 0) process.exit(1)
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
main().catch((e) => { console.error(e); process.exit(1) })
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 跨团队可见性端到端验证:leader 看其他团队任务场景(list_other_teams)、
|
|
3
|
-
* 全员查其他团队共享记忆(search_other_teams_memory)、权限反证(worker 查概览被拒)。
|
|
4
|
-
* 前置:运行中的环境(默认 3000)。运行: node scripts/_dbg-cross-team-visibility-e2e.mjs
|
|
5
|
-
*/
|
|
6
|
-
const ROOT = process.env.AW_BASE ?? 'http://127.0.0.1:3000'
|
|
7
|
-
let TOKEN = ''
|
|
8
|
-
const H = () => ({ authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' })
|
|
9
|
-
const sleep = (ms) => new Promise(r => setTimeout(r, ms))
|
|
10
|
-
let failures = 0
|
|
11
|
-
const check = (name, ok, detail = '') => {
|
|
12
|
-
console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
13
|
-
if (!ok) failures++
|
|
14
|
-
}
|
|
15
|
-
const fail = (m) => { console.error('FATAL:', m); process.exit(1) }
|
|
16
|
-
|
|
17
|
-
async function api(method, path, body) {
|
|
18
|
-
const res = await fetch(ROOT + path, { method, headers: H(), body: body !== undefined ? JSON.stringify(body) : undefined })
|
|
19
|
-
const json = await res.json().catch(() => ({}))
|
|
20
|
-
return { status: res.status, ...json }
|
|
21
|
-
}
|
|
22
|
-
const jpost = (u, b) => api('POST', u, b ?? {})
|
|
23
|
-
const jget = (u) => api('GET', u)
|
|
24
|
-
const invoke = async (agentId, tool, args = {}) => {
|
|
25
|
-
const r = await jpost('/api/workshop/agent-tools/invoke', { agentId, tool, args })
|
|
26
|
-
const result = r.data?.result
|
|
27
|
-
return { status: r.status, text: String(result?.text ?? JSON.stringify(r).slice(0, 200)), isError: result?.isError === true }
|
|
28
|
-
}
|
|
29
|
-
const cleanup = []
|
|
30
|
-
const tag = Math.random().toString(36).slice(2, 8)
|
|
31
|
-
|
|
32
|
-
async function deployTeam(name, withWorker) {
|
|
33
|
-
const chRes = (await jpost('/api/workshop/channels', { name, description: '跨团队可见性验证' })).data
|
|
34
|
-
cleanup.push(['channel', chRes.channelId])
|
|
35
|
-
const team = (await jpost('/api/workshop/teams', { name: name + '-组', description: '跨团队可见性验证' })).data
|
|
36
|
-
cleanup.push(['team', team.id])
|
|
37
|
-
await jpost(`/api/workshop/teams/${team.id}/members`, { agentId: 'tpl-default-lead', role: 'lead' })
|
|
38
|
-
let worker = null
|
|
39
|
-
if (withWorker) {
|
|
40
|
-
const tpl = (await jpost('/api/workshop/agents', { name: name + '-worker', harness: 'mock', config: {} })).data
|
|
41
|
-
cleanup.push(['agent-tpl', tpl.id])
|
|
42
|
-
await jpost(`/api/workshop/teams/${team.id}/members`, { agentId: tpl.id, role: 'worker' })
|
|
43
|
-
}
|
|
44
|
-
await jpost(`/api/workshop/teams/${team.id}/deploy`, { channelId: chRes.channelId })
|
|
45
|
-
const agents = (await jget(`/api/workshop/channels/${chRes.channelId}/agents`)).data
|
|
46
|
-
const lead = agents.find(a => a.role === 'lead')
|
|
47
|
-
worker = agents.find(a => a.role === 'worker') ?? null
|
|
48
|
-
if (lead) cleanup.push(['channel-agent', `${chRes.channelId}:${lead.id}`])
|
|
49
|
-
if (worker) cleanup.push(['channel-agent', `${chRes.channelId}:${worker.id}`])
|
|
50
|
-
return { channelId: chRes.channelId, lead, worker }
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async function main() {
|
|
54
|
-
console.log('━━━ 0. 注册与双团队部署 ━━━')
|
|
55
|
-
const reg = await jpost('/api/workshop/users/register', { name: 'xvis-' + tag })
|
|
56
|
-
TOKEN = reg.data?.token
|
|
57
|
-
if (!TOKEN) fail('注册失败: ' + JSON.stringify(reg).slice(0, 120))
|
|
58
|
-
check('注册并取得 token', !!TOKEN)
|
|
59
|
-
const east = await deployTeam('东线团队-' + tag, false)
|
|
60
|
-
const west = await deployTeam('西线团队-' + tag, true)
|
|
61
|
-
check('东线(无 worker)+ 西线(含 worker)就绪', !!east.lead?.id && !!west.lead?.id && !!west.worker?.id,
|
|
62
|
-
`eastLead=${String(east.lead?.id ?? '').slice(0, 8)} westLead=${String(west.lead?.id ?? '').slice(0, 8)}`)
|
|
63
|
-
|
|
64
|
-
// ===== 1. 东线沉淀共享记忆(他人将检索的知识)=====
|
|
65
|
-
console.log('\n━━━ 1. 东线共享记忆沉淀 ━━━')
|
|
66
|
-
const mem = await jpost(`/api/workshop/channels/${east.channelId}/memories`, {
|
|
67
|
-
title: '淬火工艺结论-' + tag,
|
|
68
|
-
content: `东线团队完成淬火工序验证:淬火温度 182℃ 保温 30 分钟后硬度达标 HRC58,温度超过 190℃ 会出现过回火软化。结论可用于西线同类工件工艺制定(${tag})。`,
|
|
69
|
-
importance: 0.9,
|
|
70
|
-
})
|
|
71
|
-
check('东线共享记忆写入', mem.status === 200, `status=${mem.status}`)
|
|
72
|
-
|
|
73
|
-
// ===== 2. 东线创建进行中场景任务 =====
|
|
74
|
-
console.log('\n━━━ 2. 东线进行中任务 ━━━')
|
|
75
|
-
const task = await jpost(`/api/workshop/channels/${east.channelId}/tasks`, {
|
|
76
|
-
title: '东线批次复检-' + tag,
|
|
77
|
-
parts: [{ text: '对当前批次做复检并记录结论' }],
|
|
78
|
-
})
|
|
79
|
-
const taskId = task.data?.task?.id ?? task.data?.id
|
|
80
|
-
cleanup.push(['task', taskId])
|
|
81
|
-
check('东线任务创建(进行中)', !!taskId, `id=${String(taskId ?? '').slice(0, 8)}`)
|
|
82
|
-
|
|
83
|
-
// ===== 3. 西线 lead:list_other_teams 看到东线的任务场景 =====
|
|
84
|
-
console.log('\n━━━ 3. Leader 跨团队观察面 ━━━')
|
|
85
|
-
const ov = await invoke(west.lead.id, 'list_other_teams')
|
|
86
|
-
const ovText = String(ov.text ?? '')
|
|
87
|
-
check('lead 查看其他团队概览', ov.status === 200 && ovText.includes('东线团队-' + tag), `status=${ov.status}`)
|
|
88
|
-
check('概览包含东线进行中任务标题', ovText.includes('东线批次复检-' + tag))
|
|
89
|
-
check('概览包含东线近期完成记录', ovText.includes('近期完成'))
|
|
90
|
-
|
|
91
|
-
// ===== 4. 西线 worker:search_other_teams_memory 查到东线共享知识 =====
|
|
92
|
-
console.log('\n━━━ 4. Worker 跨团队记忆检索 ━━━')
|
|
93
|
-
const hit = await invoke(west.worker.id, 'search_other_teams_memory', { query: '淬火 温度 硬度', limit: 5 })
|
|
94
|
-
const hitText = String(hit.text ?? '')
|
|
95
|
-
check('worker 检索到东线共享记忆', hit.status === 200 && hitText.includes('淬火工艺结论-' + tag),
|
|
96
|
-
`status=${hit.status} text=${hitText.slice(0, 60)}`)
|
|
97
|
-
check('检索结果带团队归属', hitText.includes('东线团队-' + tag))
|
|
98
|
-
|
|
99
|
-
// ===== 5. 权限反证:worker 查任务概览被拒(仅 lead)=====
|
|
100
|
-
const denied = await invoke(west.worker.id, 'list_other_teams')
|
|
101
|
-
check('worker 查任务概览被拒(仅 lead)', denied.isError === true || denied.status === 403 || String(denied.text ?? '').includes('Leader'),
|
|
102
|
-
`status=${denied.status} text=${String(denied.text ?? '').slice(0, 60)}`)
|
|
103
|
-
|
|
104
|
-
// ===== 6. 工作流语义:知识已存在 → lead 直接复用,无需发信 =====
|
|
105
|
-
const reuse = hitText.includes('182') && hitText.includes('HRC58')
|
|
106
|
-
check('跨团队知识可复用(检索内容含结论数值)', reuse)
|
|
107
|
-
console.log(' (工作流:命中知识 → 直接复用;未命中但有相关任务 → lead 用 send_cross_channel_message 发信请求协作)')
|
|
108
|
-
|
|
109
|
-
// ===== 清理 =====
|
|
110
|
-
console.log('\n━━━ 清理 ━━━')
|
|
111
|
-
for (const [kind, id] of [...cleanup].reverse()) {
|
|
112
|
-
try {
|
|
113
|
-
if (kind === 'channel') await api('DELETE', `/api/workshop/channels/${id}`)
|
|
114
|
-
else if (kind === 'team') await api('DELETE', `/api/workshop/teams/${id}`)
|
|
115
|
-
else if (kind === 'agent-tpl') await api('DELETE', `/api/workshop/agents/${id}`)
|
|
116
|
-
else if (kind === 'channel-agent') {
|
|
117
|
-
const [cid, aid] = String(id).split(':')
|
|
118
|
-
if (cid && aid) await api('DELETE', `/api/workshop/channels/${cid}/agents/${aid}`)
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
catch { /* 清理失败不阻断 */ }
|
|
122
|
-
}
|
|
123
|
-
console.log('清理完成')
|
|
124
|
-
|
|
125
|
-
console.log(failures === 0 ? '\nE2E ALL PASS' : `\nE2E ${failures} FAILED`)
|
|
126
|
-
if (failures > 0) process.exit(1)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
main().catch((e) => { console.error(e); process.exit(1) })
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# crush 探针:用 impl 生成的同款 .crushrc 实测智谱 openai-compat 网关(凭据走 env)
|
|
3
|
-
set -u
|
|
4
|
-
KEY="${ZHIPU_API_KEY:?export ZHIPU_API_KEY first}"
|
|
5
|
-
export AW_CRUSH_API_KEY="$KEY"
|
|
6
|
-
T="$(mktemp -d)"
|
|
7
|
-
BRIDGE="D:/codes/ABO/AgentWorkShop/server/harness/aw-mcp-bridge.mjs"
|
|
8
|
-
NODE="$(command -v node)"
|
|
9
|
-
cat > "$T/.crushrc" <<EOF
|
|
10
|
-
mcp add aw --command "$NODE" --args "$BRIDGE" --timeout 30
|
|
11
|
-
provider add zhipu --type openai-compat --base-url https://open.bigmodel.cn/api/coding/paas/v4 --api-key "\${AW_CRUSH_API_KEY}"
|
|
12
|
-
model add zhipu/glm-5.3-flash
|
|
13
|
-
model large zhipu/glm-5.3-flash
|
|
14
|
-
EOF
|
|
15
|
-
cd "$T"
|
|
16
|
-
echo "== generated .crushrc =="
|
|
17
|
-
cat .crushrc
|
|
18
|
-
echo "== crush run -q =="
|
|
19
|
-
timeout 90 crush run -q "reply with exactly: ok" 2>&1 | head -c 1500
|
|
20
|
-
echo; echo "== exit=$? =="
|
|
21
|
-
cd /; rm -rf "$T"
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** spawnLineProcess 直接探针:crush 短 prompt(定位 cmd 包装路径问题) */
|
|
2
|
-
import { spawnLineProcess } from '../server/services/workshop/agents/adapters/line-spawn'
|
|
3
|
-
|
|
4
|
-
const key = process.env.ZHIPU_API_KEY ?? ''
|
|
5
|
-
const child = spawnLineProcess('crush', ['run', '-q', '-m', 'zhipu/glm-5.3-flash', 'reply with exactly: ok'], {
|
|
6
|
-
cwd: process.cwd(),
|
|
7
|
-
env: { AW_AGENT_ID: 'probe', AW_AGENT_TOKEN: 'probe', AW_BASE_URL: 'http://127.0.0.1:59999', AW_CRUSH_API_KEY: key },
|
|
8
|
-
})
|
|
9
|
-
let out = ''
|
|
10
|
-
let err = ''
|
|
11
|
-
child.stdout?.on('data', (d) => {
|
|
12
|
-
out += d
|
|
13
|
-
})
|
|
14
|
-
child.stderr?.on('data', (d) => {
|
|
15
|
-
err += d
|
|
16
|
-
})
|
|
17
|
-
child.on('exit', (code) => {
|
|
18
|
-
console.log('exit', code)
|
|
19
|
-
console.log('stdout:', out.slice(0, 400))
|
|
20
|
-
console.log('stderr:', err.slice(0, 400))
|
|
21
|
-
process.exit(0)
|
|
22
|
-
})
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import puppeteer from 'puppeteer-core'
|
|
2
|
-
const ROOT = 'http://127.0.0.1:3000'
|
|
3
|
-
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
4
|
-
const login = await fetch(`${ROOT}/api/users/login`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ email: process.env.E2E_USER ?? 'zhangwei@awshop.io', password: process.env.E2E_PASS ?? 'Awshop@123' }) }).then(r => r.json())
|
|
5
|
-
const browser = await puppeteer.launch({ executablePath: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: 'new', args: ['--no-sandbox', '--disable-gpu', '--window-size=1600,1000'] })
|
|
6
|
-
const page = await browser.newPage()
|
|
7
|
-
const errors = []
|
|
8
|
-
page.on('console', m => { if (m.type() === 'error') errors.push(m.text().slice(0, 140)) })
|
|
9
|
-
page.on('pageerror', e => errors.push(`PAGEERROR: ${String(e).slice(0, 140)}`))
|
|
10
|
-
await page.setViewport({ width: 1600, height: 1000, deviceScaleFactor: 1.25 })
|
|
11
|
-
await page.setCookie({ name: 'token', value: login.data.token, domain: '127.0.0.1', path: '/' })
|
|
12
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'domcontentloaded', timeout: 45000 })
|
|
13
|
-
await sleep(7000)
|
|
14
|
-
console.log('v-if 还是 class 切换? body 在收起态是否存在于 DOM:', await page.evaluate(() => !!document.querySelector('.opt-body')))
|
|
15
|
-
await page.click('.opt-head')
|
|
16
|
-
await sleep(600)
|
|
17
|
-
console.log('chevron.open:', await page.evaluate(() => document.querySelector('.opt-chevron')?.classList.contains('open')))
|
|
18
|
-
console.log('body.open:', await page.evaluate(() => document.querySelector('.opt-body')?.classList.contains('open')))
|
|
19
|
-
console.log('body 高度:', await page.evaluate(() => document.querySelector('.opt-body')?.getBoundingClientRect().height))
|
|
20
|
-
console.log('body maxHeight computed:', await page.evaluate(() => getComputedStyle(document.querySelector('.opt-body')).maxHeight))
|
|
21
|
-
console.log('body 可见内容行数:', await page.evaluate(() => document.querySelectorAll('.opt-list .opt-row').length))
|
|
22
|
-
console.log('errors:', errors.length ? errors.slice(0, 3) : 'none')
|
|
23
|
-
await browser.close()
|
|
24
|
-
console.log('DONE')
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** 归因实验:断网后主线程占用是否消失(区分 轮询churn vs 静态渲染成本)。 */
|
|
2
|
-
import puppeteer from 'puppeteer-core'
|
|
3
|
-
|
|
4
|
-
const ROOT = 'http://127.0.0.1:3000'
|
|
5
|
-
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
6
|
-
const login = await fetch(`${ROOT}/api/users/login`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ email: process.env.E2E_USER ?? 'zhangwei@awshop.io', password: process.env.E2E_PASS ?? 'Awshop@123' }) }).then(r => r.json())
|
|
7
|
-
const browser = await puppeteer.launch({ executablePath: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: 'new', args: ['--no-sandbox', '--disable-gpu', '--window-size=1600,1000'] })
|
|
8
|
-
const page = await browser.newPage()
|
|
9
|
-
await page.setViewport({ width: 1600, height: 1000, deviceScaleFactor: 1 })
|
|
10
|
-
await page.setCookie({ name: 'token', value: login.data.token, domain: '127.0.0.1', path: '/' })
|
|
11
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
12
|
-
await sleep(15000)
|
|
13
|
-
console.log('rows rendered:', await page.evaluate(() => document.querySelectorAll('.nodes-table tbody tr').length))
|
|
14
|
-
|
|
15
|
-
// 5s 在线基线
|
|
16
|
-
const on = await page.evaluate(() => new Promise((resolve) => {
|
|
17
|
-
const t = { lt: 0, tot: 0 }
|
|
18
|
-
const po = new PerformanceObserver((l) => { for (const e of l.getEntries()) { t.lt++; t.tot += e.duration } })
|
|
19
|
-
po.observe({ entryTypes: ['longtask'] })
|
|
20
|
-
setTimeout(() => { po.disconnect(); resolve({ lt: t.lt, tot: Math.round(t.tot) }) }, 5000)
|
|
21
|
-
}))
|
|
22
|
-
|
|
23
|
-
// 断网(轮询失败 + WS 断)后 5s
|
|
24
|
-
await page.setOfflineMode(true)
|
|
25
|
-
await sleep(1500)
|
|
26
|
-
const off = await page.evaluate(() => new Promise((resolve) => {
|
|
27
|
-
const t = { lt: 0, tot: 0 }
|
|
28
|
-
const po = new PerformanceObserver((l) => { for (const e of l.getEntries()) { t.lt++; t.tot += e.duration } })
|
|
29
|
-
po.observe({ entryTypes: ['longtask'] })
|
|
30
|
-
setTimeout(() => { po.disconnect(); resolve({ lt: t.lt, tot: Math.round(t.tot) }) }, 5000)
|
|
31
|
-
}))
|
|
32
|
-
console.log('在线 5s:', JSON.stringify(on), '| 断网 5s:', JSON.stringify(off))
|
|
33
|
-
await browser.close()
|
|
34
|
-
console.log('DONE')
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/** 一次性:模板→节点→设备 绑定链路审计(同模板多节点/全量 list/场景全挂载/遥测事件不清场) */
|
|
2
|
-
import puppeteer from 'puppeteer-core'
|
|
3
|
-
|
|
4
|
-
const TOKEN = process.env.DAQ_TOKEN ?? 'ut-ffc1dfbbc0c1444c87c1ec69a9e8208c'
|
|
5
|
-
const browser = await puppeteer.launch({
|
|
6
|
-
executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
|
|
7
|
-
headless: 'new',
|
|
8
|
-
args: ['--no-sandbox', '--disable-gpu', '--window-size=1600,1200'],
|
|
9
|
-
})
|
|
10
|
-
const page = await browser.newPage()
|
|
11
|
-
await page.setViewport({ width: 1600, height: 1200 })
|
|
12
|
-
await page.setCookie({ name: 'token', value: TOKEN, domain: '127.0.0.1', path: '/' })
|
|
13
|
-
const fail = (m) => { console.error('FAIL:', m); process.exitCode = 1 }
|
|
14
|
-
const sleep = (ms) => new Promise(r => setTimeout(r, ms))
|
|
15
|
-
|
|
16
|
-
await page.goto('http://127.0.0.1:3000/daq', { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
17
|
-
await sleep(2500)
|
|
18
|
-
|
|
19
|
-
// 0) 基线:REST 层验证
|
|
20
|
-
const base = await page.evaluate(async (token) => {
|
|
21
|
-
const h = { authorization: `Bearer ${token}`, 'content-type': 'application/json' }
|
|
22
|
-
const post = (url, body) => fetch(url, { method: 'POST', headers: h, body: JSON.stringify(body) }).then(r => r.json())
|
|
23
|
-
// 0.1 裸调不带 templateRef 必须被拒
|
|
24
|
-
const noTpl = await post('/api/workshop/daq', { name: 'x' })
|
|
25
|
-
// 0.2 未知模板必须 404
|
|
26
|
-
const badTpl = await post('/api/workshop/daq', { templateRef: 'daq-no-such', name: 'x' })
|
|
27
|
-
// 0.3 同模板连建 3 个节点(速度编码器),两绑设备一自由
|
|
28
|
-
const list0 = await fetch('/api/workshop/daq', { headers: h }).then(r => r.json())
|
|
29
|
-
const devices = await fetch('/api/workshop/device-twins', { headers: h }).then(r => r.json())
|
|
30
|
-
const twinList = (devices.data?.twins ?? []).filter(t => t.kind !== 'daq' && typeof t.posX === 'number')
|
|
31
|
-
const made = []
|
|
32
|
-
for (let i = 0; i < 3; i++) {
|
|
33
|
-
const r = await post('/api/workshop/daq', { templateRef: 'daq-line-encoder', posX: 500 + i * 130, posZ: 900 })
|
|
34
|
-
if (r.data?.node) made.push(r.data.node)
|
|
35
|
-
}
|
|
36
|
-
// 绑定其中两个到不同设备
|
|
37
|
-
const binds = []
|
|
38
|
-
for (let i = 0; i < Math.min(2, made.length); i++) {
|
|
39
|
-
if (twinList[i]) {
|
|
40
|
-
await fetch(`/api/workshop/daq/${made[i].id}/bind`, { method: 'POST', headers: h, body: JSON.stringify({ deviceId: twinList[i].id }) })
|
|
41
|
-
binds.push(twinList[i].id)
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const list1 = await fetch('/api/workshop/daq', { headers: h }).then(r => r.json())
|
|
45
|
-
const enc = list1.data.nodes.filter(n => n.templateRef === 'daq-line-encoder')
|
|
46
|
-
return {
|
|
47
|
-
noTplCode: noTpl.code, noTplMsg: (noTpl.message ?? '').slice(0, 30),
|
|
48
|
-
badTplCode: badTpl.code,
|
|
49
|
-
created: made.map(n => ({ id: n.id, tpl: n.templateRef, unit: n.unit, min: n.min, max: n.max, name: n.name })),
|
|
50
|
-
totalEnc: enc.length, distinctIds: new Set(enc.map(n => n.id)).size,
|
|
51
|
-
boundCount: enc.filter(n => n.deviceBindingId).length,
|
|
52
|
-
totalNodes: list1.data.nodes.length,
|
|
53
|
-
enabledListed: list1.data.nodes.filter(n => n.enabled).length,
|
|
54
|
-
devicesAvail: twinList.length,
|
|
55
|
-
cleanupIds: made.map(n => n.id),
|
|
56
|
-
}
|
|
57
|
-
}, TOKEN)
|
|
58
|
-
console.log('REST audit:', JSON.stringify({ ...base, created: base.created.length, cleanupIds: undefined }))
|
|
59
|
-
|
|
60
|
-
if (base.noTplCode !== 'VALIDATION_ERROR' && base.noTplCode !== 400) fail(`裸调未拒: ${base.noTplCode} ${base.noTplMsg}`)
|
|
61
|
-
else console.log('PASS create without templateRef rejected:', base.noTplMsg)
|
|
62
|
-
if (base.badTplCode !== 'INTERNAL_ERROR') console.log('PASS unknown template rejected:', base.badTplCode)
|
|
63
|
-
else fail('unknown template not rejected')
|
|
64
|
-
if (base.created.length === 3 && base.created.every((n, i, a) => a.findIndex(x => x.id === n.id) === i) && base.boundCount >= 2) console.log(`PASS same-template x3 created (distinct ids), bound=${base.boundCount} incl. legacy`)
|
|
65
|
-
else fail(`multi-node/bind wrong: created=${base.created.length} distinct=${base.distinctIds} bound=${base.boundCount}`)
|
|
66
|
-
const first = base.created[0]
|
|
67
|
-
if (first && first.unit === 'm/min' && first.min === 280 && first.max === 360) console.log('PASS template domain inherited (m/min 280~360)')
|
|
68
|
-
else fail(`template domain missing: ${JSON.stringify(first)}`)
|
|
69
|
-
|
|
70
|
-
// 1) 场景层:/town 全部 DAQ 节点挂载 + device.updated 遥测流不清场
|
|
71
|
-
await page.goto('http://127.0.0.1:3000/town', { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
72
|
-
let ready = false
|
|
73
|
-
for (let i = 0; i < 30; i++) {
|
|
74
|
-
ready = await page.evaluate(() => (window.__town?.scene?.deviceNodes?.size ?? 0) > 0)
|
|
75
|
-
if (ready) break
|
|
76
|
-
await sleep(1000)
|
|
77
|
-
}
|
|
78
|
-
if (!ready) { fail('town scene deviceNodes never ready'); await browser.close(); process.exit(1) }
|
|
79
|
-
await sleep(4000)
|
|
80
|
-
|
|
81
|
-
const sceneProbe = await page.evaluate(async (ids) => {
|
|
82
|
-
const s = window.__town.scene
|
|
83
|
-
const daqNodes = [...s.deviceNodes.values()].filter(d => (d.modelRef ?? '').startsWith('daq-'))
|
|
84
|
-
const before = new Set(daqNodes.map(d => d.twinId))
|
|
85
|
-
const allPresent = ids.every(id => before.has(id))
|
|
86
|
-
// 等 4s(跨 ≥3 个 1s 节流的 device.updated 遥测帧)后清点,验证不清场
|
|
87
|
-
await new Promise(r => setTimeout(r, 4000))
|
|
88
|
-
const after = new Set([...s.deviceNodes.values()].filter(d => (d.modelRef ?? '').startsWith('daq-')).map(d => d.twinId))
|
|
89
|
-
return {
|
|
90
|
-
daqInScene: before.size,
|
|
91
|
-
allPresent,
|
|
92
|
-
stableAfterTelemetry: ids.every(id => after.has(id)),
|
|
93
|
-
afterCount: after.size,
|
|
94
|
-
}
|
|
95
|
-
}, base.cleanupIds)
|
|
96
|
-
console.log('scene probe:', JSON.stringify(sceneProbe))
|
|
97
|
-
if (sceneProbe.allPresent && sceneProbe.stableAfterTelemetry) console.log(`PASS all ${sceneProbe.daqInScene} daq nodes mounted in scene, stable across device.updated telemetry stream`)
|
|
98
|
-
else fail(`scene mount/unstable: ${JSON.stringify(sceneProbe)}`)
|
|
99
|
-
|
|
100
|
-
// 同模板多节点在场景中彼此独立(不同位置)
|
|
101
|
-
const spread = await page.evaluate(() => {
|
|
102
|
-
const s = window.__town.scene
|
|
103
|
-
const enc = [...s.deviceNodes.values()].filter(d => d.modelRef === 'daq-line-encoder')
|
|
104
|
-
return { count: enc.length, distinctPos: new Set(enc.map(d => `${Math.round(d.root.position.x)},${Math.round(d.root.position.z)}`)).size }
|
|
105
|
-
})
|
|
106
|
-
if (spread.count >= 3 && spread.distinctPos === spread.count) console.log(`PASS ${spread.count} same-template nodes独立实例/位置`)
|
|
107
|
-
else fail(`scene same-template nodes wrong: ${JSON.stringify(spread)}`)
|
|
108
|
-
|
|
109
|
-
// 2) 清理
|
|
110
|
-
const cleaned = await page.evaluate(async (ids, token) => {
|
|
111
|
-
const h = { authorization: `Bearer ${token}`, 'content-type': 'application/json' }
|
|
112
|
-
for (const id of ids) await fetch(`/api/workshop/daq/${id}`, { method: 'DELETE', headers: h })
|
|
113
|
-
const l = await fetch('/api/workshop/daq', { headers: h }).then(r => r.json())
|
|
114
|
-
return l.data.nodes.length
|
|
115
|
-
}, base.cleanupIds, TOKEN)
|
|
116
|
-
console.log('cleanup done, nodes back to:', cleaned)
|
|
117
|
-
|
|
118
|
-
await browser.close()
|
|
119
|
-
console.log(process.exitCode ? 'AUDIT FAILED' : 'AUDIT ALL PASS')
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/** 一次性:双节拍(采集入库 intervalMs / WS 下发 publishIntervalMs)独立控制验证 */
|
|
2
|
-
const TOKEN = process.env.DAQ_TOKEN ?? 'ut-ffc1dfbbc0c1444c87c1ec69a9e8208c'
|
|
3
|
-
const H = { authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' }
|
|
4
|
-
const BASE = (process.env.DAQ_BASE ?? 'http://127.0.0.1:3000') + '/api/workshop/daq'
|
|
5
|
-
const fail = (m) => { console.error('FAIL:', m); process.exitCode = 1 }
|
|
6
|
-
const sleep = (ms) => new Promise(r => setTimeout(r, ms))
|
|
7
|
-
|
|
8
|
-
const post = (url, body) => fetch(BASE + url, { method: 'POST', headers: H, body: JSON.stringify(body) }).then(r => r.json())
|
|
9
|
-
const patch = (id, body) => fetch(`${BASE}/${id}`, { method: 'PATCH', headers: H, body: JSON.stringify(body) }).then(r => r.json())
|
|
10
|
-
const get = () => fetch(BASE, { headers: H }).then(r => r.json())
|
|
11
|
-
|
|
12
|
-
// 0) 产线门控前置:数采由配方驱动,先建产品+配方并开跑(无匹配节点的参数记失败不阻塞)
|
|
13
|
-
const DCW = (process.env.DAQ_BASE ?? 'http://127.0.0.1:3000') + '/api/workshop/dcw'
|
|
14
|
-
const dpost = (u, b) => fetch(DCW + u, { method: 'POST', headers: H, body: JSON.stringify(b) }).then(r => r.json())
|
|
15
|
-
const { makeLineFixture } = await import('./_lib-dcw-line.mjs')
|
|
16
|
-
const fx = await makeLineFixture(process.env.DAQ_BASE ?? 'http://127.0.0.1:3000', H, 'daq-cadence 线')
|
|
17
|
-
const gateProd = (await dpost('/products', { name: '节拍审计产品', lineId: fx.line.id })).data.product
|
|
18
|
-
const gateRc = (await dpost('/recipes', { productId: gateProd.id, name: '节拍审计配方', params: [{ templateRef: 'dcw-temp-sp', value: 180 }] })).data.recipe
|
|
19
|
-
const gateStart = await fx.start(gateRc.id)
|
|
20
|
-
if (!gateStart.data?.line?.active) { console.error('FAIL: line start for gating:', JSON.stringify(gateStart).slice(0, 140)); process.exit(1) }
|
|
21
|
-
console.log('line gating: started (recipe-driven acquisition)')
|
|
22
|
-
|
|
23
|
-
// 0b) 建两个同模板节点:A=采样 500ms/下发 2500ms;B=采样 500ms/下发 0(每帧)
|
|
24
|
-
const a = (await post('', { templateRef: 'daq-line-encoder', name: '双节拍A', intervalMs: 500, publishIntervalMs: 2500, posX: 100, posZ: 100, lineId: fx.line.id })).data.node
|
|
25
|
-
const b = (await post('', { templateRef: 'daq-line-encoder', name: '双节拍B', intervalMs: 500, publishIntervalMs: 0, posX: 140, posZ: 100, lineId: fx.line.id })).data.node
|
|
26
|
-
if (!a || !b) { console.error('FAIL: create nodes'); process.exit(1) }
|
|
27
|
-
console.log('created:', a.id, a.publishIntervalMs, '|', b.id, b.publishIntervalMs)
|
|
28
|
-
|
|
29
|
-
// 1) 页内原生 WS 订阅,统计 7s 内两节点的 daq.reading 帧数与入库数对比
|
|
30
|
-
const counts = await (async () => {
|
|
31
|
-
const browser = await import('puppeteer-core')
|
|
32
|
-
return null
|
|
33
|
-
})()
|
|
34
|
-
|
|
35
|
-
// 裸 WS 客户端(Node 22+ 原生 WebSocket):daq.reading 走 scene-events 直达已订阅 peer,
|
|
36
|
-
// 订阅任一可见真实频道即可完成 peer 注册
|
|
37
|
-
const base = process.env.DAQ_BASE ?? 'http://127.0.0.1:3000'
|
|
38
|
-
const channels = await fetch(base + '/api/workshop/channels', { headers: H }).then(r => r.json())
|
|
39
|
-
const chanList = channels.data ?? []
|
|
40
|
-
const channelId = (Array.isArray(chanList) ? chanList[0] : chanList.channels?.[0] ?? chanList.items?.[0])?.id
|
|
41
|
-
if (!channelId) { console.error('FAIL: no channel to subscribe'); process.exit(1) }
|
|
42
|
-
const wsURL = base.replace('http', 'ws') + '/api/workshop/ws'
|
|
43
|
-
const ws = new WebSocket(wsURL)
|
|
44
|
-
const seen = {}
|
|
45
|
-
let snap = false
|
|
46
|
-
ws.onmessage = (ev) => {
|
|
47
|
-
const f = JSON.parse(ev.data)
|
|
48
|
-
if (f.type === 'daq.reading' && (f.payload.nodeId === a.id || f.payload.nodeId === b.id)) {
|
|
49
|
-
seen[f.payload.nodeId] = (seen[f.payload.nodeId] ?? 0) + 1
|
|
50
|
-
}
|
|
51
|
-
if (f.type === 'channel.snapshot') snap = true
|
|
52
|
-
}
|
|
53
|
-
ws.onopen = () => ws.send(JSON.stringify({ type: 'sub', channelId, token: TOKEN }))
|
|
54
|
-
await sleep(1500)
|
|
55
|
-
if (!snap) console.error('WARN: no snapshot — sub may have failed, frames unreliable')
|
|
56
|
-
|
|
57
|
-
// 采 7s 窗口:预期 A(500ms 采/2500ms 发)≈2 帧,B(500ms 采/0)≈14 帧
|
|
58
|
-
const t0 = Date.now()
|
|
59
|
-
seen[a.id] = 0
|
|
60
|
-
seen[b.id] = 0
|
|
61
|
-
await sleep(7000)
|
|
62
|
-
const elapsed = Date.now() - t0
|
|
63
|
-
ws.close()
|
|
64
|
-
|
|
65
|
-
// 2) 入库数对比(TSDB 查询):A 与 B 的样本数应都 ≈14(每采样必入库,与下发无关)
|
|
66
|
-
const now = Date.now()
|
|
67
|
-
const qa = await fetch(`${BASE}/${a.id}/samples?from=${now - 9000}&to=${now}`, { headers: H }).then(r => r.json())
|
|
68
|
-
const qb = await fetch(`${BASE}/${b.id}/samples?from=${now - 9000}&to=${now}`, { headers: H }).then(r => r.json())
|
|
69
|
-
const sa = (qa.data?.points ?? []).length
|
|
70
|
-
const sb = (qb.data?.points ?? []).length
|
|
71
|
-
|
|
72
|
-
console.log(`window ${elapsed}ms | WS frames: A(publish 2500ms)=${seen[a.id]}, B(publish 0)=${seen[b.id]} | stored: A=${sa}, B=${sb}`)
|
|
73
|
-
|
|
74
|
-
// 3) 全局缺省跟随验证:PATCH A 回 null → controllerState.defaultPublishIntervalMs 生效
|
|
75
|
-
const pa = await patch(a.id, { publishIntervalMs: null })
|
|
76
|
-
if (pa.data?.node?.publishIntervalMs === null) console.log('PASS publishIntervalMs=null reset (follow global)')
|
|
77
|
-
else fail(`null reset wrong: ${JSON.stringify(pa.data?.node?.publishIntervalMs)}`)
|
|
78
|
-
|
|
79
|
-
// 4) 全局 config:defaultPublishIntervalMs=800 → controllerState 反映
|
|
80
|
-
const cfg = await post('/controller', { action: 'config', defaultPublishIntervalMs: 800 })
|
|
81
|
-
if (cfg.data?.controller?.defaultPublishIntervalMs === 800) console.log('PASS gateway defaultPublishIntervalMs configurable')
|
|
82
|
-
else fail(`gateway config wrong: ${JSON.stringify(cfg.data?.controller)}`)
|
|
83
|
-
await post('/controller', { action: 'config', defaultPublishIntervalMs: 0 })
|
|
84
|
-
|
|
85
|
-
// 5) 判定
|
|
86
|
-
const framesA = seen[a.id] ?? 0
|
|
87
|
-
const framesB = seen[b.id] ?? 0
|
|
88
|
-
if (!snap) console.log('WARN: no snapshot frame (channelId empty sub may skip; frames still counted)')
|
|
89
|
-
if (framesA >= 1 && framesA <= 4 && framesB >= 8) {
|
|
90
|
-
console.log(`PASS dual-cadence: A(2.5s publish)=${framesA} frames vs B(every frame)=${framesB} in 7s`)
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
fail(`cadence wrong: A=${framesA} (expect 1~4), B=${framesB} (expect >=8)`)
|
|
94
|
-
}
|
|
95
|
-
if (sa >= 8 && sb >= 8) console.log(`PASS storage unaffected by publish gating (A=${sa}, B=${sb} samples stored)`)
|
|
96
|
-
else fail(`storage gated wrongly: A=${sa}, B=${sb}`)
|
|
97
|
-
|
|
98
|
-
// cleanup:停线(采集门控关闭)+ 删节点/配方/产品
|
|
99
|
-
for (const id of [a.id, b.id]) await fetch(`${BASE}/${id}`, { method: 'DELETE', headers: H })
|
|
100
|
-
await fx.cleanup()
|
|
101
|
-
await fetch(`${DCW}/recipes/${gateRc.id}`, { method: 'DELETE', headers: H })
|
|
102
|
-
await fetch(`${DCW}/products/${gateProd.id}`, { method: 'DELETE', headers: H })
|
|
103
|
-
console.log(process.exitCode ? 'AUDIT FAILED' : 'AUDIT ALL PASS')
|
|
104
|
-
process.exit(process.exitCode ?? 0)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import puppeteer from 'puppeteer-core'
|
|
2
|
-
const ROOT = 'http://127.0.0.1:3000'
|
|
3
|
-
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
4
|
-
const login = await fetch(`${ROOT}/api/users/login`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ email: process.env.E2E_USER ?? 'zhangwei@awshop.io', password: process.env.E2E_PASS ?? 'Awshop@123' }) }).then(r => r.json())
|
|
5
|
-
const browser = await puppeteer.launch({ executablePath: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: 'new', args: ['--no-sandbox', '--disable-gpu', '--window-size=1600,1000'] })
|
|
6
|
-
const page = await browser.newPage()
|
|
7
|
-
const errs = []
|
|
8
|
-
page.on('pageerror', e => errs.push(`PAGEERROR: ${String(e).slice(0, 300)}`))
|
|
9
|
-
page.on('console', (m) => { if (m.type() === 'error') errs.push(`CONSOLE: ${m.text().slice(0, 300)}`) })
|
|
10
|
-
await page.setViewport({ width: 1600, height: 1000, deviceScaleFactor: 1 })
|
|
11
|
-
await page.setCookie({ name: 'token', value: login.data.token, domain: '127.0.0.1', path: '/' })
|
|
12
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
13
|
-
await sleep(15000)
|
|
14
|
-
console.log('rows:', await page.evaluate(() => document.querySelectorAll('.nodes-table tbody tr').length))
|
|
15
|
-
console.log('toolbar 存在:', await page.evaluate(() => !!document.querySelector('.tbl-toolbar')),
|
|
16
|
-
'| 模板下拉存在:', await page.evaluate(() => !!document.querySelector('.flt-search')),
|
|
17
|
-
'| KPI/横幅存在:', await page.evaluate(() => !!document.querySelector('.page')))
|
|
18
|
-
console.log('count 文本:', await page.evaluate(() => document.querySelector('.count')?.textContent ?? 'none'))
|
|
19
|
-
console.log('errors:', errs.length ? errs.slice(0, 6) : 'none')
|
|
20
|
-
await page.screenshot({ path: 'docs/audit/screenshots/redesign0831/daq-debug.png' })
|
|
21
|
-
await browser.close()
|
|
22
|
-
console.log('DONE')
|