agentworkshop 0.5.9 → 0.6.1
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/221de779-a113-4232-b9a1-31a614f5e3c7.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 +2675 -1425
- 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-plugin-tools-inject.ts +80 -0
- package/scripts/_dbg-plugin-verify-e2e.mjs +123 -0
- package/scripts/_dbg-prompts-hotreload-test.ts +76 -0
- package/scripts/_dbg-release-smoke.mjs +104 -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 +113 -89
- package/server/data/dcw-rollback.json +1 -1
- package/server/data/dcw-runs.json +3207 -2517
- package/server/data/dcw-writes.json +720 -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/6f7e40bf-a960-4f51-8a2e-bb1fffeaa5e8.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,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DaqFrame 处理器注册表 —— 实时下沉处理(sink pipeline)的执行面。
|
|
3
|
+
*
|
|
4
|
+
* 模板 `sink.processors` 声明有序步骤,采样后、入队/入库前在生产侧按序执行
|
|
5
|
+
* (图像 blob 不能过 MQTT 队列 → 全部 blob 处理必须在生产侧完成,消费侧只收元数据);
|
|
6
|
+
* 处理器 = 纯函数式变换(working frame → working frame),内置 5 件,插件经
|
|
7
|
+
* ctx.daq.registerProcessor 追加(同名覆盖并告警)。
|
|
8
|
+
*
|
|
9
|
+
* 内置处理器:
|
|
10
|
+
* - resample(n) vector 重采样到 n 点(线性插值)
|
|
11
|
+
* - derive-metric vector/image 派生标量指标(op=avg|min|max|range|std)
|
|
12
|
+
* - zones(n) vector 分区统计(zone_i_min/max/avg 进 metrics)
|
|
13
|
+
* - thumbnail(width) image 生成缩略图(thumbPng,最近邻抽点)
|
|
14
|
+
* - quality-gate image 亮度统计(brightness/contrast 进 metrics)
|
|
15
|
+
*/
|
|
16
|
+
import { createLogger } from '../logger'
|
|
17
|
+
import { inflateSync } from 'node:zlib'
|
|
18
|
+
import { encodePng, resizeGray } from './png-enc'
|
|
19
|
+
import type { DaqSinkStep } from '../../../../shared/daq-protocol'
|
|
20
|
+
|
|
21
|
+
const log = createLogger('daq.frames')
|
|
22
|
+
|
|
23
|
+
/** 下沉管线的处理中帧(blob 仅在生产侧管线内存续,入队前被替换为 objectKey) */
|
|
24
|
+
export interface DaqFrameWorking {
|
|
25
|
+
kind: 'vector' | 'image'
|
|
26
|
+
/** vector:工程量点列 */
|
|
27
|
+
points?: number[]
|
|
28
|
+
/** image:原始 PNG blob(生产侧管线内;入队前剥离) */
|
|
29
|
+
blob?: Buffer
|
|
30
|
+
thumbBlob?: Buffer
|
|
31
|
+
mime?: string
|
|
32
|
+
width?: number
|
|
33
|
+
height?: number
|
|
34
|
+
metrics?: Record<string, number>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface DaqFrameProcessor {
|
|
38
|
+
name: string
|
|
39
|
+
/** 适用形态(any = 两种都吃) */
|
|
40
|
+
applies: 'vector' | 'image' | 'any'
|
|
41
|
+
process(frame: DaqFrameWorking, args: Record<string, unknown>): DaqFrameWorking
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ---------- 内置处理器 ----------
|
|
45
|
+
|
|
46
|
+
const num = (v: unknown, fallback: number): number => (Number.isFinite(Number(v)) ? Number(v) : fallback)
|
|
47
|
+
|
|
48
|
+
function vectorStats(points: number[]): { min: number, max: number, avg: number } {
|
|
49
|
+
let min = Infinity
|
|
50
|
+
let max = -Infinity
|
|
51
|
+
let sum = 0
|
|
52
|
+
for (const p of points) {
|
|
53
|
+
if (p < min) min = p
|
|
54
|
+
if (p > max) max = p
|
|
55
|
+
sum += p
|
|
56
|
+
}
|
|
57
|
+
return { min, max, avg: points.length > 0 ? sum / points.length : 0 }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const resample: DaqFrameProcessor = {
|
|
61
|
+
name: 'resample',
|
|
62
|
+
applies: 'vector',
|
|
63
|
+
process(frame, args) {
|
|
64
|
+
const n = Math.max(2, Math.min(4096, Math.round(num(args.n, frame.points?.length ?? 64))))
|
|
65
|
+
const src = frame.points ?? []
|
|
66
|
+
if (src.length === n || src.length === 0) return { ...frame, points: src }
|
|
67
|
+
const out: number[] = []
|
|
68
|
+
for (let i = 0; i < n; i++) {
|
|
69
|
+
const pos = (i * (src.length - 1)) / (n - 1)
|
|
70
|
+
const lo = Math.floor(pos)
|
|
71
|
+
const hi = Math.min(src.length - 1, lo + 1)
|
|
72
|
+
const f = pos - lo
|
|
73
|
+
out.push(src[lo]! * (1 - f) + src[hi]! * f)
|
|
74
|
+
}
|
|
75
|
+
return { ...frame, points: out }
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const deriveMetric: DaqFrameProcessor = {
|
|
80
|
+
name: 'derive-metric',
|
|
81
|
+
applies: 'any',
|
|
82
|
+
process(frame, args) {
|
|
83
|
+
const name = String(args.name ?? '').trim()
|
|
84
|
+
if (!name) return frame
|
|
85
|
+
const op = String(args.op ?? 'avg')
|
|
86
|
+
let value: number
|
|
87
|
+
if (frame.points && frame.points.length > 0) {
|
|
88
|
+
const st = vectorStats(frame.points)
|
|
89
|
+
value = op === 'min' ? st.min : op === 'max' ? st.max : op === 'range' ? st.max - st.min : op === 'std' ? stdOf(frame.points) : st.avg
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
value = num(frame.metrics?.[op], Number.NaN)
|
|
93
|
+
if (!Number.isFinite(value)) return frame
|
|
94
|
+
}
|
|
95
|
+
return { ...frame, metrics: { ...frame.metrics, [name]: Math.round(value * 1e6) / 1e6 } }
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function stdOf(points: number[]): number {
|
|
100
|
+
if (points.length === 0) return 0
|
|
101
|
+
const avg = points.reduce((s, p) => s + p, 0) / points.length
|
|
102
|
+
const v = points.reduce((s, p) => s + (p - avg) ** 2, 0) / points.length
|
|
103
|
+
return Math.sqrt(v)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const zones: DaqFrameProcessor = {
|
|
107
|
+
name: 'zones',
|
|
108
|
+
applies: 'vector',
|
|
109
|
+
process(frame, args) {
|
|
110
|
+
const src = frame.points ?? []
|
|
111
|
+
const n = Math.max(2, Math.min(64, Math.round(num(args.n, 8))))
|
|
112
|
+
const size = Math.max(1, Math.floor(src.length / n))
|
|
113
|
+
const metrics = { ...frame.metrics }
|
|
114
|
+
for (let z = 0; z < n; z++) {
|
|
115
|
+
const seg = src.slice(z * size, z === n - 1 ? src.length : (z + 1) * size)
|
|
116
|
+
if (seg.length === 0) continue
|
|
117
|
+
const st = vectorStats(seg)
|
|
118
|
+
metrics[`zone${z + 1}_min`] = Math.round(st.min * 1e6) / 1e6
|
|
119
|
+
metrics[`zone${z + 1}_max`] = Math.round(st.max * 1e6) / 1e6
|
|
120
|
+
metrics[`zone${z + 1}_avg`] = Math.round(st.avg * 1e6) / 1e6
|
|
121
|
+
}
|
|
122
|
+
return { ...frame, metrics }
|
|
123
|
+
},
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const thumbnail: DaqFrameProcessor = {
|
|
127
|
+
name: 'thumbnail',
|
|
128
|
+
applies: 'image',
|
|
129
|
+
process(frame, args) {
|
|
130
|
+
const w = frame.width ?? 0
|
|
131
|
+
const h = frame.height ?? 0
|
|
132
|
+
if (!frame.blob || w <= 0 || h <= 0) return frame
|
|
133
|
+
const tw = Math.max(16, Math.min(1024, Math.round(num(args.width, 256))))
|
|
134
|
+
const th = Math.max(1, Math.round((h * tw) / w))
|
|
135
|
+
// blob 为本仓 png-enc 的灰度 PNG:解不出像素时跳过(缩略图缺省,主图可达)
|
|
136
|
+
const gray = decodeGrayPng(frame.blob, w, h)
|
|
137
|
+
if (!gray) return frame
|
|
138
|
+
const small = resizeGray(gray, w, h, tw, th)
|
|
139
|
+
return { ...frame, thumbBlob: encodePng(tw, th, small), metrics: frame.metrics }
|
|
140
|
+
},
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** 最小灰度 PNG 解码(仅支持本仓 encodePng 产出的 filter-0/8bit 灰度;其余返回 null) */
|
|
144
|
+
function decodeGrayPng(blob: Buffer, w: number, h: number): Uint8Array | null {
|
|
145
|
+
try {
|
|
146
|
+
// 定位 IDAT(跳签名+IHDR;本仓编码器结构固定,宽容解析)
|
|
147
|
+
let off = 8
|
|
148
|
+
const idat: Buffer[] = []
|
|
149
|
+
while (off + 8 <= blob.length) {
|
|
150
|
+
const len = blob.readUInt32BE(off)
|
|
151
|
+
const type = blob.subarray(off + 4, off + 8).toString('ascii')
|
|
152
|
+
if (type === 'IDAT') idat.push(blob.subarray(off + 8, off + 8 + len))
|
|
153
|
+
off += 12 + len
|
|
154
|
+
}
|
|
155
|
+
if (idat.length === 0) return null
|
|
156
|
+
const raw = inflateSync(Buffer.concat(idat))
|
|
157
|
+
const stride = w + 1
|
|
158
|
+
if (raw.length < stride * h) return null
|
|
159
|
+
const out = new Uint8Array(w * h)
|
|
160
|
+
for (let y = 0; y < h; y++) out.set(raw.subarray(y * stride + 1, y * stride + 1 + w), y * w)
|
|
161
|
+
return out
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
return null
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const qualityGate: DaqFrameProcessor = {
|
|
169
|
+
name: 'quality-gate',
|
|
170
|
+
applies: 'image',
|
|
171
|
+
process(frame) {
|
|
172
|
+
const w = frame.width ?? 0
|
|
173
|
+
const h = frame.height ?? 0
|
|
174
|
+
if (!frame.blob || w <= 0 || h <= 0) return frame
|
|
175
|
+
const gray = decodeGrayPng(frame.blob, w, h)
|
|
176
|
+
if (!gray) return frame
|
|
177
|
+
let sum = 0
|
|
178
|
+
for (const v of gray) sum += v
|
|
179
|
+
const brightness = sum / gray.length
|
|
180
|
+
let varSum = 0
|
|
181
|
+
for (const v of gray) varSum += (v - brightness) ** 2
|
|
182
|
+
const contrast = Math.sqrt(varSum / gray.length)
|
|
183
|
+
const r = (x: number): number => Math.round(x * 10) / 10
|
|
184
|
+
return { ...frame, metrics: { ...frame.metrics, brightness: r(brightness), contrast: r(contrast) } }
|
|
185
|
+
},
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// ---------- 注册表 ----------
|
|
189
|
+
|
|
190
|
+
const builtin = new Map<string, DaqFrameProcessor>([resample, deriveMetric, zones, thumbnail, qualityGate].map(p => [p.name, p]))
|
|
191
|
+
|
|
192
|
+
const g = globalThis as typeof globalThis & { __daqFrameProcessors?: Map<string, DaqFrameProcessor> }
|
|
193
|
+
function registry(): Map<string, DaqFrameProcessor> {
|
|
194
|
+
return g.__daqFrameProcessors ??= new Map()
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** 插件处理器注册(同名覆盖内置并告警;热重载时重复注册幂等) */
|
|
198
|
+
export function registerFrameProcessor(p: DaqFrameProcessor): void {
|
|
199
|
+
if (builtin.has(p.name)) log.warn(`[daq-frames] 插件处理器覆盖内置:「${p.name}」`)
|
|
200
|
+
registry().set(p.name, p)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** 已注册处理器名清单(诊断/manifest 用) */
|
|
204
|
+
export function listFrameProcessors(): string[] {
|
|
205
|
+
return [...builtin.keys(), ...registry().keys()]
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** 执行模板 sink 管线(生产侧;单步失败保留原帧并告警,永不抛出) */
|
|
209
|
+
export function runSinkPipeline(frame: DaqFrameWorking, steps: DaqSinkStep[] | undefined, nodeId: string): DaqFrameWorking {
|
|
210
|
+
if (!steps || steps.length === 0) return frame
|
|
211
|
+
let cur = frame
|
|
212
|
+
for (const step of steps) {
|
|
213
|
+
try {
|
|
214
|
+
const p = registry().get(step.name) ?? builtin.get(step.name)
|
|
215
|
+
if (!p) {
|
|
216
|
+
log.warn(`[daq-frames] ${nodeId} 未知处理器「${step.name}」,跳过`)
|
|
217
|
+
continue
|
|
218
|
+
}
|
|
219
|
+
if (p.applies !== 'any' && p.applies !== cur.kind) continue
|
|
220
|
+
cur = p.process(cur, step.args ?? {})
|
|
221
|
+
}
|
|
222
|
+
catch (err) {
|
|
223
|
+
log.error(`[daq-frames] ${nodeId} 处理器「${step.name}」失败(保留原帧):`, err instanceof Error ? err.message : err)
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return cur
|
|
227
|
+
}
|
|
@@ -11,20 +11,22 @@
|
|
|
11
11
|
* 控制器停采(在线数采停用),meta 携带 warning,前端横幅 + 一键重连;
|
|
12
12
|
* 后台每 30s 自动重试,恢复后自动重启采集并切回真实后端。
|
|
13
13
|
*/
|
|
14
|
-
import { createLogger } from '../logger'
|
|
14
|
+
import { createLogger } from '../logger'
|
|
15
15
|
import { execFile } from 'node:child_process'
|
|
16
16
|
import { createConnection } from 'node:net'
|
|
17
17
|
import { promisify } from 'node:util'
|
|
18
18
|
import { join } from 'node:path'
|
|
19
19
|
|
|
20
|
-
const log = createLogger('daq.infra')
|
|
21
|
-
|
|
20
|
+
const log = createLogger('daq.infra')
|
|
21
|
+
|
|
22
22
|
const execFileAsync = promisify(execFile)
|
|
23
23
|
|
|
24
24
|
export interface DaqInfraConfig {
|
|
25
25
|
startInfrastructure: 'auto' | 'always' | 'never'
|
|
26
26
|
mqtt: { host: string, port: number, username?: string, password?: string, secure?: boolean, caFile?: string }
|
|
27
27
|
timescale: { host: string, port: number, user: string, password: string, database: string }
|
|
28
|
+
/** 对象存储(v2:图像帧;不可达 → 本地磁盘降级,不阻断采集) */
|
|
29
|
+
objectstore?: { host: string, port: number, accessKey: string, secretKey: string, bucket: string }
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
export interface DaqInfraStatus {
|
|
@@ -32,6 +34,8 @@ export interface DaqInfraStatus {
|
|
|
32
34
|
mqttOnline: boolean
|
|
33
35
|
/** Timescale 是否在线(离线 → SQLite 时序仿真降级) */
|
|
34
36
|
tsdbOnline: boolean
|
|
37
|
+
/** 对象存储是否在线(离线 → 本地磁盘降级;不计入 degraded,采集不中断) */
|
|
38
|
+
objectStoreOnline: boolean
|
|
35
39
|
/** 任一降级 → 在线采集停用,前端横幅警告 */
|
|
36
40
|
degraded: boolean
|
|
37
41
|
warning: string
|
|
@@ -48,7 +52,7 @@ const g = globalThis as typeof globalThis & {
|
|
|
48
52
|
function state() {
|
|
49
53
|
return g.__daqInfra ??= {
|
|
50
54
|
cfg: { startInfrastructure: 'auto', mqtt: { host: '127.0.0.1', port: 1883 }, timescale: { host: '127.0.0.1', port: 5432, user: 'postgres', password: 'awshop', database: 'awshop' } },
|
|
51
|
-
status: { mqttOnline: false, tsdbOnline: false, degraded: true, warning: '', startedBy: 'none', lastCheckAt: new Date().toISOString() },
|
|
55
|
+
status: { mqttOnline: false, tsdbOnline: false, objectStoreOnline: false, degraded: true, warning: '', startedBy: 'none', lastCheckAt: new Date().toISOString() },
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -78,7 +82,7 @@ async function dockerAvailable(): Promise<boolean> {
|
|
|
78
82
|
|
|
79
83
|
async function dockerComposeUp(projectRoot: string): Promise<{ ok: boolean, error?: string }> {
|
|
80
84
|
try {
|
|
81
|
-
await execFileAsync('docker', ['compose', '-f', join(projectRoot, 'docker-compose.yml'), 'up', '-d', 'daq-mosquitto', 'daq-timescale'], { timeout:
|
|
85
|
+
await execFileAsync('docker', ['compose', '-f', join(projectRoot, 'docker-compose.yml'), 'up', '-d', 'daq-mosquitto', 'daq-timescale', 'daq-minio'], { timeout: 180_000, cwd: projectRoot })
|
|
82
86
|
return { ok: true }
|
|
83
87
|
}
|
|
84
88
|
catch (err) {
|
|
@@ -86,17 +90,19 @@ async function dockerComposeUp(projectRoot: string): Promise<{ ok: boolean, erro
|
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
|
|
89
|
-
/**
|
|
90
|
-
async function waitPorts(cfg: DaqInfraConfig, waitMs: number): Promise<{ mqtt: boolean, tsdb: boolean }> {
|
|
93
|
+
/** 等待三个端口就绪(拉起后服务初始化需要数秒;最长 waitMs) */
|
|
94
|
+
async function waitPorts(cfg: DaqInfraConfig, waitMs: number): Promise<{ mqtt: boolean, tsdb: boolean, os: boolean }> {
|
|
91
95
|
const deadline = Date.now() + waitMs
|
|
92
96
|
let mqtt = false
|
|
93
97
|
let tsdb = false
|
|
94
|
-
|
|
98
|
+
let os = false
|
|
99
|
+
while (Date.now() < deadline && !(mqtt && tsdb && os)) {
|
|
95
100
|
mqtt = mqtt || await probePort(cfg.mqtt.host, cfg.mqtt.port, 1200)
|
|
96
101
|
tsdb = tsdb || await probePort(cfg.timescale.host, cfg.timescale.port, 1200)
|
|
97
|
-
|
|
102
|
+
os = os || await probePort(cfg.objectstore?.host ?? '127.0.0.1', cfg.objectstore?.port ?? 9000, 1200)
|
|
103
|
+
if (!(mqtt && tsdb && os)) await new Promise(r => setTimeout(r, 1500))
|
|
98
104
|
}
|
|
99
|
-
return { mqtt, tsdb }
|
|
105
|
+
return { mqtt, tsdb, os }
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
export function daqInfraStatus(): DaqInfraStatus {
|
|
@@ -108,8 +114,8 @@ export function daqInfraConfig(): DaqInfraConfig {
|
|
|
108
114
|
return state().cfg
|
|
109
115
|
}
|
|
110
116
|
|
|
111
|
-
/** 配置 → 连接 URL(env 显式覆盖优先,便于外部托管 broker/db
|
|
112
|
-
export function daqUrls(cfg = state().cfg): { mqttUrl: string | null, tsdbUrl: string | null } {
|
|
117
|
+
/** 配置 → 连接 URL(env 显式覆盖优先,便于外部托管 broker/db/对象存储;S1:支持凭据/TLS) */
|
|
118
|
+
export function daqUrls(cfg = state().cfg): { mqttUrl: string | null, tsdbUrl: string | null, objectStoreUrl: string | null } {
|
|
113
119
|
// S1:凭据/TLS 优先 env(DAQ_MQTT_URL 整串覆盖),否则由 config.mqtt 拼(含 user:pass@ 与 mqtts://)
|
|
114
120
|
let mqttUrl: string
|
|
115
121
|
if (process.env.DAQ_MQTT_URL) {
|
|
@@ -124,7 +130,13 @@ export function daqUrls(cfg = state().cfg): { mqttUrl: string | null, tsdbUrl: s
|
|
|
124
130
|
}
|
|
125
131
|
const { user, password, database, host, port } = cfg.timescale
|
|
126
132
|
const tsdbUrl = process.env.DAQ_TSDB_URL ?? `postgres://${encodeURIComponent(user)}:${encodeURIComponent(password)}@${host}:${port}/${database}`
|
|
127
|
-
|
|
133
|
+
// 对象存储(v2):DAQ_OS_URL 覆盖;未配置 objectstore 段 → null(磁盘降级)
|
|
134
|
+
const osCfg = cfg.objectstore
|
|
135
|
+
const objectStoreUrl = process.env.DAQ_OS_URL
|
|
136
|
+
?? (osCfg
|
|
137
|
+
? `http://${encodeURIComponent(osCfg.accessKey)}:${encodeURIComponent(osCfg.secretKey)}@${osCfg.host}:${osCfg.port}/${osCfg.bucket}`
|
|
138
|
+
: null)
|
|
139
|
+
return { mqttUrl, tsdbUrl, objectStoreUrl }
|
|
128
140
|
}
|
|
129
141
|
|
|
130
142
|
/**
|
|
@@ -141,12 +153,11 @@ export async function ensureDaqInfrastructure(cfg: DaqInfraConfig, projectRoot:
|
|
|
141
153
|
// 1) 直接探测配置地址
|
|
142
154
|
let probe = await waitPorts(cfg, 3000)
|
|
143
155
|
s.startedBy = 'none'
|
|
144
|
-
|
|
145
156
|
// 2) 不通 → 按策略 Docker 拉起
|
|
146
157
|
if (!(probe.mqtt && probe.tsdb) && cfg.startInfrastructure !== 'never') {
|
|
147
158
|
const canDocker = await dockerAvailable()
|
|
148
159
|
if (canDocker) {
|
|
149
|
-
log.info('[daq-infra] 配置地址未就绪,经 Docker Compose 拉起(daq-mosquitto + daq-timescale)…')
|
|
160
|
+
log.info('[daq-infra] 配置地址未就绪,经 Docker Compose 拉起(daq-mosquitto + daq-timescale + daq-minio)…')
|
|
150
161
|
const up = await dockerComposeUp(projectRoot)
|
|
151
162
|
if (up.ok) {
|
|
152
163
|
probe = await waitPorts(cfg, 60_000)
|
|
@@ -168,6 +179,7 @@ export async function ensureDaqInfrastructure(cfg: DaqInfraConfig, projectRoot:
|
|
|
168
179
|
|
|
169
180
|
s.mqttOnline = probe.mqtt
|
|
170
181
|
s.tsdbOnline = probe.tsdb
|
|
182
|
+
s.objectStoreOnline = probe.os
|
|
171
183
|
s.degraded = !(probe.mqtt && probe.tsdb)
|
|
172
184
|
|
|
173
185
|
if (s.degraded) {
|
|
@@ -178,8 +190,10 @@ export async function ensureDaqInfrastructure(cfg: DaqInfraConfig, projectRoot:
|
|
|
178
190
|
log.warn(`[daq-infra] 降级运行 — ${s.warning}`)
|
|
179
191
|
}
|
|
180
192
|
else {
|
|
181
|
-
s.warning =
|
|
182
|
-
|
|
193
|
+
s.warning = probe.os
|
|
194
|
+
? ''
|
|
195
|
+
: `对象存储(MinIO)不可达:图像帧已降级本地磁盘(data/daq-objects/),采集不中断。`
|
|
196
|
+
log.info(`[daq-infra] 真实链路就绪(mqtt=${cfg.mqtt.host}:${cfg.mqtt.port}, timescale=${cfg.timescale.host}:${cfg.timescale.port}, objectstore=${probe.os ? `${cfg.objectstore?.host}:${cfg.objectstore?.port}` : 'disk-degraded'}, 来源=${s.startedBy})`)
|
|
183
197
|
}
|
|
184
198
|
return daqInfraStatus()
|
|
185
199
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DiskObjectAdapter —— 对象存储的本地磁盘降级实现(data/daq-objects/)。
|
|
3
|
+
* MinIO 不可达时帧管线自动切换到此适配器(采集不中断;meta.infra 报告 disk:degraded)。
|
|
4
|
+
*/
|
|
5
|
+
import { mkdir, readFile, rm, writeFile } from 'node:fs/promises'
|
|
6
|
+
import { join, resolve } from 'node:path'
|
|
7
|
+
import { ensureDataDir } from '@/shared/config/home.mjs'
|
|
8
|
+
import type { DaqObjectStore } from './objectstore-port'
|
|
9
|
+
|
|
10
|
+
const ROOT = resolve(join(ensureDataDir(), 'daq-objects'))
|
|
11
|
+
|
|
12
|
+
export class DiskObjectAdapter implements DaqObjectStore {
|
|
13
|
+
readonly backend = 'disk'
|
|
14
|
+
|
|
15
|
+
async init(): Promise<void> {
|
|
16
|
+
await mkdir(ROOT, { recursive: true })
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** key 归一(防路径逃逸:只允许 [A-Za-z0-9/._-];非法字符拒绝) */
|
|
20
|
+
private pathOf(key: string): string {
|
|
21
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9/._-]*$/.test(key)) throw new Error(`非法对象键: ${key}`)
|
|
22
|
+
return join(ROOT, key)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async put(key: string, data: Buffer): Promise<void> {
|
|
26
|
+
const p = this.pathOf(key)
|
|
27
|
+
await mkdir(join(p, '..'), { recursive: true })
|
|
28
|
+
await writeFile(p, data)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async get(key: string): Promise<Buffer> {
|
|
32
|
+
return readFile(this.pathOf(key))
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async remove(key: string): Promise<void> {
|
|
36
|
+
await rm(this.pathOf(key), { force: true })
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DaqObjectStore 工厂 —— 配置驱动,MinIO 不可达自动降级本地磁盘。
|
|
3
|
+
* 单例挂 globalThis;rebuildObjectStore() 支持重连时切回真实实例(与 tsdb 工厂同构)。
|
|
4
|
+
*/
|
|
5
|
+
import { createLogger } from '../../logger'
|
|
6
|
+
import { DiskObjectAdapter } from './disk.adapter'
|
|
7
|
+
import { MinioObjectAdapter } from './minio.adapter'
|
|
8
|
+
import type { DaqObjectStore } from './objectstore-port'
|
|
9
|
+
|
|
10
|
+
const log = createLogger('daq.objectstore')
|
|
11
|
+
|
|
12
|
+
interface DaqOsState { current?: DaqObjectStore }
|
|
13
|
+
const g = globalThis as typeof globalThis & { __daqObjectStoreState?: DaqOsState }
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 解析对象存储连接(DAQ_OS_URL 显式覆盖优先):
|
|
17
|
+
* http://accessKey:secretKey@host:port/bucket
|
|
18
|
+
*/
|
|
19
|
+
export function parseObjectStoreUrl(url: string): { endPoint: string, port: number, accessKey: string, secretKey: string, bucket: string } | null {
|
|
20
|
+
try {
|
|
21
|
+
const u = new URL(url)
|
|
22
|
+
if (u.protocol !== 'http:' && u.protocol !== 'https:') return null
|
|
23
|
+
return {
|
|
24
|
+
endPoint: u.hostname,
|
|
25
|
+
port: Number(u.port || (u.protocol === 'https:' ? 443 : 80)),
|
|
26
|
+
accessKey: decodeURIComponent(u.username || 'awshop'),
|
|
27
|
+
secretKey: decodeURIComponent(u.password || 'awshop'),
|
|
28
|
+
bucket: decodeURIComponent(u.pathname.replace(/^\//, '')) || 'daq',
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function makeFallback(reason: string): DaqObjectStore {
|
|
37
|
+
const dev = new DiskObjectAdapter()
|
|
38
|
+
void dev.init()
|
|
39
|
+
log.warn(`[daq-objectstore] ${reason} → 已降级本地磁盘(data/daq-objects/)`)
|
|
40
|
+
return dev
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function getObjectStore(): DaqObjectStore {
|
|
44
|
+
const st: DaqOsState = g.__daqObjectStoreState ??= {}
|
|
45
|
+
let cur = st.current
|
|
46
|
+
if (!cur) {
|
|
47
|
+
cur = new DiskObjectAdapter()
|
|
48
|
+
void cur.init()
|
|
49
|
+
log.info('[daq-objectstore] 本地磁盘对象存储就绪(data/daq-objects/)')
|
|
50
|
+
st.current = cur
|
|
51
|
+
}
|
|
52
|
+
return cur
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** 重连/初始装配:online 且 url 可解析 → MinIO(5×2.5s 重试扛容器初始化窗口);否则磁盘降级 */
|
|
56
|
+
export async function rebuildObjectStore(online: boolean, url?: string | null): Promise<void> {
|
|
57
|
+
const st: DaqOsState = g.__daqObjectStoreState ??= {}
|
|
58
|
+
const swap = (next: DaqObjectStore): void => {
|
|
59
|
+
const old = st.current
|
|
60
|
+
st.current = next
|
|
61
|
+
void Promise.resolve(old?.close?.()).catch(() => {})
|
|
62
|
+
}
|
|
63
|
+
const parsed = url ? parseObjectStoreUrl(url) : null
|
|
64
|
+
if (!online || !parsed) {
|
|
65
|
+
if (st.current?.backend !== 'disk') swap(makeFallback('infra 判定离线或未配置'))
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
const adapter = new MinioObjectAdapter(parsed)
|
|
69
|
+
let lastErr: unknown
|
|
70
|
+
for (let i = 0; i < 5; i++) {
|
|
71
|
+
try {
|
|
72
|
+
await adapter.init()
|
|
73
|
+
lastErr = null
|
|
74
|
+
break
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
lastErr = err
|
|
78
|
+
await new Promise(r => setTimeout(r, 2500))
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (lastErr) {
|
|
82
|
+
await adapter.close?.().catch(() => {})
|
|
83
|
+
swap(makeFallback(lastErr instanceof Error ? lastErr.message : String(lastErr)))
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
swap(adapter)
|
|
87
|
+
log.info(`[daq-objectstore] MinIO 就绪(${parsed.endPoint}:${parsed.port}/${parsed.bucket})`)
|
|
88
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MinioObjectAdapter —— S3 兼容对象存储实现(compose daq-minio)。
|
|
3
|
+
*
|
|
4
|
+
* minio 官方客户端经 createRequire 加载(nitro Windows 动态 import external 的
|
|
5
|
+
* 'd:' scheme 坑,与 pg/mqtt 同款规避);bucket 不存在时 init 幂等创建。
|
|
6
|
+
*/
|
|
7
|
+
import { createRequire } from 'node:module'
|
|
8
|
+
import type { DaqObjectStore } from './objectstore-port'
|
|
9
|
+
|
|
10
|
+
const reqOs = createRequire(import.meta.url)
|
|
11
|
+
|
|
12
|
+
export interface MinioConnectOpts {
|
|
13
|
+
endPoint: string
|
|
14
|
+
port: number
|
|
15
|
+
accessKey: string
|
|
16
|
+
secretKey: string
|
|
17
|
+
bucket: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class MinioObjectAdapter implements DaqObjectStore {
|
|
21
|
+
readonly backend = 'minio'
|
|
22
|
+
private client: import('minio').Client | null = null
|
|
23
|
+
|
|
24
|
+
constructor(private readonly opts: MinioConnectOpts) {}
|
|
25
|
+
|
|
26
|
+
async init(): Promise<void> {
|
|
27
|
+
const mod = reqOs('minio') as unknown as { Client: new (o: Record<string, unknown>) => import('minio').Client }
|
|
28
|
+
this.client = new mod.Client({
|
|
29
|
+
endPoint: this.opts.endPoint,
|
|
30
|
+
port: this.opts.port,
|
|
31
|
+
useSSL: false,
|
|
32
|
+
accessKey: this.opts.accessKey,
|
|
33
|
+
secretKey: this.opts.secretKey,
|
|
34
|
+
})
|
|
35
|
+
const exists = await this.client.bucketExists(this.opts.bucket).catch(() => false)
|
|
36
|
+
if (!exists) await this.client.makeBucket(this.opts.bucket, 'us-east-1')
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async put(key: string, data: Buffer, contentType: string): Promise<void> {
|
|
40
|
+
if (!this.client) throw new Error('minio 未初始化')
|
|
41
|
+
await this.client.putObject(this.opts.bucket, key, data, data.length, { 'Content-Type': contentType })
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async get(key: string): Promise<Buffer> {
|
|
45
|
+
if (!this.client) throw new Error('minio 未初始化')
|
|
46
|
+
const stream = await this.client.getObject(this.opts.bucket, key)
|
|
47
|
+
const chunks: Buffer[] = []
|
|
48
|
+
for await (const c of stream) chunks.push(c as Buffer)
|
|
49
|
+
return Buffer.concat(chunks)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async remove(key: string): Promise<void> {
|
|
53
|
+
if (!this.client) return
|
|
54
|
+
await this.client.removeObject(this.opts.bucket, key)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async close(): Promise<void> {
|
|
58
|
+
this.client = null
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DaqObjectStore 端口(hexagonal seam)—— 图像等非结构化帧数据的持久化出口。
|
|
3
|
+
*
|
|
4
|
+
* 分工约定(plan D1/D3):Timescale 存帧元数据(daq_frames.meta.objectKey),
|
|
5
|
+
* 像素 blob 只落对象存储;实现:
|
|
6
|
+
* - minio.adapter —— S3 兼容(compose daq-minio;DAQ_OS_URL / config daq.objectstore 启用)
|
|
7
|
+
* - disk.adapter —— 本地磁盘降级(data/daq-objects/;MinIO 不可达时自动切换,采集不中断)
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export interface DaqObjectStore {
|
|
11
|
+
/** 后端标识(minio | disk)——REST meta 直报前端 */
|
|
12
|
+
readonly backend: string
|
|
13
|
+
init(): Promise<void>
|
|
14
|
+
put(key: string, data: Buffer, contentType: string): Promise<void>
|
|
15
|
+
get(key: string): Promise<Buffer>
|
|
16
|
+
remove(key: string): Promise<void>
|
|
17
|
+
close?(): Promise<void> | void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** 对象键生成(daq/<nodeId>/<yyyy>/<mm>/<dd>/<ts><suffix>) */
|
|
21
|
+
export function daqObjectKey(nodeId: string, tsMs: number, ext: string): string {
|
|
22
|
+
const d = new Date(tsMs)
|
|
23
|
+
const yyyy = d.getUTCFullYear()
|
|
24
|
+
const mm = String(d.getUTCMonth() + 1).padStart(2, '0')
|
|
25
|
+
const dd = String(d.getUTCDate()).padStart(2, '0')
|
|
26
|
+
return `daq/${nodeId}/${yyyy}/${mm}/${dd}/${tsMs}${ext}`
|
|
27
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { DaqTemplateDef } from '../../../../shared/daq-protocol'
|
|
2
|
+
import { getDaqTemplateRegistry } from './daq-templates'
|
|
3
|
+
import { registerPluginDriver } from './drivers'
|
|
4
|
+
import { registerFrameProcessor } from './frames'
|
|
5
|
+
|
|
6
|
+
interface DaqPluginBridge {
|
|
7
|
+
pendingDrivers: unknown[]
|
|
8
|
+
pendingProcessors: Array<{ kind: string, name: string, fn: unknown }>
|
|
9
|
+
pendingTemplates: unknown[]
|
|
10
|
+
/** 回放槽(drain 接管后设置;注册即时回调) */
|
|
11
|
+
_drain?: () => void
|
|
12
|
+
registerDriver(d: unknown): void
|
|
13
|
+
registerProcessor(kind: string, name: string, fn: unknown): void
|
|
14
|
+
registerTemplate(t: unknown): void
|
|
15
|
+
drain(onDriver: (d: unknown) => void, onProcessor: (kind: string, name: string, fn: unknown) => void, onTemplate: (t: unknown) => void): void
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** 自建桥(仅队列 + drain 槽;宿主后到时由其接管) */
|
|
19
|
+
function makeDaqBridge(): DaqPluginBridge {
|
|
20
|
+
return {
|
|
21
|
+
pendingDrivers: [],
|
|
22
|
+
pendingProcessors: [],
|
|
23
|
+
pendingTemplates: [],
|
|
24
|
+
registerDriver(d) {
|
|
25
|
+
this.pendingDrivers.push(d)
|
|
26
|
+
this._drain?.()
|
|
27
|
+
},
|
|
28
|
+
registerProcessor(kind, name, fn) {
|
|
29
|
+
this.pendingProcessors.push({ kind, name, fn })
|
|
30
|
+
this._drain?.()
|
|
31
|
+
},
|
|
32
|
+
registerTemplate(t) {
|
|
33
|
+
this.pendingTemplates.push(t)
|
|
34
|
+
this._drain?.()
|
|
35
|
+
},
|
|
36
|
+
drain(onDriver, onProcessor, onTemplate) {
|
|
37
|
+
this._drain = () => {
|
|
38
|
+
for (const d of this.pendingDrivers.splice(0)) onDriver(d)
|
|
39
|
+
for (const p of this.pendingProcessors.splice(0)) onProcessor(p.kind, p.name, p.fn)
|
|
40
|
+
for (const t of this.pendingTemplates.splice(0)) onTemplate(t)
|
|
41
|
+
}
|
|
42
|
+
this._drain()
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let attached = false
|
|
48
|
+
|
|
49
|
+
export function attachDaqPluginBridge(): void {
|
|
50
|
+
if (attached) return
|
|
51
|
+
attached = true
|
|
52
|
+
// 顺序无关:daq 先于插件宿主装载时桥尚不存在 → 此处自建(仅队列+drain 槽);
|
|
53
|
+
// 反之宿主已建桥则直接接管。drain 设槽即回放,后续注册实时到达。
|
|
54
|
+
const g = globalThis as { __daqPluginExt?: DaqPluginBridge }
|
|
55
|
+
const bridge: DaqPluginBridge = g.__daqPluginExt ?? makeDaqBridge()
|
|
56
|
+
g.__daqPluginExt = bridge
|
|
57
|
+
bridge.drain(
|
|
58
|
+
d => registerPluginDriver(d as Parameters<typeof registerPluginDriver>[0]),
|
|
59
|
+
(kind, name, fn) => registerFrameProcessor({
|
|
60
|
+
name,
|
|
61
|
+
applies: kind === 'vector' ? 'vector' : kind === 'image' ? 'image' : 'any',
|
|
62
|
+
process: fn as Parameters<typeof registerFrameProcessor>[0]['process'],
|
|
63
|
+
}),
|
|
64
|
+
(t) => {
|
|
65
|
+
try {
|
|
66
|
+
getDaqTemplateRegistry().registerPlugin(t as DaqTemplateDef)
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
console.error('[daq] 插件模板注册失败:', err instanceof Error ? err.message : err)
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
)
|
|
73
|
+
}
|