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
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { AppError, ErrorCodes } from '../../../utils/errors'
|
|
10
10
|
import type { DcwNode } from './dcw-node'
|
|
11
11
|
import { assertWithinLimits } from './param-limits'
|
|
12
|
+
import type { ExecutionScope } from '../agents/execution-scope'
|
|
12
13
|
|
|
13
14
|
/** 回读死区容差:max(0.5×10^-小数位, 量程 0.5%) */
|
|
14
15
|
export function writeTolerance(node: DcwNode): number {
|
|
@@ -22,6 +23,8 @@ export interface DcwWriteOutcome {
|
|
|
22
23
|
readback: number | null
|
|
23
24
|
/** 写 ACK 鉴定等级(2026-10-08):设备证实 / 仅链路受理 / 未证实(网关归一后必有) */
|
|
24
25
|
ack?: 'readback-verified' | 'transport-ack' | 'unverified'
|
|
26
|
+
/** Actual driver response when the task lease expired while the write was in flight. */
|
|
27
|
+
driverOutcome?: { ok: boolean, message: string, raw: number | null, readback: number | null, ack?: 'readback-verified' | 'transport-ack' | 'unverified' }
|
|
25
28
|
/** 调控闭环:本次写产生的参数锚(入册成功时) */
|
|
26
29
|
anchorId?: string
|
|
27
30
|
/** 调控闭环:Agent/回退路径开出的优化记录 id(manual/recipe 路径无) */
|
|
@@ -34,7 +37,7 @@ export interface DcwRuntimeHost {
|
|
|
34
37
|
/** 产线活动判定(P0-1 保写产线门):绑定产线在跑(有活动批次窗口)才允许保写心跳 */
|
|
35
38
|
lineActive(lineId: string): boolean
|
|
36
39
|
/** 网关执行写命令(驱动写 + ACK 记账 + 写历史 + WS 广播) */
|
|
37
|
-
executeWrite(node: DcwNode, eng: number, tolerance: number, recipeRunId: string | null): Promise<DcwWriteOutcome>
|
|
40
|
+
executeWrite(node: DcwNode, eng: number, tolerance: number, recipeRunId: string | null, executionScope?: ExecutionScope, onDriverStart?: () => void): Promise<DcwWriteOutcome>
|
|
38
41
|
/** 网关执行读数(驱动读 + 读状态记账 + WS 广播;返回物理值) */
|
|
39
42
|
executeRead(node: DcwNode): Promise<{ ok: boolean, value: number | null, raw: number | null, message: string, at: string }>
|
|
40
43
|
}
|
|
@@ -71,7 +74,8 @@ export class DcwNodeRuntime {
|
|
|
71
74
|
* 用户/Recipe 设定值(核心写命令入口)。
|
|
72
75
|
* 工艺安全量程硬校验(越界拒绝)+ 在飞互斥(同一通道同时只允许一个写事务)。
|
|
73
76
|
*/
|
|
74
|
-
async write(eng: number, recipeRunId: string | null = null, toleranceOverride?: number): Promise<DcwWriteOutcome> {
|
|
77
|
+
async write(eng: number, recipeRunId: string | null = null, toleranceOverride?: number, executionScope?: ExecutionScope, onDriverStart?: () => void): Promise<DcwWriteOutcome> {
|
|
78
|
+
executionScope?.assertActive()
|
|
75
79
|
const node = this.node
|
|
76
80
|
const invalid = node.validateEng(eng)
|
|
77
81
|
if (invalid) throw new AppError(400, ErrorCodes.VALIDATION_ERROR, invalid)
|
|
@@ -84,7 +88,7 @@ export class DcwNodeRuntime {
|
|
|
84
88
|
node.lastAttemptAt = new Date().toISOString()
|
|
85
89
|
try {
|
|
86
90
|
// D8 基准消融:no-readback/ungated 臂由 write() 传入 MAX 容差 → 回读差异不再致败(假成功语义)
|
|
87
|
-
return await this.host.executeWrite(node, eng, toleranceOverride ?? writeTolerance(node), recipeRunId)
|
|
91
|
+
return await this.host.executeWrite(node, eng, toleranceOverride ?? writeTolerance(node), recipeRunId, executionScope, onDriverStart)
|
|
88
92
|
}
|
|
89
93
|
catch (err) {
|
|
90
94
|
// 执行链抛错(异常不流向 outcome):状态机必须离开 writing,否则通道永久 409
|
|
@@ -107,7 +111,7 @@ export class DcwNodeRuntime {
|
|
|
107
111
|
// writing 互斥,心跳可与用户下发并发落到同一通道:驱动层交错、后到者覆盖先到者,
|
|
108
112
|
// 且 dcw-controller 的 prevValue 采样跨 await,会把过期值记进回滚账本导致回滚点错位。
|
|
109
113
|
// 语义:写冲突时心跳**跳过本拍**(不排队、不补发),下一拍自然重试 —— 保写是幂等重下发。
|
|
110
|
-
if (!this.writing && node.enabled && node.value != null && node.state !== 'writing') {
|
|
114
|
+
if (!this.writing && node.enabled && !node.holdBlocked && node.value != null && node.state !== 'writing') {
|
|
111
115
|
const hold = node.holdIntervalMs ?? this.host.defaults().holdIntervalMs
|
|
112
116
|
// P0-1 保写产线门:绑定产线的节点仅在产线活动(有运行批次窗口)时保写,停线即挂起,
|
|
113
117
|
// 开线后下一拍自然恢复(10-07 事故根因④:停线不挂起心跳,残留节点持续直写)。
|
|
@@ -14,6 +14,8 @@ export interface EffectsOutboxOptions {
|
|
|
14
14
|
maxAttempts?: number
|
|
15
15
|
baseBackoffMs?: number
|
|
16
16
|
maxBackoffMs?: number
|
|
17
|
+
/** Exclude effects before claim; held effects must retain their attempt budget. */
|
|
18
|
+
canRun?: (effect: ProjectEffectRow) => boolean
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export interface DrainResult {
|
|
@@ -43,39 +45,55 @@ export function createEffectsOutbox(
|
|
|
43
45
|
*/
|
|
44
46
|
async drain(limit = 20): Promise<DrainResult> {
|
|
45
47
|
const nowIso = iso(nowMs())
|
|
46
|
-
const due = kernel.effects.due(nowIso, limit)
|
|
47
48
|
const result: DrainResult = { done: 0, retried: 0, dead: 0, escalated: [] }
|
|
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
|
-
if (esc.inserted) result.escalated.push({ effectId: effect.id, dedupeKey: esc.id })
|
|
49
|
+
let offset = 0
|
|
50
|
+
let processed = 0
|
|
51
|
+
while (processed < limit) {
|
|
52
|
+
const due = kernel.effects.due(nowIso, limit, offset)
|
|
53
|
+
if (due.length === 0) break
|
|
54
|
+
for (const effect of due) {
|
|
55
|
+
let allowed: boolean
|
|
56
|
+
try {
|
|
57
|
+
allowed = options.canRun?.(effect) ?? true
|
|
58
|
+
}
|
|
59
|
+
catch { allowed = false }
|
|
60
|
+
if (!allowed) {
|
|
61
|
+
offset += 1
|
|
62
|
+
continue
|
|
63
|
+
}
|
|
64
|
+
if (!kernel.effects.claim(effect.id)) continue
|
|
65
|
+
processed += 1
|
|
66
|
+
let handler: EffectHandler | undefined
|
|
67
|
+
try {
|
|
68
|
+
handler = handlers[effect.kind]
|
|
69
|
+
if (!handler) throw new Error(`unknown effect kind: ${effect.kind}`)
|
|
70
|
+
await handler(effect, JSON.parse(effect.payloadJson || '{}') as Record<string, unknown>)
|
|
71
|
+
kernel.effects.markDone(effect.id)
|
|
72
|
+
result.done += 1
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
catch (err) {
|
|
75
|
+
const message = err instanceof Error ? err.message : String(err)
|
|
76
|
+
const attempts = kernel.effects.findById(effect.id)?.attempts ?? 1
|
|
77
|
+
if (attempts >= maxAttempts) {
|
|
78
|
+
kernel.effects.markDead(effect.id, message)
|
|
79
|
+
result.dead += 1
|
|
80
|
+
const esc = kernel.effects.enqueue({
|
|
81
|
+
projectId: effect.projectId,
|
|
82
|
+
dedupeKey: `escalate:${effect.id}`,
|
|
83
|
+
kind: 'notify',
|
|
84
|
+
payload: { title: '项目副作用最终失败', effectId: effect.id, kind: effect.kind, error: message },
|
|
85
|
+
traceId: effect.traceId,
|
|
86
|
+
})
|
|
87
|
+
if (esc.inserted) result.escalated.push({ effectId: effect.id, dedupeKey: esc.id })
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
kernel.effects.markRetry(effect.id, message, iso(nowMs() + backoffMs(attempts)))
|
|
91
|
+
result.retried += 1
|
|
92
|
+
}
|
|
77
93
|
}
|
|
94
|
+
if (processed >= limit) break
|
|
78
95
|
}
|
|
96
|
+
if (due.length < limit) break
|
|
79
97
|
}
|
|
80
98
|
return result
|
|
81
99
|
},
|
|
@@ -14,6 +14,7 @@ import { createEventIngress, type IngressProcessResult } from './event-ingress'
|
|
|
14
14
|
import { createEffectsOutbox, type DrainResult } from './effects'
|
|
15
15
|
import { createProjectWatchdog, type WatchdogFinding } from './watchdog'
|
|
16
16
|
import type { ProjectService } from './service'
|
|
17
|
+
import { assertProjectRecoveryClear } from './legacy-recovery'
|
|
17
18
|
|
|
18
19
|
export interface ProjectKernelOptions {
|
|
19
20
|
tickMs?: number
|
|
@@ -110,7 +111,10 @@ export function initProjectKernel(deps: ProjectKernelDeps, options: ProjectKerne
|
|
|
110
111
|
const detail = String(payload.detail ?? payload.error ?? '')
|
|
111
112
|
await deps.notifyOwner(effect.projectId, title, detail, effect.id)
|
|
112
113
|
},
|
|
113
|
-
}, { nowMs
|
|
114
|
+
}, { nowMs, canRun: (effect) => {
|
|
115
|
+
assertProjectRecoveryClear(db, effect.projectId)
|
|
116
|
+
return true
|
|
117
|
+
} })
|
|
114
118
|
|
|
115
119
|
const activeProjects = () => {
|
|
116
120
|
try {
|
|
@@ -129,6 +133,7 @@ export function initProjectKernel(deps: ProjectKernelDeps, options: ProjectKerne
|
|
|
129
133
|
result.projects = projects.length
|
|
130
134
|
for (const p of projects) {
|
|
131
135
|
try {
|
|
136
|
+
assertProjectRecoveryClear(db, p.id)
|
|
132
137
|
const r = ingress.process(p.id)
|
|
133
138
|
result.ingress.push({ projectId: p.id, ...r })
|
|
134
139
|
// PR20 route 回调主路径:无条件 reconcile(幂等且便宜)+ 立即派发下一批就绪项 ——
|
|
@@ -157,6 +162,7 @@ export function initProjectKernel(deps: ProjectKernelDeps, options: ProjectKerne
|
|
|
157
162
|
if (tickCount % watchdogEveryTicks === 0) {
|
|
158
163
|
for (const p of projects) {
|
|
159
164
|
try {
|
|
165
|
+
assertProjectRecoveryClear(db, p.id)
|
|
160
166
|
const findings = watchdog.scanProject(p.id, p.planVersion)
|
|
161
167
|
result.watchdog.push({ projectId: p.id, findings })
|
|
162
168
|
if (findings.length === 0) watchdog.heartbeat(p.id)
|
|
@@ -170,6 +176,7 @@ export function initProjectKernel(deps: ProjectKernelDeps, options: ProjectKerne
|
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
const processProject = async (projectId: string) => {
|
|
179
|
+
assertProjectRecoveryClear(db, projectId)
|
|
173
180
|
const r = ingress.process(projectId)
|
|
174
181
|
// PR20:无条件 route 闭环(对账 + 自动派发),与 tick 同口径(API 手动触发即可验收)。
|
|
175
182
|
const route = await service.runRouteLoop(projectId)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DatabaseSync } from 'node:sqlite'
|
|
2
|
+
import { AppError } from '../../../utils/errors'
|
|
3
|
+
import { isChannelRecoveryBlocked } from '../runtime/task-engine/legacy-recovery'
|
|
4
|
+
|
|
5
|
+
/** Include the whole task tree, even when legacy descendants lack project metadata. */
|
|
6
|
+
export function projectHasLegacyRecoveryHold(db: DatabaseSync, projectId: string): boolean {
|
|
7
|
+
const rows = db.prepare(`WITH RECURSIVE related(id, channel_id, parent_id, close_reason) AS (
|
|
8
|
+
SELECT t.id, t.channel_id, t.parent_id, t.close_reason FROM tasks t
|
|
9
|
+
WHERE t.project_id = ?
|
|
10
|
+
OR EXISTS (SELECT 1 FROM project_work_items w WHERE w.project_id = ? AND w.id = t.project_work_item_id)
|
|
11
|
+
OR EXISTS (SELECT 1 FROM project_work_item_attempts a WHERE a.project_id = ?
|
|
12
|
+
AND (a.channel_task_id = t.id OR a.source_key = t.source_chat_message_id))
|
|
13
|
+
UNION
|
|
14
|
+
SELECT t.id, t.channel_id, t.parent_id, t.close_reason FROM tasks t
|
|
15
|
+
JOIN related r ON t.channel_id = r.channel_id AND (t.parent_id = r.id OR t.id = r.parent_id)
|
|
16
|
+
) SELECT id, channel_id AS channelId FROM related`).all(projectId, projectId, projectId) as Array<{ id: string, channelId: string }>
|
|
17
|
+
const channelRows = db.prepare(`SELECT id, parent_id AS parentId, root_queue_seq AS rootQueueSeq,
|
|
18
|
+
close_reason AS closeReason FROM tasks WHERE channel_id = ?`)
|
|
19
|
+
type RecoveryRow = { id: string, parentId: string | null, rootQueueSeq: number | null, closeReason: string | null }
|
|
20
|
+
const byChannel = new Map<string, RecoveryRow[]>()
|
|
21
|
+
for (const task of rows) {
|
|
22
|
+
let tasks = byChannel.get(task.channelId)
|
|
23
|
+
if (!tasks) {
|
|
24
|
+
tasks = channelRows.all(task.channelId) as unknown as RecoveryRow[]
|
|
25
|
+
byChannel.set(task.channelId, tasks)
|
|
26
|
+
}
|
|
27
|
+
if (isChannelRecoveryBlocked(task.id, tasks)) return true
|
|
28
|
+
}
|
|
29
|
+
return false
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function assertProjectRecoveryClear(db: DatabaseSync, projectId: string): void {
|
|
33
|
+
if (projectHasLegacyRecoveryHold(db, projectId)) {
|
|
34
|
+
throw new AppError(409, 'LEGACY_EXECUTION_RECOVERY_REQUIRED', `Project ${projectId} contains a task requiring operator investigation`)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -40,6 +40,7 @@ import { canonicalJson } from '../../../../shared/context/hash'
|
|
|
40
40
|
import { parseJson } from '../db/database'
|
|
41
41
|
import { workshopSettings } from '../settings'
|
|
42
42
|
import { resolveDispatchLimits } from './dispatch-limits'
|
|
43
|
+
import { assertProjectRecoveryClear, projectHasLegacyRecoveryHold } from './legacy-recovery'
|
|
43
44
|
import { AppError } from '../../../utils/errors'
|
|
44
45
|
import { argsDigest } from './digest'
|
|
45
46
|
import { PROJECT_GATED_WRITE_TOOL_NAMES } from './tool-surface'
|
|
@@ -583,6 +584,10 @@ export class ProjectService {
|
|
|
583
584
|
* 组合根把它注入 TaskEngine;取消/终止后即使任务已被唤醒也无法开工。
|
|
584
585
|
*/
|
|
585
586
|
isProjectTaskRunnable(projectId: string, taskId: string): boolean {
|
|
587
|
+
try {
|
|
588
|
+
if (projectHasLegacyRecoveryHold(this.db, projectId)) return false
|
|
589
|
+
}
|
|
590
|
+
catch { return false }
|
|
586
591
|
const p = this.projects.findById(projectId)
|
|
587
592
|
if (!p || p.status !== 'active') return false
|
|
588
593
|
const task = this.tasks.findById(taskId)
|
|
@@ -919,6 +924,7 @@ export class ProjectService {
|
|
|
919
924
|
p: ProjectRow,
|
|
920
925
|
opts: { auto: boolean },
|
|
921
926
|
): Promise<ProjectWorkItemRow> {
|
|
927
|
+
assertProjectRecoveryClear(this.db, id)
|
|
922
928
|
if (p.status !== 'active') throw new AppError(409, 'PROJECT_NOT_ACTIVE', `Project 状态 ${p.status} 不能派发`)
|
|
923
929
|
// 审查修复(计划门):要求批准计划的项目,plan 未批前不得派发任何工作项。
|
|
924
930
|
if (p.planApprovalRequired === 1 && p.planVersion === 0) {
|
|
@@ -1001,6 +1007,7 @@ export class ProjectService {
|
|
|
1001
1007
|
if (!instanceChannel || instanceChannel.enabled !== 1 || !instanceChannel.leadAgentId) {
|
|
1002
1008
|
throw new AppError(409, 'TASK_INSTANCE_UNAVAILABLE', `任务实例 Channel 不可用: ${instanceChannelId}`)
|
|
1003
1009
|
}
|
|
1010
|
+
assertProjectRecoveryClear(this.db, id)
|
|
1004
1011
|
const taskSession = this.sessions.listByWorkItem(wi.id).find(s => s.status === 'active')
|
|
1005
1012
|
const attemptNo = this.attempts.listByWorkItem(wi.id).reduce((max, a) => Math.max(max, a.attemptNo), 0) + 1
|
|
1006
1013
|
const sourceKey = `pw:${wi.id}:${attemptNo}`
|
|
@@ -1111,6 +1118,7 @@ export class ProjectService {
|
|
|
1111
1118
|
catch (err) {
|
|
1112
1119
|
const message = err instanceof Error ? err.message : String(err)
|
|
1113
1120
|
const code = (err as { code?: string }).code ?? ''
|
|
1121
|
+
if (code === 'LEGACY_EXECUTION_RECOVERY_REQUIRED') throw err
|
|
1114
1122
|
const errno = (err as { errno?: number }).errno
|
|
1115
1123
|
// H0 派发后栅栏已把本次 attempt/工作项收敛到终态或 DRAFT,不能再走通用
|
|
1116
1124
|
// close/回落逻辑覆盖(否则 CANCELED 会被改回 DRAFT/BLOCKED)。
|
|
@@ -1624,6 +1632,7 @@ export class ProjectService {
|
|
|
1624
1632
|
* 项目完成仍走 owner 审批门 —— 自动派发永不自动完成项目。
|
|
1625
1633
|
*/
|
|
1626
1634
|
private async doAutoDispatch(id: string): Promise<AutoDispatchResult> {
|
|
1635
|
+
assertProjectRecoveryClear(this.db, id)
|
|
1627
1636
|
const out: AutoDispatchResult = { dispatched: [], failed: 0, skippedByGate: false }
|
|
1628
1637
|
const p = this.projects.findById(id)
|
|
1629
1638
|
// mode=observe:只读观察,自动派发一律关闭;owner 仍可逐项手动派发。
|
|
@@ -1657,6 +1666,7 @@ export class ProjectService {
|
|
|
1657
1666
|
}
|
|
1658
1667
|
const systemActor = { id: 'system', role: 'system' } as const
|
|
1659
1668
|
for (const wi of ready) {
|
|
1669
|
+
assertProjectRecoveryClear(this.db, id)
|
|
1660
1670
|
if (projectSlots <= 0 || tickSlots <= 0) break
|
|
1661
1671
|
const dispatchKey = wi.instanceChannelId ?? wi.channelId
|
|
1662
1672
|
if ((channelInFlight.get(dispatchKey) ?? 0) >= limits.perChannel) continue
|
|
@@ -1716,6 +1726,7 @@ export class ProjectService {
|
|
|
1716
1726
|
reconcile: { workItems: ProjectWorkItemRow[], expiredApprovals: number }
|
|
1717
1727
|
autoDispatch: Awaited<ReturnType<ProjectService['autoDispatchProject']>>
|
|
1718
1728
|
}> {
|
|
1729
|
+
assertProjectRecoveryClear(this.db, id)
|
|
1719
1730
|
const currentProject = this.projects.findById(id)
|
|
1720
1731
|
if (!currentProject) throw new AppError(404, 'NOT_FOUND', `Project 不存在: ${id}`)
|
|
1721
1732
|
if (currentProject.status === 'canceled') {
|
|
@@ -1725,6 +1736,7 @@ export class ProjectService {
|
|
|
1725
1736
|
// 任务实例回收:终态工作项的专属 Channel/会话停用(幂等;放在派发前,
|
|
1726
1737
|
// 让下一批任务使用干净实例,也避免终态实例继续占用调度槽位)
|
|
1727
1738
|
await this.releaseTerminalTaskInstances(id)
|
|
1739
|
+
assertProjectRecoveryClear(this.db, id)
|
|
1728
1740
|
const afterRelease = this.projects.findById(id)
|
|
1729
1741
|
if (!afterRelease || afterRelease.status === 'canceled') {
|
|
1730
1742
|
return { reconcile, autoDispatch: { dispatched: [], failed: 0, skippedByGate: true } }
|
|
@@ -1732,6 +1744,7 @@ export class ProjectService {
|
|
|
1732
1744
|
// Router v3 验收闭环:成果 submitted 后主动向 Leader/独立评审 Channel 发 L1 请求,
|
|
1733
1745
|
// 而不是等人工在演示脚本里逐个 @。消息幂等(correlation=review:<resultId>)。
|
|
1734
1746
|
await this.ensureTechnicalReviewRequests(id)
|
|
1747
|
+
assertProjectRecoveryClear(this.db, id)
|
|
1735
1748
|
const afterReview = this.projects.findById(id)
|
|
1736
1749
|
if (!afterReview || afterReview.status === 'canceled') {
|
|
1737
1750
|
return { reconcile, autoDispatch: { dispatched: [], failed: 0, skippedByGate: true } }
|
|
@@ -1757,6 +1770,7 @@ export class ProjectService {
|
|
|
1757
1770
|
const bindings = this.bindings.listByProject(projectId).filter(b => b.status === 'active')
|
|
1758
1771
|
const items = this.workItems.listByProject(projectId)
|
|
1759
1772
|
for (const result of submitted) {
|
|
1773
|
+
assertProjectRecoveryClear(this.db, projectId)
|
|
1760
1774
|
if (this.hasPassingTechnicalReview(result.id, result.version)) continue
|
|
1761
1775
|
// 相关键带 version+updatedAt:同一成果重新提交会生成新的 L1 请求;
|
|
1762
1776
|
// 只认平台发出的 system:review,防止成员伪造 request_review 抑制真实请求。
|
|
@@ -1858,6 +1872,7 @@ export class ProjectService {
|
|
|
1858
1872
|
}
|
|
1859
1873
|
|
|
1860
1874
|
private reconcileWith(id: string, actor: ProjectActor): { workItems: ProjectWorkItemRow[], expiredApprovals: number } {
|
|
1875
|
+
assertProjectRecoveryClear(this.db, id)
|
|
1861
1876
|
const project = this.projects.findById(id)
|
|
1862
1877
|
if (!project) throw new AppError(404, 'NOT_FOUND', `Project 不存在: ${id}`)
|
|
1863
1878
|
// canceled 是不可变终态:晚到的 root 回调/定时对账只能读,不能重新生成 draft、推进工作项或写审计。
|
|
@@ -17,7 +17,7 @@ import type { AgentContextStats, AgentStatusView } from '../../types/task'
|
|
|
17
17
|
export abstract class AgentRuntimeContracts {
|
|
18
18
|
protected abstract consumeLoop(): Promise<void>
|
|
19
19
|
protected abstract maybePostSettle(): void
|
|
20
|
-
protected abstract processMessage(msg: A2AMessage): Promise<void>
|
|
20
|
+
protected abstract processMessage(msg: A2AMessage, claimToken: string): Promise<void>
|
|
21
21
|
/** 状态重广播(由 lifecycle 层实现;supervise/任务突变后同步前端实体) */
|
|
22
22
|
abstract refreshStatus(): void
|
|
23
23
|
protected abstract queueContext(): Pick<AgentStatusView, 'currentTaskId' | 'currentTaskTitle' | 'currentTaskProgress' | 'queuedCount' | 'completedCount' | 'supervision' | 'continuity'> & { context?: AgentContextStats | null }
|
|
@@ -12,7 +12,7 @@ import { sendHitlNote } from '../platform-notice'
|
|
|
12
12
|
export abstract class AgentRuntimeLifecycle extends AgentRuntimeState {
|
|
13
13
|
/** 启动消费循环 */
|
|
14
14
|
start(): void {
|
|
15
|
-
if (this.started) return
|
|
15
|
+
if (this.started || this.state === 'stopped') return
|
|
16
16
|
this.started = true
|
|
17
17
|
this.state = 'idle'
|
|
18
18
|
this.loopPromise = this.consumeLoop()
|
|
@@ -47,7 +47,7 @@ export abstract class AgentRuntimeLifecycle extends AgentRuntimeState {
|
|
|
47
47
|
catch (err) {
|
|
48
48
|
log.error(`[AgentRuntime:${this.agentId}] 挂起审批收敛失败(继续停止):`, err)
|
|
49
49
|
}
|
|
50
|
-
this.
|
|
50
|
+
this.abortCurrent('runtime stop')
|
|
51
51
|
this.deps.mailbox.close()
|
|
52
52
|
// 状态广播:前端经 WS agent.status 实时反映 stopped
|
|
53
53
|
this.deps.bus.notifyAgent({ agentId: this.agentId, state: 'stopped', ...this.queueContext() })
|
|
@@ -62,6 +62,11 @@ export abstract class AgentRuntimeLifecycle extends AgentRuntimeState {
|
|
|
62
62
|
await this.loopPromise?.catch((err) => {
|
|
63
63
|
log.error(`[AgentRuntime:${this.agentId}] 消费循环收尾失败:`, err)
|
|
64
64
|
})
|
|
65
|
+
await this.execLock?.catch((err) => {
|
|
66
|
+
log.error(`[AgentRuntime:${this.agentId}] 执行锁收尾失败:`, err)
|
|
67
|
+
})
|
|
68
|
+
await Promise.allSettled([...(this.steerPromises ?? [])])
|
|
69
|
+
this.deps.mailbox.releaseOwnedClaims?.()
|
|
65
70
|
await this.postSettlePromise?.catch((err) => {
|
|
66
71
|
log.error(`[AgentRuntime:${this.agentId}] 回合收尾失败:`, err)
|
|
67
72
|
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 消息级停滞看门狗的纯判定(2026-11-16 复现回归的语义核心)。
|
|
3
|
+
*
|
|
4
|
+
* 历史缺陷:固定 600s 从 claim 起算、不区分活动、HITL 人工等待也算停滞——
|
|
5
|
+
* 实测把 16 分钟的健康治理回合(含 4 分钟 HITL)连续 abort+重投 3 次直到 dead,
|
|
6
|
+
* 同一 message_id 被整段重放三轮,还连坐取消了频道内其它 active 任务。
|
|
7
|
+
*
|
|
8
|
+
* 新语义(只回答"现在该不该 fire",进程/计时器归 AgentRuntime):
|
|
9
|
+
* 1. 运行时已停止 → 永不 fire;
|
|
10
|
+
* 2. 距最近一次 harness 活动(事件/流式 delta/工具调用)< stallMs → 不 fire;
|
|
11
|
+
* 3. 本 agent 有挂起 HITL 审批 → 不 fire("有人在裁"是合法等待,不是停滞);
|
|
12
|
+
* 4. 其余(真无活动超过阈值)→ fire。
|
|
13
|
+
*/
|
|
14
|
+
export interface MessageWatchdogSnapshot {
|
|
15
|
+
/** 运行时状态(stopped 时整个看门狗应已随回合结束而清除) */
|
|
16
|
+
state: string
|
|
17
|
+
/** 最近一次 harness 活动(epoch ms;claim 时初始化) */
|
|
18
|
+
lastActivityAt: number
|
|
19
|
+
/** 当前时间(epoch ms) */
|
|
20
|
+
now: number
|
|
21
|
+
/** 无活动阈值 ms(来自 harness_stall_timeout_ms,下限 60s) */
|
|
22
|
+
stallMs: number
|
|
23
|
+
/** 本 agent 是否有挂起 HITL 审批 */
|
|
24
|
+
hasPendingApprovals: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Pending approval is a legal pause, not a fireable idle state. */
|
|
28
|
+
export function hasLegalMessageWatchdogPause(s: Pick<MessageWatchdogSnapshot, 'hasPendingApprovals'>): boolean {
|
|
29
|
+
return s.hasPendingApprovals
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function shouldFireMessageWatchdog(s: MessageWatchdogSnapshot): boolean {
|
|
33
|
+
if (s.state === 'stopped') return false
|
|
34
|
+
if (hasLegalMessageWatchdogPause(s)) return false
|
|
35
|
+
if (s.now - s.lastActivityAt < s.stallMs) return false
|
|
36
|
+
return true
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** 看门狗巡检节奏( 每 tick 检查一次活动窗口;独立于 stallMs 本身) */
|
|
40
|
+
export const MESSAGE_WATCHDOG_TICK_MS = 30_000
|