chainlesschain 0.166.20 → 0.166.22
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/README.md +67 -9
- package/package.json +2 -2
- package/src/assets/web-panel/assets/{AIOps-CcJst5Zs.js → AIOps-oJ7USzMC.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BpHPFKd3.js → ActionButton-BlgnZe_C.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DHAsASuS.js → Analytics-D2rRbTLu.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-BTKwo5RC.js → AppLayout-FwS3f0B2.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-BcCBTggA.js → Artifacts-iF-_08Hi.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-z1JvJYbT.js → Audit-D24p0zQw.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-CJ7DCMDR.js → BackgroundAgents-Cg3mRVi9.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-CKpxw4uw.js → Backup-EOqht3H-.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-2jI_IlUB.js → BaseInput-9XWYq2hj.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-C_4RfBeN.js → Chat-Dq5yardA.js} +5 -5
- package/src/assets/web-panel/assets/ChatBubbleRenderer-Ds3pA-ET.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-BnF4z4N1.js → Checkbox-CuyCBoBf.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-m_LMamhM.js → Codegen-DjWtYHNe.js} +1 -1
- package/src/assets/web-panel/assets/{Col-DzMbA760.js → Col-CrVr_iuG.js} +1 -1
- package/src/assets/web-panel/assets/{Community-SScuZUcW.js → Community-C6QxpfGc.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-CiOHRvwQ.js → Compact-B-v5r6Pa.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-97FzYz-6.js → Compliance-zNiLiFgD.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-C0ss-SRl.js → Cowork-D9K7lMOu.js} +2 -2
- package/src/assets/web-panel/assets/{Cron-CCbdc9fp.js → Cron-DAjO36z4.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-BPnabXej.js → Crosschain-Bxqn0aqB.js} +1 -1
- package/src/assets/web-panel/assets/{DID-B65hFnHs.js → DID-DfRmLUe-.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-B6qR_TF2.js → Dashboard-Cz8KF3fr.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-6c-2Fxm-.js → Dropdown-C4oVfkP0.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-GD57mfiz.js → EmailListRenderer-ivyZKN8k.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-B2mxG6LN.js → FamilyGuardDashboard-DoxY1CPW.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-cZS-uvAo.js → Federation-C93gZxnb.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-UbSfBIe1.js → FormItemContext-D_lEjYJE.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BMAtvGt1.js → GenericCardRenderer-BNFN9YjN.js} +1 -1
- package/src/assets/web-panel/assets/{Git-DAlhOiDA.js → Git-mUu2HcLI.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-B-RRVaP8.js → Governance-CNuosrge.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-DBl-pXYR.js → Inference-DwY5pbCB.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DjqOkvgY.js → KnowledgeGraph-aRUxhACD.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-CEV7AEAD.js → Logs-DFfsWYy_.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-BDCxa4d1.js → MarkdownRenderer-DqTx7_u1.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-oRjzfmYJ.js → Marketplace-COI-ciM-.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-BiTnznLw.js → McpTools-BJJwaIpe.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-DR0C5K4N.js → Memory-CDO6SGDZ.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge--oR8wEcp.js → MobileBridge-BlZ5tFf4.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-DKqpYMuG.js → MobileProjects-DuoxbgWz.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-Dg0D6fDQ.js → Mtc-6ec9j70b.js} +2 -2
- package/src/assets/web-panel/assets/{MtcAudit-D4_-yWTK.js → MtcAudit-BuL7HkC7.js} +5 -5
- package/src/assets/web-panel/assets/{Multisig-Coz55FxA.js → Multisig-CJxR85lk.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-BWVjgW9Y.js → NLProgramming-B71O1S4l.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-BflVuGwr.js → Notes-Bsw5zbpV.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-CT0F_dJ7.js → NotificationSettings-BnAhXuK_.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-Dyrnqy_o.js → OrderTableRenderer-BJ0R5GGz.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-CMDTM2z5.js → Organization-B7wwNxoP.js} +2 -2
- package/src/assets/web-panel/assets/{Overflow-acKvvYpC.js → Overflow-CfAGr0gM.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CRq5j9Ax.js → P2P-KhMg22Fz.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-DmtzN6Kn.js → PdhVaultBrowser-NdAXI9ft.js} +4 -4
- package/src/assets/web-panel/assets/{Permissions-SZ-kjJDa.js → Permissions-CIYjqyT7.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DXh-ZfgJ.js → PersonalDataHub-D2ht3P_R.js} +6 -6
- package/src/assets/web-panel/assets/{Pipeline-DhBU9ftP.js → Pipeline-i6flZW1m.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-BgEXpO_V.js → Privacy-DE0lhYVc.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-B2DJ-dmK.js → ProjectInit-BL3YbyxS.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-ve3SocWc.js → ProjectSettings-CEtdg7ni.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-5ZvFasSJ.js → Projects-CvtU5peJ.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-C8fcF3BK.js → Providers-DKt_Cg-j.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-unjO8lNO.js → QrScannerModal-DA61jNSx.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-BT1QtT7D.js → QuickAsk-fS9ryUmq.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BSjFrY1w.js → Recommend-CR9dZU5Y.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-CWV0bICg.js → RemoteSession-BV0BR2Dz.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-BMjiMsk2.js → Reputation-BIeGUvYD.js} +1 -1
- package/src/assets/web-panel/assets/{Row-9XCY22PM.js → Row-DHDT1aro.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-DQ9PDy7Q.js → RssFeed-Cq6YKb1h.js} +3 -3
- package/src/assets/web-panel/assets/{Search-Boym2HwG.js → Search-DEF6vsy6.js} +1 -1
- package/src/assets/web-panel/assets/{Security-Gbq3lGQb.js → Security-CHtYiKY9.js} +4 -4
- package/src/assets/web-panel/assets/{Services-OcUfLdnu.js → Services-u16lvBJN.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-BjTog6cA.js → Skeleton-CGbizyDj.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-Dny4ft_1.js → Skills-BZMQcAa7.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Cy_VnhpZ.js → Sla-Bm-CycVi.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CrFuL_lp.js → SpeechSettings-BudpA5kr.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-k-FnjuOR.js → SyncSettings-B8q1C1eC.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-ZEqDSo0_.js → Tasks-SU1pBWc-.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CYYksYV5.js → Templates-CyOfJzmt.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BvTTRTHS.js → Tenant-xqWSm2GP.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-DMOQOtkj.js → Terminal-D1Ttgjsi.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-CnudkJxk.js → TimelineRenderer-Da2lYs5D.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-VW6Wocdp.js → Tokens-B34-SduO.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-BtOxZqP6.js → Trigger-C8zyYm4R.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-XcGJoTQx.js → Trust-D1Pvqems.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-aASNCs5j.js → UkeySign-Do3VVnAy.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-Bz89M52u.js → VideoEditing-Dz7egVIA.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-uU4dSS_N.js → Wallet-Dcuw-OxR.js} +3 -3
- package/src/assets/web-panel/assets/{WebAuthn-Brrroxgr.js → WebAuthn-DPlw-QsB.js} +3 -3
- package/src/assets/web-panel/assets/{WorkflowEditor-Cny-evI9.js → WorkflowEditor-h4OsnU5q.js} +1 -1
- package/src/assets/web-panel/assets/{chat-CJ5iSwWq.js → chat-eO9wEwrW.js} +1 -1
- package/src/assets/web-panel/assets/{colors-DWa-2flG.js → colors-34lSmOXw.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-DFwUfptU.js → compact-item-CK4kEWJ4.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-FHWWcyeB.js → createContext-E0A57xed.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-CF3xafX2.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-QY_TElrN.js → hasIn-BD9ZMGAl.js} +1 -1
- package/src/assets/web-panel/assets/{index-BcVr-LOk.js → index--N0u6kTG.js} +1 -1
- package/src/assets/web-panel/assets/{index-CUiTugu3.js → index-8qMA1DWQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-0umhind6.js → index-B0rkHxKK.js} +1 -1
- package/src/assets/web-panel/assets/{index-wqiOz655.js → index-B_G_ElKO.js} +1 -1
- package/src/assets/web-panel/assets/{index-B18zERdP.js → index-BbX_Dted.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dy2PnKZx.js → index-Bjs90Eh9.js} +1 -1
- package/src/assets/web-panel/assets/{index-th467RN6.js → index-BmNbU2Z6.js} +1 -1
- package/src/assets/web-panel/assets/{index-uRUZdL7I.js → index-Brqc9Emx.js} +1 -1
- package/src/assets/web-panel/assets/{index-hw1J_Oxs.js → index-BsGmo6v1.js} +1 -1
- package/src/assets/web-panel/assets/index-C907rPwd.js +1 -0
- package/src/assets/web-panel/assets/{index-CjejB-z9.js → index-CT1_eRL-.js} +1 -1
- package/src/assets/web-panel/assets/{index-DaHvj4jA.js → index-CZBaqe3d.js} +1 -1
- package/src/assets/web-panel/assets/{index-B33frlaD.js → index-CZkFMeWL.js} +1 -1
- package/src/assets/web-panel/assets/{index-BYbwQ7SP.js → index-Ch175NUw.js} +1 -1
- package/src/assets/web-panel/assets/{index-va4Rt-yM.js → index-CsrKJJcX.js} +1 -1
- package/src/assets/web-panel/assets/{index-DDpXDi4J.js → index-CuSau5ya.js} +1 -1
- package/src/assets/web-panel/assets/{index-D-Mhq8K6.js → index-Cx3Jn1r0.js} +1 -1
- package/src/assets/web-panel/assets/{index-CKS7n6mE.js → index-Cz3unNfL.js} +1 -1
- package/src/assets/web-panel/assets/{index-BRsGZBHc.js → index-D4bB_x_v.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bd7McYpJ.js → index-DCn-ECvK.js} +1 -1
- package/src/assets/web-panel/assets/{index-DUfILsc-.js → index-DFLE2qO9.js} +1 -1
- package/src/assets/web-panel/assets/{index-DUepuy7O.js → index-DGRxt5wj.js} +1 -1
- package/src/assets/web-panel/assets/{index-BR4RMPnB.js → index-DONOUtlz.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dlq-u9E4.js → index-DP-UZAQN.js} +1 -1
- package/src/assets/web-panel/assets/{index-DCHMVYG1.js → index-Da5fmOHB.js} +1 -1
- package/src/assets/web-panel/assets/{index-BiHRihC0.js → index-DcE1BspQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-CGv5In_T.js → index-DcbgVLOH.js} +1 -1
- package/src/assets/web-panel/assets/{index-BQCtBurK.js → index-DeXNCyQJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-D2rPJ6Sv.js → index-DiT_REby.js} +1 -1
- package/src/assets/web-panel/assets/{index-CUoLd1dt.js → index-DpfisY1g.js} +1 -1
- package/src/assets/web-panel/assets/{index-2ufsNuVn.js → index-DrOalGut.js} +1 -1
- package/src/assets/web-panel/assets/{index-aTiI7lOQ.js → index-DrSAAuJj.js} +1 -1
- package/src/assets/web-panel/assets/{index-BUNwuu5v.js → index-DrsDA_md.js} +1 -1
- package/src/assets/web-panel/assets/{index-CkmgbT7h.js → index-DvKcroix.js} +1 -1
- package/src/assets/web-panel/assets/{index-BEjwv2x6.js → index-DzXjP44T.js} +1 -1
- package/src/assets/web-panel/assets/{index-CeGn0A4W.js → index-MIg5Z8qe.js} +1 -1
- package/src/assets/web-panel/assets/{index-C5F1vwec.js → index-o8pYehRq.js} +3 -3
- package/src/assets/web-panel/assets/index-wueRSK2d.js +1 -0
- package/src/assets/web-panel/assets/{index-w3SdYwaC.js → index-yAGBu2E0.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-BeSPUFDz.js → initDefaultProps-DMTkAomF.js} +1 -1
- package/src/assets/web-panel/assets/{motion-Dcajvjm9.js → motion-Cnti1F5g.js} +1 -1
- package/src/assets/web-panel/assets/{move-B76orau-.js → move-CGxmHUga.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-zB6yFwcX.js → mtc-parser-CuwwLoq7.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BsbNjz8w.js → omit-BpdlTkPM.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-BiJ9tssQ.js → pickAttrs-D7nWrThp.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-BdfMjMeN.js → placementArrow-Bhx0TV8F.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-rV4LGpbU.js → responsiveObserve-CZ1KesZh.js} +1 -1
- package/src/assets/web-panel/assets/{slide-HsVw1qFQ.js → slide-CnldF8J6.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-D1ry8XPE.js → statusUtils-CZfo_GOA.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-B1t6aQQ_.js → styleChecker-B2QCcAv5.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-C8qbl-9w.js → useFlexGapSupport-DzzjIS4J.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-R7g_mYTC.js → useFs-B_atg9M0.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-Cd-kCe7Z.js → usePersonalDataHub-DhZs3QYN.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-9WhK5UWA.js → vnode-DcePTYAm.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-CUqppPco.js → zoom-BYmlnjRk.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +2 -2
- package/src/commands/agent.js +19 -1
- package/src/commands/evolution-knowledge.js +54 -0
- package/src/commands/evolution-workbench.js +83 -0
- package/src/commands/evolution.js +6 -1
- package/src/commands/serve.js +47 -0
- package/src/commands/skill.js +158 -16
- package/src/data/changelog.json +26 -0
- package/src/gateways/ws/session-protocol.js +2 -0
- package/src/gateways/ws/ws-agent-handler.js +124 -69
- package/src/gateways/ws/ws-server.js +19 -0
- package/src/generated/cc-agent-protocol.schema.json +7 -1
- package/src/harness/jsonl-session-store.js +25 -1
- package/src/index.js +11 -3
- package/src/lazy-dispatch.js +9 -1
- package/src/lib/app-server/cli-agent-kernel-adapter.js +8 -0
- package/src/lib/app-server/graph-runtime.js +40 -1
- package/src/lib/app-server/server.js +181 -3
- package/src/lib/app-server/websocket-transport.js +23 -0
- package/src/lib/evolution/agent-evolution-runtime-composition-brand.js +17 -0
- package/src/lib/evolution/agent-evolution-runtime-composition.js +165 -1
- package/src/lib/evolution/controlled-skill-production-pilot.js +912 -0
- package/src/lib/evolution/evolution-artifact-ports.js +30 -0
- package/src/lib/evolution/evolution-deployment-loader.js +208 -0
- package/src/lib/evolution/evolution-raw-crypto-shred.js +185 -0
- package/src/lib/evolution/evolution-release-train-ledger-adapter.js +335 -0
- package/src/lib/evolution/evolution-release-train.js +538 -0
- package/src/lib/evolution/evolution-workbench-batch-executor.js +195 -0
- package/src/lib/evolution/evolution-workbench-cli-host.js +169 -0
- package/src/lib/evolution/evolution-workbench-metrics-ledger-adapter.js +648 -0
- package/src/lib/evolution/evolution-workbench-metrics.js +943 -0
- package/src/lib/evolution/evolution-workbench-projection.js +753 -0
- package/src/lib/evolution/evolution-workbench-version-control.js +272 -0
- package/src/lib/evolution/evolvable-artifact-ledger-adapter.js +688 -0
- package/src/lib/evolution/governed-knowledge-artifact-lifecycle.js +364 -0
- package/src/lib/evolution/governed-knowledge-conflict-merge.js +352 -0
- package/src/lib/evolution/governed-knowledge-dependency-authority.js +273 -0
- package/src/lib/evolution/governed-knowledge-dependency-ledger-executor.js +646 -0
- package/src/lib/evolution/governed-knowledge-merge-ledger-executor.js +671 -0
- package/src/lib/evolution/governed-knowledge-merge-publisher-authority.js +310 -0
- package/src/lib/evolution/governed-knowledge-node-crypto-authority.js +348 -0
- package/src/lib/evolution/governed-knowledge-rbac-approval-authority.js +621 -0
- package/src/lib/evolution/governed-knowledge-review-host.js +249 -0
- package/src/lib/evolution/governed-knowledge-sync-ledger-adapter.js +729 -0
- package/src/lib/evolution/governed-knowledge-sync-merge-publisher.js +312 -0
- package/src/lib/evolution/governed-knowledge-sync.js +795 -0
- package/src/lib/evolution/governed-knowledge-trust-ledger.js +707 -0
- package/src/lib/evolution/governed-skill-marketplace.js +430 -0
- package/src/lib/evolution/governed-wiki-pruning.js +435 -0
- package/src/lib/evolution/skill-outcome-index-authority.js +268 -0
- package/src/lib/evolution/skill-outcome-source-catalog-authority.js +237 -0
- package/src/lib/evolution/skill-writer-inventory-manifest.js +7 -6
- package/src/lib/evolution/statistical-progressive-canary.js +683 -0
- package/src/lib/evolution/wikiskill-benchmark.js +510 -0
- package/src/lib/public-ide-capability-manifest.js +4 -0
- package/src/lib/session-host-lease.js +11 -16
- package/src/lib/skill-outcome-authority.js +43 -0
- package/src/lib/skill-outcome-transcript-authority.js +252 -0
- package/src/lib/skill-retrieval-router-benchmark.js +135 -0
- package/src/lib/skill-retrieval-router.js +235 -0
- package/src/lib/skill-vector-authority.js +325 -0
- package/src/lib/skill-vector-process-authority.js +386 -0
- package/src/repl/agent-repl.js +7 -1
- package/src/runtime/agent-core.js +133 -13
- package/src/runtime/agent-runtime.js +42 -0
- package/src/runtime/headless-runner.js +32 -0
- package/src/runtime/headless-stream.js +39 -1
- package/src/runtime/runtime-factory.js +62 -4
- package/src/assets/web-panel/assets/ChatBubbleRenderer-eMmw1eZF.js +0 -1
- package/src/assets/web-panel/assets/devWarning-DxufPwXC.js +0 -1
- package/src/assets/web-panel/assets/index-ZMTB9p5z.js +0 -1
- package/src/assets/web-panel/assets/index-_PvIDelE.js +0 -1
package/src/repl/agent-repl.js
CHANGED
|
@@ -739,6 +739,7 @@ export async function agentLoop(messages, options) {
|
|
|
739
739
|
tool: event?.tool || started?.tool || "?",
|
|
740
740
|
isError: Boolean(event?.error || event?.result?.error),
|
|
741
741
|
skill: event?.attribution?.skill,
|
|
742
|
+
invocationReceipt: event?.result?.invocationReceipt,
|
|
742
743
|
durationMs: started
|
|
743
744
|
? Math.max(
|
|
744
745
|
0,
|
|
@@ -918,9 +919,13 @@ export async function agentLoop(messages, options) {
|
|
|
918
919
|
: undefined,
|
|
919
920
|
...extractPluginUsageAttribution(event.result),
|
|
920
921
|
durationMs,
|
|
922
|
+
invocationReceipt: event.result?.invocationReceipt,
|
|
921
923
|
});
|
|
922
924
|
} catch (_e) {
|
|
923
|
-
if (
|
|
925
|
+
if (
|
|
926
|
+
event.result?.invocationReceipt ||
|
|
927
|
+
options.persistUsageTelemetry === true
|
|
928
|
+
) {
|
|
924
929
|
throw markRuntimeLedgerPersistenceError(_e);
|
|
925
930
|
}
|
|
926
931
|
// Legacy non-JSONL persistence remains best-effort.
|
|
@@ -9638,6 +9643,7 @@ async function startAgentReplInWorkspaceOwned(
|
|
|
9638
9643
|
sessionId,
|
|
9639
9644
|
persistUsageTelemetry: useJsonl,
|
|
9640
9645
|
skillLoader: _replSkillLoader,
|
|
9646
|
+
skillOutcomeIndex: options.skillOutcomeIndex,
|
|
9641
9647
|
cwd: process.cwd(),
|
|
9642
9648
|
additionalDirectories,
|
|
9643
9649
|
sandbox: _sandbox,
|
|
@@ -45,6 +45,12 @@ import {
|
|
|
45
45
|
} from "../lib/lsp/workspace-roots.js";
|
|
46
46
|
import { getPlanModeManager } from "../lib/plan-mode.js";
|
|
47
47
|
import { CLISkillLoader } from "../lib/skill-loader.js";
|
|
48
|
+
import { routeSkillDescriptors } from "../lib/skill-retrieval-router.js";
|
|
49
|
+
import { resolveSkillOutcomeAuthority } from "../lib/skill-outcome-authority.js";
|
|
50
|
+
import {
|
|
51
|
+
captureSkillVectorAuthority,
|
|
52
|
+
unavailableSkillVectorEvidence,
|
|
53
|
+
} from "../lib/skill-vector-authority.js";
|
|
48
54
|
import {
|
|
49
55
|
admitSkillPrompt,
|
|
50
56
|
debitSkillPromptBudget,
|
|
@@ -362,12 +368,12 @@ function resolveBackgroundShellWorkspacePaths(
|
|
|
362
368
|
|
|
363
369
|
// ─── Background shell tasks ────────────────────────────────────────────────
|
|
364
370
|
//
|
|
365
|
-
// run_shell
|
|
366
|
-
//
|
|
367
|
-
//
|
|
368
|
-
//
|
|
369
|
-
//
|
|
370
|
-
//
|
|
371
|
+
// run_shell remains synchronous by default for compatibility. Persistent
|
|
372
|
+
// stream hosts opt into an async foreground path so commands cannot block the
|
|
373
|
+
// session heartbeat or protocol pump. When the model passes
|
|
374
|
+
// run_in_background:true the command is spawned instead, returns a task_id
|
|
375
|
+
// immediately, and streams its output into this registry. The agent then polls
|
|
376
|
+
// completion + incremental output via the check_shell tool — the
|
|
371
377
|
// run_in_background + BashOutput pattern from Claude Code.
|
|
372
378
|
//
|
|
373
379
|
// In-memory, process-lifetime: a task_id is only valid within the agent process
|
|
@@ -378,6 +384,22 @@ const MAX_BG_BUFFER = 1024 * 1024; // 1 MB retained tail per stream
|
|
|
378
384
|
const _backgroundShellTasks = new Map();
|
|
379
385
|
let _backgroundTaskSeq = 0;
|
|
380
386
|
|
|
387
|
+
function _runForegroundProcessAsync(file, args, options) {
|
|
388
|
+
return new Promise((resolve, reject) => {
|
|
389
|
+
try {
|
|
390
|
+
broker.execFile(file, args, options, (error, stdout, stderr) => {
|
|
391
|
+
if (error) {
|
|
392
|
+
reject(error);
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
resolve({ stdout: stdout ?? "", stderr: stderr ?? "" });
|
|
396
|
+
});
|
|
397
|
+
} catch (error) {
|
|
398
|
+
reject(error);
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
|
|
381
403
|
function _newBgStream() {
|
|
382
404
|
return { buf: "", total: 0, dropped: 0, cursor: 0 };
|
|
383
405
|
}
|
|
@@ -3549,6 +3571,8 @@ export async function executeTool(name, args, context = {}) {
|
|
|
3549
3571
|
skillLoader,
|
|
3550
3572
|
// Subagent skill capability INTERSECT — forwarded to run_skill/list_skills.
|
|
3551
3573
|
skillAllowlist: context.skillAllowlist ?? null,
|
|
3574
|
+
skillOutcomeIndex: context.skillOutcomeIndex,
|
|
3575
|
+
skillVectorAuthority: context.skillVectorAuthority,
|
|
3552
3576
|
cwd,
|
|
3553
3577
|
parentMessages: context.parentMessages,
|
|
3554
3578
|
interaction: context.interaction,
|
|
@@ -3592,6 +3616,7 @@ export async function executeTool(name, args, context = {}) {
|
|
|
3592
3616
|
context.subtreeInstructionScope || context.sessionId || "__legacy__",
|
|
3593
3617
|
shellPolicyOverrides: context.shellPolicyOverrides || null,
|
|
3594
3618
|
classifyAllShell: context.classifyAllShell === true,
|
|
3619
|
+
nonBlockingShell: context.nonBlockingShell === true,
|
|
3595
3620
|
approvalGate: context.approvalGate || null,
|
|
3596
3621
|
shellConfirm: context.shellConfirm || null,
|
|
3597
3622
|
additionalDirectories: context.additionalDirectories || null,
|
|
@@ -5091,6 +5116,8 @@ async function executeToolInner(
|
|
|
5091
5116
|
{
|
|
5092
5117
|
skillLoader,
|
|
5093
5118
|
skillAllowlist = null,
|
|
5119
|
+
skillOutcomeIndex,
|
|
5120
|
+
skillVectorAuthority,
|
|
5094
5121
|
cwd,
|
|
5095
5122
|
parentMessages,
|
|
5096
5123
|
interaction,
|
|
@@ -5158,6 +5185,7 @@ async function executeToolInner(
|
|
|
5158
5185
|
// (spawn_sub_agent / isolated run_skill) as their parent_id.
|
|
5159
5186
|
hookTraceId = null,
|
|
5160
5187
|
skillLifecycleMode = "active",
|
|
5188
|
+
nonBlockingShell = false,
|
|
5161
5189
|
},
|
|
5162
5190
|
) {
|
|
5163
5191
|
const localToolDescriptor =
|
|
@@ -6627,7 +6655,23 @@ async function executeToolInner(
|
|
|
6627
6655
|
auditContext: createShellProcessAuditContext(),
|
|
6628
6656
|
...processProvenance,
|
|
6629
6657
|
};
|
|
6630
|
-
if (pluginBinInvocation) {
|
|
6658
|
+
if (pluginBinInvocation && nonBlockingShell) {
|
|
6659
|
+
const res = await _runForegroundProcessAsync(
|
|
6660
|
+
executionPlugin.sandboxExecution?.kind === "strict-plugin-node-bin"
|
|
6661
|
+
? executionPlugin.sandboxExecution.runtimePath
|
|
6662
|
+
: executionPlugin.command,
|
|
6663
|
+
executionPlugin.argv,
|
|
6664
|
+
{
|
|
6665
|
+
...brokerExecOpts,
|
|
6666
|
+
cwd:
|
|
6667
|
+
executionPlugin.sandboxExecution?.workingDirectory ||
|
|
6668
|
+
brokerExecOpts.cwd,
|
|
6669
|
+
shell: false,
|
|
6670
|
+
windowsHide: true,
|
|
6671
|
+
},
|
|
6672
|
+
);
|
|
6673
|
+
output = res.stdout;
|
|
6674
|
+
} else if (pluginBinInvocation) {
|
|
6631
6675
|
const res = broker.spawnSync(
|
|
6632
6676
|
executionPlugin.sandboxExecution?.kind === "strict-plugin-node-bin"
|
|
6633
6677
|
? executionPlugin.sandboxExecution.runtimePath
|
|
@@ -6653,8 +6697,25 @@ async function executeToolInner(
|
|
|
6653
6697
|
throw e;
|
|
6654
6698
|
}
|
|
6655
6699
|
output = res.stdout ?? "";
|
|
6700
|
+
} else if (shellInv.useDefaultShell && nonBlockingShell) {
|
|
6701
|
+
const res = await _runForegroundProcessAsync(args.command, [], {
|
|
6702
|
+
...brokerExecOpts,
|
|
6703
|
+
shell: true,
|
|
6704
|
+
windowsHide: true,
|
|
6705
|
+
});
|
|
6706
|
+
output = res.stdout;
|
|
6656
6707
|
} else if (shellInv.useDefaultShell) {
|
|
6657
6708
|
output = broker.execSync(args.command, brokerExecOpts);
|
|
6709
|
+
} else if (nonBlockingShell) {
|
|
6710
|
+
const res = await _runForegroundProcessAsync(
|
|
6711
|
+
shellInv.file,
|
|
6712
|
+
shellInv.argv,
|
|
6713
|
+
{
|
|
6714
|
+
...brokerExecOpts,
|
|
6715
|
+
windowsHide: true,
|
|
6716
|
+
},
|
|
6717
|
+
);
|
|
6718
|
+
output = res.stdout;
|
|
6658
6719
|
} else {
|
|
6659
6720
|
// PowerShell route: explicit argv, no intermediate default shell.
|
|
6660
6721
|
// Reproduce execSync's contract so the shared catch shapes errors
|
|
@@ -8201,14 +8262,38 @@ async function executeToolInner(
|
|
|
8201
8262
|
(s) => s.category.toLowerCase() === args.category.toLowerCase(),
|
|
8202
8263
|
);
|
|
8203
8264
|
}
|
|
8265
|
+
let routing = null;
|
|
8266
|
+
let outcomeAuthority = null;
|
|
8267
|
+
let vector = null;
|
|
8204
8268
|
if (args.query) {
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
(s) =>
|
|
8208
|
-
s.id.includes(q) ||
|
|
8209
|
-
s.description.toLowerCase().includes(q) ||
|
|
8210
|
-
s.category.toLowerCase().includes(q),
|
|
8269
|
+
outcomeAuthority = resolveSkillOutcomeAuthority(
|
|
8270
|
+
skillOutcomeIndex === undefined ? {} : { index: skillOutcomeIndex },
|
|
8211
8271
|
);
|
|
8272
|
+
const vectorAuthority =
|
|
8273
|
+
skillVectorAuthority == null
|
|
8274
|
+
? null
|
|
8275
|
+
: captureSkillVectorAuthority(skillVectorAuthority);
|
|
8276
|
+
vector =
|
|
8277
|
+
vectorAuthority === null
|
|
8278
|
+
? null
|
|
8279
|
+
: await vectorAuthority.score({ query: args.query, skills });
|
|
8280
|
+
routing = routeSkillDescriptors({
|
|
8281
|
+
skills,
|
|
8282
|
+
query: args.query,
|
|
8283
|
+
target: { os: process.platform },
|
|
8284
|
+
vectorScores: vector?.scores ?? null,
|
|
8285
|
+
outcomeMetrics: outcomeAuthority.metrics,
|
|
8286
|
+
topK: Math.min(64, Math.max(1, skills.length)),
|
|
8287
|
+
});
|
|
8288
|
+
const byDigest = new Map(
|
|
8289
|
+
skills.map((skill) => [
|
|
8290
|
+
skill.executionIdentity?.contentDigest,
|
|
8291
|
+
skill,
|
|
8292
|
+
]),
|
|
8293
|
+
);
|
|
8294
|
+
skills = routing.candidates
|
|
8295
|
+
.map(({ digest }) => byDigest.get(digest))
|
|
8296
|
+
.filter(Boolean);
|
|
8212
8297
|
}
|
|
8213
8298
|
skillLoader.recordDescriptorUse?.(skills, {
|
|
8214
8299
|
sessionId,
|
|
@@ -8217,12 +8302,42 @@ async function executeToolInner(
|
|
|
8217
8302
|
});
|
|
8218
8303
|
return attachDescriptor({
|
|
8219
8304
|
count: skills.length,
|
|
8305
|
+
...(routing
|
|
8306
|
+
? {
|
|
8307
|
+
routing: {
|
|
8308
|
+
schema: routing.schema,
|
|
8309
|
+
selectedDigest: routing.selected?.digest || null,
|
|
8310
|
+
conflicts: routing.conflicts,
|
|
8311
|
+
rejectedCount: routing.rejected.length,
|
|
8312
|
+
vectorAvailable: routing.vectorAvailable,
|
|
8313
|
+
vectorAuthority:
|
|
8314
|
+
vector?.evidence ?? unavailableSkillVectorEvidence(),
|
|
8315
|
+
outcomeAuthority: outcomeAuthority.evidence,
|
|
8316
|
+
},
|
|
8317
|
+
}
|
|
8318
|
+
: {}),
|
|
8220
8319
|
skills: skills.map((s) => ({
|
|
8221
8320
|
id: s.id,
|
|
8222
8321
|
category: s.category,
|
|
8223
8322
|
source: s.source,
|
|
8224
8323
|
hasHandler: s.hasHandler,
|
|
8225
8324
|
description: (s.description || "").substring(0, 80),
|
|
8325
|
+
...(routing
|
|
8326
|
+
? (() => {
|
|
8327
|
+
const candidate = routing.candidates.find(
|
|
8328
|
+
({ digest }) => digest === s.executionIdentity?.contentDigest,
|
|
8329
|
+
);
|
|
8330
|
+
return candidate
|
|
8331
|
+
? {
|
|
8332
|
+
digest: candidate.digest,
|
|
8333
|
+
version: candidate.version,
|
|
8334
|
+
contextCostTokens: candidate.contextCostTokens,
|
|
8335
|
+
routeScore: candidate.score,
|
|
8336
|
+
routeReason: candidate.reason,
|
|
8337
|
+
}
|
|
8338
|
+
: {};
|
|
8339
|
+
})()
|
|
8340
|
+
: {}),
|
|
8226
8341
|
})),
|
|
8227
8342
|
});
|
|
8228
8343
|
}
|
|
@@ -13160,6 +13275,8 @@ export async function* agentLoop(messages, options) {
|
|
|
13160
13275
|
const toolContext = {
|
|
13161
13276
|
hookDb: hermeticExecution ? null : options.hookDb || null,
|
|
13162
13277
|
skillLoader: options.skillLoader || _defaultSkillLoader,
|
|
13278
|
+
skillOutcomeIndex: options.skillOutcomeIndex,
|
|
13279
|
+
skillVectorAuthority: options.skillVectorAuthority,
|
|
13163
13280
|
// Hook-envelope tracing (P2 unified event bus): every settings-hook payload
|
|
13164
13281
|
// fired during this run carries trace_id = this run's id; a spawned child
|
|
13165
13282
|
// loop carries parent_id = the spawning run's id (threaded by
|
|
@@ -13268,6 +13385,9 @@ export async function* agentLoop(messages, options) {
|
|
|
13268
13385
|
// verification allowlist (npm test / rg / …) is classified through the
|
|
13269
13386
|
// ApprovalGate instead of fast-pathed, so no shell command auto-runs.
|
|
13270
13387
|
classifyAllShell: options.classifyAllShell || false,
|
|
13388
|
+
// Persistent stream hosts must not block their own session-lease heartbeat
|
|
13389
|
+
// while a foreground shell command (notably a networked git push) runs.
|
|
13390
|
+
nonBlockingShell: options.nonBlockingShell === true,
|
|
13271
13391
|
approvalGate: hermeticExecution ? null : options.approvalGate || null,
|
|
13272
13392
|
shellConfirm: hermeticExecution ? null : options.shellConfirm || null,
|
|
13273
13393
|
// Interactive sessions (the REPL) set this so run_code is gated through the
|
|
@@ -34,6 +34,8 @@ import { registerHostHooksV2Workspace } from "../lib/hooks-v2-workspace-context.
|
|
|
34
34
|
import { captureStructuredMemoryPolicyReceiptWriter } from "../lib/evolution/structured-memory-policy-receipt-writer.js";
|
|
35
35
|
import { captureStructuredMemoryAgentControlPlane } from "../lib/evolution/structured-memory-agent-control-plane.js";
|
|
36
36
|
import { captureAgentEvolutionIngress } from "../lib/evolution/agent-evolution-ingress.js";
|
|
37
|
+
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
38
|
+
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
37
39
|
|
|
38
40
|
const {
|
|
39
41
|
DEFAULT_ALLOWED_MCP_SERVER_NAMES,
|
|
@@ -69,6 +71,34 @@ export class AgentRuntime {
|
|
|
69
71
|
deps.evolutionIngress == null
|
|
70
72
|
? null
|
|
71
73
|
: captureAgentEvolutionIngress(deps.evolutionIngress);
|
|
74
|
+
this.skillOutcomeIndex =
|
|
75
|
+
deps.skillOutcomeIndex == null
|
|
76
|
+
? null
|
|
77
|
+
: captureAgentSkillOutcomeIndex(deps.skillOutcomeIndex);
|
|
78
|
+
this.skillVectorAuthority =
|
|
79
|
+
deps.skillVectorAuthority == null
|
|
80
|
+
? null
|
|
81
|
+
: captureSkillVectorAuthority(deps.skillVectorAuthority);
|
|
82
|
+
if (
|
|
83
|
+
this.evolutionIngress !== null &&
|
|
84
|
+
this.skillOutcomeIndex !== null &&
|
|
85
|
+
this.evolutionIngress.tenantId !== this.skillOutcomeIndex.tenantId
|
|
86
|
+
) {
|
|
87
|
+
throw new Error(
|
|
88
|
+
"Agent evolution ingress and Skill outcome index must share one tenant",
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const retrievalTenant =
|
|
92
|
+
this.evolutionIngress?.tenantId ??
|
|
93
|
+
this.skillOutcomeIndex?.tenantId ??
|
|
94
|
+
null;
|
|
95
|
+
if (
|
|
96
|
+
retrievalTenant !== null &&
|
|
97
|
+
this.skillVectorAuthority !== null &&
|
|
98
|
+
retrievalTenant !== this.skillVectorAuthority.tenantId
|
|
99
|
+
) {
|
|
100
|
+
throw new Error("Agent retrieval authorities must share one tenant");
|
|
101
|
+
}
|
|
72
102
|
this.structuredMemoryControlPlane =
|
|
73
103
|
deps.structuredMemoryControlPlane == null
|
|
74
104
|
? null
|
|
@@ -297,6 +327,12 @@ export class AgentRuntime {
|
|
|
297
327
|
...(this.evolutionIngress === null
|
|
298
328
|
? {}
|
|
299
329
|
: { evolutionIngress: this.evolutionIngress }),
|
|
330
|
+
...(this.skillOutcomeIndex === null
|
|
331
|
+
? {}
|
|
332
|
+
: { skillOutcomeIndex: this.skillOutcomeIndex }),
|
|
333
|
+
...(this.skillVectorAuthority === null
|
|
334
|
+
? {}
|
|
335
|
+
: { skillVectorAuthority: this.skillVectorAuthority }),
|
|
300
336
|
});
|
|
301
337
|
if (this.evolutionIngress !== null) {
|
|
302
338
|
await this.evolutionIngress.complete();
|
|
@@ -468,6 +504,12 @@ export class AgentRuntime {
|
|
|
468
504
|
remoteSessionPeerId,
|
|
469
505
|
envelopeBus,
|
|
470
506
|
evolutionCompositionFactory: this.deps.evolutionCompositionFactory,
|
|
507
|
+
...(this.skillOutcomeIndex === null
|
|
508
|
+
? {}
|
|
509
|
+
: { skillOutcomeIndex: this.skillOutcomeIndex }),
|
|
510
|
+
...(this.skillVectorAuthority === null
|
|
511
|
+
? {}
|
|
512
|
+
: { skillVectorAuthority: this.skillVectorAuthority }),
|
|
471
513
|
});
|
|
472
514
|
|
|
473
515
|
server.on("connection", ({ clientId, ip }) => {
|
|
@@ -121,6 +121,8 @@ import { createBackgroundPhaseReporter } from "../lib/background-phase-reporter.
|
|
|
121
121
|
import { createBackgroundInteractionClient } from "../lib/background-interaction-resolver.js";
|
|
122
122
|
import { withQuietStdout } from "./quiet-stdout.js";
|
|
123
123
|
import { captureAgentEvolutionIngress } from "../lib/evolution/agent-evolution-ingress.js";
|
|
124
|
+
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
125
|
+
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
124
126
|
import { CostBudget } from "../lib/cost-budget.js";
|
|
125
127
|
import { estimateTokens } from "../harness/prompt-compressor.js";
|
|
126
128
|
import {
|
|
@@ -659,6 +661,32 @@ async function runAgentHeadlessInWorkspace(
|
|
|
659
661
|
options.evolutionIngress == null
|
|
660
662
|
? null
|
|
661
663
|
: captureAgentEvolutionIngress(options.evolutionIngress);
|
|
664
|
+
const skillOutcomeIndex =
|
|
665
|
+
options.skillOutcomeIndex == null
|
|
666
|
+
? null
|
|
667
|
+
: captureAgentSkillOutcomeIndex(options.skillOutcomeIndex);
|
|
668
|
+
const skillVectorAuthority =
|
|
669
|
+
options.skillVectorAuthority == null
|
|
670
|
+
? null
|
|
671
|
+
: captureSkillVectorAuthority(options.skillVectorAuthority);
|
|
672
|
+
if (
|
|
673
|
+
evolutionIngress !== null &&
|
|
674
|
+
skillOutcomeIndex !== null &&
|
|
675
|
+
evolutionIngress.tenantId !== skillOutcomeIndex.tenantId
|
|
676
|
+
) {
|
|
677
|
+
throw new TypeError(
|
|
678
|
+
"Agent evolution ingress and Skill outcome index must share one tenant",
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
const retrievalTenant =
|
|
682
|
+
evolutionIngress?.tenantId ?? skillOutcomeIndex?.tenantId ?? null;
|
|
683
|
+
if (
|
|
684
|
+
retrievalTenant !== null &&
|
|
685
|
+
skillVectorAuthority !== null &&
|
|
686
|
+
retrievalTenant !== skillVectorAuthority.tenantId
|
|
687
|
+
) {
|
|
688
|
+
throw new TypeError("Agent retrieval authorities must share one tenant");
|
|
689
|
+
}
|
|
662
690
|
const prompt = (options.prompt || "").trim();
|
|
663
691
|
if (!prompt) {
|
|
664
692
|
throw new Error(
|
|
@@ -2449,6 +2477,8 @@ async function runAgentHeadlessInWorkspace(
|
|
|
2449
2477
|
apiKey,
|
|
2450
2478
|
cwd,
|
|
2451
2479
|
skillLoader: _runtimeSkillLoader,
|
|
2480
|
+
...(skillOutcomeIndex === null ? {} : { skillOutcomeIndex }),
|
|
2481
|
+
...(skillVectorAuthority === null ? {} : { skillVectorAuthority }),
|
|
2452
2482
|
additionalDirectories,
|
|
2453
2483
|
sandbox: options.sandbox || null,
|
|
2454
2484
|
sessionId,
|
|
@@ -2605,6 +2635,7 @@ async function runAgentHeadlessInWorkspace(
|
|
|
2605
2635
|
tool: event?.tool || started?.tool || "?",
|
|
2606
2636
|
isError: Boolean(event?.error || event?.result?.error),
|
|
2607
2637
|
skill: event?.attribution?.skill,
|
|
2638
|
+
invocationReceipt: event?.result?.invocationReceipt,
|
|
2608
2639
|
durationMs: started
|
|
2609
2640
|
? Math.max(
|
|
2610
2641
|
0,
|
|
@@ -3211,6 +3242,7 @@ async function runAgentHeadlessInWorkspace(
|
|
|
3211
3242
|
plugin: settledCall.plugin || undefined,
|
|
3212
3243
|
pluginVersion: settledCall.pluginVersion || undefined,
|
|
3213
3244
|
durationMs: settledCall.durationMs,
|
|
3245
|
+
invocationReceipt: event.result?.invocationReceipt,
|
|
3214
3246
|
}),
|
|
3215
3247
|
);
|
|
3216
3248
|
}
|
|
@@ -80,6 +80,8 @@ import {
|
|
|
80
80
|
AGENT_EVOLUTION_INGRESS_FAILED_CODE,
|
|
81
81
|
captureAgentEvolutionIngress,
|
|
82
82
|
} from "../lib/evolution/agent-evolution-ingress.js";
|
|
83
|
+
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
84
|
+
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
83
85
|
import {
|
|
84
86
|
resolveAgentMcp,
|
|
85
87
|
resolvePermissionPromptTool,
|
|
@@ -1054,7 +1056,10 @@ async function runTurn(
|
|
|
1054
1056
|
? undefined
|
|
1055
1057
|
: Math.max(0, now() - toolStartedAt.get(lastCall.id)));
|
|
1056
1058
|
Object.assign(lastCall, extractPluginUsageAttribution(event.result));
|
|
1057
|
-
persistToolEvent?.("settled",
|
|
1059
|
+
persistToolEvent?.("settled", {
|
|
1060
|
+
...lastCall,
|
|
1061
|
+
invocationReceipt: event.result?.invocationReceipt,
|
|
1062
|
+
});
|
|
1058
1063
|
}
|
|
1059
1064
|
if (lastCall) toolStartedAt.delete(lastCall.id);
|
|
1060
1065
|
const pm = getPlanModeManager();
|
|
@@ -1539,6 +1544,32 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
1539
1544
|
options.evolutionIngress == null
|
|
1540
1545
|
? null
|
|
1541
1546
|
: captureAgentEvolutionIngress(options.evolutionIngress);
|
|
1547
|
+
const skillOutcomeIndex =
|
|
1548
|
+
options.skillOutcomeIndex == null
|
|
1549
|
+
? null
|
|
1550
|
+
: captureAgentSkillOutcomeIndex(options.skillOutcomeIndex);
|
|
1551
|
+
const skillVectorAuthority =
|
|
1552
|
+
options.skillVectorAuthority == null
|
|
1553
|
+
? null
|
|
1554
|
+
: captureSkillVectorAuthority(options.skillVectorAuthority);
|
|
1555
|
+
if (
|
|
1556
|
+
evolutionIngress !== null &&
|
|
1557
|
+
skillOutcomeIndex !== null &&
|
|
1558
|
+
evolutionIngress.tenantId !== skillOutcomeIndex.tenantId
|
|
1559
|
+
) {
|
|
1560
|
+
throw new TypeError(
|
|
1561
|
+
"Agent evolution ingress and Skill outcome index must share one tenant",
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1564
|
+
const retrievalTenant =
|
|
1565
|
+
evolutionIngress?.tenantId ?? skillOutcomeIndex?.tenantId ?? null;
|
|
1566
|
+
if (
|
|
1567
|
+
retrievalTenant !== null &&
|
|
1568
|
+
skillVectorAuthority !== null &&
|
|
1569
|
+
retrievalTenant !== skillVectorAuthority.tenantId
|
|
1570
|
+
) {
|
|
1571
|
+
throw new TypeError("Agent retrieval authorities must share one tenant");
|
|
1572
|
+
}
|
|
1542
1573
|
const model = options.model || "qwen2.5:7b";
|
|
1543
1574
|
const provider = options.provider || "ollama";
|
|
1544
1575
|
const baseUrl = options.baseUrl || "http://localhost:11434";
|
|
@@ -3203,6 +3234,8 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
3203
3234
|
apiKey,
|
|
3204
3235
|
cwd,
|
|
3205
3236
|
additionalDirectories,
|
|
3237
|
+
...(skillOutcomeIndex === null ? {} : { skillOutcomeIndex }),
|
|
3238
|
+
...(skillVectorAuthority === null ? {} : { skillVectorAuthority }),
|
|
3206
3239
|
sessionId,
|
|
3207
3240
|
sessionBudget: options.sessionBudget || null,
|
|
3208
3241
|
hostResourceBudget,
|
|
@@ -3376,6 +3409,7 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
3376
3409
|
plugin: call.plugin || undefined,
|
|
3377
3410
|
pluginVersion: call.pluginVersion || undefined,
|
|
3378
3411
|
durationMs: call.durationMs,
|
|
3412
|
+
invocationReceipt: call.invocationReceipt,
|
|
3379
3413
|
});
|
|
3380
3414
|
} catch (error) {
|
|
3381
3415
|
throw markRuntimeLedgerPersistenceError(error);
|
|
@@ -3403,6 +3437,7 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
3403
3437
|
tool: event?.tool || started?.tool || "?",
|
|
3404
3438
|
is_error: Boolean(event?.error || event?.result?.error),
|
|
3405
3439
|
skill: event?.attribution?.skill,
|
|
3440
|
+
invocationReceipt: event?.result?.invocationReceipt,
|
|
3406
3441
|
durationMs: started
|
|
3407
3442
|
? Math.max(
|
|
3408
3443
|
0,
|
|
@@ -4545,6 +4580,9 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
4545
4580
|
onUsageSettlement: persistUsageEvent,
|
|
4546
4581
|
onToolCallBoundary: persistChildToolBoundary,
|
|
4547
4582
|
onToolCallSettlement: persistChildToolSettlement,
|
|
4583
|
+
// Keep the session heartbeat and protocol pumps live while a
|
|
4584
|
+
// foreground command such as a networked git push is still running.
|
|
4585
|
+
nonBlockingShell: true,
|
|
4548
4586
|
// Resume-degenerate role merge for the first live model call only.
|
|
4549
4587
|
mergeRoles: mergeRolesThisTurn,
|
|
4550
4588
|
},
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { loadConfig } from "../lib/config-manager.js";
|
|
2
2
|
import { AgentRuntime } from "./agent-runtime.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
captureAgentEvolutionRuntimeComposition,
|
|
5
|
+
captureAgentSkillOutcomeIndex,
|
|
6
|
+
} from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
7
|
+
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
4
8
|
import {
|
|
5
9
|
resolveAgentPolicy,
|
|
6
10
|
resolveServerPolicy,
|
|
@@ -11,6 +15,8 @@ export function createAgentRuntimeFactory({
|
|
|
11
15
|
config = loadConfig(),
|
|
12
16
|
deps = {},
|
|
13
17
|
evolutionComposition = null,
|
|
18
|
+
skillOutcomeIndex = null,
|
|
19
|
+
skillVectorAuthority = null,
|
|
14
20
|
} = {}) {
|
|
15
21
|
const composition =
|
|
16
22
|
evolutionComposition === null
|
|
@@ -21,12 +27,64 @@ export function createAgentRuntimeFactory({
|
|
|
21
27
|
"evolution ingress must come from the production composition root only",
|
|
22
28
|
);
|
|
23
29
|
}
|
|
30
|
+
const outcomeIndex =
|
|
31
|
+
skillOutcomeIndex === null
|
|
32
|
+
? null
|
|
33
|
+
: captureAgentSkillOutcomeIndex(skillOutcomeIndex);
|
|
34
|
+
const vectorAuthority =
|
|
35
|
+
skillVectorAuthority === null
|
|
36
|
+
? null
|
|
37
|
+
: captureSkillVectorAuthority(skillVectorAuthority);
|
|
38
|
+
if (
|
|
39
|
+
composition !== null &&
|
|
40
|
+
outcomeIndex !== null &&
|
|
41
|
+
composition.tenantId !== outcomeIndex.tenantId
|
|
42
|
+
) {
|
|
43
|
+
throw new TypeError(
|
|
44
|
+
"evolution composition and Skill outcome index must share one tenant",
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
if (outcomeIndex !== null && Object.hasOwn(deps, "skillOutcomeIndex")) {
|
|
48
|
+
throw new TypeError(
|
|
49
|
+
"Skill outcome index must come from the production composition root only",
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const retrievalTenant =
|
|
53
|
+
composition?.tenantId ?? outcomeIndex?.tenantId ?? null;
|
|
54
|
+
if (
|
|
55
|
+
retrievalTenant !== null &&
|
|
56
|
+
vectorAuthority !== null &&
|
|
57
|
+
retrievalTenant !== vectorAuthority.tenantId
|
|
58
|
+
) {
|
|
59
|
+
throw new TypeError("Agent retrieval authorities must share one tenant");
|
|
60
|
+
}
|
|
61
|
+
if (vectorAuthority !== null && Object.hasOwn(deps, "skillVectorAuthority")) {
|
|
62
|
+
throw new TypeError(
|
|
63
|
+
"Skill vector authority must come from the production root only",
|
|
64
|
+
);
|
|
65
|
+
}
|
|
24
66
|
const runtimeDeps =
|
|
25
|
-
composition === null
|
|
67
|
+
composition === null && outcomeIndex === null && vectorAuthority === null
|
|
26
68
|
? deps
|
|
27
69
|
: Object.freeze({
|
|
28
70
|
...deps,
|
|
29
|
-
|
|
71
|
+
...(composition === null
|
|
72
|
+
? {}
|
|
73
|
+
: { evolutionIngress: composition.evolutionIngress }),
|
|
74
|
+
...(outcomeIndex === null ? {} : { skillOutcomeIndex: outcomeIndex }),
|
|
75
|
+
...(vectorAuthority === null
|
|
76
|
+
? {}
|
|
77
|
+
: { skillVectorAuthority: vectorAuthority }),
|
|
78
|
+
});
|
|
79
|
+
const serverDeps =
|
|
80
|
+
outcomeIndex === null && vectorAuthority === null
|
|
81
|
+
? deps
|
|
82
|
+
: Object.freeze({
|
|
83
|
+
...deps,
|
|
84
|
+
...(outcomeIndex === null ? {} : { skillOutcomeIndex: outcomeIndex }),
|
|
85
|
+
...(vectorAuthority === null
|
|
86
|
+
? {}
|
|
87
|
+
: { skillVectorAuthority: vectorAuthority }),
|
|
30
88
|
});
|
|
31
89
|
return {
|
|
32
90
|
createAgentRuntime(overrides = {}) {
|
|
@@ -52,7 +110,7 @@ export function createAgentRuntimeFactory({
|
|
|
52
110
|
kind: "server",
|
|
53
111
|
policy: resolveServerPolicy(overrides),
|
|
54
112
|
config,
|
|
55
|
-
deps,
|
|
113
|
+
deps: serverDeps,
|
|
56
114
|
});
|
|
57
115
|
},
|
|
58
116
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as v,P as m,J as S,U as n,R as a,S as y,K as C,Q as w,V as x,_ as B,b as s}from"./vendor-Bn1JzzAn.js";import{_ as k}from"./index-C5F1vwec.js";import"./icons-DG5UD-6K.js";const N={__name:"ChatBubbleRenderer",props:{event:{type:Object,required:!0}},setup(c,{expose:i}){i();const t=c,r=s(()=>{const e=t.event.content||{};return e.text||e.body||e.message||e.title||JSON.stringify(e).slice(0,200)}),d=s(()=>{const e=t.event.content||{};return e.from||e.sender||e.senderName||t.event.actor||"(unknown)"}),l=s(()=>{const e=(t.event.actor||"").toLowerCase();return e.includes("self")||e==="me"||e.endsWith("_self")}),o=s(()=>{const e=t.event.source.adapter||"";return e.startsWith("messaging-qq")?"magenta":e==="wechat"?"green":"blue"}),u=s(()=>{if(!t.event.occurredAt)return"";try{const e=new Date(t.event.occurredAt),p=e.getFullYear(),b=String(e.getMonth()+1).padStart(2,"0"),f=String(e.getDate()).padStart(2,"0"),g=String(e.getHours()).padStart(2,"0"),h=String(e.getMinutes()).padStart(2,"0");return`${p}-${b}-${f} ${g}:${h}`}catch{return""}}),_={props:t,messageText:r,actorLabel:d,isMine:l,adapterColor:o,formattedTime:u,computed:s};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}},T={class:"bubble"},M={class:"meta"},R={class:"actor"},V={class:"time"},q={class:"body"};function D(c,i,t,r,d,l){const o=v("a-tag");return m(),S("div",{class:B(["chat-row",{mine:r.isMine}])},[n("div",T,[n("div",M,[n("span",R,a(r.actorLabel),1),n("span",V,a(r.formattedTime),1)]),n("div",q,a(r.messageText),1),t.event.source.adapter?(m(),y(o,{key:0,class:"src",color:r.adapterColor},{default:C(()=>[w(a(t.event.source.adapter),1)]),_:1},8,["color"])):x("v-if",!0)])],2)}const j=k(N,[["render",D],["__scopeId","data-v-49238629"],["__file","/tmp/cc-web-panel-iPmwbl/repo/packages/web-panel/src/components/pdh/renderers/ChatBubbleRenderer.vue"]]);export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as r}from"./index-C5F1vwec.js";const o=((n,a,e)=>{r(n,`[ant-design-vue: ${a}] ${e}`)});export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as o}from"./Row-9XCY22PM.js";import{a0 as t}from"./index-C5F1vwec.js";import"./vendor-Bn1JzzAn.js";import"./responsiveObserve-rV4LGpbU.js";import"./useFlexGapSupport-C8qbl-9w.js";import"./styleChecker-B1t6aQQ_.js";import"./index-wqiOz655.js";import"./icons-DG5UD-6K.js";const l=t(o);export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as o}from"./Col-DzMbA760.js";import{a0 as t}from"./index-C5F1vwec.js";import"./vendor-Bn1JzzAn.js";import"./index-wqiOz655.js";import"./icons-DG5UD-6K.js";const s=t(o);export{s as default};
|