agentworkshop 0.11.3 → 0.13.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/host-tools.json +4 -4
- package/.output/.AgentWorkShop/prompts/host-tools.json +4 -4
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{DXXBGPAc.js → CsdezMu9.js} +4 -4
- package/.output/public/_nuxt/WL1R8lPA.js +1 -0
- package/.output/public/_nuxt/_id_.Czwkl50w.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/2f96705b-cf57-4bde-87a4-1b818b268f0f.json +1 -0
- package/.output/server/chunks/_/access.mjs +1 -1
- package/.output/server/chunks/_/candidate-store.mjs +1 -1
- package/.output/server/chunks/_/catalog-view.mjs +1 -1
- package/.output/server/chunks/_/character-asset.repo.mjs +1 -1
- package/.output/server/chunks/_/data-export.mjs +6 -6
- package/.output/server/chunks/_/data-query.mjs +3 -3
- package/.output/server/chunks/_/eda-run.repo.mjs +2 -2
- package/.output/server/chunks/_/entity.mjs +1 -1
- package/.output/server/chunks/_/features.mjs +5 -5
- package/.output/server/chunks/_/golden.mjs +3 -3
- package/.output/server/chunks/_/host-bindings.mjs +1 -1
- package/.output/server/chunks/_/index.mjs +1 -1
- package/.output/server/chunks/_/line-scope.mjs +1 -1
- package/.output/server/chunks/_/mes-console.mjs +1 -1
- package/.output/server/chunks/_/mes-secrets.repo.mjs +1 -1
- package/.output/server/chunks/_/mes-templates.mjs +1 -1
- package/.output/server/chunks/_/nitro.mjs +4084 -2343
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/_/ocap.mjs +1 -1
- package/.output/server/chunks/_/orchestrator.mjs +1 -1
- package/.output/server/chunks/_/promote.mjs +1 -1
- package/.output/server/chunks/_/rest-auth.mjs +1 -1
- package/.output/server/chunks/_/runtime.mjs +8 -8
- package/.output/server/chunks/_/scene-layout.repo.mjs +1 -1
- package/.output/server/chunks/_/spc.mjs +1 -1
- package/.output/server/chunks/_/validator.mjs +1 -1
- package/.output/server/chunks/build/TownView-DD1zY8xq.mjs +1 -1
- package/.output/server/chunks/build/{_id_-C0vNEbts.mjs → _id_-B9zi8WEg.mjs} +23 -12
- package/.output/server/chunks/build/_id_-B9zi8WEg.mjs.map +1 -0
- package/.output/server/chunks/build/_wsId_-LDv5SEW_.mjs +1 -1
- package/.output/server/chunks/build/daq-B5zlUIlb.mjs +1 -1
- package/.output/server/chunks/build/dcw-B-eoU7sq.mjs +1 -1
- package/.output/server/chunks/build/types-D6J7slEa.mjs +1 -1
- package/.output/server/chunks/build/useDaqAddNode-Dr5CfMpU.mjs +1 -1
- package/.output/server/chunks/build/useDaqDetailNode-DDq5osE-.mjs +1 -1
- package/.output/server/chunks/build/useDaqDetailParams-DdOcUvHG.mjs +1 -1
- package/.output/server/chunks/build/useDaqFilters-Y_NRhP6i.mjs +1 -1
- package/.output/server/chunks/build/useDaqStream-phwM5tIN.mjs +1 -1
- package/.output/server/chunks/build/useDaqTemplates-lKw2b01d.mjs +1 -1
- package/.output/server/chunks/build/useDcwAddNode-CT-oOFom.mjs +1 -1
- package/.output/server/chunks/build/useDcwStream-CNtMGcR0.mjs +1 -1
- package/.output/server/chunks/routes/api/mcp/workshop.mjs +1 -1
- package/.output/server/chunks/routes/api/system/backup/run.post.mjs +2 -2
- package/.output/server/chunks/routes/api/system/index.patch.mjs +2 -2
- package/.output/server/chunks/routes/api/system/shutdown.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs +7 -2
- package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id/preview.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/env/recheck.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/env/uv.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/env/venv.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index4.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index6.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/index7.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/cancel.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/logs.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/retry.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/models/_id/predict.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/models/_id/promote.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/models/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/models/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id/train.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/training-plans/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/aml/twin/providers.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/analysis/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/analysis/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/analysis/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/devices/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/execution-mode.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/harness-profiles/promote.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/improvement-proposals/decide.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index11.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index2.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index5.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index7.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/index7.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/line.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/members/join.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId/promote.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/memories/merge.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/products.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/products.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/tool-usage.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/tools/reset.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs +7 -7
- package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/bindings.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/ingest.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/storage/retention.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/storage/rollup.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/storage.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bindings.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index5.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index6.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index7.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index8.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/mes-artifacts/file.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/mes-hook-test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/mes-test-read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/revert.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/index.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/eda/commonality.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/eda/index6.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/eda/index6.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/eda/vm/predict.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/exp/confirmations/_id/decide.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/exp/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index12.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index13.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index14.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index5.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index7.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index7.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index8.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index9.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/mes/bridge.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/mes/datasets.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/autofix.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/compile.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/evidence.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/publish.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/approval-decision.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/approval.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/transition.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/subgraph.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/validate.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId_.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/export/_ontologyId_.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/index.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/scene.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/traces/_ontologyId_.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/versions/_ontologyId/compare.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/ontology/versions/_ontologyId_.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/capabilities.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/index.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/index2.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/profiles/_id/publish.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/recommendations/_id/crosscheck.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/recommendations/_id/dispatch.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/optimization/solve.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/process-model/datasets.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/process-model/eligibility.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/process-model/experiments.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/process-model/index.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/process-model/specs/_id/publish.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/process-model/train.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/activate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/approvals/_aid/decide.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/archive.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/channels/_channelId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/complete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/continue.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/_did/waive.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/index.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index3.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index4.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index5.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index6.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index7.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/index8.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/kernel/tick.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/ledger.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/members/_userId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/observability/activity.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/observability/route.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/observability/work-items/_wid_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/observability.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/pause.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/plan/request-approval.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/proposals/_decisionId/apply.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/reconcile.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/report.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/request-acceptance.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/review.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/submit.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/supersede.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/resume.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/sessions.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/snapshot.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/terminate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/trace/_traceId_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/_wid/cancel.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/_wid/dispatch.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/_wid/retry.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/index.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/projects/instantiate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tasks/_id/recovery-disposition.post.mjs +44 -0
- package/.output/server/chunks/routes/api/workshop/tasks/_id/recovery-disposition.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/tasks/recovery-holds.get.mjs +38 -0
- package/.output/server/chunks/routes/api/workshop/tasks/recovery-holds.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/teams/_id/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/tools/sync.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +2 -2
- package/.output/server/chunks/routes/api/workshop/ws/ticket.post.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/virtual/entry.mjs +6 -2
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README-zh.md +19 -7
- package/README.md +21 -7
- package/app/components/dcw/DcwNodesTable.vue +24 -0
- package/config.yml +1 -1
- package/docs/cli.en.md +1 -1
- package/docs/cli.md +1 -1
- package/docs/mcp.en.md +30 -27
- package/docs/mcp.md +7 -3
- package/docs/plugin-idd-rag-contract.md +87 -0
- package/docs/plugins.en.md +5 -3
- package/docs/plugins.md +5 -3
- package/docs/sdk.en.md +1 -1
- package/docs/sdk.md +1 -1
- package/i18n/dicts/dcwDetail.json +221 -219
- package/i18n/locales/en.ts +2 -0
- package/i18n/locales/zh-CN.ts +2 -0
- package/package.json +3 -1
- package/scripts/check-docs-sync.mjs +20 -9
- package/scripts/onboarding/forge-channel.mjs +2 -1
- package/scripts/onboarding/lib.mjs +159 -3
- package/scripts/onboarding/onboard.mjs +2 -0
- package/scripts/onboarding/preflight.mjs +233 -231
- package/scripts/onboarding/provision-line.mjs +12 -2
- package/scripts/onboarding/sim-attest.mjs +103 -0
- package/scripts/onboarding/sim-twin.mjs +115 -19
- package/scripts/onboarding/test-connection.mjs +2 -1
- package/scripts/onboarding/v6-protected-api.mjs +41 -0
- package/scripts/onboarding/v6-protected-fixture.mjs +54 -0
- package/scripts/onboarding/verify-line.mjs +179 -136
- package/scripts/onboarding/verify-mirror.mjs +149 -145
- package/server/api/workshop/agent-tools/list.get.ts +10 -1
- package/server/api/workshop/tasks/[id]/recovery-disposition.post.ts +32 -0
- package/server/api/workshop/tasks/recovery-holds.get.ts +22 -0
- package/server/plugins-builtin/diag-bridge/host/deposit.mjs +232 -0
- package/server/plugins-builtin/diag-bridge/host/diagnosis.mjs +121 -38
- package/server/plugins-builtin/diag-bridge/host/external-v1.mjs +213 -0
- package/server/plugins-builtin/diag-bridge/host/helpers.mjs +4 -2
- package/server/plugins-builtin/diag-bridge/host/intents.mjs +65 -62
- package/server/plugins-builtin/diag-bridge/host/plugin.mjs +351 -82
- package/server/plugins-builtin/diag-bridge/host/receipt.mjs +83 -0
- package/server/plugins-builtin/diag-bridge/host/sweep.mjs +70 -91
- package/server/plugins-builtin/diag-bridge/i18n.json +4 -0
- package/server/plugins-builtin/rag-bridge/i18n.json +18 -0
- package/server/plugins-builtin/rag-bridge/index.mjs +570 -64
- package/server/services/workshop/agents/agent-interface.ts +3 -0
- package/server/services/workshop/agents/base-agent.ts +100 -4
- package/server/services/workshop/agents/execution-scope.ts +26 -0
- package/server/services/workshop/agents/hitl-capabilities.ts +3 -3
- package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +42 -2
- package/server/services/workshop/agents/host-tool-bridge/tools/progress.ts +4 -0
- package/server/services/workshop/agents/host-tool-bridge/tools/tasks.ts +11 -28
- package/server/services/workshop/agents/host-tool-bridge/tools/team-delegation.ts +83 -129
- package/server/services/workshop/agents/industrial/dcw-tools.ts +27 -5
- package/server/services/workshop/agents/industrial/line-tools.ts +15 -4
- package/server/services/workshop/agents/industrial/ops-tools.ts +32 -6
- package/server/services/workshop/agents/industrial/optimization-tools.ts +28 -4
- package/server/services/workshop/agents/industrial/recipe-propose-tools.ts +26 -3
- package/server/services/workshop/agents/omp-agent/client.ts +2 -4
- package/server/services/workshop/agents/omp-agent/core.ts +3 -0
- package/server/services/workshop/agents/omp-agent/lifecycle.ts +70 -4
- package/server/services/workshop/agents/omp-agent/supervision-decision.ts +3 -1
- package/server/services/workshop/agents/omp-agent/tools-steer.ts +113 -32
- package/server/services/workshop/agents/tool-approvals.ts +113 -29
- package/server/services/workshop/agents/tool-classes.ts +72 -56
- package/server/services/workshop/db/database/open.ts +5 -2
- package/server/services/workshop/db/database/schema.ts +1 -0
- package/server/services/workshop/db/database/seed.ts +2 -2
- package/server/services/workshop/db/message.repo.ts +134 -26
- package/server/services/workshop/db/project-kernel.repo.ts +3 -3
- package/server/services/workshop/db/schema.sql +3 -1
- package/server/services/workshop/db/task.repo.ts +101 -0
- package/server/services/workshop/dcw/dcw-controller/actuation.ts +120 -9
- package/server/services/workshop/dcw/dcw-controller/contracts.ts +18 -16
- package/server/services/workshop/dcw/dcw-controller/crud.ts +23 -0
- package/server/services/workshop/dcw/dcw-controller/lines.ts +34 -2
- package/server/services/workshop/dcw/dcw-controller/recipes.ts +80 -6
- package/server/services/workshop/dcw/dcw-controller/state.ts +89 -88
- package/server/services/workshop/dcw/dcw-controller/types.ts +5 -0
- package/server/services/workshop/dcw/dcw-controller/write.ts +9 -6
- package/server/services/workshop/dcw/dcw-line.repo.ts +2 -0
- package/server/services/workshop/dcw/dcw-node.repo.ts +3 -1
- package/server/services/workshop/dcw/dcw-node.ts +346 -307
- package/server/services/workshop/dcw/dcw-runtime.ts +8 -4
- package/server/services/workshop/projects/effects.ts +47 -29
- package/server/services/workshop/projects/kernel.ts +8 -1
- package/server/services/workshop/projects/legacy-recovery.ts +36 -0
- package/server/services/workshop/projects/service.ts +15 -0
- package/server/services/workshop/runtime/agent-runtime/contracts.ts +1 -1
- package/server/services/workshop/runtime/agent-runtime/lifecycle.ts +7 -2
- package/server/services/workshop/runtime/agent-runtime/message-watchdog.ts +40 -0
- package/server/services/workshop/runtime/agent-runtime/message.ts +151 -21
- package/server/services/workshop/runtime/agent-runtime/state.ts +69 -13
- package/server/services/workshop/runtime/agent-runtime/supervise.ts +219 -42
- package/server/services/workshop/runtime/agent-runtime/types.ts +6 -0
- package/server/services/workshop/runtime/mailbox.ts +112 -21
- package/server/services/workshop/runtime/manager/admin-channel.ts +34 -22
- package/server/services/workshop/runtime/manager/host-tools.ts +18 -5
- package/server/services/workshop/runtime/manager/runtime-wiring.ts +101 -41
- package/server/services/workshop/runtime/manager/schedules.ts +3 -1
- package/server/services/workshop/runtime/manager/tasks.ts +41 -0
- package/server/services/workshop/runtime/memory/recall.ts +11 -4
- package/server/services/workshop/runtime/memory/types.ts +2 -0
- package/server/services/workshop/runtime/scheduler-loop/contracts.ts +29 -29
- package/server/services/workshop/runtime/scheduler-loop/execute.ts +7 -0
- package/server/services/workshop/runtime/scheduler-loop/rules.ts +3 -0
- package/server/services/workshop/runtime/scheduler-loop/snapshot.ts +10 -2
- package/server/services/workshop/runtime/scheduler-loop/state.ts +12 -0
- package/server/services/workshop/runtime/scheduler-loop/tick.ts +54 -5
- package/server/services/workshop/runtime/task-engine/create.ts +16 -0
- package/server/services/workshop/runtime/task-engine/helpers.ts +5 -0
- package/server/services/workshop/runtime/task-engine/legacy-recovery.ts +149 -0
- package/server/services/workshop/runtime/task-engine/lifecycle.ts +38 -1
- package/server/services/workshop/runtime/task-engine/transition.ts +4 -0
- package/server/services/workshop/runtime/task-engine/update.ts +6 -0
- package/server/services/workshop/runtime/task-engine/views.ts +61 -0
- package/server/services/workshop/tools/policy.ts +16 -1
- package/shared/dcw-protocol/line.ts +4 -0
- package/.output/public/_nuxt/C8QlHux5.js +0 -1
- package/.output/public/_nuxt/_id_.0EnzA0aA.css +0 -1
- package/.output/public/_nuxt/builds/meta/846b9c03-1442-4fcb-b3fc-1d9484eaa41b.json +0 -1
- package/.output/server/chunks/build/_id_-C0vNEbts.mjs.map +0 -1
|
@@ -1,307 +1,346 @@
|
|
|
1
|
-
import { maskDriverConfigSecrets } from '../../../../shared/daq-protocol'
|
|
2
|
-
/**
|
|
3
|
-
* DcwNode —— 数据写控制节点领域对象(与 DaqNode 对称)。
|
|
4
|
-
*
|
|
5
|
-
* 一个实例 = 一条工艺参数写通道:模板域(物理含义/单位/工艺安全量程)+ 驱动配置
|
|
6
|
-
* (连接 + 工程量→原始值线性换算,系统封装)+ 绑定关系 + 写状态(value/lastAckAt/
|
|
7
|
-
* writeState)。用户只操作工程量;PLC 原始值的换算/回读校验由运行时完成。
|
|
8
|
-
* 序列化经 toRow/fromRow 对接持久化仓库(dcws.json)。
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { dcwKeyFromRef, type DcwDriverKind, type DcwNodeState, type DcwNodeView, type DataTransform } from '../../../../shared/dcw-protocol'
|
|
12
|
-
import { findDcwTemplate } from './dcw-templates'
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
value
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
readValue
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
unit:
|
|
227
|
-
decimals:
|
|
228
|
-
min:
|
|
229
|
-
max:
|
|
230
|
-
deviceBindingId:
|
|
231
|
-
deviceIds:
|
|
232
|
-
driverConfig:
|
|
233
|
-
transform:
|
|
234
|
-
posX:
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
1
|
+
import { maskDriverConfigSecrets } from '../../../../shared/daq-protocol'
|
|
2
|
+
/**
|
|
3
|
+
* DcwNode —— 数据写控制节点领域对象(与 DaqNode 对称)。
|
|
4
|
+
*
|
|
5
|
+
* 一个实例 = 一条工艺参数写通道:模板域(物理含义/单位/工艺安全量程)+ 驱动配置
|
|
6
|
+
* (连接 + 工程量→原始值线性换算,系统封装)+ 绑定关系 + 写状态(value/lastAckAt/
|
|
7
|
+
* writeState)。用户只操作工程量;PLC 原始值的换算/回读校验由运行时完成。
|
|
8
|
+
* 序列化经 toRow/fromRow 对接持久化仓库(dcws.json)。
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { dcwKeyFromRef, type DcwDriverKind, type DcwNodeState, type DcwNodeView, type DataTransform } from '../../../../shared/dcw-protocol'
|
|
12
|
+
import { findDcwTemplate } from './dcw-templates'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* transport-ack 节点的保写观测证实声明(与 V3 验收 ACK 口径同源):
|
|
16
|
+
* 写被 broker 受理后,以独立 DAQ 观测节点跟随到目标值作为「设备侧生效」证据,
|
|
17
|
+
* 证实通过才解除保写安全锁(holdBlocked)。无此声明的 transport-ack 节点保写
|
|
18
|
+
* 保持挂起并显式提示 —— 链路受理本身不是设备生效证据。
|
|
19
|
+
*/
|
|
20
|
+
export interface DcwHoldObserve {
|
|
21
|
+
/** 独立观测 DAQ 节点 id(物理量跟随证据源) */
|
|
22
|
+
daqId: string
|
|
23
|
+
/** 观测跟随容差(工程量;缺省 max(0.5, |目标|×2%),与 V3 观测口径一致) */
|
|
24
|
+
tolerance?: number
|
|
25
|
+
/** 观测证实超时 ms(缺省 45000;超时保写保持挂起并提示) */
|
|
26
|
+
timeoutMs?: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface DcwNodeOptions {
|
|
30
|
+
id: string
|
|
31
|
+
templateRef: string
|
|
32
|
+
name?: string
|
|
33
|
+
driver?: DcwDriverKind
|
|
34
|
+
enabled?: boolean
|
|
35
|
+
/** 保写周期 ms(心跳重下发;null = 仅手动下发) */
|
|
36
|
+
holdIntervalMs?: number | null
|
|
37
|
+
/** transport-ack 写的观测证实声明(缺省 null = 链路受理不构成保写解除证据) */
|
|
38
|
+
holdObserve?: DcwHoldObserve | null
|
|
39
|
+
unit?: string
|
|
40
|
+
decimals?: number
|
|
41
|
+
min?: number
|
|
42
|
+
max?: number
|
|
43
|
+
deviceBindingId?: string | null
|
|
44
|
+
/** 多对多绑定(权威):deviceIds 去重列表 */
|
|
45
|
+
deviceIds?: string[]
|
|
46
|
+
driverConfig?: Record<string, string | number | boolean>
|
|
47
|
+
/** 数据语义标定钩子(encode:物理值 → PLC 设定值;回读经 decoder 校验) */
|
|
48
|
+
transform?: DataTransform
|
|
49
|
+
posX?: number
|
|
50
|
+
posZ?: number
|
|
51
|
+
/** 所属产线('' = 未分配) */
|
|
52
|
+
lineId?: string
|
|
53
|
+
/** 节点级工艺语义备注(覆盖模板 semantics;注入 Agent 上下文) */
|
|
54
|
+
semantics?: string
|
|
55
|
+
/** 周期读间隔 ms(null = 走网关默认;0 = 关闭周期读,仅手动读取) */
|
|
56
|
+
readIntervalMs?: number | null
|
|
57
|
+
/** 写入保持窗秒数(写成功后节点锁定该时长,防参数震荡;0 = 不锁;默认 60) */
|
|
58
|
+
writeLockSeconds?: number
|
|
59
|
+
/** 单次控制步长上限(工程量;undefined 采用量程 2% 默认值;null 显式关闭) */
|
|
60
|
+
stepLimit?: number | null
|
|
61
|
+
createdAt?: string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function normalizeStepLimit(value: number | null): number | null {
|
|
65
|
+
if (value == null) return null
|
|
66
|
+
const n = Number(value)
|
|
67
|
+
if (!Number.isFinite(n) || n <= 0) return null
|
|
68
|
+
return n
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** 快照恢复守卫:形态不合法的 holdObserve 一律按 null(未声明)处理,fail-safe。 */
|
|
72
|
+
function isDcwHoldObserve(value: unknown): value is DcwHoldObserve {
|
|
73
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) return false
|
|
74
|
+
const o = value as Record<string, unknown>
|
|
75
|
+
if (typeof o.daqId !== 'string' || !/^[A-Za-z0-9_-]+$/.test(o.daqId)) return false
|
|
76
|
+
if (o.tolerance !== undefined && (!Number.isFinite(Number(o.tolerance)) || Number(o.tolerance) <= 0)) return false
|
|
77
|
+
if (o.timeoutMs !== undefined && (!Number.isFinite(Number(o.timeoutMs)) || Number(o.timeoutMs) < 250 || Number(o.timeoutMs) > 600_000)) return false
|
|
78
|
+
return true
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export class DcwNode {
|
|
82
|
+
readonly id: string
|
|
83
|
+
templateRef: string
|
|
84
|
+
name: string
|
|
85
|
+
driver: DcwDriverKind
|
|
86
|
+
enabled: boolean
|
|
87
|
+
holdIntervalMs: number | null
|
|
88
|
+
/** transport-ack 保写观测证实声明(null = 链路受理不构成保写解除证据) */
|
|
89
|
+
holdObserve: DcwHoldObserve | null
|
|
90
|
+
unit: string
|
|
91
|
+
decimals: number
|
|
92
|
+
min: number
|
|
93
|
+
max: number
|
|
94
|
+
deviceBindingId: string | null
|
|
95
|
+
/** 多对多设备绑定(权威字段;去重有序) */
|
|
96
|
+
deviceIds: string[]
|
|
97
|
+
driverConfig: Record<string, string | number | boolean>
|
|
98
|
+
transform?: DataTransform
|
|
99
|
+
posX?: number
|
|
100
|
+
posZ?: number
|
|
101
|
+
/** 当前设定值(工程量;null = 从未下发) */
|
|
102
|
+
value: number | null = null
|
|
103
|
+
/** Hold is blocked until a later write is confirmed by physical readback. */
|
|
104
|
+
holdBlocked = false
|
|
105
|
+
/** PLC 当前读数(工程量物理值;null = 从未读到或驱动不支持读) */
|
|
106
|
+
readValue: number | null = null
|
|
107
|
+
lastReadAt: string | null = null
|
|
108
|
+
lastReadError: string | null = null
|
|
109
|
+
/** 周期读间隔 ms(null = 走网关默认;0 = 仅手动读取) */
|
|
110
|
+
readIntervalMs: number | null = null
|
|
111
|
+
/** 写入保持窗秒数(写成功后锁定;防参数频繁修改震荡;0 = 不锁) */
|
|
112
|
+
writeLockSeconds = 30
|
|
113
|
+
/** 单次控制步长上限(工程量);探索阶段必须有有限值 */
|
|
114
|
+
stepLimit: number | null
|
|
115
|
+
lastAckAt: string | null = null
|
|
116
|
+
/** 最近一次**成功**下发(设备已证实/受理)的时刻;失败写不更新 */
|
|
117
|
+
lastWriteAt: string | null = null
|
|
118
|
+
/**
|
|
119
|
+
* 最近一次**值发生变化**的成功下发时刻。
|
|
120
|
+
* 60s 在线写间隔以此为准:保写心跳(holdIntervalMs)按周期重发同一设定值,
|
|
121
|
+
* 若它刷新间隔基准,会让 Agent/试验计划的写入永远差 60s(实测活锁)。
|
|
122
|
+
*/
|
|
123
|
+
lastChangeAt: string | null = null
|
|
124
|
+
/** 最近一次写**尝试**的时刻(含失败);仅用于诊断/失败冷却,不参与 60s 成功间隔 */
|
|
125
|
+
lastAttemptAt: string | null = null
|
|
126
|
+
state: DcwNodeState = 'idle'
|
|
127
|
+
/** 所属产线('' = 未分配;采集门控/写联锁/场景光晕按产线隔离) */
|
|
128
|
+
lineId = ''
|
|
129
|
+
/** 节点级工艺语义备注(覆盖模板 semantics) */
|
|
130
|
+
semantics?: string
|
|
131
|
+
lastError: string | null = null
|
|
132
|
+
readonly createdAt: string
|
|
133
|
+
|
|
134
|
+
constructor(o: DcwNodeOptions) {
|
|
135
|
+
const tpl = findDcwTemplate(dcwKeyFromRef(o.templateRef))
|
|
136
|
+
this.id = o.id
|
|
137
|
+
this.templateRef = o.templateRef
|
|
138
|
+
this.name = o.name ?? (tpl ? `${tpl.name}` : '控制节点')
|
|
139
|
+
this.driver = o.driver ?? 'mock'
|
|
140
|
+
this.enabled = o.enabled ?? true
|
|
141
|
+
this.holdIntervalMs = o.holdIntervalMs ?? null
|
|
142
|
+
this.holdObserve = o.holdObserve ?? null
|
|
143
|
+
this.unit = o.unit ?? tpl?.unit ?? ''
|
|
144
|
+
this.decimals = o.decimals ?? tpl?.decimals ?? 2
|
|
145
|
+
this.min = o.min ?? tpl?.min ?? 0
|
|
146
|
+
this.max = o.max ?? tpl?.max ?? 100
|
|
147
|
+
const legacyD = o.deviceBindingId ?? null
|
|
148
|
+
this.deviceIds = [...new Set([...(o.deviceIds ?? []), ...(legacyD ? [legacyD] : [])])].filter(Boolean)
|
|
149
|
+
this.deviceBindingId = this.deviceIds[0] ?? legacyD ?? null
|
|
150
|
+
this.driverConfig = o.driverConfig ?? {}
|
|
151
|
+
if (o.transform) this.transform = o.transform
|
|
152
|
+
if (o.posX !== undefined) this.posX = o.posX
|
|
153
|
+
if (o.posZ !== undefined) this.posZ = o.posZ
|
|
154
|
+
this.lineId = o.lineId ?? ''
|
|
155
|
+
this.semantics = o.semantics
|
|
156
|
+
this.readIntervalMs = o.readIntervalMs ?? null
|
|
157
|
+
this.writeLockSeconds = Math.max(0, Math.min(3600, Math.round(o.writeLockSeconds ?? 60)))
|
|
158
|
+
const fallbackStep = Math.max(10 ** -this.decimals, (this.max - this.min) * 0.02)
|
|
159
|
+
this.stepLimit = o.stepLimit === undefined ? Number(fallbackStep.toFixed(this.decimals)) : normalizeStepLimit(o.stepLimit)
|
|
160
|
+
this.createdAt = o.createdAt ?? new Date().toISOString()
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
get templateKey(): string {
|
|
164
|
+
return dcwKeyFromRef(this.templateRef)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** 写入值工艺安全校验(越界即拒绝;返回错误消息或 null) */
|
|
168
|
+
validateEng(v: number): string | null {
|
|
169
|
+
if (!Number.isFinite(v)) return '设定值需为数字'
|
|
170
|
+
if (v < this.min || v > this.max) {
|
|
171
|
+
return `设定值 ${v}${this.unit} 越出工艺安全量程 [${this.min}, ${this.max}] ${this.unit}`
|
|
172
|
+
}
|
|
173
|
+
return null
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** 记录一次写 ACK(成功)/失败。
|
|
177
|
+
* P0-1 失败写不占位:value 只承载「设备确认过的值」(成功取回读,缺失回退指令值)。
|
|
178
|
+
* 此前失败写把从未被 PLC 接受的指令值占进 value —— 保写心跳按 value 周期重下发,
|
|
179
|
+
* 会把幻影指令值反复写向设备(10-07 事故放大器);同时污染步长基准与回退账本 prevValue。 */
|
|
180
|
+
applyWriteResult(eng: number, ok: boolean, message: string, at: string): void {
|
|
181
|
+
// 尝试时间恒更新;成功时间只在设备证实/受理时更新 ——
|
|
182
|
+
// 失败写不再占用 60s 成功间隔(现场瞬断恢复后可立即重试),失败冷却另由
|
|
183
|
+
// write.ts 用 lastAttemptAt 做 5s 防轰炸。
|
|
184
|
+
this.lastAttemptAt = at
|
|
185
|
+
if (ok) {
|
|
186
|
+
const prev = this.value
|
|
187
|
+
this.lastWriteAt = at
|
|
188
|
+
this.value = Number(eng.toFixed(this.decimals))
|
|
189
|
+
// 只有真正改变设定值才推进 60s 间隔基准(同值保活写不算)
|
|
190
|
+
if (prev == null || Math.abs(Number(prev) - this.value) > 1e-9) this.lastChangeAt = at
|
|
191
|
+
this.lastAckAt = at
|
|
192
|
+
this.state = 'ok'
|
|
193
|
+
this.lastError = null
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
this.state = 'error'
|
|
197
|
+
this.lastError = message
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** 记录一次读数(成功回填物理值;失败仅记原因,旧读数保留供展示) */
|
|
202
|
+
applyReadResult(eng: number | null, raw: number | null, ok: boolean, message: string, at: string): void {
|
|
203
|
+
this.lastReadAt = at
|
|
204
|
+
if (ok && eng != null) {
|
|
205
|
+
this.readValue = Number(eng.toFixed(this.decimals))
|
|
206
|
+
this.lastReadError = null
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
this.lastReadError = message
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
toRow(): Record<string, unknown> {
|
|
214
|
+
return {
|
|
215
|
+
id: this.id,
|
|
216
|
+
templateRef: this.templateRef,
|
|
217
|
+
name: this.name,
|
|
218
|
+
driver: this.driver,
|
|
219
|
+
enabled: this.enabled,
|
|
220
|
+
holdIntervalMs: this.holdIntervalMs,
|
|
221
|
+
holdObserve: this.holdObserve,
|
|
222
|
+
holdBlocked: this.holdBlocked,
|
|
223
|
+
readIntervalMs: this.readIntervalMs,
|
|
224
|
+
writeLockSeconds: this.writeLockSeconds,
|
|
225
|
+
stepLimit: this.stepLimit,
|
|
226
|
+
unit: this.unit,
|
|
227
|
+
decimals: this.decimals,
|
|
228
|
+
min: this.min,
|
|
229
|
+
max: this.max,
|
|
230
|
+
deviceBindingId: this.deviceBindingId,
|
|
231
|
+
deviceIds: this.deviceIds,
|
|
232
|
+
driverConfig: this.driverConfig,
|
|
233
|
+
transform: this.transform,
|
|
234
|
+
posX: this.posX,
|
|
235
|
+
posZ: this.posZ,
|
|
236
|
+
lineId: this.lineId,
|
|
237
|
+
semantics: this.semantics,
|
|
238
|
+
value: this.value,
|
|
239
|
+
readValue: this.readValue,
|
|
240
|
+
lastReadAt: this.lastReadAt,
|
|
241
|
+
lastReadError: this.lastReadError,
|
|
242
|
+
lastAckAt: this.lastAckAt,
|
|
243
|
+
lastWriteAt: this.lastWriteAt,
|
|
244
|
+
lastChangeAt: this.lastChangeAt,
|
|
245
|
+
lastAttemptAt: this.lastAttemptAt,
|
|
246
|
+
state: this.state,
|
|
247
|
+
lastError: this.lastError,
|
|
248
|
+
createdAt: this.createdAt,
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
static fromRow(row: Record<string, unknown>): DcwNode {
|
|
253
|
+
const node = new DcwNode({
|
|
254
|
+
id: String(row.id),
|
|
255
|
+
templateRef: String(row.templateRef ?? ''),
|
|
256
|
+
name: row.name != null ? String(row.name) : undefined,
|
|
257
|
+
driver: (row.driver as DcwDriverKind) ?? undefined,
|
|
258
|
+
enabled: row.enabled === undefined ? undefined : Boolean(row.enabled),
|
|
259
|
+
holdIntervalMs: row.holdIntervalMs == null ? null : Number(row.holdIntervalMs),
|
|
260
|
+
holdObserve: isDcwHoldObserve(row.holdObserve) ? row.holdObserve : null,
|
|
261
|
+
unit: row.unit != null ? String(row.unit) : undefined,
|
|
262
|
+
decimals: row.decimals != null ? Number(row.decimals) : undefined,
|
|
263
|
+
min: row.min != null ? Number(row.min) : undefined,
|
|
264
|
+
max: row.max != null ? Number(row.max) : undefined,
|
|
265
|
+
deviceBindingId: row.deviceBindingId === undefined ? undefined : (row.deviceBindingId == null ? null : String(row.deviceBindingId)),
|
|
266
|
+
deviceIds: Array.isArray(row.deviceIds) ? row.deviceIds.map(String).filter(Boolean) : undefined,
|
|
267
|
+
driverConfig: (row.driverConfig as Record<string, string | number | boolean>) ?? {},
|
|
268
|
+
transform: (row.transform as DataTransform | undefined) ?? undefined,
|
|
269
|
+
posX: row.posX == null ? undefined : Number(row.posX),
|
|
270
|
+
lineId: row.lineId == null ? '' : String(row.lineId),
|
|
271
|
+
semantics: row.semantics == null ? undefined : String(row.semantics),
|
|
272
|
+
readIntervalMs: row.readIntervalMs == null ? null : Number(row.readIntervalMs),
|
|
273
|
+
writeLockSeconds: row.writeLockSeconds == null ? undefined : Number(row.writeLockSeconds),
|
|
274
|
+
stepLimit: row.stepLimit === undefined ? undefined : (row.stepLimit == null ? null : Number(row.stepLimit)),
|
|
275
|
+
posZ: row.posZ == null ? undefined : Number(row.posZ),
|
|
276
|
+
createdAt: row.createdAt != null ? String(row.createdAt) : undefined,
|
|
277
|
+
})
|
|
278
|
+
node.holdBlocked = row.holdBlocked === true
|
|
279
|
+
if (row.value != null && !Number.isNaN(Number(row.value))) node.value = Number(row.value)
|
|
280
|
+
if (row.readValue != null && !Number.isNaN(Number(row.readValue))) node.readValue = Number(row.readValue)
|
|
281
|
+
if (row.lastReadAt != null) node.lastReadAt = String(row.lastReadAt)
|
|
282
|
+
if (row.lastReadError != null) node.lastReadError = String(row.lastReadError)
|
|
283
|
+
if (row.lastAckAt != null) node.lastAckAt = String(row.lastAckAt)
|
|
284
|
+
if (row.lastWriteAt != null) node.lastWriteAt = String(row.lastWriteAt)
|
|
285
|
+
if (row.lastChangeAt != null) node.lastChangeAt = String(row.lastChangeAt)
|
|
286
|
+
if (row.lastAttemptAt != null) node.lastAttemptAt = String(row.lastAttemptAt)
|
|
287
|
+
// 旧快照兼容:历史 lastWriteAt 是「尝试时间」语义,补一份到 lastAttemptAt
|
|
288
|
+
else if (row.lastWriteAt != null) node.lastAttemptAt = String(row.lastWriteAt)
|
|
289
|
+
if (row.state != null) {
|
|
290
|
+
const restored = String(row.state)
|
|
291
|
+
// 持久化恢复消毒:'writing' 是进程内瞬态(写事务在飞)。若被快照带出后进程
|
|
292
|
+
// 硬杀重启,原样恢复会让该节点所有写永久 409(startAll 只复位 offline)。
|
|
293
|
+
// 归一为 error:写路径放行,同时显式提示"上次写入结果未知,需核销"。
|
|
294
|
+
if (restored === 'writing') {
|
|
295
|
+
node.holdBlocked = true
|
|
296
|
+
node.state = 'error'
|
|
297
|
+
node.lastError = node.lastError || '进程中断于写入,状态已复位为 error(上次写入结果未知,请回读核销)'
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
node.state = restored as DcwNodeState
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (row.lastError != null) node.lastError = String(row.lastError)
|
|
304
|
+
return node
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
toView(): DcwNodeView {
|
|
308
|
+
return {
|
|
309
|
+
id: this.id,
|
|
310
|
+
templateRef: this.templateRef,
|
|
311
|
+
name: this.name,
|
|
312
|
+
driver: this.driver,
|
|
313
|
+
enabled: this.enabled,
|
|
314
|
+
holdIntervalMs: this.holdIntervalMs,
|
|
315
|
+
holdBlocked: this.holdBlocked,
|
|
316
|
+
holdObserve: this.holdObserve,
|
|
317
|
+
unit: this.unit,
|
|
318
|
+
decimals: this.decimals,
|
|
319
|
+
min: this.min,
|
|
320
|
+
max: this.max,
|
|
321
|
+
deviceBindingId: this.deviceBindingId,
|
|
322
|
+
deviceIds: this.deviceIds,
|
|
323
|
+
// 凭据脱敏(同 daq 侧 toView;toRow 持久化不掩码)
|
|
324
|
+
driverConfig: maskDriverConfigSecrets(this.driverConfig),
|
|
325
|
+
transform: this.transform,
|
|
326
|
+
posX: this.posX,
|
|
327
|
+
posZ: this.posZ,
|
|
328
|
+
lineId: this.lineId,
|
|
329
|
+
semantics: this.semantics,
|
|
330
|
+
value: this.value,
|
|
331
|
+
readValue: this.readValue,
|
|
332
|
+
lastReadAt: this.lastReadAt,
|
|
333
|
+
lastReadError: this.lastReadError,
|
|
334
|
+
readIntervalMs: this.readIntervalMs,
|
|
335
|
+
writeLockSeconds: this.writeLockSeconds,
|
|
336
|
+
stepLimit: this.stepLimit,
|
|
337
|
+
lastAckAt: this.lastAckAt,
|
|
338
|
+
lastWriteAt: this.lastWriteAt,
|
|
339
|
+
lastChangeAt: this.lastChangeAt,
|
|
340
|
+
lastAttemptAt: this.lastAttemptAt,
|
|
341
|
+
state: this.state,
|
|
342
|
+
lastError: this.lastError,
|
|
343
|
+
createdAt: this.createdAt,
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|