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
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* plc-clean-scenario.mjs —— 全新环境 · PLC 工艺模拟器 · 端到端真实工况演练
|
|
3
|
+
* ------------------------------------------------------------
|
|
4
|
+
* 目标:在**空配置根**上,用真实 Modbus TCP 从站(scripts/dev-plc-simulator.mjs,
|
|
5
|
+
* 涂布产线烘干单元:温度/速度/张力三回路,一阶惯性 + 执行器斜率限制 + 过程噪声)
|
|
6
|
+
* 走完一整条业务链,并留下可供截图核验的数据:
|
|
7
|
+
*
|
|
8
|
+
* P1 管理员引导 P5 工艺收敛(等 PV 追上 SP)
|
|
9
|
+
* P2 建线 + 3 数采 + 3 数控 P6 参数调优(3 次设定值调整 + 回读校验)
|
|
10
|
+
* P3 拖入真实 3D 模型并绑定 P7 Channel / Agent / 节点绑定 / 任务
|
|
11
|
+
* P4 产品 + 配方 + 开跑 P8 历史与留痕核查(数采/写史/台账/版本/运维日志)
|
|
12
|
+
*
|
|
13
|
+
* 用法:
|
|
14
|
+
* node scripts/_audit/plc-clean-scenario.mjs --base http://127.0.0.1:3112 \
|
|
15
|
+
* --plc 127.0.0.1:15041 [--state <输出 state.json>] [--skip-agent]
|
|
16
|
+
*/
|
|
17
|
+
import { mkdirSync, writeFileSync } from 'node:fs'
|
|
18
|
+
import { dirname, resolve } from 'node:path'
|
|
19
|
+
import { fileURLToPath } from 'node:url'
|
|
20
|
+
|
|
21
|
+
const arg = (k, d) => {
|
|
22
|
+
const i = process.argv.indexOf(`--${k}`)
|
|
23
|
+
return i > 0 && process.argv[i + 1] ? process.argv[i + 1] : d
|
|
24
|
+
}
|
|
25
|
+
const BASE = arg('base', 'http://127.0.0.1:3112').replace(/\/$/, '')
|
|
26
|
+
const [PLC_HOST, PLC_PORT] = arg('plc', '127.0.0.1:15041').split(':')
|
|
27
|
+
const SKIP_AGENT = process.argv.includes('--skip-agent')
|
|
28
|
+
/** --only=town —— 只补做「小镇挂载」这一步(可对既有环境补跑,不必重建整套数据) */
|
|
29
|
+
const ONLY = arg('only', '')
|
|
30
|
+
const HERE = dirname(fileURLToPath(import.meta.url))
|
|
31
|
+
const STATE = arg('state', resolve(HERE, '..', '..', '.e2e-shots', 'plc-clean', 'state.json'))
|
|
32
|
+
|
|
33
|
+
const TAG = Date.now().toString(36).slice(-5)
|
|
34
|
+
const ADMIN = { email: 'plant@awshop.local', password: 'Plant!2026', name: '产线工程师' }
|
|
35
|
+
|
|
36
|
+
let pass = 0
|
|
37
|
+
let fail = 0
|
|
38
|
+
const check = (name, ok, detail = '') => {
|
|
39
|
+
console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
40
|
+
ok ? pass++ : fail++
|
|
41
|
+
}
|
|
42
|
+
const info = msg => console.log(` · ${msg}`)
|
|
43
|
+
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
44
|
+
|
|
45
|
+
let token = null
|
|
46
|
+
async function api(method, path, { body, raw } = {}) {
|
|
47
|
+
const headers = { 'content-type': 'application/json' }
|
|
48
|
+
if (token) headers.authorization = `Bearer ${token}`
|
|
49
|
+
const res = await fetch(`${BASE}${path}`, {
|
|
50
|
+
method,
|
|
51
|
+
headers,
|
|
52
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
53
|
+
})
|
|
54
|
+
const json = await res.json().catch(() => null)
|
|
55
|
+
return raw ? { status: res.status, json } : { status: res.status, ...(json ?? {}) }
|
|
56
|
+
}
|
|
57
|
+
const data = r => r?.data ?? {}
|
|
58
|
+
const ok = r => r?.code === 0 || (r?.status >= 200 && r?.status < 300)
|
|
59
|
+
|
|
60
|
+
async function waitFor(name, fn, timeoutMs = 180_000, intervalMs = 1500) {
|
|
61
|
+
const deadline = Date.now() + timeoutMs
|
|
62
|
+
let last
|
|
63
|
+
while (Date.now() < deadline) {
|
|
64
|
+
try {
|
|
65
|
+
last = await fn()
|
|
66
|
+
if (last) return last
|
|
67
|
+
}
|
|
68
|
+
catch (err) { last = err?.message ?? err }
|
|
69
|
+
await sleep(intervalMs)
|
|
70
|
+
}
|
|
71
|
+
info(`waitFor 超时: ${name}(最后=${String(last).slice(0, 140)})`)
|
|
72
|
+
return null
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** PLC 侧三回路 —— 与 dev-plc-simulator.mjs 的寄存器布局一一对应 */
|
|
76
|
+
const CIRCUITS = [
|
|
77
|
+
{ key: 'temp', label: '烘箱温度', daqTpl: 'daq-temp-tc', dcwTpl: 'dcw-temp-sp', pvReg: 40001, spReg: 40021, unit: '℃', set: 182, tune: 186, min: 150, max: 200, win: [176, 188] },
|
|
78
|
+
{ key: 'speed', label: '产线速度', daqTpl: 'daq-line-encoder', dcwTpl: 'dcw-speed-sp', pvReg: 40003, spReg: 40023, unit: 'm/min', set: 320, tune: 330, min: 280, max: 360, win: [310, 340] },
|
|
79
|
+
{ key: 'tension', label: '膜张力', daqTpl: 'daq-tension-cell', dcwTpl: 'dcw-tension-sp', pvReg: 40005, spReg: 40025, unit: 'kN', set: 21.4, tune: 22.6, min: 18, max: 26, win: [19.5, 23.5] },
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
/** 车间落位(数采/数控/孪生三者错开,便于在 3D 场景里分辨) */
|
|
83
|
+
const LAYOUT = {
|
|
84
|
+
temp: { daq: [-9, -3], dcw: [-9, 3], model: 'extruder', name: '挤出主机' },
|
|
85
|
+
speed: { daq: [0, -3], dcw: [0, 3], model: 'winder', name: '收卷机组' },
|
|
86
|
+
tension: { daq: [9, -3], dcw: [9, 3], model: 'mdo', name: 'MDO 拉伸单元' },
|
|
87
|
+
}
|
|
88
|
+
const EXTRA_TWINS = [
|
|
89
|
+
{ model: 'power-cabinet', name: '配电柜', pos: [-14, 8] },
|
|
90
|
+
{ model: 'device-robot-arm', name: '上下料机械臂', pos: [14, 8] },
|
|
91
|
+
{ model: 'thickness-scanner', name: '在线测厚仪', pos: [0, 8] },
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
const state = { base: BASE, plc: `${PLC_HOST}:${PLC_PORT}`, tag: TAG, circuits: {}, createdAt: new Date().toISOString() }
|
|
95
|
+
|
|
96
|
+
async function main() {
|
|
97
|
+
console.log(`\n━━━ 全新环境 · PLC 工艺模拟 · 端到端演练 @ ${BASE}(PLC ${PLC_HOST}:${PLC_PORT})━━━`)
|
|
98
|
+
|
|
99
|
+
// --only=town:对既有环境补做「小镇挂载」,不重建数据(截图前常用)
|
|
100
|
+
if (ONLY === 'town') {
|
|
101
|
+
const login = await api('POST', '/api/users/login', { body: { email: state.admin?.email ?? ADMIN.email, password: state.admin?.password ?? ADMIN.password } })
|
|
102
|
+
token = data(login).token ?? (await api('POST', '/api/users/register', { body: ADMIN })).data?.token
|
|
103
|
+
if (!token) throw new Error('登录失败:--only=town 需要既有环境与 state.json')
|
|
104
|
+
const chans = data(await api('GET', '/api/workshop/channels'))
|
|
105
|
+
const list = Array.isArray(chans) ? chans : (chans.channels ?? [])
|
|
106
|
+
const ch = list[0]
|
|
107
|
+
if (!ch) throw new Error('既有环境里没有 Channel')
|
|
108
|
+
console.log(` 复用 Channel:${ch.name}(${ch.id})`)
|
|
109
|
+
const ws = data(await api('POST', '/api/workshop/workspaces', { body: { name: `数字化车间-${TAG}` } }))
|
|
110
|
+
const wsId = ws.id ?? ws.workspace?.id
|
|
111
|
+
check('P9.1 workspace 创建', Boolean(wsId), wsId)
|
|
112
|
+
const mounted = await api('POST', `/api/workshop/workspaces/${wsId}/channels/${ch.id}`)
|
|
113
|
+
check('P9.2 Channel 挂载进小镇', ok(mounted), `code=${mounted.code}`)
|
|
114
|
+
const layout = data(await api('PUT', `/api/workshop/scene/layouts/${ch.id}`, { body: { x: 0, z: 0, radiusX: 22, radiusZ: 16, shape: 'ellipse' } })).layout
|
|
115
|
+
check('P9.3 频道领地铺开', Boolean(layout), JSON.stringify(layout ?? {}).slice(0, 120))
|
|
116
|
+
state.town = { workspaceId: wsId, channelId: ch.id, mounted: true }
|
|
117
|
+
state.channel = { id: ch.id, name: ch.name }
|
|
118
|
+
mkdirSync(dirname(STATE), { recursive: true })
|
|
119
|
+
writeFileSync(STATE, JSON.stringify(state, null, 2), 'utf8')
|
|
120
|
+
console.log(`\n 状态已更新 ${STATE}`)
|
|
121
|
+
return
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ══════════ P1 管理员引导 ══════════
|
|
125
|
+
console.log('\n── P1 环境引导(空配置根) ──')
|
|
126
|
+
const setup = await api('GET', '/api/users/setup-status')
|
|
127
|
+
check('P1.1 空配置根:needsSetup=true(全新环境)', data(setup).needsSetup === true, JSON.stringify(data(setup)))
|
|
128
|
+
const reg = await api('POST', '/api/users/register', { body: ADMIN })
|
|
129
|
+
token = data(reg).token
|
|
130
|
+
check('P1.2 首个用户注册即管理员', Boolean(token), `status=${reg.status} role=${data(reg).user?.role ?? '?'}`)
|
|
131
|
+
if (!token) throw new Error('注册失败,后续无法继续')
|
|
132
|
+
|
|
133
|
+
// ══════════ P2 产线 + 节点 ══════════
|
|
134
|
+
console.log('\n── P2 建产线 · 3 数采 + 3 数控(真实 Modbus TCP)──')
|
|
135
|
+
const line = data(await api('POST', '/api/workshop/dcw/lines', { body: { name: `涂布烘干线-${TAG}`, color: '#35e0a0' } })).line
|
|
136
|
+
check('P2.1 产线创建', Boolean(line?.id), line?.name)
|
|
137
|
+
|
|
138
|
+
const driverConfig = reg => ({ host: PLC_HOST, port: Number(PLC_PORT), unitId: 1, register: reg, registerType: 'holding', dataType: 'float32', byteOrder: 'big', scale: 1 })
|
|
139
|
+
|
|
140
|
+
// 建节点前先做一次连接测试:协议栈缺失/端口不通会在这里直接暴露,
|
|
141
|
+
// 否则只会在节点上留下 state=offline + produced=0 这种没有原因的现象。
|
|
142
|
+
const probe = await api('POST', '/api/workshop/daq/test-driver', {
|
|
143
|
+
body: { driver: 'modbus-tcp', driverConfig: driverConfig(CIRCUITS[0].pvReg) },
|
|
144
|
+
})
|
|
145
|
+
const probeRes = data(probe).test ?? {}
|
|
146
|
+
check('P2.0 Modbus TCP 连接测试(协议栈 + 端口可读)', probeRes.ok === true,
|
|
147
|
+
`ok=${probeRes.ok} value=${probeRes.sampleValue ?? '?'} latency=${probeRes.latencyMs ?? '?'}ms msg=${probeRes.message ?? ''}`)
|
|
148
|
+
|
|
149
|
+
for (const c of CIRCUITS) {
|
|
150
|
+
const lay = LAYOUT[c.key]
|
|
151
|
+
const daq = data(await api('POST', '/api/workshop/daq', {
|
|
152
|
+
body: {
|
|
153
|
+
templateRef: c.daqTpl,
|
|
154
|
+
name: `${c.label}采集-${TAG}`,
|
|
155
|
+
driver: 'modbus-tcp',
|
|
156
|
+
driverConfig: driverConfig(c.pvReg),
|
|
157
|
+
lineId: line.id,
|
|
158
|
+
intervalMs: 1000,
|
|
159
|
+
posX: lay.daq[0],
|
|
160
|
+
posZ: lay.daq[1],
|
|
161
|
+
},
|
|
162
|
+
})).node
|
|
163
|
+
const dcw = data(await api('POST', '/api/workshop/dcw', {
|
|
164
|
+
body: {
|
|
165
|
+
templateRef: c.dcwTpl,
|
|
166
|
+
name: `${c.label}设定-${TAG}`,
|
|
167
|
+
driver: 'modbus-tcp',
|
|
168
|
+
driverConfig: driverConfig(c.spReg),
|
|
169
|
+
lineId: line.id,
|
|
170
|
+
readIntervalMs: 2000,
|
|
171
|
+
posX: lay.dcw[0],
|
|
172
|
+
posZ: lay.dcw[1],
|
|
173
|
+
},
|
|
174
|
+
})).node
|
|
175
|
+
state.circuits[c.key] = { daq: daq?.id, dcw: dcw?.id, pvReg: c.pvReg, spReg: c.spReg }
|
|
176
|
+
check(`P2.2 ${c.label} 数采节点建立(驱动 modbus-tcp,PV 寄存器 ${c.pvReg} @${PLC_HOST}:${PLC_PORT})`, daq?.driver === 'modbus-tcp', `driver=${daq?.driver} state=${daq?.state} value=${daq?.value}`)
|
|
177
|
+
check(`P2.3 ${c.label} 数控节点建立(SP 寄存器 ${c.spReg})`, dcw?.driver === 'modbus-tcp', `driver=${dcw?.driver} state=${dcw?.state}`)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// ══════════ P3 3D 模型:真实 GLB 落位并绑定节点 ══════════
|
|
181
|
+
console.log('\n── P3 数字孪生:拖入真实 3D 模型并绑定节点 ──')
|
|
182
|
+
const assets = data(await api('GET', '/api/workshop/assets/devices')).devices ?? []
|
|
183
|
+
check('P3.1 模型库扫描到设备 GLB', assets.length >= 6, `${assets.length} 个:${assets.map(a => a.id).slice(0, 6).join(', ')}`)
|
|
184
|
+
const assetOf = needle => assets.find(a => a.id.includes(needle)) ?? assets.find(a => a.name?.includes(needle))
|
|
185
|
+
|
|
186
|
+
state.twins = {}
|
|
187
|
+
for (const c of CIRCUITS) {
|
|
188
|
+
const lay = LAYOUT[c.key]
|
|
189
|
+
const asset = assetOf(lay.model)
|
|
190
|
+
const twin = data(await api('POST', '/api/workshop/device-twins', {
|
|
191
|
+
body: { name: `${lay.name}-${TAG}`, modelRef: asset?.id ?? '', kind: 'device', posX: lay.daq[0], posZ: 8, rotationY: 0, scale: 1, controls: [] },
|
|
192
|
+
})).twin
|
|
193
|
+
if (twin?.id) {
|
|
194
|
+
await api('POST', `/api/workshop/daq/${state.circuits[c.key].daq}/bind`, { body: { deviceId: twin.id } })
|
|
195
|
+
await api('POST', `/api/workshop/dcw/${state.circuits[c.key].dcw}/bind`, { body: { deviceId: twin.id } })
|
|
196
|
+
}
|
|
197
|
+
state.twins[c.key] = twin?.id
|
|
198
|
+
check(`P3.2 ${lay.name} ← ${asset?.id ?? '(未找到模型)'} 并绑定数采+数控`, Boolean(twin?.id && asset?.id), `twin=${twin?.id?.slice(0, 8)} model=${asset?.id}`)
|
|
199
|
+
}
|
|
200
|
+
for (const t of EXTRA_TWINS) {
|
|
201
|
+
const asset = assetOf(t.model)
|
|
202
|
+
const twin = data(await api('POST', '/api/workshop/device-twins', {
|
|
203
|
+
body: { name: `${t.name}-${TAG}`, modelRef: asset?.id ?? '', kind: 'device', posX: t.pos[0], posZ: t.pos[1], rotationY: 0, scale: 1, controls: [] },
|
|
204
|
+
})).twin
|
|
205
|
+
state.twins[t.model] = twin?.id
|
|
206
|
+
check(`P3.3 辅助设备落位 ${t.name}`, Boolean(twin?.id), asset?.id)
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// ══════════ P4 产品 + 配方 + 开跑 ══════════
|
|
210
|
+
console.log('\n── P4 产品 / 配方 / 开跑(配方参数逐节点写入并回读校验)──')
|
|
211
|
+
const prod = data(await api('POST', '/api/workshop/dcw/products', { body: { name: `锂电隔膜-${TAG}`, lineId: line.id } })).product
|
|
212
|
+
check('P4.1 产品创建', Boolean(prod?.id), prod?.name)
|
|
213
|
+
|
|
214
|
+
const recipe = data(await api('POST', '/api/workshop/dcw/recipes', {
|
|
215
|
+
body: {
|
|
216
|
+
productId: prod.id,
|
|
217
|
+
name: `标准配方-${TAG}`,
|
|
218
|
+
params: CIRCUITS.map(c => ({
|
|
219
|
+
templateRef: c.dcwTpl,
|
|
220
|
+
nodeId: state.circuits[c.key].dcw,
|
|
221
|
+
value: c.set,
|
|
222
|
+
min: c.win[0],
|
|
223
|
+
max: c.win[1],
|
|
224
|
+
})),
|
|
225
|
+
daqWindows: CIRCUITS.map(c => ({ nodeId: state.circuits[c.key].daq, min: c.min, max: c.max })),
|
|
226
|
+
},
|
|
227
|
+
})).recipe
|
|
228
|
+
check('P4.2 配方创建(3 写参数 + 3 数采窗口)', Boolean(recipe?.id), `params=${recipe?.params?.length} windows=${recipe?.daqWindows?.length}`)
|
|
229
|
+
|
|
230
|
+
const started = await api('POST', `/api/workshop/dcw/lines/${line.id}/start`, { body: { recipeId: recipe.id } })
|
|
231
|
+
check('P4.3 开跑:配方参数逐节点下发(联锁 ∩ 配方窗口)', ok(started), `code=${started.code} msg=${started.message ?? ''}`)
|
|
232
|
+
|
|
233
|
+
// ══════════ P5 工艺收敛 ══════════
|
|
234
|
+
console.log('\n── P5 等待工艺收敛(PV 追 SP:一阶惯性 τ≈4–8s + 执行器斜率限制)──')
|
|
235
|
+
const pvNow = async (c) => {
|
|
236
|
+
// 注意:/samples 返回的是**按 bucketMs 聚合的点** { at, avg, min, max, cnt },
|
|
237
|
+
// 不是原始 { value }。读 .avg。
|
|
238
|
+
const r = await api('GET', `/api/workshop/daq/${state.circuits[c.key].daq}/samples?limit=5`)
|
|
239
|
+
const pts = data(r).points ?? []
|
|
240
|
+
return pts.length ? Number(pts[0].avg) : null
|
|
241
|
+
}
|
|
242
|
+
const converged = {}
|
|
243
|
+
for (const c of CIRCUITS) {
|
|
244
|
+
const tol = c.key === 'temp' ? 4 : c.key === 'speed' ? 6 : 0.6
|
|
245
|
+
const v = await waitFor(`${c.label} 收敛到 ${c.set}`, async () => {
|
|
246
|
+
const pv = await pvNow(c)
|
|
247
|
+
return pv !== null && Math.abs(pv - c.set) <= tol ? pv : null
|
|
248
|
+
}, 240_000, 3000)
|
|
249
|
+
converged[c.key] = v
|
|
250
|
+
check(`P5.1 ${c.label} 实测 PV 收敛到设定值 ${c.set}${c.unit}`, v !== null, v === null ? '未收敛' : `PV=${Number(v).toFixed(2)}`)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// ══════════ P6 参数调优 ══════════
|
|
254
|
+
console.log('\n── P6 产线参数调优(设定值调整 → PLC 写入 → 回读校验 → PV 跟随)──')
|
|
255
|
+
for (const c of CIRCUITS) {
|
|
256
|
+
const r = await api('POST', `/api/workshop/dcw/${state.circuits[c.key].dcw}/write`, { body: { value: c.tune } })
|
|
257
|
+
const outcome = data(r).outcome ?? {}
|
|
258
|
+
check(`P6.1 ${c.label} 调优写入 ${c.set} → ${c.tune}${c.unit}(回读校验)`,
|
|
259
|
+
ok(r) && outcome.ok === true,
|
|
260
|
+
`ok=${outcome.ok} readback=${outcome.readValue ?? outcome.readback ?? '?'} ack=${outcome.state ?? outcome.ack ?? ''}`)
|
|
261
|
+
await sleep(1200)
|
|
262
|
+
}
|
|
263
|
+
for (const c of CIRCUITS) {
|
|
264
|
+
const tol = c.key === 'temp' ? 4 : c.key === 'speed' ? 6 : 0.6
|
|
265
|
+
const v = await waitFor(`${c.label} PV 跟随到 ${c.tune}`, async () => {
|
|
266
|
+
const pv = await pvNow(c)
|
|
267
|
+
return pv !== null && Math.abs(pv - c.tune) <= tol ? pv : null
|
|
268
|
+
}, 240_000, 3000)
|
|
269
|
+
check(`P6.2 ${c.label} 实测 PV 跟随调优值 ${c.tune}${c.unit}`, v !== null, v === null ? '未跟随' : `PV=${Number(v).toFixed(2)}`)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// 配方版本:调优后把新值落进配方(产生 v2 版本记录)
|
|
273
|
+
const bumped = await api('PATCH', `/api/workshop/dcw/recipes/${recipe.id}`, {
|
|
274
|
+
body: { params: CIRCUITS.map(c => ({ templateRef: c.dcwTpl, nodeId: state.circuits[c.key].dcw, value: c.tune, min: c.win[0], max: c.win[1] })) },
|
|
275
|
+
})
|
|
276
|
+
check('P6.3 调优结果回写配方(产生新版本)', ok(bumped), `code=${bumped.code}`)
|
|
277
|
+
|
|
278
|
+
// ══════════ P7 Channel / Agent / 绑定 / 任务 ══════════
|
|
279
|
+
console.log('\n── P7 Channel 团队 · 节点绑定 · 任务 ──')
|
|
280
|
+
const chName = `烘干线工艺组-${TAG}`
|
|
281
|
+
const ch = data(await api('POST', '/api/workshop/channels', {
|
|
282
|
+
body: {
|
|
283
|
+
name: chName,
|
|
284
|
+
description: '涂布烘干线工艺调优(温/速/张力)',
|
|
285
|
+
leadAgent: { name: `调度长-${TAG}`, harness: 'mock', config: { delayMs: 40 } },
|
|
286
|
+
},
|
|
287
|
+
}))
|
|
288
|
+
const channelId = ch.channelId ?? ch.id
|
|
289
|
+
check('P7.1 Channel 创建(lead=mock 调度长)', Boolean(channelId), channelId?.slice(0, 8))
|
|
290
|
+
|
|
291
|
+
const harness = SKIP_AGENT ? 'mock' : 'omp'
|
|
292
|
+
const workerTpl = data(await api('POST', '/api/workshop/agents', {
|
|
293
|
+
body: {
|
|
294
|
+
name: `工艺员-${TAG}`,
|
|
295
|
+
harness,
|
|
296
|
+
config: { systemPromptPrefix: '你是涂布烘干线的工艺操作员。只使用工业工具读取与调整参数,步骤化执行,不做额外操作。' },
|
|
297
|
+
},
|
|
298
|
+
}))
|
|
299
|
+
const workerId = workerTpl.id
|
|
300
|
+
if (workerId) await api('POST', `/api/workshop/channels/${channelId}/agents`, { body: { agentId: workerId, role: 'worker' } })
|
|
301
|
+
check(`P7.2 工艺员 Agent 入队(harness=${harness})`, Boolean(workerId), workerId?.slice(0, 8))
|
|
302
|
+
|
|
303
|
+
// 数采 auto / 数控 manual(manual = 下发需人工审批,生产上就应该这么配)
|
|
304
|
+
// ⚠️ 绑定必须用**频道成员实例 id**,不是 Agent 模板 id:
|
|
305
|
+
// 运行时持绑定做工具鉴权的是成员实例;绑到模板 id 上成员侧一律报"尚未绑定节点",
|
|
306
|
+
// 是一条静默失效的授权(实测踩过 —— 任务被真实 LLM 正当地拒绝)。接口现已显式拒绝模板 id。
|
|
307
|
+
const membersRaw = data(await api('GET', `/api/workshop/channels/${channelId}/agents`))
|
|
308
|
+
const memberList = Array.isArray(membersRaw) ? membersRaw : (membersRaw.agents ?? [])
|
|
309
|
+
const member = memberList.find(m => m.role === 'worker' && (m.templateId === workerId || m.id === workerId))
|
|
310
|
+
const bindAgentId = member?.id ?? workerId
|
|
311
|
+
check('P7.2b 取到 worker 的频道成员 id(绑定的正确主体)', Boolean(member?.id), `member=${String(bindAgentId).slice(0, 8)} template=${String(workerId).slice(0, 8)}`)
|
|
312
|
+
|
|
313
|
+
// 数采 auto / 数控 manual(manual = 下发需人工审批,生产上就应该这么配)
|
|
314
|
+
let bound = 0
|
|
315
|
+
for (const c of CIRCUITS) {
|
|
316
|
+
for (const [kind, id, mode] of [['daq', state.circuits[c.key].daq, 'auto'], ['dcw', state.circuits[c.key].dcw, 'manual']]) {
|
|
317
|
+
const b = await api('POST', '/api/workshop/agent-tools/bindings', { body: { agentId: bindAgentId, nodeId: id, kind, mode } })
|
|
318
|
+
if (ok(b)) bound++
|
|
319
|
+
else check(`P7.3 ${c.label} ${kind} 绑定(${mode})`, false, JSON.stringify(b).slice(0, 160))
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
const bindings = data(await api('GET', `/api/workshop/agent-tools/bindings?agentId=${bindAgentId}`))
|
|
323
|
+
const bList = Array.isArray(bindings) ? bindings : (bindings.bindings ?? [])
|
|
324
|
+
check('P7.3 六个节点绑定完成且成员侧可见(3 数采 auto + 3 数控 manual)',
|
|
325
|
+
bound === 6 && bList.length === 6, `创建 ${bound}/6 · 成员侧可见 ${bList.length}`)
|
|
326
|
+
|
|
327
|
+
if (!SKIP_AGENT && member?.id) {
|
|
328
|
+
const task = await api('POST', `/api/workshop/channels/${channelId}/tasks`, {
|
|
329
|
+
body: {
|
|
330
|
+
title: `烘干线工艺巡检-${TAG}`,
|
|
331
|
+
parts: [{ text: `用 daq_query 读取「烘箱温度采集-${TAG}」「产线速度采集-${TAG}」「膜张力采集-${TAG}」最近 5 分钟数据,汇总三者的均值与波动,判断是否处于稳态,然后把结论写入 complete_task。` }],
|
|
332
|
+
assigneeId: member.id,
|
|
333
|
+
},
|
|
334
|
+
})
|
|
335
|
+
const taskId = data(task).task?.id ?? data(task).id
|
|
336
|
+
check('P7.4 巡检任务下发', Boolean(taskId), taskId?.slice(0, 8))
|
|
337
|
+
info('… 等待 omp 真实 LLM 执行(2–4 分钟)…')
|
|
338
|
+
const finalState = await waitFor('任务终态', async () => {
|
|
339
|
+
const t = await api('GET', `/api/workshop/channels/${channelId}/tasks`)
|
|
340
|
+
const me = (data(t) ?? []).find(x => x.id === taskId)
|
|
341
|
+
return me && ['COMPLETED', 'FAILED', 'CANCELED'].includes(me.state) ? me.state : null
|
|
342
|
+
}, 420_000, 4000)
|
|
343
|
+
check('P7.5 任务终态(Agent 真实读取数采)', finalState === 'COMPLETED', `state=${finalState}`)
|
|
344
|
+
state.taskId = taskId
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// ══════════ P8 历史与留痕 ══════════
|
|
348
|
+
console.log('\n── P8 数据与留痕核查 ──')
|
|
349
|
+
const tempDaq = state.circuits.temp.daq
|
|
350
|
+
// /samples 返回的是**按显示桶聚合**的点(每桶 15s,含 cnt),桶数不代表样本量 ——
|
|
351
|
+
// 真正的样本量要把 cnt 求和,否则短窗口下会误判成"没数据"。
|
|
352
|
+
const samplePts = data(await api('GET', `/api/workshop/daq/${tempDaq}/samples?limit=400`)).points ?? []
|
|
353
|
+
const rawCount = samplePts.reduce((s, p) => s + Number(p.cnt ?? 0), 0)
|
|
354
|
+
const ctrl = data(await api('GET', '/api/workshop/daq')).controller ?? {}
|
|
355
|
+
check('P8.1 数采持续入库', rawCount >= 60 && Number(ctrl.samplesStored ?? 0) >= 60,
|
|
356
|
+
`桶=${samplePts.length} 原始样本=${rawCount} samplesStored=${ctrl.samplesStored} produced=${ctrl.produced} dropped=${ctrl.dropped}`)
|
|
357
|
+
check('P8.1b 采集过程无丢弃', Number(ctrl.dropped ?? 0) === 0, `dropped=${ctrl.dropped}`)
|
|
358
|
+
check('P8.1c 越限触发过告警(启动阶段 PV 远低于量程)', Number(ctrl.alarmsRaised ?? 0) >= 1, `alarmsRaised=${ctrl.alarmsRaised}`)
|
|
359
|
+
|
|
360
|
+
// 写历史:响应字段是 data.anchors(不是 entries/records)
|
|
361
|
+
const anchors = data(await api('GET', '/api/workshop/dcw/journal?limit=200')).anchors ?? []
|
|
362
|
+
const manualWrites = anchors.filter(a => a.source === 'manual')
|
|
363
|
+
check('P8.2 数控写历史(签名写记录:谁/何时/前值→新值)', anchors.length >= 4,
|
|
364
|
+
`${anchors.length} 条(manual ${manualWrites.length} · recipe ${anchors.length - manualWrites.length})`)
|
|
365
|
+
check('P8.2b 人工调优写记录带操作者归因', manualWrites.length >= 3 && manualWrites.every(a => Boolean(a.actor)),
|
|
366
|
+
manualWrites.slice(0, 3).map(a => `${a.prevValue}→${a.newValue}@${a.actor?.slice(0, 8)}`).join(' '))
|
|
367
|
+
|
|
368
|
+
// 参数台账:data.ledger.journal
|
|
369
|
+
const led = data(await api('GET', `/api/workshop/dcw/${state.circuits.temp.dcw}/param-ledger`)).ledger ?? {}
|
|
370
|
+
const ledRows = led.journal ?? []
|
|
371
|
+
check('P8.3 节点参数台账(当前值/配方目标/改动链)', ledRows.length >= 2 && led.current !== undefined,
|
|
372
|
+
`current=${led.current} recipeTarget=${led.recipeTarget} 改动链=${ledRows.length} 条`)
|
|
373
|
+
|
|
374
|
+
const versions = data(await api('GET', `/api/workshop/dcw/recipes/${recipe.id}/versions`)).versions ?? []
|
|
375
|
+
check('P8.4 Recipe 版本历史(调优后落新版本)', versions.length >= 2, `${versions.length} 个版本`)
|
|
376
|
+
|
|
377
|
+
const opsLogs = data(await api('GET', '/api/workshop/ops-logs?limit=300')).logs ?? []
|
|
378
|
+
const kinds = [...new Set(opsLogs.map(l => l.kind))]
|
|
379
|
+
check('P8.5 运维日志(全操作留痕,按产线可检索)', opsLogs.length >= 15,
|
|
380
|
+
`${opsLogs.length} 条 / ${kinds.length} 类:${kinds.slice(0, 8).join(',')}`)
|
|
381
|
+
const lineLogs = data(await api('GET', `/api/workshop/ops-logs?lineId=${line.id}&limit=300`)).logs ?? []
|
|
382
|
+
check('P8.5b 运维日志可按产线维度过滤', lineLogs.length >= 10, `本产线 ${lineLogs.length} 条`)
|
|
383
|
+
|
|
384
|
+
const runs = data(await api('GET', `/api/workshop/dcw/runs?lineId=${line.id}`)).runs ?? []
|
|
385
|
+
check('P8.6 批次运行记录(Run + 配方 + 产品)', runs.length >= 1, `${runs.length} 个 run · tag=${runs[0]?.id?.slice(0, 8)}`)
|
|
386
|
+
|
|
387
|
+
const twins = data(await api('GET', '/api/workshop/device-twins')).twins ?? []
|
|
388
|
+
const withModel = twins.filter(t => t.modelRef)
|
|
389
|
+
check('P8.7 数字孪生实体已落位且都带模型', twins.length >= 6 && withModel.length === twins.length,
|
|
390
|
+
`${twins.length} 个实体,${withModel.length} 个带 modelRef`)
|
|
391
|
+
|
|
392
|
+
// ══════════ P9 孪生小镇:建 workspace → 挂载 Channel → 铺领地 ══════════
|
|
393
|
+
// 缺了这一步,/town 会显示"还没有挂载任何 Channel" —— 3D 场景只渲染**已挂载**的频道。
|
|
394
|
+
console.log('\n── P9 数字孪生小镇:频道挂载与领地落位 ──')
|
|
395
|
+
const ws = data(await api('POST', '/api/workshop/workspaces', { body: { name: `烘干线数字化车间-${TAG}` } }))
|
|
396
|
+
const wsId = ws.id ?? ws.workspace?.id
|
|
397
|
+
check('P9.1 workspace 创建', Boolean(wsId), wsId)
|
|
398
|
+
const mounted = await api('POST', `/api/workshop/workspaces/${wsId}/channels/${channelId}`)
|
|
399
|
+
check('P9.2 Channel 挂载进小镇(3D 场景的前提)', ok(mounted), `code=${mounted.code}`)
|
|
400
|
+
const layout = data(await api('PUT', `/api/workshop/scene/layouts/${channelId}`, {
|
|
401
|
+
body: { x: 0, z: 0, radiusX: 22, radiusZ: 16, shape: 'ellipse' },
|
|
402
|
+
})).layout
|
|
403
|
+
check('P9.3 频道领地铺开(设备与 Agent 落在领地内)', Boolean(layout?.channelId ?? layout?.x !== undefined), JSON.stringify(layout ?? {}).slice(0, 120))
|
|
404
|
+
const town = data(await api('GET', '/api/workshop/workspaces'))
|
|
405
|
+
const wsList = Array.isArray(town) ? town : (town.workspaces ?? [])
|
|
406
|
+
const mountedIds = wsList.flatMap(w => w.channelIds ?? [])
|
|
407
|
+
check('P9.4 小镇已挂载该频道(页面据此决定渲染)', mountedIds.includes(channelId), `workspaces=${wsList.length} 挂载频道=${mountedIds.length}`)
|
|
408
|
+
state.town = { workspaceId: wsId, channelId, mounted: mountedIds.includes(channelId) }
|
|
409
|
+
|
|
410
|
+
Object.assign(state, {
|
|
411
|
+
admin: ADMIN,
|
|
412
|
+
line: { id: line.id, name: line.name },
|
|
413
|
+
product: { id: prod.id, name: prod.name },
|
|
414
|
+
recipe: { id: recipe.id, name: recipe.name },
|
|
415
|
+
channel: { id: channelId, name: chName },
|
|
416
|
+
workerId: bindAgentId,
|
|
417
|
+
workerTemplateId: workerId,
|
|
418
|
+
counts: { rawSamples: rawCount, buckets: samplePts.length, anchors: anchors.length, manualWrites: manualWrites.length, ledgerRows: ledRows.length, versions: versions.length, opsLogs: opsLogs.length, lineLogs: lineLogs.length, runs: runs.length, twins: twins.length },
|
|
419
|
+
ledger: { current: led.current, recipeTarget: led.recipeTarget },
|
|
420
|
+
})
|
|
421
|
+
mkdirSync(dirname(STATE), { recursive: true })
|
|
422
|
+
writeFileSync(STATE, JSON.stringify(state, null, 2), 'utf8')
|
|
423
|
+
console.log(`\n 状态已写入 ${STATE}`)
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
main()
|
|
427
|
+
.then(() => {
|
|
428
|
+
console.log(`\n${fail ? '✖' : '✅'} PLC 全新环境演练:${pass} 通过 / ${fail} 失败`)
|
|
429
|
+
process.exitCode = fail ? 1 : 0
|
|
430
|
+
})
|
|
431
|
+
.catch((err) => {
|
|
432
|
+
console.error('\n✖ 演练中断:', err?.stack ?? err)
|
|
433
|
+
process.exit(1)
|
|
434
|
+
})
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* plc-clean-shots.mjs —— 全新环境演练的界面取证截图
|
|
3
|
+
* ------------------------------------------------------------
|
|
4
|
+
* 只做一件事:登录 → 逐页截图 → 断言页面上**真的出现了数据**(不是空壳),
|
|
5
|
+
* 并把断言结果打出来。数据判据取自各页自身的语义,不看截图长相。
|
|
6
|
+
*
|
|
7
|
+
* 用法:node scripts/_audit/plc-clean-shots.mjs --base http://127.0.0.1:3112 [--out <dir>]
|
|
8
|
+
*/
|
|
9
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'
|
|
10
|
+
import { dirname, join, resolve } from 'node:path'
|
|
11
|
+
import { fileURLToPath } from 'node:url'
|
|
12
|
+
import puppeteer from 'puppeteer-core'
|
|
13
|
+
|
|
14
|
+
const HERE = dirname(fileURLToPath(import.meta.url))
|
|
15
|
+
const REPO = resolve(HERE, '..', '..')
|
|
16
|
+
const arg = (k, d) => {
|
|
17
|
+
const i = process.argv.indexOf(`--${k}`)
|
|
18
|
+
return i > 0 && process.argv[i + 1] ? process.argv[i + 1] : d
|
|
19
|
+
}
|
|
20
|
+
const BASE = arg('base', 'http://127.0.0.1:3112').replace(/\/$/, '')
|
|
21
|
+
const STATE_FILE = arg('state', join(REPO, '.e2e-shots', 'plc-clean', 'state.json'))
|
|
22
|
+
const OUT = arg('out', join(REPO, '.e2e-shots', 'plc-clean'))
|
|
23
|
+
const ADMIN = { email: 'plant@awshop.local', password: 'Plant!2026' }
|
|
24
|
+
const EDGE = 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe'
|
|
25
|
+
const CHROME = 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'
|
|
26
|
+
const EXEC = existsSync(EDGE) ? EDGE : CHROME
|
|
27
|
+
|
|
28
|
+
const state = existsSync(STATE_FILE) ? JSON.parse(readFileSync(STATE_FILE, 'utf8')) : {}
|
|
29
|
+
const tempDaqFromState = state?.circuits?.temp?.daq
|
|
30
|
+
const lineIdFromState = state?.line?.id
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 页面 + 该页必须出现的数据判据(在 main 的 innerText 上做正则)。
|
|
34
|
+
* ⚠️ 路由参数含义各不相同,别想当然:
|
|
35
|
+
* /dcw/:id → **产线 id**(总览页「产线管理」进入;传节点 id 会渲染出一个空壳)
|
|
36
|
+
* /daq/:id → **数采节点 id**
|
|
37
|
+
* /town → 只渲染**已挂载到 workspace** 的频道,未挂载时显示"还没有挂载任何 Channel"
|
|
38
|
+
*/
|
|
39
|
+
const PAGES = [
|
|
40
|
+
['/town', '数字孪生小镇', /(挤出主机|收卷机组|MDO|设备|Agent)/, true],
|
|
41
|
+
['/daq', '数采中心', /(烘箱温度|采集|采样|℃)/, true],
|
|
42
|
+
['/dcw', '产线运营', /(涂布烘干线|运行中|节点|配方)/, true],
|
|
43
|
+
['/dcw/{line}', '产线详情(节点 SET/ACT + 台账 + 改动历史)', /(烘箱温度设定|SET|ACT|台账|182|186)/, true],
|
|
44
|
+
['/daq/{daq}', '数采节点详情(实时值 + 时序)', /(烘箱温度|℃|采样)/, true],
|
|
45
|
+
['/logs', '运维日志', /(write|recipe|alarm|line|daq|日志)/, true],
|
|
46
|
+
['/workshop/teams', 'Agent 团队(Channel)', /(烘干线工艺组|工艺员|调度长|worker|lead)/, false],
|
|
47
|
+
['/plugins', '插件管理', /(rag-bridge|diag-bridge|插件)/, false],
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
51
|
+
let pass = 0
|
|
52
|
+
let fail = 0
|
|
53
|
+
const check = (name, ok, detail = '') => {
|
|
54
|
+
console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
55
|
+
ok ? pass++ : fail++
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
mkdirSync(OUT, { recursive: true })
|
|
59
|
+
|
|
60
|
+
const login = await fetch(`${BASE}/api/users/login`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
headers: { 'content-type': 'application/json' },
|
|
63
|
+
body: JSON.stringify(ADMIN),
|
|
64
|
+
}).then(r => r.json()).catch(() => null)
|
|
65
|
+
const token = login?.data?.token ?? ''
|
|
66
|
+
if (!token) {
|
|
67
|
+
console.error('✖ 登录失败,无法截图')
|
|
68
|
+
process.exit(2)
|
|
69
|
+
}
|
|
70
|
+
console.log(`服务 ${BASE} · token ok · 输出 ${OUT}`)
|
|
71
|
+
|
|
72
|
+
// 路由参数从**服务端**取,不依赖 state.json —— 该文件会被补跑步骤覆写,
|
|
73
|
+
// 一旦缺字段就会静默截出 /dcw/undefined 这种空壳页面(实际踩过)。
|
|
74
|
+
const auth = { authorization: `Bearer ${token}` }
|
|
75
|
+
const lines = (await fetch(`${BASE}/api/workshop/dcw/lines`, { headers: auth }).then(r => r.json()).catch(() => null))?.data?.lines ?? []
|
|
76
|
+
const daqNodes = (await fetch(`${BASE}/api/workshop/daq`, { headers: auth }).then(r => r.json()).catch(() => null))?.data?.nodes ?? []
|
|
77
|
+
const lineId = lineIdFromState ?? lines[0]?.id ?? ''
|
|
78
|
+
const tempDaq = tempDaqFromState ?? daqNodes.find(n => /温度/.test(n.name))?.id ?? daqNodes[0]?.id ?? ''
|
|
79
|
+
console.log(`路由参数:产线 ${lineId || '(缺)'} · 数采节点 ${tempDaq || '(缺)'} [产线 ${lines.length} 条 / 数采节点 ${daqNodes.length} 个]`)
|
|
80
|
+
if (!lineId || !tempDaq) {
|
|
81
|
+
console.error('✖ 缺少产线或数采节点 id,无法截取详情页')
|
|
82
|
+
process.exit(2)
|
|
83
|
+
}
|
|
84
|
+
const resolvedPages = PAGES.map(([p, ...rest]) => [p.replace('{line}', lineId).replace('{daq}', tempDaq), ...rest])
|
|
85
|
+
|
|
86
|
+
const browser = await puppeteer.launch({
|
|
87
|
+
executablePath: EXEC,
|
|
88
|
+
headless: 'new',
|
|
89
|
+
args: ['--no-sandbox', '--disable-dev-shm-usage', '--force-device-scale-factor=1', '--hide-scrollbars', '--use-gl=angle', '--enable-unsafe-swiftshader'],
|
|
90
|
+
defaultViewport: { width: 1680, height: 1050 },
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const errors = []
|
|
94
|
+
try {
|
|
95
|
+
const page = await browser.newPage()
|
|
96
|
+
page.on('pageerror', e => errors.push(`[pageerror] ${e.message}`))
|
|
97
|
+
page.on('response', (r) => {
|
|
98
|
+
if (r.status() >= 400 && !r.url().endsWith('/favicon.ico')) errors.push(`HTTP ${r.status()} ${r.url()}`)
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const seed = async () => {
|
|
102
|
+
await page.evaluate((tok) => {
|
|
103
|
+
document.cookie = `token=${encodeURIComponent(tok)}; path=/`
|
|
104
|
+
document.cookie = 'aw-theme=light; path=/'
|
|
105
|
+
localStorage.setItem('app', JSON.stringify({ isDark: false, sidebarCollapsed: false, accent: '', themeTouched: true }))
|
|
106
|
+
}, token)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
for (const [path, label, needle, full] of resolvedPages) {
|
|
110
|
+
const before = errors.length
|
|
111
|
+
try {
|
|
112
|
+
await page.goto(`${BASE}${path}`, { waitUntil: 'domcontentloaded', timeout: 60_000 })
|
|
113
|
+
await seed()
|
|
114
|
+
await page.reload({ waitUntil: 'networkidle2', timeout: 60_000 })
|
|
115
|
+
// 等 WS 推数与 3D 首帧落定
|
|
116
|
+
await page.evaluate(() => document.fonts?.ready).catch(() => {})
|
|
117
|
+
await sleep(path === '/town' ? 6000 : 3500)
|
|
118
|
+
|
|
119
|
+
const info = await page.evaluate(() => {
|
|
120
|
+
const root = document.querySelector('main') ?? document.body
|
|
121
|
+
const text = (root.innerText ?? '').replace(/\s+/g, ' ')
|
|
122
|
+
const canvas = document.querySelector('canvas')
|
|
123
|
+
return {
|
|
124
|
+
len: text.length,
|
|
125
|
+
text: text.slice(0, 20000),
|
|
126
|
+
hasCanvas: Boolean(canvas),
|
|
127
|
+
canvasSize: canvas ? `${canvas.width}x${canvas.height}` : '',
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
const file = join(OUT, `${label.replace(/[^\w\u4e00-\u9fa5]+/g, '-')}.png`)
|
|
132
|
+
await page.screenshot({ path: file, fullPage: full })
|
|
133
|
+
const matched = needle.test(info.text)
|
|
134
|
+
// 产线运营页是卡片式总览,正文天然短(约 250 字);门槛按页区分,避免误判
|
|
135
|
+
const minLen = path === '/dcw' ? 180 : 300
|
|
136
|
+
check(`${label} 渲染出内容`, info.len > minLen && matched, `文本 ${info.len} 字 · 命中判据=${matched}${info.hasCanvas ? ` · canvas ${info.canvasSize}` : ''} → ${file.split('\\').pop()}`)
|
|
137
|
+
if (path === '/town') {
|
|
138
|
+
check('数字孪生 canvas 已挂载(3D 场景)', info.hasCanvas, info.canvasSize)
|
|
139
|
+
}
|
|
140
|
+
if (errors.length > before) {
|
|
141
|
+
check(`${label} 无失败请求`, false, errors.slice(before, before + 2).join(' | '))
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
check(`${label} 渲染出内容`, false, String(err?.message ?? err).slice(0, 160))
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
finally {
|
|
150
|
+
await browser.close()
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const realErrors = [...new Set(errors)]
|
|
154
|
+
if (realErrors.length) {
|
|
155
|
+
console.log('\n 失败请求/前端错误:')
|
|
156
|
+
for (const e of realErrors.slice(0, 10)) console.log(` · ${e}`)
|
|
157
|
+
}
|
|
158
|
+
writeFileSync(join(OUT, 'shot-errors.json'), JSON.stringify(realErrors, null, 2), 'utf8')
|
|
159
|
+
|
|
160
|
+
console.log(`\n${fail ? '✖' : '✅'} 界面取证:${pass} 通过 / ${fail} 失败`)
|
|
161
|
+
process.exitCode = fail ? 1 : 0
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* plc-fc10-probe.mjs —— FC10 写入后把寄存器窗口整段 dump 出来,看数据实际落在哪里
|
|
3
|
+
*/
|
|
4
|
+
import ModbusRTU from 'modbus-serial'
|
|
5
|
+
|
|
6
|
+
const PORT = Number(process.argv[2] ?? 15041)
|
|
7
|
+
const c = new ModbusRTU()
|
|
8
|
+
await c.connectTCP('127.0.0.1', { port: PORT })
|
|
9
|
+
c.setID(1)
|
|
10
|
+
|
|
11
|
+
const dump = async (label) => {
|
|
12
|
+
const r = (await c.readHoldingRegisters(16, 12)).data
|
|
13
|
+
console.log(label)
|
|
14
|
+
for (let i = 0; i < 12; i++) {
|
|
15
|
+
const off = 16 + i
|
|
16
|
+
console.log(` off ${String(off).padStart(2)} = 0x${r[i].toString(16).padStart(4, '0')} (${r[i]})`)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
await dump('① FC10 写入前 off16..27')
|
|
21
|
+
// 用可识别的图案:0xAAAA 0xBBBB 写在 off20/21
|
|
22
|
+
await c.writeRegisters(20, [0xAAAA, 0xBBBB])
|
|
23
|
+
await dump('② writeRegisters(20, [0xAAAA, 0xBBBB]) 之后')
|
|
24
|
+
|
|
25
|
+
// 对照:FC06 单写
|
|
26
|
+
await c.writeRegister(22, 0xCCCC)
|
|
27
|
+
const r = (await c.readHoldingRegisters(22, 1)).data
|
|
28
|
+
console.log(`③ writeRegister(22, 0xCCCC) → 0x${r[0].toString(16).padStart(4, '0')}`)
|
|
29
|
+
|
|
30
|
+
c.close(() => {})
|