agentworkshop 0.7.34 → 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 +1523 -1027
- 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 -194
- 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 -303
- 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/codex-agent.ts +4 -7
- 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 +14 -5
- 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/adc365b6-f636-4a2b-9527-79819c1e874b.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-cancel-repro.mjs +0 -81
- 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,62 +0,0 @@
|
|
|
1
|
-
/** 前端 smoke:frame 节点详情页渲染(向量轮廓 SVG + 图像画廊)+ 插件 manifest */
|
|
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
|
-
let failed = 0
|
|
7
|
-
const check = (name, ok, detail = '') => { console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`); if (!ok) failed++ }
|
|
8
|
-
|
|
9
|
-
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())
|
|
10
|
-
const H = { authorization: `Bearer ${login.data.token}`, 'content-type': 'application/json' }
|
|
11
|
-
const cookie = { name: 'token', value: login.data.token, domain: '127.0.0.1', path: '/' }
|
|
12
|
-
const j = (u, m = 'GET', b) => fetch(ROOT + u, { method: m, headers: H, body: b ? JSON.stringify(b) : undefined }).then(r => r.json())
|
|
13
|
-
|
|
14
|
-
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'] })
|
|
15
|
-
const page = await browser.newPage()
|
|
16
|
-
await page.setViewport({ width: 1600, height: 1000 })
|
|
17
|
-
await page.setCookie(cookie)
|
|
18
|
-
page.on('pageerror', (e) => { console.log('PAGEERROR:', String(e).slice(0, 200)); failed++ })
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
// 开跑 + 建向量/图像节点
|
|
22
|
-
const d = (await j('/api/workshop/dcw')).data
|
|
23
|
-
const cand = d.lines.map(l => ({ line: l, recipe: d.recipes.find(r => r.lineId === l.id) })).find(x => x.recipe)
|
|
24
|
-
await j(`/api/workshop/dcw/lines/${cand.line.id}/stop`, 'POST').catch(() => {})
|
|
25
|
-
await sleep(800)
|
|
26
|
-
await j(`/api/workshop/dcw/lines/${cand.line.id}/start`, 'POST', { recipeId: cand.recipe.id })
|
|
27
|
-
const vec = (await j('/api/workshop/daq', 'POST', { templateRef: 'thickness-scan', lineId: cand.line.id, name: 'UI 向量' })).data.node
|
|
28
|
-
const img = (await j('/api/workshop/daq', 'POST', { templateRef: 'ccd-image', lineId: cand.line.id, name: 'UI 图像' })).data.node
|
|
29
|
-
await sleep(6000)
|
|
30
|
-
|
|
31
|
-
// 向量详情页
|
|
32
|
-
await page.goto(`${ROOT}/daq/${vec.id}`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
33
|
-
await sleep(6000)
|
|
34
|
-
const vecTile = await page.evaluate(() => ({ frames: !!document.querySelector('.frames-tile'), svg: !!document.querySelector('.vec-svg polyline'), rows: document.querySelectorAll('.frames-tile tbody tr').length }))
|
|
35
|
-
check('向量页:帧视图渲染', vecTile.frames && vecTile.svg, JSON.stringify(vecTile))
|
|
36
|
-
|
|
37
|
-
// 图像详情页(画廊 + 缩略图实际加载)
|
|
38
|
-
await page.goto(`${ROOT}/daq/${img.id}`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
39
|
-
await sleep(8000)
|
|
40
|
-
const imgTile = await page.evaluate(() => {
|
|
41
|
-
const imgs = [...document.querySelectorAll('.gal-item img')]
|
|
42
|
-
return { gal: !!document.querySelector('.gal'), n: imgs.length, loaded: imgs.filter(i => i.naturalWidth > 0).length }
|
|
43
|
-
})
|
|
44
|
-
check('图像页:画廊渲染', imgTile.gal, JSON.stringify(imgTile))
|
|
45
|
-
check('图像页:缩略图实际加载(naturalWidth>0)', imgTile.loaded > 0, `loaded=${imgTile.loaded}/${imgTile.n}`)
|
|
46
|
-
|
|
47
|
-
// /daq 列表页无回归
|
|
48
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
49
|
-
await sleep(4000)
|
|
50
|
-
const listRows = await page.evaluate(() => document.querySelectorAll('tbody tr').length)
|
|
51
|
-
check('/daq 列表页正常(有节点行)', listRows > 0, `rows=${listRows}`)
|
|
52
|
-
} finally {
|
|
53
|
-
await browser.close().catch(() => {})
|
|
54
|
-
// 清理
|
|
55
|
-
const nodes = (await j('/api/workshop/daq')).data.nodes.filter(n => n.name.startsWith('UI '))
|
|
56
|
-
for (const n of nodes) await j(`/api/workshop/daq/${n.id}`, 'DELETE').catch(() => {})
|
|
57
|
-
const d = (await j('/api/workshop/dcw')).data
|
|
58
|
-
for (const l of d.lines) await j(`/api/workshop/dcw/lines/${l.id}/stop`, 'POST').catch(() => {})
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
console.log(failed === 0 ? '\nUI SMOKE PASS' : `\nUI SMOKE FAILED(${failed})`)
|
|
62
|
-
process.exit(failed === 0 ? 0 : 1)
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 补充验证 B:WS daq.frame 实时帧 + 指标阈值告警(mock 场景)。
|
|
3
|
-
* ①裸 WS(Node 原生)订阅真实频道 → 开跑 → 建 thickness-scan 节点
|
|
4
|
-
* → ②收集 daq.frame 帧(preview ≤64 点、metrics、无 blob)
|
|
5
|
-
* → ③thk-max alarmHigh=0.62:mock max 可达 0.65 → 等待告警落库(alarm_events)
|
|
6
|
-
* → ④清理。
|
|
7
|
-
* 运行: node scripts/_dbg-daq-frame-ws.mjs
|
|
8
|
-
*/
|
|
9
|
-
const ROOT = process.env.E2E_ROOT ?? 'http://127.0.0.1:3000'
|
|
10
|
-
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
11
|
-
const fail = (msg) => { console.error('FAIL:', msg); process.exitCode = 1 }
|
|
12
|
-
|
|
13
|
-
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())
|
|
14
|
-
const token = login.data.token
|
|
15
|
-
const H = { authorization: `Bearer ${token}`, 'content-type': 'application/json' }
|
|
16
|
-
const j = (u, m = 'GET', b) => fetch(ROOT + u, { method: m, headers: H, body: b ? JSON.stringify(b) : undefined }).then(r => r.json())
|
|
17
|
-
|
|
18
|
-
// 订阅任一真实频道(注册 scene peer;daq.* 帧不依赖频道)
|
|
19
|
-
const channels = await j('/api/workshop/channels')
|
|
20
|
-
const chanList = channels.data ?? []
|
|
21
|
-
const channelId = (Array.isArray(chanList) ? chanList[0] : chanList.channels?.[0] ?? chanList.items?.[0])?.id
|
|
22
|
-
if (!channelId) { console.error('FAIL: no channel'); process.exit(1) }
|
|
23
|
-
const ws = new WebSocket(ROOT.replace('http', 'ws') + '/api/workshop/ws')
|
|
24
|
-
const frameEvents = []
|
|
25
|
-
ws.onmessage = (ev) => {
|
|
26
|
-
try {
|
|
27
|
-
const e = JSON.parse(ev.data)
|
|
28
|
-
if (e.type === 'daq.frame') frameEvents.push(e.payload)
|
|
29
|
-
}
|
|
30
|
-
catch { /* ignore */ }
|
|
31
|
-
}
|
|
32
|
-
ws.onopen = () => ws.send(JSON.stringify({ type: 'sub', channelId, token }))
|
|
33
|
-
await new Promise(r => { ws.onopen ? (ws.onopen = ((orig) => () => { orig(); r() })(ws.onopen)) : r() })
|
|
34
|
-
|
|
35
|
-
// 开跑 + 建向量节点
|
|
36
|
-
const d = (await j('/api/workshop/dcw')).data
|
|
37
|
-
const cand = d.lines.map(l => ({ line: l, recipe: d.recipes.find(r => r.lineId === l.id) })).find(x => x.recipe)
|
|
38
|
-
await j(`/api/workshop/dcw/lines/${cand.line.id}/stop`, 'POST').catch(() => {})
|
|
39
|
-
await sleep(1000)
|
|
40
|
-
await j(`/api/workshop/dcw/lines/${cand.line.id}/start`, 'POST', { recipeId: cand.recipe.id })
|
|
41
|
-
const node = (await j('/api/workshop/daq', 'POST', { templateRef: 'thickness-scan', lineId: cand.line.id, name: 'E2E WS 轮廓' })).data.node
|
|
42
|
-
|
|
43
|
-
// 收集 ~12s 帧事件
|
|
44
|
-
await sleep(12000)
|
|
45
|
-
const alarmsOpen = (await j('/api/workshop/daq/alarms?scope=all&limit=100')).data.alarms
|
|
46
|
-
const frameAlarms = alarmsOpen.filter(a => a.nodeId === node.id && a.metric === 'thickness-scan.max')
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
if (frameEvents.length >= 3) {
|
|
50
|
-
console.log(`PASS WS daq.frame: 收到 ${frameEvents.length} 帧`)
|
|
51
|
-
const f = frameEvents[frameEvents.length - 1]
|
|
52
|
-
if (f.kind === 'vector' && (f.preview?.length ?? 0) > 0 && f.preview.length <= 64) console.log(`PASS 帧预览: ${f.preview.length} 点(≤64)`)
|
|
53
|
-
else fail(`preview: kind=${f.kind} len=${f.preview?.length}`)
|
|
54
|
-
if (f.metrics && Object.keys(f.metrics).length > 0) console.log(`PASS 帧指标: ${JSON.stringify(f.metrics).slice(0, 120)}`)
|
|
55
|
-
else fail('metrics missing on daq.frame')
|
|
56
|
-
if (JSON.stringify(f).length < 4096) console.log('PASS 帧载荷轻量(<4KB,无全量点列/blob)')
|
|
57
|
-
else fail(`payload too large: ${JSON.stringify(f).length}`)
|
|
58
|
-
} else fail(`daq.frame events insufficient: ${frameEvents.length}`)
|
|
59
|
-
|
|
60
|
-
if (frameAlarms.length > 0) {
|
|
61
|
-
const a = frameAlarms[0]
|
|
62
|
-
console.log(`PASS 指标阈值告警: metric=${a.metric} rule=${a.rule} value=${a.value} threshold=${a.threshold}`)
|
|
63
|
-
} else {
|
|
64
|
-
console.log(`WARN: 12s 窗口内未见 thk-max 告警(mock max 需越 0.62;当前未触发,不判失败)`)
|
|
65
|
-
}
|
|
66
|
-
} finally {
|
|
67
|
-
ws.close()
|
|
68
|
-
await j(`/api/workshop/daq/${node.id}`, 'DELETE').catch(() => {})
|
|
69
|
-
await j(`/api/workshop/dcw/lines/${cand.line.id}/stop`, 'POST').catch(() => {})
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
console.log(process.exitCode ? '\nWS E2E FAILED' : '\nWS E2E PASS')
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
/** 一次性:DAQ v0.2.0 全量接口/语义核查(16 项断言) */
|
|
2
|
-
const BASE = 'http://127.0.0.1:3000'
|
|
3
|
-
let pass = 0
|
|
4
|
-
let fail = 0
|
|
5
|
-
function check(name, cond, detail = '') {
|
|
6
|
-
if (cond) {
|
|
7
|
-
pass++
|
|
8
|
-
console.log(` ✓ ${name}`)
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
fail++
|
|
12
|
-
console.log(` ✗ ${name}${detail ? ` — ${detail}` : ''}`)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const login = await fetch(`${BASE}/api/users/login`, {
|
|
17
|
-
method: 'POST',
|
|
18
|
-
headers: { 'content-type': 'application/json' },
|
|
19
|
-
body: JSON.stringify({ email: process.env.E2E_USER ?? 'zhangwei@awshop.io', password: process.env.E2E_PASS ?? 'Awshop@123' }),
|
|
20
|
-
}).then(r => r.json())
|
|
21
|
-
const token = login.data?.token
|
|
22
|
-
check('登录', Boolean(token))
|
|
23
|
-
const H = { 'authorization': `Bearer ${token}`, 'content-type': 'application/json' }
|
|
24
|
-
|
|
25
|
-
// ---------- 1. 快照与 meta ----------
|
|
26
|
-
const base = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
27
|
-
check('GET /daq: controller/nodes/meta 结构', Boolean(base.data?.controller && Array.isArray(base.data?.nodes) && base.data?.meta))
|
|
28
|
-
check('meta 能力自描述:tsdb/queue/drivers', ['sqlite-emulated', 'timescale'].includes(base.data.meta.tsdb) && ['inproc', 'mqtt'].includes(base.data.meta.queue) && Array.isArray(base.data.meta.drivers) && base.data.meta.drivers.length >= 4)
|
|
29
|
-
check('管线指标字段齐备', ['produced', 'consumed', 'dropped', 'samplesStored'].every(k => typeof base.data.meta[k] === 'number'))
|
|
30
|
-
check('管线守恒:dropped == produced - consumed', base.data.meta.dropped === base.data.meta.produced - base.data.meta.consumed, JSON.stringify(base.data.meta))
|
|
31
|
-
|
|
32
|
-
// ---------- 2. 创建(默认值派生) ----------
|
|
33
|
-
const made = await fetch(`${BASE}/api/workshop/daq`, {
|
|
34
|
-
method: 'POST', headers: H,
|
|
35
|
-
body: JSON.stringify({ templateRef: 'daq-temp-tc', posX: 10, posZ: 10 }),
|
|
36
|
-
}).then(r => r.json())
|
|
37
|
-
const n1 = made.data?.node
|
|
38
|
-
check('POST 创建:模板缺省派生(单位/量程/预警带)', n1?.unit === '℃' && n1?.min === 150 && n1?.max === 185 && n1?.warnLow === 152.8 && n1?.warnHigh === 182.2, JSON.stringify(n1))
|
|
39
|
-
|
|
40
|
-
// 未知模板 → 404
|
|
41
|
-
const badTpl = await fetch(`${BASE}/api/workshop/daq`, {
|
|
42
|
-
method: 'POST', headers: H, body: JSON.stringify({ templateRef: 'daq-nope' }),
|
|
43
|
-
}).then(r => r.json())
|
|
44
|
-
check('POST 未知模板 → 业务错误', badTpl.code !== 0)
|
|
45
|
-
|
|
46
|
-
// ---------- 3. 采样与落库(单节点独立周期) ----------
|
|
47
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
48
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ intervalMs: 200 }),
|
|
49
|
-
})
|
|
50
|
-
await new Promise(r => setTimeout(r, 2500))
|
|
51
|
-
|
|
52
|
-
// 原始点
|
|
53
|
-
const raw = await fetch(`${BASE}/api/workshop/daq/${n1.id}/samples?limit=500`, { headers: H }).then(r => r.json())
|
|
54
|
-
const rawPts = raw.data?.points ?? []
|
|
55
|
-
check('samples 原始点入库(2.5s@200ms ≈ 8~14 点)', rawPts.length >= 6, `got ${rawPts.length}`)
|
|
56
|
-
|
|
57
|
-
// 桶聚合
|
|
58
|
-
const bucket = await fetch(`${BASE}/api/workshop/daq/${n1.id}/samples?bucketMs=1000&limit=100`, { headers: H }).then(r => r.json())
|
|
59
|
-
const bPts = bucket.data?.points ?? []
|
|
60
|
-
check('samples 桶聚合(avg/min/max/cnt)', bPts.length >= 1 && bPts[0].avg != null && bPts[0].cnt >= 1, JSON.stringify(bPts[0]))
|
|
61
|
-
|
|
62
|
-
// from/to 过滤
|
|
63
|
-
const future = await fetch(`${BASE}/api/workshop/daq/${n1.id}/samples?from=${Date.now() + 60_000}&to=${Date.now() + 120_000}`, { headers: H }).then(r => r.json())
|
|
64
|
-
check('samples from/to 时间过滤', (future.data?.points ?? []).length === 0)
|
|
65
|
-
|
|
66
|
-
// 值域合理性(mock 相位带 ±裕量)
|
|
67
|
-
const inBand = rawPts.every(p => p.value > 140 && p.value < 195)
|
|
68
|
-
check('样本值在模板域+裕量内', rawPts.length === 0 || inBand)
|
|
69
|
-
|
|
70
|
-
// ---------- 4. 阈值控制 → 告警派生(server 语义) ----------
|
|
71
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
72
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ warnHigh: n1.min + 0.5 }),
|
|
73
|
-
})
|
|
74
|
-
let sawWarnOrAlarm = false
|
|
75
|
-
for (let i = 0; i < 12; i++) {
|
|
76
|
-
await new Promise(r => setTimeout(r, 700))
|
|
77
|
-
const snap = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
78
|
-
const st = snap.data.nodes.find(x => x.id === n1.id)?.state
|
|
79
|
-
if (st === 'warn' || st === 'alarm') {
|
|
80
|
-
sawWarnOrAlarm = true
|
|
81
|
-
break
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
check('收紧预警带 → 节点进入 warn/alarm', sawWarnOrAlarm)
|
|
85
|
-
|
|
86
|
-
// 恢复
|
|
87
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
88
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ warnHigh: 177.2 }),
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
// ---------- 5. 单节点启停(独立控制) ----------
|
|
92
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
93
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ enabled: false }),
|
|
94
|
-
})
|
|
95
|
-
await new Promise(r => setTimeout(r, 1600))
|
|
96
|
-
const afterOff = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
97
|
-
const offNode = afterOff.data.nodes.find(x => x.id === n1.id)
|
|
98
|
-
check('节点停用 → offline 且不再产出', offNode?.state === 'offline' && offNode?.enabled === false)
|
|
99
|
-
const cntOff = afterOff.data.meta.produced
|
|
100
|
-
await new Promise(r => setTimeout(r, 1200))
|
|
101
|
-
const cntCheck = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
102
|
-
check('停用期间全局 produced 不增长(其余节点不受影响之外该节点静默)', cntCheck.data.meta.produced - cntOff >= 0)
|
|
103
|
-
|
|
104
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
105
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ enabled: true }),
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
// ---------- 6. PLC 桩:切换驱动 → offline + 结构化错误;切回 mock 恢复 ----------
|
|
109
|
-
// 真实驱动负向:指向确定关闭的端口 → 连接拒绝 → offline(可见降级)
|
|
110
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
111
|
-
method: 'PATCH', headers: H,
|
|
112
|
-
body: JSON.stringify({ driver: 'modbus-tcp', driverConfig: { host: '127.0.0.1', port: 1599, unitId: 1, register: 40001, dataType: 'float32', byteOrder: 'big' } }),
|
|
113
|
-
})
|
|
114
|
-
let sawOffline = false
|
|
115
|
-
for (let i = 0; i < 10; i++) {
|
|
116
|
-
await new Promise(r => setTimeout(r, 700))
|
|
117
|
-
const plc = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
118
|
-
if (plc.data.nodes.find(x => x.id === n1.id)?.state === 'offline') { sawOffline = true; break }
|
|
119
|
-
}
|
|
120
|
-
check('真实驱动连不可达地址 → 节点 offline(可见降级)', sawOffline)
|
|
121
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
122
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ driver: 'mock', driverConfig: {} }),
|
|
123
|
-
})
|
|
124
|
-
await new Promise(r => setTimeout(r, 1500))
|
|
125
|
-
const back = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
126
|
-
check('切回 mock → 恢复采样', ['ok', 'warn', 'alarm'].includes(back.data.nodes.find(x => x.id === n1.id)?.state))
|
|
127
|
-
|
|
128
|
-
// 旧命名归一:patch driver='modbus' → 落库为 modbus-tcp
|
|
129
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
130
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ driver: 'modbus' }),
|
|
131
|
-
})
|
|
132
|
-
const norm = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
133
|
-
check('旧驱动命名归一(modbus→modbus-tcp)', norm.data.nodes.find(x => x.id === n1.id)?.driver === 'modbus-tcp')
|
|
134
|
-
await fetch(`${BASE}/api/workshop/daq/${n1.id}`, {
|
|
135
|
-
method: 'PATCH', headers: H, body: JSON.stringify({ driver: 'mock' }),
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
// ---------- 7. 绑定语义 ----------
|
|
139
|
-
const twins = await fetch(`${BASE}/api/workshop/device-twins`, { headers: H }).then(r => r.json())
|
|
140
|
-
const dev = (twins.data?.twins ?? []).find(t => t.kind !== 'daq')
|
|
141
|
-
const bind = await fetch(`${BASE}/api/workshop/daq/${n1.id}/bind`, {
|
|
142
|
-
method: 'POST', headers: H, body: JSON.stringify({ deviceId: dev?.id ?? 'dev-none' }),
|
|
143
|
-
}).then(r => r.json())
|
|
144
|
-
check('绑定设备(devices 存在时)', !dev || bind.data?.node?.deviceBindingId === dev.id)
|
|
145
|
-
const badBind = await fetch(`${BASE}/api/workshop/daq/${n1.id}/bind`, {
|
|
146
|
-
method: 'POST', headers: H, body: JSON.stringify({ deviceId: 'dev-not-exist' }),
|
|
147
|
-
}).then(r => r.json())
|
|
148
|
-
check('绑定不存在设备 → 404', badBind.code === 'NOT_FOUND' || badBind.code !== 0)
|
|
149
|
-
const unbind = await fetch(`${BASE}/api/workshop/daq/${n1.id}/bind`, {
|
|
150
|
-
method: 'POST', headers: H, body: JSON.stringify({ deviceId: null }),
|
|
151
|
-
}).then(r => r.json())
|
|
152
|
-
check('解绑(deviceId=null)', unbind.data?.node?.deviceBindingId === null)
|
|
153
|
-
|
|
154
|
-
// ---------- 8. 控制器边界 ----------
|
|
155
|
-
const badCfg = await fetch(`${BASE}/api/workshop/daq/controller`, {
|
|
156
|
-
method: 'POST', headers: H, body: JSON.stringify({ action: 'config', defaultIntervalMs: 5 }),
|
|
157
|
-
}).then(r => r.json())
|
|
158
|
-
check('非法周期(<120)被拒收', badCfg.data?.controller?.defaultIntervalMs !== 5)
|
|
159
|
-
const stop = await fetch(`${BASE}/api/workshop/daq/controller`, {
|
|
160
|
-
method: 'POST', headers: H, body: JSON.stringify({ action: 'stop' }),
|
|
161
|
-
}).then(r => r.json())
|
|
162
|
-
check('总停 → nodesOnline=0', stop.data?.controller?.nodesOnline === 0)
|
|
163
|
-
const start = await fetch(`${BASE}/api/workshop/daq/controller`, {
|
|
164
|
-
method: 'POST', headers: H, body: JSON.stringify({ action: 'start' }),
|
|
165
|
-
}).then(r => r.json())
|
|
166
|
-
check('恢复 → nodesOnline 回升', (start.data?.controller?.nodesOnline ?? 0) > 0)
|
|
167
|
-
|
|
168
|
-
// ---------- 9. 404 语义 ----------
|
|
169
|
-
const s404 = await fetch(`${BASE}/api/workshop/daq/dn-not-exist/samples`, { headers: H }).then(r => r.json())
|
|
170
|
-
check('samples 不存在节点 → 404', s404.code === 'NOT_FOUND' || s404.code !== 0)
|
|
171
|
-
const d404 = await fetch(`${BASE}/api/workshop/daq/dn-not-exist`, { method: 'DELETE', headers: H }).then(r => r.json())
|
|
172
|
-
check('DELETE 不存在节点 → 404', d404.code !== 0)
|
|
173
|
-
|
|
174
|
-
// ---------- 10. 清理 ----------
|
|
175
|
-
const del = await fetch(`${BASE}/api/workshop/daq/${n1.id}`, { method: 'DELETE', headers: H }).then(r => r.json())
|
|
176
|
-
check('删除测试节点', del.code === 0)
|
|
177
|
-
|
|
178
|
-
console.log(`\n=== RESULT: ${pass} pass / ${fail} fail ===`)
|
|
179
|
-
process.exit(fail > 0 ? 1 : 0)
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/** 一次性:验证数采面板节点列表的产线运行注记(未运行/运行中+产品·Recipe) */
|
|
2
|
-
import puppeteer from 'puppeteer-core'
|
|
3
|
-
|
|
4
|
-
const TOKEN = 'ut-ffc1dfbbc0c1444c87c1ec69a9e8208c'
|
|
5
|
-
const ROOT = 'http://127.0.0.1:3000'
|
|
6
|
-
const H = { authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' }
|
|
7
|
-
const j = (u, m = 'GET', b) => fetch(ROOT + u, { method: m, headers: H, body: b ? JSON.stringify(b) : undefined }).then(r => r.json())
|
|
8
|
-
|
|
9
|
-
const d = (await j('/api/workshop/dcw')).data
|
|
10
|
-
const line = d.lines.find(l => l.name === '1号产线') ?? d.lines.find(l => d.recipes.some(r => r.lineId === l.id && r.params.length > 0))
|
|
11
|
-
const recipe = d.recipes.find(r => r.lineId === line.id && r.params.length > 0)
|
|
12
|
-
await j(`/api/workshop/dcw/lines/${line.id}/stop`, 'POST').catch(() => {})
|
|
13
|
-
|
|
14
|
-
const browser = await puppeteer.launch({
|
|
15
|
-
executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
|
|
16
|
-
headless: 'new',
|
|
17
|
-
args: ['--no-sandbox', '--disable-gpu', '--window-size=2560,1400'],
|
|
18
|
-
})
|
|
19
|
-
const page = await browser.newPage()
|
|
20
|
-
await page.setViewport({ width: 2560, height: 1400 })
|
|
21
|
-
await page.setCookie({ name: 'token', value: TOKEN, domain: '127.0.0.1', path: '/' })
|
|
22
|
-
|
|
23
|
-
// ① 未开跑:列表应显示「未运行」
|
|
24
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'networkidle2', timeout: 60000 })
|
|
25
|
-
await new Promise(r => setTimeout(r, 5000))
|
|
26
|
-
await page.evaluate((lineName) => {
|
|
27
|
-
const sel = document.querySelectorAll('.tbl-toolbar .inp-sel')[0]
|
|
28
|
-
const opt = [...sel.options].find(o => o.textContent.trim() === lineName)
|
|
29
|
-
const setter = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, 'value').set
|
|
30
|
-
setter.call(sel, opt.value)
|
|
31
|
-
sel.dispatchEvent(new Event('change', { bubbles: true }))
|
|
32
|
-
}, line.name)
|
|
33
|
-
await new Promise(r => setTimeout(r, 600))
|
|
34
|
-
const idleNotes = await page.evaluate(() =>
|
|
35
|
-
[...document.querySelectorAll('.nodes-table .line-run')].map(n => ({ text: n.textContent.replace(/\s+/g, ' ').trim(), on: n.classList.contains('on') })))
|
|
36
|
-
console.log('① 未开跑 注记:', JSON.stringify(idleNotes))
|
|
37
|
-
await page.screenshot({ path: 'docs/audit/screenshots/daq-line-note-idle.png' })
|
|
38
|
-
|
|
39
|
-
// ② 开跑:列表应显示「运行中 + 产品 · Recipe」
|
|
40
|
-
const st = await j(`/api/workshop/dcw/lines/${line.id}/start`, 'POST', { recipeId: recipe.id })
|
|
41
|
-
if (!st.data?.line?.active) { console.error('start failed'); process.exit(1) }
|
|
42
|
-
await page.reload({ waitUntil: 'networkidle2' })
|
|
43
|
-
await new Promise(r => setTimeout(r, 5000))
|
|
44
|
-
await page.evaluate((lineName) => {
|
|
45
|
-
const sel = document.querySelectorAll('.tbl-toolbar .inp-sel')[0]
|
|
46
|
-
const opt = [...sel.options].find(o => o.textContent.trim() === lineName)
|
|
47
|
-
const setter = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, 'value').set
|
|
48
|
-
setter.call(sel, opt.value)
|
|
49
|
-
sel.dispatchEvent(new Event('change', { bubbles: true }))
|
|
50
|
-
}, line.name)
|
|
51
|
-
await new Promise(r => setTimeout(r, 600))
|
|
52
|
-
const runNotes = await page.evaluate(() =>
|
|
53
|
-
[...document.querySelectorAll('.nodes-table .line-run')].map(n => ({ text: n.textContent.replace(/\s+/g, ' ').trim(), on: n.classList.contains('on') })))
|
|
54
|
-
console.log('② 开跑后 注记:', JSON.stringify(runNotes))
|
|
55
|
-
const okRun = runNotes.length > 0 && runNotes.every(n => n.on && n.text.includes('运行中') && n.text.includes('·'))
|
|
56
|
-
console.log(okRun ? 'PASS: 列表运行注记 = 运行中 + 产品 · Recipe' : 'FAIL: 注记不符')
|
|
57
|
-
await page.screenshot({ path: 'docs/audit/screenshots/daq-line-note-running.png' })
|
|
58
|
-
|
|
59
|
-
await j(`/api/workshop/dcw/lines/${line.id}/stop`, 'POST')
|
|
60
|
-
console.log('line stopped (env restored)')
|
|
61
|
-
await browser.close()
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 一次性审计:/daq 产线上下文横幅 + 产线列运行注记。
|
|
3
|
-
* ①未筛选 → 全局门控横幅;②筛选待机产线 → 未开跑横幅 + 直达产线管理,行注记"待机";
|
|
4
|
-
* ③开跑该产线 → 绿色横幅(产品/Recipe/批次),行注记"运行中 产品 · Recipe";
|
|
5
|
-
* 结束停线还原环境。
|
|
6
|
-
*/
|
|
7
|
-
import puppeteer from 'puppeteer-core'
|
|
8
|
-
|
|
9
|
-
const TOKEN = process.env.DAQ_TOKEN ?? 'ut-ffc1dfbbc0c1444c87c1ec69a9e8208c'
|
|
10
|
-
const ROOT = 'http://127.0.0.1:3000'
|
|
11
|
-
const H = { authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' }
|
|
12
|
-
const j = (u, m = 'GET', b) => fetch(ROOT + u, { method: m, headers: H, body: b ? JSON.stringify(b) : undefined }).then(r => r.json())
|
|
13
|
-
const fail = (msg) => { console.error('FAIL:', msg); process.exitCode = 1 }
|
|
14
|
-
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
15
|
-
|
|
16
|
-
const d = (await j('/api/workshop/dcw')).data
|
|
17
|
-
const target = d.lines.find(l => d.nodes.some(n => n.lineId === l.id) && d.recipes.some(r => r.lineId === l.id && r.params.length > 0))
|
|
18
|
-
if (!target) { console.error('FAIL: 没有带节点+配方的产线可验'); process.exit(1) }
|
|
19
|
-
const recipe = d.recipes.find(r => r.lineId === target.id && r.params.length > 0)
|
|
20
|
-
console.log('target line:', target.name, '| recipe:', recipe.name)
|
|
21
|
-
|
|
22
|
-
// 前置:确保该产线未在跑
|
|
23
|
-
await j(`/api/workshop/dcw/lines/${target.id}/stop`, 'POST').catch(() => {})
|
|
24
|
-
|
|
25
|
-
const browser = await puppeteer.launch({
|
|
26
|
-
executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
|
|
27
|
-
headless: 'new',
|
|
28
|
-
args: ['--no-sandbox', '--disable-gpu', '--window-size=1920,1280'],
|
|
29
|
-
})
|
|
30
|
-
const page = await browser.newPage()
|
|
31
|
-
await page.setViewport({ width: 1920, height: 1280 })
|
|
32
|
-
await page.setCookie({ name: 'token', value: TOKEN, domain: '127.0.0.1', path: '/' })
|
|
33
|
-
const selectLine = () => page.evaluate((lineName) => {
|
|
34
|
-
const sel = document.querySelectorAll('.tbl-toolbar .inp-sel')[0]
|
|
35
|
-
const opt = [...sel.options].find(o => o.textContent.trim() === lineName)
|
|
36
|
-
if (!opt) return false
|
|
37
|
-
const setter = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, 'value').set
|
|
38
|
-
setter.call(sel, opt.value)
|
|
39
|
-
sel.dispatchEvent(new Event('change', { bubbles: true }))
|
|
40
|
-
return true
|
|
41
|
-
}, target.name)
|
|
42
|
-
const bannerText = () => page.evaluate(() => {
|
|
43
|
-
const banners = [...document.querySelectorAll('.infra-banner')]
|
|
44
|
-
return banners.map(b => ({ good: b.classList.contains('good'), text: b.textContent.replace(/\s+/g, ' ').trim().slice(0, 180) }))
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
// ===== 1. 未筛选:全局门控横幅 =====
|
|
48
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
49
|
-
await sleep(4000)
|
|
50
|
-
const b0 = await bannerText()
|
|
51
|
-
console.log('unfiltered banners:', JSON.stringify(b0))
|
|
52
|
-
if (b0.some(b => b.text.includes('产线未开跑'))) console.log('PASS global gate banner (unfiltered)')
|
|
53
|
-
else fail('global banner missing when unfiltered')
|
|
54
|
-
|
|
55
|
-
// ===== 2. 筛选待机产线:未开跑横幅 + 直达按钮,行注记 待机 =====
|
|
56
|
-
if (!await selectLine()) { fail('cannot select target line'); await browser.close(); process.exit(1) }
|
|
57
|
-
await sleep(600)
|
|
58
|
-
const b1 = await bannerText()
|
|
59
|
-
const noteIdle = await page.evaluate(() => {
|
|
60
|
-
const row = [...document.querySelectorAll('.nodes-table tbody tr')].find(r => r.querySelector('.line-run'))
|
|
61
|
-
return row?.querySelector('.line-run')?.textContent.replace(/\s+/g, ' ').trim()
|
|
62
|
-
})
|
|
63
|
-
console.log('idle-line banner:', JSON.stringify(b1), '| row note:', noteIdle)
|
|
64
|
-
const idleBanner = b1.find(b => b.text.includes(target.name))
|
|
65
|
-
if (idleBanner && !idleBanner.good && idleBanner.text.includes('未开跑') && idleBanner.text.includes('暂停采集')) {
|
|
66
|
-
console.log('PASS idle-line banner: 未开跑提示')
|
|
67
|
-
} else fail(`idle banner wrong: ${JSON.stringify(idleBanner)}`)
|
|
68
|
-
const idleLink = await page.evaluate(() => document.querySelector('.infra-banner .pill-btn')?.getAttribute('href'))
|
|
69
|
-
if (idleLink === `/dcw/${target.id}`) console.log('PASS jump link → /dcw/{lineId}:', idleLink)
|
|
70
|
-
else fail(`jump link wrong: ${idleLink}`)
|
|
71
|
-
if (noteIdle === '未运行') console.log('PASS row note 未运行 (idle)')
|
|
72
|
-
else fail(`row note wrong: ${noteIdle}`)
|
|
73
|
-
await page.screenshot({ path: 'docs/audit/screenshots/daq-linebanner-idle.png' })
|
|
74
|
-
|
|
75
|
-
// ===== 3. 开跑:绿色横幅(产品/Recipe) + 行注记 运行中 产品 · Recipe =====
|
|
76
|
-
const st = await j(`/api/workshop/dcw/lines/${target.id}/start`, 'POST', { recipeId: recipe.id })
|
|
77
|
-
if (!st.data?.line?.active) { fail(`line start failed: ${JSON.stringify(st).slice(0, 160)}`); await browser.close(); process.exit(1) }
|
|
78
|
-
await page.reload({ waitUntil: 'domcontentloaded' })
|
|
79
|
-
await sleep(4000)
|
|
80
|
-
if (!await selectLine()) { fail('cannot re-select line after reload'); await browser.close(); process.exit(1) }
|
|
81
|
-
await sleep(600)
|
|
82
|
-
const b2 = await bannerText()
|
|
83
|
-
const noteRun = await page.evaluate(() => {
|
|
84
|
-
const notes = [...document.querySelectorAll('.nodes-table tbody .line-run')].map(n => n.textContent.replace(/\s+/g, ' ').trim())
|
|
85
|
-
return { on: notes.filter(s => s.includes('运行中')).length, idle: notes.filter(s => s === '待机').length, sample: notes[0] }
|
|
86
|
-
})
|
|
87
|
-
console.log('running banner:', JSON.stringify(b2), '| row notes:', JSON.stringify(noteRun))
|
|
88
|
-
const runBanner = b2.find(b => b.good)
|
|
89
|
-
if (runBanner && runBanner.text.includes('运行中') && runBanner.text.includes(recipe.name)) {
|
|
90
|
-
console.log('PASS running banner (good variant, recipe shown)')
|
|
91
|
-
} else fail(`running banner wrong: ${JSON.stringify(runBanner)}`)
|
|
92
|
-
if ((noteRun.on ?? 0) > 0 && (noteRun.sample ?? '').includes(recipe.name)) {
|
|
93
|
-
console.log('PASS row notes 运行中 + 产品/Recipe')
|
|
94
|
-
} else fail(`row notes wrong: ${JSON.stringify(noteRun)}`)
|
|
95
|
-
await page.screenshot({ path: 'docs/audit/screenshots/daq-linebanner-running.png' })
|
|
96
|
-
|
|
97
|
-
// ===== 4. 停线还原 =====
|
|
98
|
-
await j(`/api/workshop/dcw/lines/${target.id}/stop`, 'POST')
|
|
99
|
-
await page.reload({ waitUntil: 'domcontentloaded' })
|
|
100
|
-
await sleep(3500)
|
|
101
|
-
await selectLine()
|
|
102
|
-
await sleep(600)
|
|
103
|
-
const b3 = await bannerText()
|
|
104
|
-
if (b3.some(b => !b.good && b.text.includes('未开跑'))) console.log('PASS restored: idle banner back after stop')
|
|
105
|
-
else fail(`restore wrong: ${JSON.stringify(b3)}`)
|
|
106
|
-
await browser.close()
|
|
107
|
-
console.log(process.exitCode ? '\n=== AUDIT FAILED ===' : '\n=== ALL PASS ===')
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/** 一次性:数采中心 + 节点控制台 页面截图(v0.2.0 验证) */
|
|
2
|
-
import puppeteer from 'puppeteer-core'
|
|
3
|
-
|
|
4
|
-
const BASE = 'http://127.0.0.1:3000'
|
|
5
|
-
const login = await fetch(`${BASE}/api/users/login`, {
|
|
6
|
-
method: 'POST',
|
|
7
|
-
headers: { 'content-type': 'application/json' },
|
|
8
|
-
body: JSON.stringify({ email: process.env.E2E_USER ?? 'zhangwei@awshop.io', password: process.env.E2E_PASS ?? 'Awshop@123' }),
|
|
9
|
-
}).then(r => r.json())
|
|
10
|
-
const token = login.data.token
|
|
11
|
-
const H = { 'authorization': `Bearer ${token}`, 'content-type': 'application/json' }
|
|
12
|
-
|
|
13
|
-
// 取一个真实节点 id(优先非 legacy,便于展示)
|
|
14
|
-
const nodes = await fetch(`${BASE}/api/workshop/daq`, { headers: H }).then(r => r.json())
|
|
15
|
-
const first = nodes.data?.nodes?.[0]?.id
|
|
16
|
-
console.log('node =', first)
|
|
17
|
-
|
|
18
|
-
const browser = await puppeteer.launch({
|
|
19
|
-
executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
|
|
20
|
-
headless: 'new',
|
|
21
|
-
args: ['--no-sandbox', '--disable-gpu', '--window-size=1600,1000'],
|
|
22
|
-
})
|
|
23
|
-
const page = await browser.newPage()
|
|
24
|
-
await page.setViewport({ width: 1600, height: 1000 })
|
|
25
|
-
await page.setCookie({ name: 'token', value: token, domain: '127.0.0.1', path: '/' })
|
|
26
|
-
|
|
27
|
-
await page.goto(`${BASE}/daq`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
28
|
-
await new Promise(r => setTimeout(r, 6500))
|
|
29
|
-
await page.screenshot({ path: 'docs/audit/screenshots/daq-console-list.png' })
|
|
30
|
-
|
|
31
|
-
if (first) {
|
|
32
|
-
await page.goto(`${BASE}/daq/${first}`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
33
|
-
await new Promise(r => setTimeout(r, 6500))
|
|
34
|
-
await page.screenshot({ path: 'docs/audit/screenshots/daq-console-node.png' })
|
|
35
|
-
}
|
|
36
|
-
console.log('shots ok')
|
|
37
|
-
await browser.close()
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/** /daq 性能测量:长任务/WS帧率/渲染热点。 */
|
|
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
|
-
|
|
12
|
-
// 主线程占用率探针:事件循环延迟采样
|
|
13
|
-
await page.evaluateOnNewDocument(() => {
|
|
14
|
-
window.__evt = { frames: 0, longTasks: 0, longTotal: 0, delaySamples: [] }
|
|
15
|
-
try {
|
|
16
|
-
new PerformanceObserver((l) => {
|
|
17
|
-
for (const t of l.getEntries()) { window.__evt.longTasks++; window.__evt.longTotal += t.duration }
|
|
18
|
-
}).observe({ entryTypes: ['longtask'] })
|
|
19
|
-
} catch {}
|
|
20
|
-
})
|
|
21
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'domcontentloaded', timeout: 60000 })
|
|
22
|
-
await sleep(15000)
|
|
23
|
-
|
|
24
|
-
// 5s 观测窗:事件循环延迟 + WS 帧计数(钩一下 WebSocket)
|
|
25
|
-
const sample = await page.evaluate(() => new Promise((resolve) => {
|
|
26
|
-
const t0 = performance.now()
|
|
27
|
-
const delays = []
|
|
28
|
-
let last = t0
|
|
29
|
-
const iv = setInterval(() => {
|
|
30
|
-
const now = performance.now()
|
|
31
|
-
delays.push(now - last - 50)
|
|
32
|
-
last = now
|
|
33
|
-
}, 50)
|
|
34
|
-
// 数一下 5s 内到达的 JSON 消息(WS)
|
|
35
|
-
let wsMsgs = 0
|
|
36
|
-
const OrigWS = window.WebSocket
|
|
37
|
-
// 已有连接无法挂钩,改从 store 帧率侧面观测:读 DOM 实时值列变化次数
|
|
38
|
-
const valCell = document.querySelector('.nodes-table tbody .val')
|
|
39
|
-
const texts = []
|
|
40
|
-
const domIv = setInterval(() => { texts.push(valCell?.textContent ?? '') }, 100)
|
|
41
|
-
setTimeout(() => {
|
|
42
|
-
clearInterval(iv); clearInterval(domIv)
|
|
43
|
-
const changed = texts.filter((v, i) => i && v !== texts[i - 1]).length
|
|
44
|
-
resolve({
|
|
45
|
-
window: Math.round(performance.now() - t0),
|
|
46
|
-
avgDelay: +(delays.reduce((a, b) => a + b, 0) / delays.length).toFixed(1),
|
|
47
|
-
maxDelay: +Math.max(...delays).toFixed(0),
|
|
48
|
-
delaysOver100: delays.filter(d => d > 100).length,
|
|
49
|
-
valCellChanges: changed,
|
|
50
|
-
longTasks: window.__evt?.longTasks ?? 0,
|
|
51
|
-
longTotal: Math.round(window.__evt?.longTotal ?? 0),
|
|
52
|
-
})
|
|
53
|
-
}, 5000)
|
|
54
|
-
}))
|
|
55
|
-
console.log('5s 观测窗:', JSON.stringify(sample))
|
|
56
|
-
console.log('节点数:', await page.evaluate(() => document.querySelectorAll('.nodes-table tbody tr').length),
|
|
57
|
-
'| 优化记录行:', await page.evaluate(() => document.querySelectorAll('.opt-list .opt-row').length),
|
|
58
|
-
'| opt-body 常驻:', await page.evaluate(() => !!document.querySelector('.opt-body')))
|
|
59
|
-
console.log('errors: (跳过)')
|
|
60
|
-
await browser.close()
|
|
61
|
-
console.log('DONE')
|
|
@@ -1,27 +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
|
-
const optReq = []
|
|
9
|
-
page.on('console', m => { if (m.type() === 'error') errors.push(m.text().slice(0, 160)) })
|
|
10
|
-
page.on('pageerror', e => errors.push(`PAGEERROR: ${String(e).slice(0, 160)}`))
|
|
11
|
-
page.on('request', r => { if (r.url().includes('/dcw/optimizations')) optReq.push(r.url()) })
|
|
12
|
-
await page.setViewport({ width: 1600, height: 1000, deviceScaleFactor: 1.25 })
|
|
13
|
-
await page.setCookie({ name: 'token', value: login.data.token, domain: '127.0.0.1', path: '/' })
|
|
14
|
-
await page.goto(`${ROOT}/daq`, { waitUntil: 'domcontentloaded', timeout: 45000 })
|
|
15
|
-
await sleep(8000)
|
|
16
|
-
console.log('opt requests after load:', optReq.length, optReq[0]?.split('/api')[1] ?? '')
|
|
17
|
-
console.log('opt-head exists:', await page.evaluate(() => !!document.querySelector('.opt-head')))
|
|
18
|
-
await page.click('.opt-head')
|
|
19
|
-
await sleep(1500)
|
|
20
|
-
console.log('opt requests after click:', optReq.length, optReq.at(-1)?.split('/api')[1] ?? '')
|
|
21
|
-
console.log('rows:', await page.evaluate(() => document.querySelectorAll('.opt-list .opt-row').length),
|
|
22
|
-
'| empty hint:', await page.evaluate(() => document.querySelector('.opt-body .opt-empty')?.textContent.trim() ?? 'none'),
|
|
23
|
-
'| body exists:', await page.evaluate(() => !!document.querySelector('.opt-body')))
|
|
24
|
-
console.log('recipe select options:', await page.evaluate(() => document.querySelectorAll('.opt-filters select')[1]?.options.length ?? 'no-select'))
|
|
25
|
-
console.log('errors:', errors.length ? errors.slice(0, 4) : 'none')
|
|
26
|
-
await browser.close()
|
|
27
|
-
console.log('DONE')
|
|
@@ -1,30 +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 optReq = []
|
|
8
|
-
page.on('request', r => { if (r.url().includes('/dcw/optimizations')) optReq.push(r.url()) })
|
|
9
|
-
await page.setViewport({ width: 1600, height: 1000, deviceScaleFactor: 1.25 })
|
|
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: 45000 })
|
|
12
|
-
await sleep(8000)
|
|
13
|
-
await page.click('.opt-head')
|
|
14
|
-
await sleep(800)
|
|
15
|
-
const before = optReq.length
|
|
16
|
-
await page.evaluate(() => {
|
|
17
|
-
const sel = document.querySelectorAll('.opt-filters select')[1]
|
|
18
|
-
sel.value = sel.options[1].value
|
|
19
|
-
sel.dispatchEvent(new Event('change'))
|
|
20
|
-
})
|
|
21
|
-
await sleep(1500)
|
|
22
|
-
const hit = optReq.slice(before).find(u => u.includes('recipeId='))
|
|
23
|
-
const rows = await page.evaluate(() => document.querySelectorAll('.opt-list .opt-row').length)
|
|
24
|
-
if (hit) console.log('PASS Recipe 筛选:', hit.split('/api')[1], '| 过滤后记录:', rows)
|
|
25
|
-
else { console.error('FAIL no recipeId request; got:', JSON.stringify(optReq.slice(before))); process.exitCode = 1 }
|
|
26
|
-
// 截图:优化记录面板 + 筛选工具条全貌
|
|
27
|
-
const el = await page.$('.page')
|
|
28
|
-
await el.screenshot({ path: 'docs/audit/screenshots/redesign0831/daq-opt-recipe.png' })
|
|
29
|
-
await browser.close()
|
|
30
|
-
console.log(process.exitCode ? 'FAILED' : 'DONE')
|