agentworkshop 0.5.8 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.AgentWorkShop/prompts/compaction-hints.md +9 -9
- package/.AgentWorkShop/prompts/host-tools.json +42 -0
- package/.output/.AgentWorkShop/prompts/compaction-hints.md +9 -9
- package/.output/.AgentWorkShop/prompts/host-tools.json +42 -0
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{Dm5mD6XT.js → BD9D9pl4.js} +1 -1
- package/.output/public/_nuxt/{BdKzfJiM.js → BxD8Fg_Z.js} +1 -1
- package/.output/public/_nuxt/{dRAyjbJ6.js → C-Y5ydB6.js} +3 -3
- package/.output/public/_nuxt/{Bok1DRqh.js → C0FogB-p.js} +1 -1
- package/.output/public/_nuxt/{BUNGEK2z.js → C2QSTAWf.js} +1 -1
- package/.output/public/_nuxt/{CWDzKGtj.js → CclO6GyL.js} +1 -1
- package/.output/public/_nuxt/{B3__nfxM.js → Ck6tznoQ.js} +1 -1
- package/.output/public/_nuxt/CwS_UHeH.js +1 -0
- package/.output/public/_nuxt/{CE2ynNi9.js → CwcOEM8m.js} +1 -1
- package/.output/public/_nuxt/MhK4buEJ.js +1 -0
- package/.output/public/_nuxt/_id_.DN3U6EF9.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a0ac51ef-51c0-4ff9-8484-7c90d8dd10ba.json +1 -0
- package/.output/public/_nuxt/{entry.DjhxLu-f.css → entry.DvlXlPwx.css} +1 -1
- package/.output/public/_nuxt/settings.BG0K9_MG.css +1 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -1
- package/.output/server/chunks/_/nitro.mjs +2634 -1387
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/build/{OmpTerminalPanel-CZnxR3M_.mjs → OmpTerminalPanel-B_SYhmgb.mjs} +2 -2
- package/.output/server/chunks/build/{OmpTerminalPanel-CZnxR3M_.mjs.map → OmpTerminalPanel-B_SYhmgb.mjs.map} +1 -1
- package/.output/server/chunks/build/{TownView-DYlUNRZe.mjs → TownView-D9yCQe1T.mjs} +6 -6
- package/.output/server/chunks/build/{TownView-DYlUNRZe.mjs.map → TownView-D9yCQe1T.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-BOhG2yz8.mjs → _id_-CmKAEFHV.mjs} +4 -2
- package/.output/server/chunks/build/_id_-CmKAEFHV.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-CuyMYmhY.mjs → _id_-xR3AChMO.mjs} +74 -26
- package/.output/server/chunks/build/_id_-xR3AChMO.mjs.map +1 -0
- package/.output/server/chunks/build/{_wsId_-B5f5BdW2.mjs → _wsId_-C45nVrl-.mjs} +12 -10
- package/.output/server/chunks/build/{_wsId_-B5f5BdW2.mjs.map → _wsId_-C45nVrl-.mjs.map} +1 -1
- package/.output/server/chunks/build/{agents-BVaxN75W.mjs → agents-D4l1icvn.mjs} +5 -3
- package/.output/server/chunks/build/agents-D4l1icvn.mjs.map +1 -0
- package/.output/server/chunks/build/{channel-templates-D1K2IKrE.mjs → channel-templates-DqjtC-R0.mjs} +5 -3
- package/.output/server/chunks/build/channel-templates-DqjtC-R0.mjs.map +1 -0
- package/.output/server/chunks/build/{client-only-CFTHwakk.mjs → client-only-D5BzSQc6.mjs} +2 -2
- package/.output/server/chunks/build/client-only-D5BzSQc6.mjs.map +1 -0
- package/.output/server/chunks/build/{daq-ObtN1TQ4.mjs → daq-Boz_dlAQ.mjs} +6 -4
- package/.output/server/chunks/build/daq-Boz_dlAQ.mjs.map +1 -0
- package/.output/server/chunks/build/{dcw-fINr-He1.mjs → dcw-wTRwBAUi.mjs} +3 -1
- package/.output/server/chunks/build/dcw-wTRwBAUi.mjs.map +1 -0
- package/.output/server/chunks/build/{default-CVVO40Jj.mjs → default-Dt6xLdpd.mjs} +7 -5
- package/.output/server/chunks/build/{default-CVVO40Jj.mjs.map → default-Dt6xLdpd.mjs.map} +1 -1
- package/.output/server/chunks/build/interval-WlxgjTzO.mjs +9 -0
- package/.output/server/chunks/build/interval-WlxgjTzO.mjs.map +1 -0
- package/.output/server/chunks/build/{logs-DqNgCJAn.mjs → logs-Cdi-eXlN.mjs} +5 -3
- package/.output/server/chunks/build/logs-Cdi-eXlN.mjs.map +1 -0
- package/.output/server/chunks/build/{monitor-CTZLwbdw.mjs → monitor-yNoV98rf.mjs} +6 -4
- package/.output/server/chunks/build/{monitor-CTZLwbdw.mjs.map → monitor-yNoV98rf.mjs.map} +1 -1
- package/.output/server/chunks/build/{pages-DC52d7z7.mjs → pages-bWKy0ZsA.mjs} +6 -4
- package/.output/server/chunks/build/pages-bWKy0ZsA.mjs.map +1 -0
- package/.output/server/chunks/build/{plugins-DVQty7qG.mjs → plugins-B-ZNey0Z.mjs} +4 -2
- package/.output/server/chunks/build/plugins-B-ZNey0Z.mjs.map +1 -0
- package/.output/server/chunks/build/{settings-BeergncK.mjs → settings-C3T5hR2A.mjs} +21 -19
- package/.output/server/chunks/build/settings-C3T5hR2A.mjs.map +1 -0
- package/.output/server/chunks/build/{teams-CFeDlHDh.mjs → teams-QR3BBF7A.mjs} +5 -3
- package/.output/server/chunks/build/teams-QR3BBF7A.mjs.map +1 -0
- package/.output/server/chunks/build/{tokens-CBAUbOce.mjs → tokens-DFvr_TLj.mjs} +4 -2
- package/.output/server/chunks/build/tokens-DFvr_TLj.mjs.map +1 -0
- package/.output/server/chunks/build/town-BUqRobze.mjs +2 -0
- package/.output/server/chunks/build/town-BUqRobze.mjs.map +1 -1
- package/.output/server/chunks/build/{town-BxH-XXth.mjs → town-CKg6Qxba.mjs} +9 -7
- package/.output/server/chunks/build/town-CKg6Qxba.mjs.map +1 -0
- package/.output/server/chunks/build/{useDaqStream-CwORhsD7.mjs → useDaqStream-zHEptJQ_.mjs} +44 -1
- package/.output/server/chunks/build/useDaqStream-zHEptJQ_.mjs.map +1 -0
- package/.output/server/chunks/build/{useSiteConfig-Cc-ABesl.mjs → useSiteConfig-DJe_KMVr.mjs} +1 -1
- package/.output/server/chunks/build/{useSiteConfig-Cc-ABesl.mjs.map → useSiteConfig-DJe_KMVr.mjs.map} +1 -1
- package/.output/server/chunks/build/{useWorkshopApi-5er8_EHZ.mjs → useWorkshopApi-Bh5VUHWu.mjs} +1 -1
- package/.output/server/chunks/build/{useWorkshopApi-5er8_EHZ.mjs.map → useWorkshopApi-Bh5VUHWu.mjs.map} +1 -1
- package/.output/server/chunks/build/{useWorkshopWs-Dwr_1Q8f.mjs → useWorkshopWs-xcdeiSmJ.mjs} +2 -2
- package/.output/server/chunks/build/{useWorkshopWs-Dwr_1Q8f.mjs.map → useWorkshopWs-xcdeiSmJ.mjs.map} +1 -1
- package/.output/server/chunks/build/{user-CpVY4OAA.mjs → user-Dk-ytEUV.mjs} +1 -1
- package/.output/server/chunks/build/{user-CpVY4OAA.mjs.map → user-Dk-ytEUV.mjs.map} +1 -1
- package/.output/server/chunks/build/{users-BMs4s_6K.mjs → users-4FZ0yFUO.mjs} +4 -2
- package/.output/server/chunks/build/users-4FZ0yFUO.mjs.map +1 -0
- package/.output/server/chunks/build/{workshop-CJAyZ5zS.mjs → workshop-CLhwe5eo.mjs} +6 -4
- package/.output/server/chunks/build/workshop-CLhwe5eo.mjs.map +1 -0
- package/.output/server/chunks/build/{workspaces-Dq-1zvu9.mjs → workspaces-IfORCDJE.mjs} +2 -2
- package/.output/server/chunks/build/{workspaces-Dq-1zvu9.mjs.map → workspaces-IfORCDJE.mjs.map} +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +2 -0
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/mcp/workshop.mjs +2 -0
- package/.output/server/chunks/routes/api/mcp/workshop.mjs.map +1 -1
- package/.output/server/chunks/routes/api/metrics.mjs +2 -0
- package/.output/server/chunks/routes/api/metrics.mjs.map +1 -1
- package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs +2 -0
- package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs.map +1 -1
- package/.output/server/chunks/routes/api/plugins/client/_name_.get.mjs +2 -0
- package/.output/server/chunks/routes/api/plugins/client/_name_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/plugins/manifest.get.mjs +2 -0
- package/.output/server/chunks/routes/api/plugins/manifest.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/config.get.mjs +2 -0
- package/.output/server/chunks/routes/api/system/config.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/system/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/index.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/system/index.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/monitor/terminal/ws.mjs +2 -0
- package/.output/server/chunks/routes/api/system/monitor/terminal/ws.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/monitor/terminate.post.mjs +2 -0
- package/.output/server/chunks/routes/api/system/monitor/terminate.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/monitor.get.mjs +2 -0
- package/.output/server/chunks/routes/api/system/monitor.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/settings/events.get.mjs +3 -2
- package/.output/server/chunks/routes/api/system/settings/events.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/system/settings/reset.post.mjs +2 -0
- package/.output/server/chunks/routes/api/system/settings/reset.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/users/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/_id_.get.mjs +2 -0
- package/.output/server/chunks/routes/api/users/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/_id_.put.mjs +2 -0
- package/.output/server/chunks/routes/api/users/_id_.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/users/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/users/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/login.post.mjs +2 -0
- package/.output/server/chunks/routes/api/users/login.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/logout.post.mjs +2 -0
- package/.output/server/chunks/routes/api/users/logout.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/me.get.mjs +2 -0
- package/.output/server/chunks/routes/api/users/me.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/register.post.mjs +2 -0
- package/.output/server/chunks/routes/api/users/register.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id/token.get.mjs +2 -0
- package/.output/server/chunks/routes/api/users/tokens/_id/token.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/users/tokens/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/users/tokens/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/users/tokens/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/_...path_.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/_...path_.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/a2a/send.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/a2a/send.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/approvals/_id/decide.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/approvals/_id/decide.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/index2.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agents/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agents/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/subscribe.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/agents/subscribe.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/approvals/_id/decide.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/approvals/_id/decide.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/character/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/assets/character/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/devices/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/assets/devices/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/assets/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/assets/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/audit.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/audit.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/caller.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/caller.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/from-channel.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channel-templates/from-channel.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/_memoryId_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/_memoryId_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/search.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/search.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/model.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/model.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/position.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/position.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/range.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/range.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/stop.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/stop.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/events.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/events.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/queue.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/queue.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs +36 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs +53 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/alarms.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/alarms.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index10.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index10.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index2.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index3.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index3.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index4.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index4.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index5.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index5.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index5.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index5.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index6.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index7.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index7.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index7.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index7.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index8.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/index9.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/index9.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/mailbox/all.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/mailbox/all.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/mailbox.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/mailbox.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/memories/maintenance.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/memories/maintenance.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/plugins/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/runtime.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/runtime.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/scene/layouts.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/complete.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/complete.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/dispatch.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/dispatch.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/report.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/report.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/retry.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/retry.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id_.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/tasks.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/members/_agentId_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id/members/_agentId_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id_.patch.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/users/me.get.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/users/me.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/users/register.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/users/register.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.post.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/index.delete.mjs +2 -0
- package/.output/server/chunks/routes/api/workshop/workspaces/index.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs.map +1 -1
- package/.output/server/chunks/virtual/entry.mjs +166 -114
- package/.output/server/chunks/virtual/entry.mjs.map +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +2 -0
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/app/composables/workshop/useDaqStream.ts +59 -1
- package/app/config/schema.ts +8 -0
- package/app/pages/daq/[id].vue +141 -1
- package/app/pages/settings.vue +10 -5
- package/app/plugins/runtime-config.client.ts +65 -65
- package/app/stores/runtime-config.ts +212 -212
- package/config.yml +77 -70
- package/docker-compose.yml +19 -2
- package/docs/plugins.md +271 -197
- package/i18n/dicts/_en.json +7 -2
- package/i18n/dicts/daqDetail.json +8 -2
- package/i18n/locales/en.ts +55 -29
- package/i18n/locales/zh-CN.ts +55 -29
- package/nuxt.config.ts +1 -1
- package/package.json +144 -143
- package/scripts/_dbg-collab-scenario-e2e.mjs +185 -0
- package/scripts/_dbg-daq-frame-alarm.mjs +49 -0
- package/scripts/_dbg-daq-frame-ui.mjs +62 -0
- package/scripts/_dbg-daq-frame-ws.mjs +72 -0
- package/scripts/_dbg-daq-frames-e2e.mjs +118 -0
- package/scripts/_dbg-host.mjs +16 -0
- package/scripts/_dbg-plugin-agent-read.ts +56 -0
- package/scripts/_dbg-plugin-sink-rest.mjs +70 -0
- package/scripts/_dbg-plugin-sink-ui.mjs +81 -0
- package/scripts/_dbg-prompts-hotreload-test.ts +76 -0
- package/scripts/_dbg-release-smoke.mjs +104 -0
- package/scripts/home-bootstrap.mjs +18 -0
- package/scripts/i18n-merge.mjs +69 -67
- package/scripts/test-context-governor.ts +176 -176
- package/scripts/test-daq-frames.ts +180 -0
- package/scripts/test-daq-minio.ts +77 -0
- package/scripts/test-memory-rrf-mmr.ts +114 -114
- package/scripts/test-plugin-ext.ts +173 -0
- package/server/api/system/settings/events.get.ts +27 -28
- package/server/api/system/settings/index.get.ts +14 -14
- package/server/api/system/settings/index.patch.ts +22 -22
- package/server/api/system/settings/reset.post.ts +12 -12
- package/server/api/workshop/daq/[id]/frames/content.get.ts +24 -0
- package/server/api/workshop/daq/[id]/frames.get.ts +44 -0
- package/server/data/daqs.json +89 -89
- package/server/data/dcw-rollback.json +1 -1
- package/server/data/dcw-runs.json +3136 -2492
- package/server/data/dcw-writes.json +672 -0
- package/server/data/dcws.json +4 -4
- package/server/data/line-runs.json +1 -232
- package/server/plugins/daq.ts +11 -0
- package/server/plugins/system-config.ts +38 -38
- package/server/services/system-config.ts +365 -356
- package/server/services/workshop/agents/industrial-tools.ts +91 -25
- package/server/services/workshop/agents/omp-agent.ts +1955 -1895
- package/server/services/workshop/agents/plugin-tools.ts +145 -0
- package/server/services/workshop/daq/bus/queue-port.ts +18 -0
- package/server/services/workshop/daq/daq-controller.ts +216 -14
- package/server/services/workshop/daq/daq-node.ts +257 -247
- package/server/services/workshop/daq/daq-runtime.ts +36 -4
- package/server/services/workshop/daq/daq-templates.ts +213 -157
- package/server/services/workshop/daq/drivers.ts +134 -30
- package/server/services/workshop/daq/frames.ts +227 -0
- package/server/services/workshop/daq/infra.ts +31 -17
- package/server/services/workshop/daq/objectstore/disk.adapter.ts +38 -0
- package/server/services/workshop/daq/objectstore/index.ts +88 -0
- package/server/services/workshop/daq/objectstore/minio.adapter.ts +60 -0
- package/server/services/workshop/daq/objectstore/objectstore-port.ts +27 -0
- package/server/services/workshop/daq/plugin-bridge.ts +73 -0
- package/server/services/workshop/daq/png-enc.ts +71 -0
- package/server/services/workshop/daq/storage/sqlite.adapter.ts +104 -1
- package/server/services/workshop/daq/storage/timescale.adapter.ts +95 -4
- package/server/services/workshop/daq/storage/tsdb-port.ts +46 -0
- package/server/services/workshop/plugins/host.mjs +479 -417
- package/server/services/workshop/runtime/agent-runtime.ts +744 -744
- package/shared/config/schema.json +6 -1
- package/shared/daq-protocol.ts +88 -0
- package/.output/public/_nuxt/B-PgoIPN.js +0 -1
- package/.output/public/_nuxt/DVNYfGsj.js +0 -1
- package/.output/public/_nuxt/_id_.CbiF5PrV.css +0 -1
- package/.output/public/_nuxt/builds/meta/998b4cce-8563-44e5-b0ef-ff3d71a8480f.json +0 -1
- package/.output/public/_nuxt/settings.BANibAnV.css +0 -1
- package/.output/server/chunks/build/_id_-BOhG2yz8.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-CuyMYmhY.mjs.map +0 -1
- package/.output/server/chunks/build/agents-BVaxN75W.mjs.map +0 -1
- package/.output/server/chunks/build/channel-templates-D1K2IKrE.mjs.map +0 -1
- package/.output/server/chunks/build/client-only-CFTHwakk.mjs.map +0 -1
- package/.output/server/chunks/build/daq-ObtN1TQ4.mjs.map +0 -1
- package/.output/server/chunks/build/dcw-fINr-He1.mjs.map +0 -1
- package/.output/server/chunks/build/interval-Bt11uRPw.mjs +0 -9
- package/.output/server/chunks/build/interval-Bt11uRPw.mjs.map +0 -1
- package/.output/server/chunks/build/logs-DqNgCJAn.mjs.map +0 -1
- package/.output/server/chunks/build/pages-DC52d7z7.mjs.map +0 -1
- package/.output/server/chunks/build/plugins-DVQty7qG.mjs.map +0 -1
- package/.output/server/chunks/build/settings-BeergncK.mjs.map +0 -1
- package/.output/server/chunks/build/teams-CFeDlHDh.mjs.map +0 -1
- package/.output/server/chunks/build/tokens-CBAUbOce.mjs.map +0 -1
- package/.output/server/chunks/build/town-BxH-XXth.mjs.map +0 -1
- package/.output/server/chunks/build/useDaqStream-CwORhsD7.mjs.map +0 -1
- package/.output/server/chunks/build/users-BMs4s_6K.mjs.map +0 -1
- package/.output/server/chunks/build/workshop-CJAyZ5zS.mjs.map +0 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 发布前五大功能烟囱测试:产线管理 / 数采数控 / 插件处理节点 / Agent 团队作业 / 数字孪生。
|
|
3
|
+
* 运行: node scripts/_dbg-release-smoke.mjs
|
|
4
|
+
*/
|
|
5
|
+
import puppeteer from 'puppeteer-core'
|
|
6
|
+
|
|
7
|
+
const ROOT = 'http://127.0.0.1:3000'
|
|
8
|
+
const sleep = ms => new Promise(r => setTimeout(r, ms))
|
|
9
|
+
let failed = 0
|
|
10
|
+
const ok = (name, cond, detail = '') => { console.log(` ${cond ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`); if (!cond) failed++ }
|
|
11
|
+
|
|
12
|
+
const login = await fetch(`${ROOT}/api/users/login`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ email: 'zhangwei@awshop.io', password: 'Awshop@123' }) }).then(r => r.json())
|
|
13
|
+
const H = { authorization: `Bearer ${login.data.token}`, 'content-type': 'application/json' }
|
|
14
|
+
const j = (u, m = 'GET', b) => fetch(ROOT + u, { method: m, headers: H, body: b ? JSON.stringify(b) : undefined }).then(r => r.json())
|
|
15
|
+
|
|
16
|
+
// ===== ① 产线管理 =====
|
|
17
|
+
console.log('\n--- ① 产线管理 ---')
|
|
18
|
+
{
|
|
19
|
+
const d = (await j('/api/workshop/dcw')).data
|
|
20
|
+
ok('产线清单可读', (d.lines?.length ?? 0) > 0, `${d.lines?.length} 条`)
|
|
21
|
+
ok('配方清单可读', (d.recipes?.length ?? 0) > 0, `${d.recipes?.length} 条`)
|
|
22
|
+
const cand = d.lines.map(l => ({ line: l, recipe: d.recipes.find(r => r.lineId === l.id) })).find(x => x.recipe)
|
|
23
|
+
const stop = await j(`/api/workshop/dcw/lines/${cand.line.id}/stop`, 'POST').catch(() => null)
|
|
24
|
+
ok('停线操作可用', stop !== null)
|
|
25
|
+
await sleep(800)
|
|
26
|
+
const st = await j(`/api/workshop/dcw/lines/${cand.line.id}/start`, 'POST', { recipeId: cand.recipe.id })
|
|
27
|
+
ok('开跑操作可用(产线激活)', st.data?.line?.active === true)
|
|
28
|
+
const daqA = (await j('/api/workshop/daq')).data
|
|
29
|
+
await sleep(4000)
|
|
30
|
+
const daqB = (await j('/api/workshop/daq')).data
|
|
31
|
+
ok('产线运行态保持(采样持续)', daqB.meta.produced > daqA.meta.produced, `produced ${daqA.meta.produced} → ${daqB.meta.produced}`)
|
|
32
|
+
// 保持运行(后续数采/插件节点依赖);结束统一停线
|
|
33
|
+
globalThis.__smokeLine = cand.line.id
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ===== ② 数采数控 =====
|
|
37
|
+
console.log('\n--- ② 数采数控 ---')
|
|
38
|
+
{
|
|
39
|
+
const daq = (await j('/api/workshop/daq')).data
|
|
40
|
+
ok('数采节点清单可读', (daq.nodes?.length ?? 0) > 0, `${daq.nodes.length} 节点`)
|
|
41
|
+
ok('数采后端就绪(timescale/mqtt/minio)', daq.meta.tsdb === 'timescale' && daq.meta.queue === 'mqtt' && daq.meta.objectstore === 'minio', JSON.stringify({ tsdb: daq.meta.tsdb, queue: daq.meta.queue, os: daq.meta.objectstore }))
|
|
42
|
+
const live = daq.nodes.filter(n => n.value != null && n.state === 'ok').length
|
|
43
|
+
ok('标量节点实时采集中', live > 0, `${live} 节点有值`)
|
|
44
|
+
const dcw = (await j('/api/workshop/dcw')).data
|
|
45
|
+
const dcwLive = dcw.nodes?.filter(n => n.value != null) ?? []
|
|
46
|
+
ok('数控节点有设定/回读值', dcwLive.length > 0, `${dcwLive.length} 节点`)
|
|
47
|
+
const framesOk = daq.meta.framesStored == null || daq.meta.framesStored >= 0
|
|
48
|
+
ok('帧管线指标可用', framesOk, `framesStored=${daq.meta.framesStored}`)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ===== ③ 插件处理节点 =====
|
|
52
|
+
console.log('\n--- ③ 插件处理节点 ---')
|
|
53
|
+
{
|
|
54
|
+
const daq = (await j('/api/workshop/daq')).data
|
|
55
|
+
ok('插件模板在目录(plug-demo-roughness)', daq.templates.some(t => t.plugin && t.signalKind === 'vector'))
|
|
56
|
+
const manifest = await fetch(`${ROOT}/api/plugins/manifest`).then(r => r.json())
|
|
57
|
+
const names = ((manifest.data ?? manifest).plugins ?? []).map(p => p.name)
|
|
58
|
+
ok('三个扩展插件已装载', ['daq-vector-demo', 'omp-sensor-tools', 'daq-sink-verify'].every(n => names.includes(n)), names.join(','))
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ===== ④ Agent 团队作业 =====
|
|
62
|
+
console.log('\n--- ④ Agent 团队作业 ---')
|
|
63
|
+
{
|
|
64
|
+
const agents = (await j('/api/workshop/agents')).data
|
|
65
|
+
const list = agents.agents ?? agents
|
|
66
|
+
ok('Agent 实例清单可读', list.length > 0, `${list.length} 实例`)
|
|
67
|
+
const channels = (await j('/api/workshop/channels')).data
|
|
68
|
+
const chList = channels.data ?? channels
|
|
69
|
+
ok('Channel 清单可读', (Array.isArray(chList) ? chList : chList.channels ?? []).length >= 0)
|
|
70
|
+
const chList2 = (await j('/api/workshop/channels')).data
|
|
71
|
+
const ch0 = (Array.isArray(chList2) ? chList2 : chList2.channels ?? [])[0]
|
|
72
|
+
const memories = ch0 ? await j(`/api/workshop/channels/${ch0.id}/memories?limit=3`).catch(e => ({ data: null })) : { data: null }
|
|
73
|
+
ok('记忆系统可读(channel 级)', Array.isArray(memories.data))
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ===== ⑤ 数字孪生控制(浏览器)=====
|
|
77
|
+
console.log('\n--- ⑤ 数字孪生 ---')
|
|
78
|
+
{
|
|
79
|
+
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'] })
|
|
80
|
+
const page = await browser.newPage()
|
|
81
|
+
await page.setViewport({ width: 1600, height: 1000 })
|
|
82
|
+
await page.setCookie({ name: 'token', value: login.data.token, domain: '127.0.0.1', path: '/' })
|
|
83
|
+
let pageError = false
|
|
84
|
+
page.on('pageerror', () => { pageError = true })
|
|
85
|
+
await page.goto(`${ROOT}/town`, { waitUntil: 'domcontentloaded', timeout: 90000 })
|
|
86
|
+
await sleep(22000)
|
|
87
|
+
const town = await page.evaluate(() => ({
|
|
88
|
+
canvas: document.querySelectorAll('canvas').length,
|
|
89
|
+
panelDaq: document.querySelectorAll('.twin-daq .daq-item').length,
|
|
90
|
+
panelDcw: document.querySelectorAll('.twin-dcw .dcw-item').length,
|
|
91
|
+
}))
|
|
92
|
+
ok('/town 页面加载(canvas 场景)', town.canvas > 0, `${town.canvas} canvas`)
|
|
93
|
+
ok('孪生面板数采监控行', town.panelDaq > 0, `${town.panelDaq} 行`)
|
|
94
|
+
ok('孪生面板数控设定行', town.panelDcw > 0, `${town.panelDcw} 行`)
|
|
95
|
+
ok('/town 无页面级 JS 错误', !pageError)
|
|
96
|
+
// 控制面:DCW 设定行存在即数控控制面已接入面板
|
|
97
|
+
await browser.close()
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ===== 收尾:停线 =====
|
|
101
|
+
if (globalThis.__smokeLine) await j(`/api/workshop/dcw/lines/${globalThis.__smokeLine}/stop`, 'POST').catch(() => {})
|
|
102
|
+
|
|
103
|
+
console.log(failed === 0 ? '\nRELEASE SMOKE ALL PASS' : `\nRELEASE SMOKE FAILED(${failed})`)
|
|
104
|
+
process.exit(failed === 0 ? 0 : 1)
|
|
@@ -146,6 +146,24 @@ export function runBootstrap({ quiet = false, env = process.env } = {}) {
|
|
|
146
146
|
renameSync(stateTmp, stateFile)
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
// 9. prompts 初始化(提示词规约):包内资产(.AgentWorkShop/prompts)→ AW Home/prompts,
|
|
150
|
+
// 只补缺失文件、绝不覆盖用户定制 —— 运行时目录引导即完整,服务端 loader.ts 另有
|
|
151
|
+
// 同规则兜底(懒播种),两处幂等互不冲突
|
|
152
|
+
const promptsSrc = join(packageRoot, '.AgentWorkShop', 'prompts')
|
|
153
|
+
if (existsSync(promptsSrc)) {
|
|
154
|
+
const promptsDest = join(home, 'prompts')
|
|
155
|
+
mkdirSync(promptsDest, { recursive: true })
|
|
156
|
+
for (const f of readdirSync(promptsSrc)) {
|
|
157
|
+
const dest = join(promptsDest, f)
|
|
158
|
+
if (existsSync(dest)) continue
|
|
159
|
+
try {
|
|
160
|
+
copyFileSync(join(promptsSrc, f), dest)
|
|
161
|
+
seeds.push(`prompts/${f}`)
|
|
162
|
+
}
|
|
163
|
+
catch { /* 单文件失败不阻断 */ }
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
log(`[aw-home] ${home} ${created.length ? `(新建 ${created.length} 项)` : '(已就绪)'}`)
|
|
150
168
|
if (seeds.length) log(`[aw-home] 种子文件: ${seeds.join(', ')}`)
|
|
151
169
|
return { home, created, seeds }
|
package/scripts/i18n-merge.mjs
CHANGED
|
@@ -1,67 +1,69 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 合并器:把 i18n/dicts/<ns>.json(zh)+ i18n/dicts/_en.json(zh→en)
|
|
3
|
-
* 注入 i18n/locales/zh-CN.ts 与 en.ts。
|
|
4
|
-
* - ns 已存在 → 在其块首插入缺词条;否则新建 ns 块
|
|
5
|
-
* - vue-i18n 特殊字符({}@$|)转义为字面量插值
|
|
6
|
-
* - en 缺失 → 回退 zh(报告计数)
|
|
7
|
-
*/
|
|
8
|
-
import fs from 'node:fs'
|
|
9
|
-
import path from 'node:path'
|
|
10
|
-
|
|
11
|
-
const esc = v => v
|
|
12
|
-
// 保护 vue-i18n 占位符 {pN},其余 { } @ | $ 转义为字面量插值
|
|
13
|
-
.replace(/\{(?!p\d+\})/g, '{\'{\'}')
|
|
14
|
-
.replace(/([@$|])/g, '{\'$1\'}')
|
|
15
|
-
const enMap = JSON.parse(fs.readFileSync('i18n/dicts/_en.json', 'utf-8'))
|
|
16
|
-
let miss = 0
|
|
17
|
-
|
|
18
|
-
function buildEntries(ns, dict, isEn) {
|
|
19
|
-
const out = []
|
|
20
|
-
for (const [k, zh] of Object.entries(dict)) {
|
|
21
|
-
let v = zh
|
|
22
|
-
if (isEn) {
|
|
23
|
-
const normalized = s => s.replace(/\s+/g, ' ').trim()
|
|
24
|
-
const hit = enMap[normalized(zh)] ?? enMap[zh]
|
|
25
|
-
if (hit == null) {
|
|
26
|
-
miss++
|
|
27
|
-
v = zh
|
|
28
|
-
}
|
|
29
|
-
else v = hit
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 合并器:把 i18n/dicts/<ns>.json(zh)+ i18n/dicts/_en.json(zh→en)
|
|
3
|
+
* 注入 i18n/locales/zh-CN.ts 与 en.ts。
|
|
4
|
+
* - ns 已存在 → 在其块首插入缺词条;否则新建 ns 块
|
|
5
|
+
* - vue-i18n 特殊字符({}@$|)转义为字面量插值
|
|
6
|
+
* - en 缺失 → 回退 zh(报告计数)
|
|
7
|
+
*/
|
|
8
|
+
import fs from 'node:fs'
|
|
9
|
+
import path from 'node:path'
|
|
10
|
+
|
|
11
|
+
const esc = v => v
|
|
12
|
+
// 保护 vue-i18n 占位符 {pN},其余 { } @ | $ 转义为字面量插值
|
|
13
|
+
.replace(/\{(?!p\d+\})/g, '{\'{\'}')
|
|
14
|
+
.replace(/([@$|])/g, '{\'$1\'}')
|
|
15
|
+
const enMap = JSON.parse(fs.readFileSync('i18n/dicts/_en.json', 'utf-8'))
|
|
16
|
+
let miss = 0
|
|
17
|
+
|
|
18
|
+
function buildEntries(ns, dict, isEn) {
|
|
19
|
+
const out = []
|
|
20
|
+
for (const [k, zh] of Object.entries(dict)) {
|
|
21
|
+
let v = zh
|
|
22
|
+
if (isEn) {
|
|
23
|
+
const normalized = s => s.replace(/\s+/g, ' ').trim()
|
|
24
|
+
const hit = enMap[normalized(zh)] ?? enMap[zh]
|
|
25
|
+
if (hit == null) {
|
|
26
|
+
miss++
|
|
27
|
+
v = zh
|
|
28
|
+
}
|
|
29
|
+
else v = hit
|
|
30
|
+
}
|
|
31
|
+
const keyLit = /^[A-Za-z0-9_$]+$/.test(k) ? k : JSON.stringify(k)
|
|
32
|
+
out.push(` ${keyLit}: '${esc(v).replace(/\\/g, '\\\\').replace(/'/g, '\\\'').replace(/\r?\n/g, '\\n')}',`)
|
|
33
|
+
}
|
|
34
|
+
return out
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
for (const [localeFile, isEn] of [['i18n/locales/zh-CN.ts', false], ['i18n/locales/en.ts', true]]) {
|
|
38
|
+
let src = fs.readFileSync(localeFile, 'utf-8')
|
|
39
|
+
let insertedTotal = 0
|
|
40
|
+
for (const f of fs.readdirSync('i18n/dicts').filter(x => x.endsWith('.json') && !x.startsWith('_'))) {
|
|
41
|
+
const ns = f.replace('.json', '')
|
|
42
|
+
const dict = JSON.parse(fs.readFileSync(path.join('i18n/dicts', f), 'utf-8'))
|
|
43
|
+
const entries = buildEntries(ns, dict, isEn)
|
|
44
|
+
if (entries.length === 0) continue
|
|
45
|
+
const nsRe = new RegExp(`^ ${ns}: \\{`, 'm')
|
|
46
|
+
const m = src.match(nsRe)
|
|
47
|
+
if (m) {
|
|
48
|
+
// 已有 ns:块首插入尚不存在的键
|
|
49
|
+
const start = m.index + m[0].length
|
|
50
|
+
const end = src.indexOf('\n },', start)
|
|
51
|
+
const block = src.slice(start, end)
|
|
52
|
+
// 键可能带引号(点号等非 \w 键由 emitter JSON.stringify 加引号)
|
|
53
|
+
const fresh = entries.filter(e => !block.includes(e.match(/ {4}"?([\w.]+)"?:/)[1] + ':'))
|
|
54
|
+
if (fresh.length) {
|
|
55
|
+
src = src.slice(0, start) + '\n' + fresh.join('\n') + src.slice(start)
|
|
56
|
+
insertedTotal += fresh.length
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
// 新 ns:插到文件末尾闭合前
|
|
61
|
+
const tail = src.lastIndexOf('}')
|
|
62
|
+
const block = ` ${ns}: {\n${entries.join('\n')}\n },\n`
|
|
63
|
+
src = src.slice(0, tail) + block + src.slice(tail)
|
|
64
|
+
insertedTotal += entries.length
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
fs.writeFileSync(localeFile, src)
|
|
68
|
+
console.log(`${localeFile}: +${insertedTotal} entries (en missing fallback: ${isEn ? miss : 'n/a'})`)
|
|
69
|
+
}
|
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 上下文治理环测试(假 RPC 客户端,零真实子进程):
|
|
3
|
-
* 70% 门控 / get_state 复查 / compact→compaction_end 等待 / legacy 降级 /
|
|
4
|
-
* 压缩事件分支 harvest / 被动 usage 透出 / 总开关与最小间隔。
|
|
5
|
-
* 运行: npx tsx --tsconfig .nuxt/tsconfig.server.json scripts/test-context-governor.ts
|
|
6
|
-
*/
|
|
7
|
-
import { OmpRpcAgentImpl } from '../server/services/workshop/agents/omp-agent'
|
|
8
|
-
|
|
9
|
-
let failures = 0
|
|
10
|
-
function check(name: string, ok: boolean, detail = ''): void {
|
|
11
|
-
console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
12
|
-
if (!ok) failures += 1
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
type Frame = Record<string, unknown>
|
|
16
|
-
|
|
17
|
-
/** 假 omp RPC 客户端:协议面仿真(命令应答/事件订阅/被动 usage) */
|
|
18
|
-
class FakeOmpClient {
|
|
19
|
-
alive = true
|
|
20
|
-
streaming = false
|
|
21
|
-
statsOk = true
|
|
22
|
-
compactOk = true
|
|
23
|
-
usageTokens = 0
|
|
24
|
-
contextWindow = 1000
|
|
25
|
-
autoCompact: boolean | null = null
|
|
26
|
-
sent: Array<Record<string, unknown>> = []
|
|
27
|
-
private listeners = new Set<(e: Frame) => void>()
|
|
28
|
-
|
|
29
|
-
onEvent(fn: (e: Frame) => void): () => void {
|
|
30
|
-
this.listeners.add(fn)
|
|
31
|
-
return () => this.listeners.delete(fn)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
emit(e: Frame): void {
|
|
35
|
-
for (const fn of this.listeners) fn(e)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async send(cmd: Record<string, unknown>): Promise<{ success: boolean, data?: unknown }> {
|
|
39
|
-
this.sent.push(cmd)
|
|
40
|
-
const type = cmd.type as string
|
|
41
|
-
if (type === 'get_session_stats') {
|
|
42
|
-
if (!this.statsOk) throw new Error('omp RPC 命令失败: get_session_stats 未知命令')
|
|
43
|
-
return { success: true, data: { contextUsage: { tokens: this.usageTokens, contextWindow: this.contextWindow, percent: this.usageTokens / this.contextWindow } } }
|
|
44
|
-
}
|
|
45
|
-
if (type === 'get_state') {
|
|
46
|
-
return { success: true, data: { isStreaming: this.streaming, isCompacting: false, sessionId: 'sess-1', model: { contextWindow: this.contextWindow } } }
|
|
47
|
-
}
|
|
48
|
-
if (type === 'compact') {
|
|
49
|
-
if (!this.compactOk) throw new Error('omp RPC 命令失败: compact 未知命令')
|
|
50
|
-
const summary = '压缩摘要:完成任务A;未竟:验证B'
|
|
51
|
-
setTimeout(() => {
|
|
52
|
-
this.emit({ type: 'compaction_end', result: { summary, tokensBefore: this.usageTokens, tokensAfter: 30000 }, reason: 'manual' })
|
|
53
|
-
}, 10)
|
|
54
|
-
return { success: true, data: {} }
|
|
55
|
-
}
|
|
56
|
-
if (type === 'set_auto_compaction') {
|
|
57
|
-
this.autoCompact = cmd.enabled as boolean
|
|
58
|
-
return { success: true }
|
|
59
|
-
}
|
|
60
|
-
return { success: true }
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
getContextUsage(): { tokens: number, contextWindow: number, percent: number } {
|
|
64
|
-
return { tokens: this.usageTokens, contextWindow: this.contextWindow, percent: this.usageTokens / this.contextWindow }
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
setContextWindow(n: number): void {
|
|
68
|
-
this.contextWindow = n
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
onHostToolCall(_fn: unknown): void {}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/** 装配:真实 OmpRpcAgentImpl + 注入假客户端/假 workspace */
|
|
75
|
-
function assemble(): { impl: OmpRpcAgentImpl, client: FakeOmpClient, harvested: Array<Record<string, unknown>> } {
|
|
76
|
-
const impl = new OmpRpcAgentImpl({ agentId: 'a1', name: 'A', role: 'worker', channelId: 'ch1' })
|
|
77
|
-
const client = new FakeOmpClient()
|
|
78
|
-
const harvested: Array<Record<string, unknown>> = []
|
|
79
|
-
const box = impl as unknown as Record<string, unknown>
|
|
80
|
-
box.client = client
|
|
81
|
-
box.workspace = {
|
|
82
|
-
recordSessionMemory: async (i: Record<string, unknown>) => {
|
|
83
|
-
harvested.push(i)
|
|
84
|
-
},
|
|
85
|
-
}
|
|
86
|
-
return { impl, client, harvested }
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const gate = (impl: OmpRpcAgentImpl, reason = 'test'): Promise<void> =>
|
|
90
|
-
(impl as unknown as Record<string, unknown>).contextGate(reason) as Promise<void>
|
|
91
|
-
|
|
92
|
-
process.env.AW_OMP_COMPACT_THRESHOLD = '0.7'
|
|
93
|
-
process.env.AW_OMP_COMPACT_MIN_INTERVAL_MS = '300000'
|
|
94
|
-
process.env.AW_OMP_COMPACT_WAIT_MS = '5000'
|
|
95
|
-
|
|
96
|
-
console.log('\n--- 门控基础路径 ---')
|
|
97
|
-
{
|
|
98
|
-
process.env.AW_OMP_COMPACT_ENABLED = '1'
|
|
99
|
-
const { impl, client, harvested } = assemble()
|
|
100
|
-
client.usageTokens = 500 // 50% < 70%
|
|
101
|
-
await gate(impl)
|
|
102
|
-
check('低于阈值不触发 compact', !client.sent.some(c => c.type === 'compact'), `sent=${client.sent.map(c => c.type)}`)
|
|
103
|
-
|
|
104
|
-
client.usageTokens = 850 // 85% ≥ 70%
|
|
105
|
-
await gate(impl)
|
|
106
|
-
check('达阈值发起 compact', client.sent.some(c => c.type === 'compact'))
|
|
107
|
-
check('compact 前先复查 get_state', client.sent.indexOf('get_state') !== -1 || client.sent.some(c => c.type === 'get_state'))
|
|
108
|
-
await new Promise(r => setTimeout(r, 50))
|
|
109
|
-
check('compaction_end 摘要 harvest 入库', harvested.length === 1 && harvested[0]!.summary === '压缩摘要:完成任务A;未竟:验证B', JSON.stringify(harvested))
|
|
110
|
-
check('harvest 携带 token 元信息', harvested[0]!.tokensBefore === 850 && harvested[0]!.tokensAfter === 30000)
|
|
111
|
-
|
|
112
|
-
// 最小间隔:压缩后立即再 gate 不应二次 compact
|
|
113
|
-
client.usageTokens = 950
|
|
114
|
-
await gate(impl)
|
|
115
|
-
check('最小间隔防振荡(不再 compact)', client.sent.filter(c => c.type === 'compact').length === 1)
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
console.log('\n--- 安全防线 ---')
|
|
119
|
-
{
|
|
120
|
-
// get_state 复查:流式中绝不压缩
|
|
121
|
-
const { impl, client } = assemble()
|
|
122
|
-
client.usageTokens = 900
|
|
123
|
-
client.streaming = true
|
|
124
|
-
await gate(impl)
|
|
125
|
-
check('isStreaming=true 时不发起 compact', !client.sent.some(c => c.type === 'compact'))
|
|
126
|
-
|
|
127
|
-
// 总开关
|
|
128
|
-
process.env.AW_OMP_COMPACT_ENABLED = '0'
|
|
129
|
-
const g2 = assemble()
|
|
130
|
-
g2.client.usageTokens = 900
|
|
131
|
-
await gate(g2.impl)
|
|
132
|
-
check('总开关关闭不压缩', !g2.client.sent.some(c => c.type === 'compact'))
|
|
133
|
-
process.env.AW_OMP_COMPACT_ENABLED = '1'
|
|
134
|
-
|
|
135
|
-
// legacy 降级:compact 未知命令 → 标记后不再尝试
|
|
136
|
-
const g3 = assemble()
|
|
137
|
-
g3.client.usageTokens = 900
|
|
138
|
-
g3.client.compactOk = false
|
|
139
|
-
await gate(g3.impl)
|
|
140
|
-
const box3 = g3.impl as unknown as Record<string, unknown>
|
|
141
|
-
check('未知命令 → legacy 标记', box3.compactLegacy === true)
|
|
142
|
-
g3.client.usageTokens = 980
|
|
143
|
-
await gate(g3.impl)
|
|
144
|
-
check('legacy 后续回合不再发 compact', g3.client.sent.filter(c => c.type === 'compact').length === 1)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
console.log('\n--- 事件分支与状态透出 ---')
|
|
148
|
-
{
|
|
149
|
-
const { impl, client, harvested } = assemble()
|
|
150
|
-
// 回合中途原生压缩(compaction_start/end 事件):不污染事件流 + harvest
|
|
151
|
-
const map = (impl as unknown as Record<string, (e: Frame) => Frame[]>).mapOmpEvent.bind(impl)
|
|
152
|
-
const startOut = map({ type: 'compaction_start' }, undefined)
|
|
153
|
-
const endOut = map({ type: 'compaction_end', result: { summary: '原生阈值压缩摘要', tokensBefore: 900 }, reason: 'threshold' }, undefined)
|
|
154
|
-
const settledOut = map({ type: 'agent_settled' }, undefined)
|
|
155
|
-
check('压缩事件映射为空(不污染 AgentEvent 流)', startOut.length === 0 && endOut.length === 0 && settledOut.length === 0)
|
|
156
|
-
await new Promise(r => setTimeout(r, 20))
|
|
157
|
-
check('原生压缩摘要同样 harvest', harvested.some(h => h.summary === '原生阈值压缩摘要'))
|
|
158
|
-
|
|
159
|
-
// 被动 usage 透出 getContextStats
|
|
160
|
-
client.usageTokens = 420
|
|
161
|
-
const stats = (impl as unknown as Record<string, () => unknown>).getContextStats()
|
|
162
|
-
check('getContextStats 透出用量与占比', JSON.stringify(stats) === JSON.stringify({ usedTokens: 420, contextWindow: 1000, percent: 0.42, compacting: false }), JSON.stringify(stats))
|
|
163
|
-
|
|
164
|
-
// 双路去重:同摘要 60s 内只入库一次
|
|
165
|
-
map({ type: 'compaction_end', result: { summary: '原生阈值压缩摘要' }, reason: 'threshold' }, undefined)
|
|
166
|
-
await new Promise(r => setTimeout(r, 20))
|
|
167
|
-
check('同摘要双达去重(60s 窗口)', harvested.filter(h => h.summary === '原生阈值压缩摘要').length === 1)
|
|
168
|
-
|
|
169
|
-
// onTurnSettled 复用 gate(自守卫不抛错)
|
|
170
|
-
client.usageTokens = 100
|
|
171
|
-
await impl.onTurnSettled()
|
|
172
|
-
check('onTurnSettled 低用量安全返回', true)
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
console.log(failures === 0 ? '\nALL PASS' : `\n${failures} FAILED`)
|
|
176
|
-
process.exit(failures === 0 ? 0 : 1)
|
|
1
|
+
/**
|
|
2
|
+
* 上下文治理环测试(假 RPC 客户端,零真实子进程):
|
|
3
|
+
* 70% 门控 / get_state 复查 / compact→compaction_end 等待 / legacy 降级 /
|
|
4
|
+
* 压缩事件分支 harvest / 被动 usage 透出 / 总开关与最小间隔。
|
|
5
|
+
* 运行: npx tsx --tsconfig .nuxt/tsconfig.server.json scripts/test-context-governor.ts
|
|
6
|
+
*/
|
|
7
|
+
import { OmpRpcAgentImpl } from '../server/services/workshop/agents/omp-agent'
|
|
8
|
+
|
|
9
|
+
let failures = 0
|
|
10
|
+
function check(name: string, ok: boolean, detail = ''): void {
|
|
11
|
+
console.log(` ${ok ? 'PASS' : 'FAIL'} ${name}${detail ? ` — ${detail}` : ''}`)
|
|
12
|
+
if (!ok) failures += 1
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type Frame = Record<string, unknown>
|
|
16
|
+
|
|
17
|
+
/** 假 omp RPC 客户端:协议面仿真(命令应答/事件订阅/被动 usage) */
|
|
18
|
+
class FakeOmpClient {
|
|
19
|
+
alive = true
|
|
20
|
+
streaming = false
|
|
21
|
+
statsOk = true
|
|
22
|
+
compactOk = true
|
|
23
|
+
usageTokens = 0
|
|
24
|
+
contextWindow = 1000
|
|
25
|
+
autoCompact: boolean | null = null
|
|
26
|
+
sent: Array<Record<string, unknown>> = []
|
|
27
|
+
private listeners = new Set<(e: Frame) => void>()
|
|
28
|
+
|
|
29
|
+
onEvent(fn: (e: Frame) => void): () => void {
|
|
30
|
+
this.listeners.add(fn)
|
|
31
|
+
return () => this.listeners.delete(fn)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
emit(e: Frame): void {
|
|
35
|
+
for (const fn of this.listeners) fn(e)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async send(cmd: Record<string, unknown>): Promise<{ success: boolean, data?: unknown }> {
|
|
39
|
+
this.sent.push(cmd)
|
|
40
|
+
const type = cmd.type as string
|
|
41
|
+
if (type === 'get_session_stats') {
|
|
42
|
+
if (!this.statsOk) throw new Error('omp RPC 命令失败: get_session_stats 未知命令')
|
|
43
|
+
return { success: true, data: { contextUsage: { tokens: this.usageTokens, contextWindow: this.contextWindow, percent: this.usageTokens / this.contextWindow } } }
|
|
44
|
+
}
|
|
45
|
+
if (type === 'get_state') {
|
|
46
|
+
return { success: true, data: { isStreaming: this.streaming, isCompacting: false, sessionId: 'sess-1', model: { contextWindow: this.contextWindow } } }
|
|
47
|
+
}
|
|
48
|
+
if (type === 'compact') {
|
|
49
|
+
if (!this.compactOk) throw new Error('omp RPC 命令失败: compact 未知命令')
|
|
50
|
+
const summary = '压缩摘要:完成任务A;未竟:验证B'
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
this.emit({ type: 'compaction_end', result: { summary, tokensBefore: this.usageTokens, tokensAfter: 30000 }, reason: 'manual' })
|
|
53
|
+
}, 10)
|
|
54
|
+
return { success: true, data: {} }
|
|
55
|
+
}
|
|
56
|
+
if (type === 'set_auto_compaction') {
|
|
57
|
+
this.autoCompact = cmd.enabled as boolean
|
|
58
|
+
return { success: true }
|
|
59
|
+
}
|
|
60
|
+
return { success: true }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getContextUsage(): { tokens: number, contextWindow: number, percent: number } {
|
|
64
|
+
return { tokens: this.usageTokens, contextWindow: this.contextWindow, percent: this.usageTokens / this.contextWindow }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
setContextWindow(n: number): void {
|
|
68
|
+
this.contextWindow = n
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
onHostToolCall(_fn: unknown): void {}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** 装配:真实 OmpRpcAgentImpl + 注入假客户端/假 workspace */
|
|
75
|
+
function assemble(): { impl: OmpRpcAgentImpl, client: FakeOmpClient, harvested: Array<Record<string, unknown>> } {
|
|
76
|
+
const impl = new OmpRpcAgentImpl({ agentId: 'a1', name: 'A', role: 'worker', channelId: 'ch1' })
|
|
77
|
+
const client = new FakeOmpClient()
|
|
78
|
+
const harvested: Array<Record<string, unknown>> = []
|
|
79
|
+
const box = impl as unknown as Record<string, unknown>
|
|
80
|
+
box.client = client
|
|
81
|
+
box.workspace = {
|
|
82
|
+
recordSessionMemory: async (i: Record<string, unknown>) => {
|
|
83
|
+
harvested.push(i)
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
return { impl, client, harvested }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const gate = (impl: OmpRpcAgentImpl, reason = 'test'): Promise<void> =>
|
|
90
|
+
(impl as unknown as Record<string, unknown>).contextGate(reason) as Promise<void>
|
|
91
|
+
|
|
92
|
+
process.env.AW_OMP_COMPACT_THRESHOLD = '0.7'
|
|
93
|
+
process.env.AW_OMP_COMPACT_MIN_INTERVAL_MS = '300000'
|
|
94
|
+
process.env.AW_OMP_COMPACT_WAIT_MS = '5000'
|
|
95
|
+
|
|
96
|
+
console.log('\n--- 门控基础路径 ---')
|
|
97
|
+
{
|
|
98
|
+
process.env.AW_OMP_COMPACT_ENABLED = '1'
|
|
99
|
+
const { impl, client, harvested } = assemble()
|
|
100
|
+
client.usageTokens = 500 // 50% < 70%
|
|
101
|
+
await gate(impl)
|
|
102
|
+
check('低于阈值不触发 compact', !client.sent.some(c => c.type === 'compact'), `sent=${client.sent.map(c => c.type)}`)
|
|
103
|
+
|
|
104
|
+
client.usageTokens = 850 // 85% ≥ 70%
|
|
105
|
+
await gate(impl)
|
|
106
|
+
check('达阈值发起 compact', client.sent.some(c => c.type === 'compact'))
|
|
107
|
+
check('compact 前先复查 get_state', client.sent.indexOf('get_state') !== -1 || client.sent.some(c => c.type === 'get_state'))
|
|
108
|
+
await new Promise(r => setTimeout(r, 50))
|
|
109
|
+
check('compaction_end 摘要 harvest 入库', harvested.length === 1 && harvested[0]!.summary === '压缩摘要:完成任务A;未竟:验证B', JSON.stringify(harvested))
|
|
110
|
+
check('harvest 携带 token 元信息', harvested[0]!.tokensBefore === 850 && harvested[0]!.tokensAfter === 30000)
|
|
111
|
+
|
|
112
|
+
// 最小间隔:压缩后立即再 gate 不应二次 compact
|
|
113
|
+
client.usageTokens = 950
|
|
114
|
+
await gate(impl)
|
|
115
|
+
check('最小间隔防振荡(不再 compact)', client.sent.filter(c => c.type === 'compact').length === 1)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
console.log('\n--- 安全防线 ---')
|
|
119
|
+
{
|
|
120
|
+
// get_state 复查:流式中绝不压缩
|
|
121
|
+
const { impl, client } = assemble()
|
|
122
|
+
client.usageTokens = 900
|
|
123
|
+
client.streaming = true
|
|
124
|
+
await gate(impl)
|
|
125
|
+
check('isStreaming=true 时不发起 compact', !client.sent.some(c => c.type === 'compact'))
|
|
126
|
+
|
|
127
|
+
// 总开关
|
|
128
|
+
process.env.AW_OMP_COMPACT_ENABLED = '0'
|
|
129
|
+
const g2 = assemble()
|
|
130
|
+
g2.client.usageTokens = 900
|
|
131
|
+
await gate(g2.impl)
|
|
132
|
+
check('总开关关闭不压缩', !g2.client.sent.some(c => c.type === 'compact'))
|
|
133
|
+
process.env.AW_OMP_COMPACT_ENABLED = '1'
|
|
134
|
+
|
|
135
|
+
// legacy 降级:compact 未知命令 → 标记后不再尝试
|
|
136
|
+
const g3 = assemble()
|
|
137
|
+
g3.client.usageTokens = 900
|
|
138
|
+
g3.client.compactOk = false
|
|
139
|
+
await gate(g3.impl)
|
|
140
|
+
const box3 = g3.impl as unknown as Record<string, unknown>
|
|
141
|
+
check('未知命令 → legacy 标记', box3.compactLegacy === true)
|
|
142
|
+
g3.client.usageTokens = 980
|
|
143
|
+
await gate(g3.impl)
|
|
144
|
+
check('legacy 后续回合不再发 compact', g3.client.sent.filter(c => c.type === 'compact').length === 1)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
console.log('\n--- 事件分支与状态透出 ---')
|
|
148
|
+
{
|
|
149
|
+
const { impl, client, harvested } = assemble()
|
|
150
|
+
// 回合中途原生压缩(compaction_start/end 事件):不污染事件流 + harvest
|
|
151
|
+
const map = (impl as unknown as Record<string, (e: Frame) => Frame[]>).mapOmpEvent.bind(impl)
|
|
152
|
+
const startOut = map({ type: 'compaction_start' }, undefined)
|
|
153
|
+
const endOut = map({ type: 'compaction_end', result: { summary: '原生阈值压缩摘要', tokensBefore: 900 }, reason: 'threshold' }, undefined)
|
|
154
|
+
const settledOut = map({ type: 'agent_settled' }, undefined)
|
|
155
|
+
check('压缩事件映射为空(不污染 AgentEvent 流)', startOut.length === 0 && endOut.length === 0 && settledOut.length === 0)
|
|
156
|
+
await new Promise(r => setTimeout(r, 20))
|
|
157
|
+
check('原生压缩摘要同样 harvest', harvested.some(h => h.summary === '原生阈值压缩摘要'))
|
|
158
|
+
|
|
159
|
+
// 被动 usage 透出 getContextStats
|
|
160
|
+
client.usageTokens = 420
|
|
161
|
+
const stats = (impl as unknown as Record<string, () => unknown>).getContextStats()
|
|
162
|
+
check('getContextStats 透出用量与占比', JSON.stringify(stats) === JSON.stringify({ usedTokens: 420, contextWindow: 1000, percent: 0.42, compacting: false }), JSON.stringify(stats))
|
|
163
|
+
|
|
164
|
+
// 双路去重:同摘要 60s 内只入库一次
|
|
165
|
+
map({ type: 'compaction_end', result: { summary: '原生阈值压缩摘要' }, reason: 'threshold' }, undefined)
|
|
166
|
+
await new Promise(r => setTimeout(r, 20))
|
|
167
|
+
check('同摘要双达去重(60s 窗口)', harvested.filter(h => h.summary === '原生阈值压缩摘要').length === 1)
|
|
168
|
+
|
|
169
|
+
// onTurnSettled 复用 gate(自守卫不抛错)
|
|
170
|
+
client.usageTokens = 100
|
|
171
|
+
await impl.onTurnSettled()
|
|
172
|
+
check('onTurnSettled 低用量安全返回', true)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
console.log(failures === 0 ? '\nALL PASS' : `\n${failures} FAILED`)
|
|
176
|
+
process.exit(failures === 0 ? 0 : 1)
|