agentworkshop 0.11.3 → 0.12.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/577f464e-672a-4c4e-a3c8-dc8c1b38930d.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 +4070 -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 +7 -7
- package/README.md +7 -7
- package/app/components/dcw/DcwNodesTable.vue +24 -0
- package/docs/mcp.en.md +30 -27
- package/docs/mcp.md +7 -3
- package/docs/plugins.en.md +4 -2
- package/docs/plugins.md +4 -2
- 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 +2 -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 +88 -4
- 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/rag-bridge/index.mjs +20 -2
- 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 +16 -3
- 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/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
|
@@ -12,31 +12,67 @@ import { classifyHarnessFailure, harnessBreakerActive, recordHarnessFailure, HAR
|
|
|
12
12
|
import { fenceFromMetadata } from '../task-engine/lease'
|
|
13
13
|
import type { ExecutionFence } from '../task-engine/lease'
|
|
14
14
|
import { randomUUID } from 'node:crypto'
|
|
15
|
+
import type { ExecutionScope } from '../../agents/execution-scope'
|
|
16
|
+
|
|
17
|
+
function interruptedWithoutSettlement(signal: AbortSignal | null): boolean {
|
|
18
|
+
if (!signal?.aborted) return false
|
|
19
|
+
const reason = signal.reason
|
|
20
|
+
const text = reason instanceof Error ? reason.message : String(reason ?? '')
|
|
21
|
+
return /message watchdog|runtime stop|task abort/i.test(text)
|
|
22
|
+
}
|
|
15
23
|
|
|
16
24
|
export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
17
|
-
protected async processMessage(msg: A2AMessage): Promise<void> {
|
|
25
|
+
protected async processMessage(msg: A2AMessage, claimToken: string): Promise<void> {
|
|
18
26
|
const taskId = this.taskIdOf(msg)
|
|
19
27
|
const taskKind = msg.metadata?.['x-aw-task-kind']
|
|
28
|
+
if (this.deps.mailbox.deadLetterLegacyRecoveryClaim(msg.messageId, claimToken)) return
|
|
29
|
+
if (!this.deps.mailbox.ownsClaim(msg.messageId, claimToken)) return
|
|
30
|
+
if (this.deps.mailbox.isClaimBlocked?.(msg.messageId, claimToken)) {
|
|
31
|
+
this.deps.mailbox.releaseClaim(msg.messageId, claimToken)
|
|
32
|
+
return
|
|
33
|
+
}
|
|
34
|
+
if (taskId && typeof taskKind === 'string' && taskKind !== 'cancel') {
|
|
35
|
+
try {
|
|
36
|
+
if (this.deps.taskEngine.isLegacyRecoveryBlocked?.(taskId)) {
|
|
37
|
+
this.deps.mailbox.releaseClaim(msg.messageId, claimToken)
|
|
38
|
+
log.warn(`[AgentRuntime:${this.agentId}] 任务 ${taskId} 因历史恢复隔离暂不执行`)
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
this.deps.mailbox.releaseClaim(msg.messageId, claimToken)
|
|
44
|
+
log.error(`[AgentRuntime:${this.agentId}] 历史任务恢复检查失败,暂不执行:`, err)
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
}
|
|
20
48
|
// §5.1 执行代次栅栏:任务消息携带 assignment generation + execution lease。
|
|
21
49
|
// 运行中 reassign 之后,旧 worker 信箱里残留/被重投的 assign 与它会话中继续吐出的
|
|
22
50
|
// 事件都带旧代次 —— 一律丢弃,绝不覆盖新执行结果。
|
|
23
51
|
const fence = fenceFromMetadata(msg.metadata)
|
|
24
52
|
// cancel 只是控制消息:它负责让已在运行的回合收口,本身不得再启动一次 worker turn。
|
|
25
53
|
if (taskKind === 'cancel') {
|
|
26
|
-
this.deps.mailbox.markConsumed(msg.messageId)
|
|
54
|
+
this.deps.mailbox.markConsumed(msg.messageId, claimToken)
|
|
27
55
|
return
|
|
28
56
|
}
|
|
29
57
|
// 过期任务投递检查:任务已终态(cancel/reassign 后残留的旧 assign/child-completed)→ 跳过执行,
|
|
30
58
|
// 否则 worker/lead 会对着已终态任务的旧投递真的再跑一轮 harness。
|
|
31
|
-
if (
|
|
32
|
-
const task = this.deps.taskEngine.get(taskId)
|
|
33
|
-
if (!task ||
|
|
34
|
-
this.
|
|
59
|
+
if (taskKind === 'assign') {
|
|
60
|
+
const task = taskId ? this.deps.taskEngine.get(taskId) : undefined
|
|
61
|
+
if (!taskId || msg.contextId !== this.channelId || !task || task.channelId !== this.channelId
|
|
62
|
+
|| task.assigneeId !== this.agentId || TERMINAL_TASK_STATES[task.state]
|
|
63
|
+
|| !Number.isSafeInteger(fence?.generation) || (fence?.generation ?? -1) < 0
|
|
64
|
+
|| !fence?.leaseId || task.assignmentGeneration !== fence.generation
|
|
65
|
+
|| task.executionLeaseId !== fence.leaseId || task.executionLeaseAgentId !== this.agentId
|
|
66
|
+
|| task.executionLeaseRevokedAt) {
|
|
67
|
+
log.warn(`[AgentRuntime:${this.agentId}] 拒绝缺失或过期执行租约的任务投递:task=${taskId ?? '-'};请重新派发`)
|
|
68
|
+
this.deps.mailbox.markConsumed(msg.messageId, claimToken)
|
|
35
69
|
return
|
|
36
70
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
71
|
+
}
|
|
72
|
+
else if (taskKind === 'child-completed' && taskId) {
|
|
73
|
+
const task = this.deps.taskEngine.get(taskId)
|
|
74
|
+
if (!task || TERMINAL_TASK_STATES[task.state] || !this.assignmentFenceOk(taskId, fence)) {
|
|
75
|
+
this.deps.mailbox.markConsumed(msg.messageId, claimToken)
|
|
40
76
|
return
|
|
41
77
|
}
|
|
42
78
|
}
|
|
@@ -50,6 +86,9 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
50
86
|
/** 失败原因(事件 error / 生成器抛错):写入任务 history,供事后诊断 */
|
|
51
87
|
let runErrorMessage = ''
|
|
52
88
|
let runErrorCode = ''
|
|
89
|
+
const controller = new AbortController()
|
|
90
|
+
this.abortController = controller
|
|
91
|
+
const runSignal = controller.signal
|
|
53
92
|
try {
|
|
54
93
|
// 任务消息联动:assign → WORKING(自动接取;状态事件由 TaskEngine transition hooks 广播)
|
|
55
94
|
// 仅 SUBMITTED/ASSIGNED 自动接取:WAITING(已有子任务)的任务由 SchedulerLoop/子任务汇总推进,
|
|
@@ -75,8 +114,7 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
75
114
|
}
|
|
76
115
|
}
|
|
77
116
|
}
|
|
78
|
-
|
|
79
|
-
this.abortController = new AbortController()
|
|
117
|
+
if (interruptedWithoutSettlement(runSignal)) return
|
|
80
118
|
// §2.4/§6.2:worker 回合与 Lead supervise 共用同一 harness 进程/会话 ——
|
|
81
119
|
// 回合起点观测租约(复用计数 / 重建归因)。
|
|
82
120
|
this.noteHarnessUse()
|
|
@@ -88,10 +126,25 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
88
126
|
// sessionId 透传:当前会话作用域记忆在 auto 档获得排序加分(session 行更相关)
|
|
89
127
|
let memoryBlock: string | undefined
|
|
90
128
|
try {
|
|
91
|
-
|
|
129
|
+
const recall = this.deps.memory?.recall(partsToText(msg.parts), {
|
|
92
130
|
relatedTaskIds: this.relatedTaskIdsOf(taskId),
|
|
93
131
|
sessionId,
|
|
94
|
-
|
|
132
|
+
signal: runSignal,
|
|
133
|
+
})
|
|
134
|
+
if (recall) {
|
|
135
|
+
let onAbort!: () => void
|
|
136
|
+
const aborted = new Promise<undefined>((resolve) => {
|
|
137
|
+
onAbort = () => resolve(undefined)
|
|
138
|
+
if (runSignal.aborted) onAbort()
|
|
139
|
+
else runSignal.addEventListener('abort', onAbort, { once: true })
|
|
140
|
+
})
|
|
141
|
+
try {
|
|
142
|
+
memoryBlock = (await Promise.race([recall, aborted])) ?? undefined
|
|
143
|
+
}
|
|
144
|
+
finally {
|
|
145
|
+
runSignal.removeEventListener('abort', onAbort)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
95
148
|
}
|
|
96
149
|
catch (err) {
|
|
97
150
|
log.error(`[AgentRuntime:${this.agentId}] 记忆召回失败:`, err)
|
|
@@ -102,14 +155,53 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
102
155
|
memoryBlock,
|
|
103
156
|
runtimeSession ? { id: runtimeSession.id, block: runtimeSession.block } : undefined,
|
|
104
157
|
)
|
|
158
|
+
if (interruptedWithoutSettlement(runSignal)) return
|
|
159
|
+
const activeRunSignal = runSignal
|
|
160
|
+
const generation = fence?.generation
|
|
161
|
+
const leaseId = fence?.leaseId
|
|
162
|
+
const executionScope: ExecutionScope | undefined = taskKind === 'assign' && taskId && generation != null && leaseId
|
|
163
|
+
? {
|
|
164
|
+
taskId,
|
|
165
|
+
agentId: this.agentId,
|
|
166
|
+
channelId: msg.contextId,
|
|
167
|
+
assignmentGeneration: generation,
|
|
168
|
+
executionLeaseId: leaseId,
|
|
169
|
+
signal: activeRunSignal,
|
|
170
|
+
assertActive: () => {
|
|
171
|
+
if (activeRunSignal.aborted) throw new Error('task execution aborted')
|
|
172
|
+
if (this.deps.taskEngine.isLegacyRecoveryBlocked?.(taskId)) throw new Error('task blocked by legacy recovery hold')
|
|
173
|
+
const current = this.deps.taskEngine.get(taskId)
|
|
174
|
+
if (!current || current.channelId !== this.channelId || TERMINAL_TASK_STATES[current.state]
|
|
175
|
+
|| current.assigneeId !== this.agentId
|
|
176
|
+
|| current.assignmentGeneration !== generation
|
|
177
|
+
|| current.executionLeaseId !== leaseId
|
|
178
|
+
|| current.executionLeaseAgentId !== this.agentId
|
|
179
|
+
|| current.executionLeaseRevokedAt) {
|
|
180
|
+
throw new Error('stale task execution lease')
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
}
|
|
184
|
+
: undefined
|
|
105
185
|
const ctx: AgentRunContext = {
|
|
106
186
|
agentId: this.agentId,
|
|
107
187
|
channelId: msg.contextId,
|
|
108
188
|
role: this.role,
|
|
109
189
|
workspace: this.deps.workspace,
|
|
110
|
-
signal:
|
|
190
|
+
signal: runSignal,
|
|
191
|
+
...(executionScope ? { executionScope } : {}),
|
|
111
192
|
...(runtimeSession ? { session: { id: runtimeSession.id, block: runtimeSession.block } } : {}),
|
|
112
193
|
}
|
|
194
|
+
if (interruptedWithoutSettlement(runSignal)) return
|
|
195
|
+
if (this.deps.mailbox.isClaimBlocked?.(msg.messageId, claimToken)) return
|
|
196
|
+
if (executionScope) {
|
|
197
|
+
try {
|
|
198
|
+
executionScope.assertActive()
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
log.warn(`[AgentRuntime:${this.agentId}] 回合启动前执行租约失效:`, err)
|
|
202
|
+
return
|
|
203
|
+
}
|
|
204
|
+
}
|
|
113
205
|
// 补入产出者 agentId(monitor 据此归属事件;不改原 msg,用浅拷贝)
|
|
114
206
|
const enrichedSource = { ...msg, metadata: { ...msg.metadata, 'x-aw-producing-agent': this.agentId } }
|
|
115
207
|
// 回复文本收集(V9:omp 不产 message 事件,聚合三类源——message 事件 / status.message / 终态 artifact 'output')
|
|
@@ -123,6 +215,10 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
123
215
|
}
|
|
124
216
|
try {
|
|
125
217
|
for await (const event of this.impl.run(request, ctx)) {
|
|
218
|
+
if (interruptedWithoutSettlement(runSignal) || this.deps.mailbox.isClaimBlocked?.(msg.messageId, claimToken)) break
|
|
219
|
+
// 消息看门狗的活动上报:任何 harness 事件(delta/工具/状态)都证明回合活着,
|
|
220
|
+
// 重置无活动窗口 —— 长治理回合(慢模型逐回合 40s-4min)不应被固定死线误杀。
|
|
221
|
+
this.bumpMessageActivity()
|
|
126
222
|
this.deps.bus.emit(event, enrichedSource)
|
|
127
223
|
// LLM 流式增量:只走事件流(AEP agent.delta),不进任务引擎/交付兜底管道;
|
|
128
224
|
// 但要单独留底 —— 纯文本回合(模型以最终输出作答,不调工具)的回执全靠它
|
|
@@ -167,6 +263,7 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
167
263
|
this.pendingHarnessFailure = 'RPC_BROKEN'
|
|
168
264
|
log.error(`[AgentRuntime:${this.agentId}] 回合异常:`, err)
|
|
169
265
|
}
|
|
266
|
+
if (this.deps.mailbox.isClaimBlocked?.(msg.messageId, claimToken)) return
|
|
170
267
|
// 人类 requireReply 的平台兜底回执:实测部分引擎/模型不遵从 send_message_to_agent
|
|
171
268
|
// (回合只产 artifact 文本),请求方将收不到任何应答。平台把回合聚合文本代投回
|
|
172
269
|
// 时间线(in_reply_to 关联 + x-aw-relayed 标记),保证"要求回复"必有确定应答;
|
|
@@ -192,7 +289,8 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
192
289
|
if (remainder) relayText = remainder
|
|
193
290
|
}
|
|
194
291
|
relayText = relayText.trim().slice(0, 4000)
|
|
195
|
-
if (
|
|
292
|
+
if (!interruptedWithoutSettlement(runSignal)
|
|
293
|
+
&& msg.metadata?.['x-aw-require-reply'] === 'true'
|
|
196
294
|
&& typeof msg.metadata?.['x-aw-from-label'] === 'string'
|
|
197
295
|
&& relayText) {
|
|
198
296
|
const relayMeta = {
|
|
@@ -240,7 +338,8 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
240
338
|
// 最终文本作为交付物;否则这类引擎的所有任务都会「工作做完了却停滞被回收」。
|
|
241
339
|
// - 两者皆无(LLM 空转)→ FAILED 交给调度器 retry/reassign。
|
|
242
340
|
// 仅 worker 的 assign 执行消息生效:lead 由 supervise 协调;WAITING 父任务不属此列。
|
|
243
|
-
if (
|
|
341
|
+
if (!interruptedWithoutSettlement(runSignal)
|
|
342
|
+
&& taskId && this.role === 'worker' && taskKind === 'assign'
|
|
244
343
|
&& this.assignmentFenceOk(taskId, fence)) {
|
|
245
344
|
const after = this.deps.taskEngine.get(taskId)
|
|
246
345
|
if (after && after.assigneeId === this.agentId && after.state === 'WORKING') {
|
|
@@ -325,7 +424,7 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
325
424
|
}
|
|
326
425
|
|
|
327
426
|
// 记忆沉淀:终态任务 harvest;无 taskId 的点对点消息记协作(异常不阻塞)
|
|
328
|
-
if (this.deps.memory) {
|
|
427
|
+
if (!interruptedWithoutSettlement(runSignal) && this.deps.memory) {
|
|
329
428
|
try {
|
|
330
429
|
const task = taskId ? this.deps.taskEngine.get(taskId) : undefined
|
|
331
430
|
if (task && TERMINAL_TASK_STATES[task.state]) {
|
|
@@ -342,6 +441,9 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
342
441
|
}
|
|
343
442
|
}
|
|
344
443
|
finally {
|
|
444
|
+
// Revoke any in-flight host tool continuation before releasing its claim.
|
|
445
|
+
const interrupted = interruptedWithoutSettlement(runSignal)
|
|
446
|
+
if (!runSignal.aborted) controller.abort(new Error('turn settled'))
|
|
345
447
|
this.abortController = null
|
|
346
448
|
this.currentTaskId = null
|
|
347
449
|
// C-P1-2:回合落定即通知 manager。回执成功时 manager 已在 platformReply 里按
|
|
@@ -366,6 +468,17 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
366
468
|
// 内容不丢,重试回合(通常已是全新子进程)再处理;每消息最多重投 2 次防毒消息死循环。
|
|
367
469
|
// 任务已终态(取消/收口后 abort 让回合报错)则不再重投 —— 消息依任务终态
|
|
368
470
|
// 由调度器 reassign/新 assign 驱动,重投只会空转(启动即被终态检查消费)。
|
|
471
|
+
if (interrupted && taskId && fence?.generation != null && fence.leaseId) {
|
|
472
|
+
try {
|
|
473
|
+
const { getToolApprovals } = await import('../../agents/tool-approvals')
|
|
474
|
+
getToolApprovals().cancelPendingForTask(taskId, '任务执行已中止,审批失效,指令未执行', {
|
|
475
|
+
agentId: this.agentId,
|
|
476
|
+
assignmentGeneration: fence.generation,
|
|
477
|
+
executionLeaseId: fence.leaseId,
|
|
478
|
+
})
|
|
479
|
+
}
|
|
480
|
+
catch { /* 审批面未装配时仍保留中止语义 */ }
|
|
481
|
+
}
|
|
369
482
|
const taskNow = taskId ? this.deps.taskEngine.get(taskId) : undefined
|
|
370
483
|
const taskDone = !!taskNow && TERMINAL_TASK_STATES[taskNow.state]
|
|
371
484
|
// ── 缺陷2修复:harness 回合失败分类熔断(2026-10-30)──
|
|
@@ -374,7 +487,7 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
374
487
|
// 防"任务假活 + 无意义重试打供应商"。冷却窗(5min)后半开:放行探测回合,
|
|
375
488
|
// 成功整串复位;再失败立即重新熔断。network 等可重试类别不参与熔断。
|
|
376
489
|
let stopRetry = false
|
|
377
|
-
if (sawRunError) {
|
|
490
|
+
if (sawRunError && !interrupted) {
|
|
378
491
|
const cls = classifyHarnessFailure(runErrorCode, runErrorMessage)
|
|
379
492
|
const streak = recordHarnessFailure(this.harnessFailStreak, cls)
|
|
380
493
|
this.harnessFailStreak = streak
|
|
@@ -397,8 +510,25 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
397
510
|
else {
|
|
398
511
|
this.harnessFailStreak = null
|
|
399
512
|
}
|
|
400
|
-
|
|
401
|
-
|
|
513
|
+
// A hold introduced during recall or execution must retain the exact claim without retry loss.
|
|
514
|
+
const recoveryBlocked = this.deps.mailbox.isClaimBlocked?.(msg.messageId, claimToken) ?? false
|
|
515
|
+
if (recoveryBlocked) {
|
|
516
|
+
this.deps.mailbox.releaseClaim(msg.messageId, claimToken)
|
|
517
|
+
}
|
|
518
|
+
else if (interrupted) {
|
|
519
|
+
const reason = runSignal.reason instanceof Error ? runSignal.reason.message : String(runSignal.reason ?? '')
|
|
520
|
+
if (reason === 'message watchdog') {
|
|
521
|
+
if (this.deps.mailbox.requeue(msg.messageId, claimToken)) this.deps.mailbox.wake()
|
|
522
|
+
}
|
|
523
|
+
else if (reason === 'runtime stop' && !taskDone) {
|
|
524
|
+
this.deps.mailbox.releaseClaim(msg.messageId, claimToken)
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
this.deps.mailbox.markConsumed(msg.messageId, claimToken)
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
else if (sawRunError && !taskDone && !stopRetry && (this.runErrorRetries.get(msg.messageId) ?? 0) < 2
|
|
531
|
+
&& this.deps.mailbox.requeue(msg.messageId, claimToken)) {
|
|
402
532
|
const attempt = (this.runErrorRetries.get(msg.messageId) ?? 0) + 1
|
|
403
533
|
this.runErrorRetries.set(msg.messageId, attempt)
|
|
404
534
|
this.emitExternal({
|
|
@@ -417,7 +547,7 @@ export abstract class AgentRuntimeMessage extends AgentRuntimeSupervise {
|
|
|
417
547
|
}
|
|
418
548
|
else {
|
|
419
549
|
this.runErrorRetries.delete(msg.messageId)
|
|
420
|
-
this.deps.mailbox.markConsumed(msg.messageId)
|
|
550
|
+
this.deps.mailbox.markConsumed(msg.messageId, claimToken)
|
|
421
551
|
}
|
|
422
552
|
// 回合落定:信箱空 → 后台压缩检查(post-settle 路径;impl 自守卫不阻塞)
|
|
423
553
|
this.maybePostSettle()
|
|
@@ -32,12 +32,22 @@ export abstract class AgentRuntimeState extends AgentRuntimeContracts {
|
|
|
32
32
|
protected pollWaiters = 0
|
|
33
33
|
/** run 与 supervise 互斥锁(promise 链) */
|
|
34
34
|
protected execLock: Promise<void> = Promise.resolve()
|
|
35
|
-
|
|
35
|
+
private activeAbortController: AbortController | null = null
|
|
36
|
+
protected turnGeneration = 0
|
|
37
|
+
protected get abortController(): AbortController | null { return this.activeAbortController }
|
|
38
|
+
|
|
39
|
+
protected set abortController(controller: AbortController | null) {
|
|
40
|
+
if (controller) this.turnGeneration += 1
|
|
41
|
+
this.activeAbortController = controller
|
|
42
|
+
}
|
|
43
|
+
|
|
36
44
|
protected loopPromise: Promise<void> | null = null
|
|
37
45
|
/** stop() 的单次收尾 promise;manager shutdown 必须等它完成后才可关闭 DB。 */
|
|
38
46
|
protected stopPromise: Promise<void> | null = null
|
|
39
47
|
/** 回合收尾后的异步 harness 清理,必须纳入 stop 的等待屏障。 */
|
|
40
48
|
protected postSettlePromise: Promise<void> | null = null
|
|
49
|
+
/** Steer callbacks may settle messages after the consume loop has exited. */
|
|
50
|
+
protected readonly steerPromises = new Set<Promise<void>>()
|
|
41
51
|
protected started = false
|
|
42
52
|
protected supervisionAttempt: SupervisionAttemptView = {
|
|
43
53
|
attemptId: null, state: 'IDLE', startedAt: null, watchdogAt: null, activeRootId: null, watchdogCount: 0,
|
|
@@ -316,7 +326,7 @@ export abstract class AgentRuntimeState extends AgentRuntimeContracts {
|
|
|
316
326
|
&& this.hasActiveSupervisionAttempt()
|
|
317
327
|
if (!abortingRun && !abortingSupervision) return false
|
|
318
328
|
log.warn(`[AgentRuntime:${this.agentId}] abortTask 调用(task=${taskId},state=${this.state})`)
|
|
319
|
-
if (abortingRun) this.abortController?.abort()
|
|
329
|
+
if (abortingRun) this.abortController?.abort(new Error('task abort'))
|
|
320
330
|
if (abortingSupervision) {
|
|
321
331
|
this.supervisionAttempt = { ...this.supervisionAttempt, state: 'ABORT_REQUESTED' }
|
|
322
332
|
this.superviseController?.abort()
|
|
@@ -359,8 +369,13 @@ export abstract class AgentRuntimeState extends AgentRuntimeContracts {
|
|
|
359
369
|
// 关联到本消息(in_reply_to 断链,回执丢失实测)。改走信箱 peer 回合 ——
|
|
360
370
|
// 稍晚但归属正确、回执必有应答。
|
|
361
371
|
if (message.metadata?.['x-aw-require-reply'] === 'true') return
|
|
372
|
+
// Bind the acknowledgement to the turn that was active at injection time.
|
|
373
|
+
const turnSignal = this.abortController?.signal ?? this.superviseController?.signal
|
|
374
|
+
if (!turnSignal || turnSignal.aborted) return
|
|
375
|
+
const turnLock = this.execLock
|
|
362
376
|
// ④ 其余(人类紧急直发):原有 steer 注入路径
|
|
363
|
-
|
|
377
|
+
const claimToken = this.deps.mailbox.claim(message.messageId)
|
|
378
|
+
if (!claimToken) return
|
|
364
379
|
const text = message.parts
|
|
365
380
|
.map((p) => {
|
|
366
381
|
if ('text' in p) return p.text
|
|
@@ -378,27 +393,68 @@ export abstract class AgentRuntimeState extends AgentRuntimeContracts {
|
|
|
378
393
|
`require_reply=仅当你还需要对方进一步响应时才设 true。`,
|
|
379
394
|
)
|
|
380
395
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
396
|
+
let steering: Promise<'steer' | 'deferred'>
|
|
397
|
+
try {
|
|
398
|
+
steering = this.impl.steer(lines.join('\n'))
|
|
399
|
+
}
|
|
400
|
+
catch (err) {
|
|
401
|
+
log.error(`[AgentRuntime:${this.agentId}] steer 失败(释放认领回 pending 待循环处理):`, err)
|
|
402
|
+
this.releaseSteerClaim(message.messageId, claimToken)
|
|
403
|
+
return
|
|
404
|
+
}
|
|
405
|
+
const settling = steering
|
|
406
|
+
.then(async (mode) => {
|
|
407
|
+
if (mode === 'steer' && !turnSignal.aborted && this.getState() !== 'stopped') {
|
|
408
|
+
// 异步 steer 在途期间任务联动可能已进入 legacy recovery hold/FIFO 屏障:
|
|
409
|
+
// 结算前必须按当前认领 token 复检持久行资格。消费被阻塞的行会静默吞掉
|
|
410
|
+
// 恢复屏障应拥有的投递 —— 改为隔离成 dead(保留原始证据、不重放)。
|
|
411
|
+
if (this.deps.mailbox.isClaimBlocked(message.messageId, claimToken)) {
|
|
412
|
+
if (!this.deps.mailbox.deadLetterLegacyRecoveryClaim(message.messageId, claimToken)) {
|
|
413
|
+
this.deps.mailbox.releaseClaim(message.messageId, claimToken)
|
|
414
|
+
}
|
|
415
|
+
return
|
|
416
|
+
}
|
|
417
|
+
// Only acknowledge injection while its original turn is still live.
|
|
418
|
+
this.deps.mailbox.markConsumed(message.messageId, claimToken)
|
|
419
|
+
}
|
|
420
|
+
else if (turnSignal.aborted || this.getState() === 'stopped') {
|
|
421
|
+
// Do not replay until the interrupted turn has actually left its lock.
|
|
422
|
+
await turnLock
|
|
423
|
+
// 被恢复 hold 阻塞的联动消息不得回 pending 等重放(hold 解除后会双投):
|
|
424
|
+
// 同样隔离为恢复证据;未阻塞的行保持原有"不扣次数释放回 pending"语义。
|
|
425
|
+
if (this.deps.mailbox.isClaimBlocked(message.messageId, claimToken)
|
|
426
|
+
&& this.deps.mailbox.deadLetterLegacyRecoveryClaim(message.messageId, claimToken)) {
|
|
427
|
+
return
|
|
428
|
+
}
|
|
429
|
+
this.deps.mailbox.releaseClaim(message.messageId, claimToken)
|
|
386
430
|
}
|
|
387
431
|
else {
|
|
388
432
|
// deferred:释放认领回 pending,poll_messages(250ms 兜底重查)或
|
|
389
433
|
// 本回合结束后的消费循环(FIFO)接管,消息必达不丢失
|
|
390
|
-
this.releaseSteerClaim(message.messageId)
|
|
434
|
+
this.releaseSteerClaim(message.messageId, claimToken)
|
|
391
435
|
}
|
|
392
436
|
})
|
|
393
|
-
.catch((err) => {
|
|
437
|
+
.catch(async (err) => {
|
|
394
438
|
log.error(`[AgentRuntime:${this.agentId}] steer 失败(释放认领回 pending 待循环处理):`, err)
|
|
395
|
-
this.
|
|
439
|
+
if (turnSignal.aborted || this.getState() === 'stopped') {
|
|
440
|
+
await turnLock
|
|
441
|
+
this.deps.mailbox.releaseClaim(message.messageId, claimToken)
|
|
442
|
+
}
|
|
443
|
+
else this.releaseSteerClaim(message.messageId, claimToken)
|
|
396
444
|
})
|
|
445
|
+
this.steerPromises.add(settling)
|
|
446
|
+
void settling.then(
|
|
447
|
+
() => { this.steerPromises.delete(settling) },
|
|
448
|
+
(err) => {
|
|
449
|
+
this.steerPromises.delete(settling)
|
|
450
|
+
log.error(`[AgentRuntime:${this.agentId}] steer 消息收尾失败:`, err)
|
|
451
|
+
},
|
|
452
|
+
)
|
|
397
453
|
}
|
|
398
454
|
|
|
399
455
|
/** 释放 steer 认领:consuming → pending + 唤醒 dequeue 门闩与到信等待方 */
|
|
400
|
-
protected releaseSteerClaim(messageId: string): void {
|
|
401
|
-
if (this.deps.mailbox.requeue(messageId)) {
|
|
456
|
+
protected releaseSteerClaim(messageId: string, claimToken: string): void {
|
|
457
|
+
if (this.deps.mailbox.requeue(messageId, claimToken)) {
|
|
402
458
|
this.deps.mailbox.wake()
|
|
403
459
|
}
|
|
404
460
|
}
|