chainlesschain 0.166.22 → 0.166.24
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/package.json +4 -3
- package/src/assets/web-panel/assets/{AIOps-oJ7USzMC.js → AIOps-DR-MWcZc.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BlgnZe_C.js → ActionButton-DT8B7sEb.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-D2rRbTLu.js → Analytics-asjh3dQJ.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-FwS3f0B2.js → AppLayout-DivQ491i.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-iF-_08Hi.js → Artifacts-DPH2uUmy.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-D24p0zQw.js → Audit-Bp2nLyc-.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-Cg3mRVi9.js → BackgroundAgents-CHS28khl.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-EOqht3H-.js → Backup-CKeaFSfz.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-9XWYq2hj.js → BaseInput-CxwM9BAH.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-Dq5yardA.js → Chat-DYLDwaCv.js} +4 -4
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-Ds3pA-ET.js → ChatBubbleRenderer-DdBJDBP0.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-CuyCBoBf.js → Checkbox-uYTWOB8j.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-DjWtYHNe.js → Codegen-CvYa_dwT.js} +1 -1
- package/src/assets/web-panel/assets/{Col-CrVr_iuG.js → Col-CanMAX4m.js} +1 -1
- package/src/assets/web-panel/assets/{Community-C6QxpfGc.js → Community-B4WaDtHw.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-B-v5r6Pa.js → Compact-K93Uof_3.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-zNiLiFgD.js → Compliance-CKeDLgUW.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-D9K7lMOu.js → Cowork-P93grAeB.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-DAjO36z4.js → Cron-BSHnMtDn.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-Bxqn0aqB.js → Crosschain-epAOpUVJ.js} +1 -1
- package/src/assets/web-panel/assets/{DID-DfRmLUe-.js → DID-ByjXfP7t.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-Cz8KF3fr.js → Dashboard-QztTU8tb.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-C4oVfkP0.js → Dropdown-DhUc9yhN.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-ivyZKN8k.js → EmailListRenderer-C2sLhJJN.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-DoxY1CPW.js → FamilyGuardDashboard-CdfbWNDn.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-C93gZxnb.js → Federation-CcF_R7NW.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-D_lEjYJE.js → FormItemContext-Cm_X2IBk.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BNFN9YjN.js → GenericCardRenderer-DUi4NWlb.js} +1 -1
- package/src/assets/web-panel/assets/{Git-mUu2HcLI.js → Git-4Sq5FjBt.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CNuosrge.js → Governance-Dx2_v4V6.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-DwY5pbCB.js → Inference-7Vr1xekR.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-aRUxhACD.js → KnowledgeGraph-Cnd2XOzf.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DFfsWYy_.js → Logs-B66QPVf-.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-DqTx7_u1.js → MarkdownRenderer-PLsEvhly.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-COI-ciM-.js → Marketplace-BMIK9BmC.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-BJJwaIpe.js → McpTools-BDbyp3J_.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-CDO6SGDZ.js → Memory-CJdzfZGi.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-BlZ5tFf4.js → MobileBridge-C2TH5Y3-.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-DuoxbgWz.js → MobileProjects-D1dYXkvV.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-6ec9j70b.js → Mtc-B-4A1I1j.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-BuL7HkC7.js → MtcAudit-Bgcc9UOl.js} +5 -5
- package/src/assets/web-panel/assets/{Multisig-CJxR85lk.js → Multisig-DqOe-etP.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-B71O1S4l.js → NLProgramming-7VnhzE_6.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-Bsw5zbpV.js → Notes-BxawpeUQ.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-BnAhXuK_.js → NotificationSettings-Cr08G2aE.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-BJ0R5GGz.js → OrderTableRenderer-Ce8bEGlK.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-B7wwNxoP.js → Organization-BC7lveGv.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-CfAGr0gM.js → Overflow-CakOW-G0.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-KhMg22Fz.js → P2P-Cf8CaOBZ.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-NdAXI9ft.js → PdhVaultBrowser-Dc7b98W9.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-CIYjqyT7.js → Permissions-DGJyMEfS.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-D2ht3P_R.js → PersonalDataHub-DNIwSdwu.js} +6 -6
- package/src/assets/web-panel/assets/{Pipeline-i6flZW1m.js → Pipeline-5B1S12wa.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DE0lhYVc.js → Privacy-CMB6Ke5t.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-BL3YbyxS.js → ProjectInit-D5PqTFiT.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-CEtdg7ni.js → ProjectSettings-CbKNdSjV.js} +2 -2
- package/src/assets/web-panel/assets/Projects-ccXaHzYL.js +1 -0
- package/src/assets/web-panel/assets/{Providers-DKt_Cg-j.js → Providers-CJF5_-Gs.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-DA61jNSx.js → QrScannerModal-CT6iEAdi.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-fS9ryUmq.js → QuickAsk-Ci0h9mJ_.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-CR9dZU5Y.js → Recommend-Da5mobZu.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-BV0BR2Dz.js → RemoteSession-BaCY8eey.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-BIeGUvYD.js → Reputation-CaITfTsI.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DHDT1aro.js → Row-DtUDamyP.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Cq6YKb1h.js → RssFeed-DX27gFpg.js} +3 -3
- package/src/assets/web-panel/assets/{Search-DEF6vsy6.js → Search-DFL69osN.js} +1 -1
- package/src/assets/web-panel/assets/{Security-CHtYiKY9.js → Security-BqGeoWv-.js} +4 -4
- package/src/assets/web-panel/assets/{Services-u16lvBJN.js → Services-3z1WnEAc.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CGbizyDj.js → Skeleton-C_OJQQ9Z.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-BZMQcAa7.js → Skills-BY7aT6Mo.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Bm-CycVi.js → Sla-BZv7DSaD.js} +1 -1
- package/src/assets/web-panel/assets/SpeechSettings-6lJKLhCn.js +1 -0
- package/src/assets/web-panel/assets/{SyncSettings-B8q1C1eC.js → SyncSettings-B6D7STlI.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-SU1pBWc-.js → Tasks-Co_FCZAO.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CyOfJzmt.js → Templates-CnY-9fgz.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-xqWSm2GP.js → Tenant-B71yXfZ8.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-D1Ttgjsi.js → Terminal-Dd_P7awo.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-Da2lYs5D.js → TimelineRenderer-CvIEMyli.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-B34-SduO.js → Tokens-DknFBGOi.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-C8zyYm4R.js → Trigger-D_4nJONB.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-D1Pvqems.js → Trust-BNl21fa7.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-Do3VVnAy.js → UkeySign-CFrCI7uK.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-Dz7egVIA.js → VideoEditing-BVfY6JLg.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-Dcuw-OxR.js → Wallet-Cj9CAK0J.js} +3 -3
- package/src/assets/web-panel/assets/{WebAuthn-DPlw-QsB.js → WebAuthn-DcqZlzA3.js} +3 -3
- package/src/assets/web-panel/assets/{WorkflowEditor-h4OsnU5q.js → WorkflowEditor-Dfr_dMld.js} +1 -1
- package/src/assets/web-panel/assets/{chat-eO9wEwrW.js → chat-Yv6UF0AD.js} +1 -1
- package/src/assets/web-panel/assets/{colors-34lSmOXw.js → colors-CDW_-1fs.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-CK4kEWJ4.js → compact-item-BYOQvd-6.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-E0A57xed.js → createContext-BCGO0BiP.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-H-kXSuf-.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-BD9ZMGAl.js → hasIn-DY-70cfQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-B_G_ElKO.js → index-366wfQBU.js} +1 -1
- package/src/assets/web-panel/assets/index-B0o4MeNK.js +1 -0
- package/src/assets/web-panel/assets/{index-B0rkHxKK.js → index-B9ZogJJM.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrsDA_md.js → index-B9m5QAMg.js} +1 -1
- package/src/assets/web-panel/assets/{index--N0u6kTG.js → index-BBs2mv5M.js} +1 -1
- package/src/assets/web-panel/assets/{index-DiT_REby.js → index-BFv1hzF6.js} +1 -1
- package/src/assets/web-panel/assets/index-BVafOL_I.js +1 -0
- package/src/assets/web-panel/assets/{index-8qMA1DWQ.js → index-BXlEx4UH.js} +1 -1
- package/src/assets/web-panel/assets/{index-CsrKJJcX.js → index-BayRTE5w.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcbgVLOH.js → index-Bb9nyts1.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZkFMeWL.js → index-Bf_Va0S-.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cz3unNfL.js → index-Br3wQLVY.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcE1BspQ.js → index-BvK4fjkk.js} +1 -1
- package/src/assets/web-panel/assets/{index-DeXNCyQJ.js → index-C40UdtlS.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrOalGut.js → index-C4UJA2ju.js} +1 -1
- package/src/assets/web-panel/assets/{index-MIg5Z8qe.js → index-CB_Iw73G.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFLE2qO9.js → index-CCwWp3mT.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrSAAuJj.js → index-CFa2fPCk.js} +1 -1
- package/src/assets/web-panel/assets/{index-D4bB_x_v.js → index-CIyHxV4u.js} +1 -1
- package/src/assets/web-panel/assets/{index-BmNbU2Z6.js → index-CUP-A2_h.js} +1 -1
- package/src/assets/web-panel/assets/{index-o8pYehRq.js → index-CUo27q9J.js} +3 -3
- package/src/assets/web-panel/assets/{index-BbX_Dted.js → index-CaT8trvf.js} +1 -1
- package/src/assets/web-panel/assets/{index-Brqc9Emx.js → index-CnZNbcux.js} +1 -1
- package/src/assets/web-panel/assets/{index-Da5fmOHB.js → index-Cy2NE6AO.js} +1 -1
- package/src/assets/web-panel/assets/{index-yAGBu2E0.js → index-CzeEEazr.js} +1 -1
- package/src/assets/web-panel/assets/{index-BsGmo6v1.js → index-D--TEyDj.js} +1 -1
- package/src/assets/web-panel/assets/{index-DvKcroix.js → index-DCtsjhhT.js} +1 -1
- package/src/assets/web-panel/assets/{index-DGRxt5wj.js → index-DLOf7BSz.js} +1 -1
- package/src/assets/web-panel/assets/{index-DONOUtlz.js → index-DM5c4pc-.js} +1 -1
- package/src/assets/web-panel/assets/{index-CT1_eRL-.js → index-DRFC2Qt0.js} +1 -1
- package/src/assets/web-panel/assets/{index-DpfisY1g.js → index-DT_qVaaV.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cx3Jn1r0.js → index-DUDoRk9r.js} +1 -1
- package/src/assets/web-panel/assets/{index-DCn-ECvK.js → index-Dg-AQYDf.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bjs90Eh9.js → index-DuIPq5MX.js} +1 -1
- package/src/assets/web-panel/assets/{index-CuSau5ya.js → index-NYVBUAVN.js} +1 -1
- package/src/assets/web-panel/assets/{index-DP-UZAQN.js → index-NaCESahy.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ch175NUw.js → index-RjIMPG0u.js} +1 -1
- package/src/assets/web-panel/assets/{index-DzXjP44T.js → index-Y9akzgFO.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZBaqe3d.js → index-hZ0Eyrrw.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-DMTkAomF.js → initDefaultProps-CG99CcR4.js} +1 -1
- package/src/assets/web-panel/assets/{motion-Cnti1F5g.js → motion-Z7MH0_0G.js} +1 -1
- package/src/assets/web-panel/assets/{move-CGxmHUga.js → move-BX67lOdq.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-CuwwLoq7.js → mtc-parser-CmAbG1fE.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BpdlTkPM.js → omit-DiU5tI1_.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-D7nWrThp.js → pickAttrs-BGfvLrYL.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-Bhx0TV8F.js → placementArrow-CggLEgaJ.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-CZ1KesZh.js → responsiveObserve-t3nlghPZ.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CnldF8J6.js → slide-BkV4dL9s.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CZfo_GOA.js → statusUtils-qec1PUoC.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-B2QCcAv5.js → styleChecker-ChjX6T8D.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-DzzjIS4J.js → useFlexGapSupport-B1jLoZcM.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-B_atg9M0.js → useFs-C3X53s4E.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DhZs3QYN.js → usePersonalDataHub-DOvbbnkZ.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-DcePTYAm.js → vnode-Ie0TEVFT.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-BYmlnjRk.js → zoom-CRUMVS8l.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +3 -3
- package/src/commands/agent.js +18 -1
- package/src/commands/evolution-benchmark.js +72 -0
- package/src/commands/evolution.js +2 -0
- package/src/commands/governed-skill-marketplace.js +142 -0
- package/src/commands/marketplace.js +4 -1
- package/src/commands/serve.js +10 -0
- package/src/commands/skill.js +3 -0
- package/src/data/changelog.json +26 -0
- package/src/gateways/ws/ws-agent-handler.js +59 -2
- package/src/gateways/ws/ws-server.js +2 -0
- package/src/harness/golden-transcript.js +1 -0
- package/src/harness/prompt-compressor.js +51 -5
- package/src/harness/provider-backed-compaction.js +28 -1
- package/src/harness/remote-session-registry.js +15 -3
- package/src/index.js +20 -2
- package/src/lazy-dispatch.js +6 -0
- package/src/lib/advisor-runtime.js +55 -2
- package/src/lib/app-server/cli-agent-kernel-adapter.js +4 -0
- package/src/lib/app-server/graph-runtime.js +32 -0
- package/src/lib/app-server/server.js +45 -1
- package/src/lib/app-server/websocket-transport.js +2 -0
- package/src/lib/autonomous-agent.js +63 -13
- package/src/lib/cowork/ab-comparator-cli.js +4 -3
- package/src/lib/cowork/debate-review-cli.js +4 -3
- package/src/lib/cowork/decision-kb-cli.js +5 -0
- package/src/lib/cowork-adapter.js +38 -16
- package/src/lib/evolution/agent-evolution-ingress.js +95 -15
- package/src/lib/evolution/agent-evolution-runtime-composition.js +82 -0
- package/src/lib/evolution/agent-evolution-session-lifecycle.js +46 -0
- package/src/lib/evolution/agent-model-projection.js +217 -0
- package/src/lib/evolution/bounded-descriptor-read.js +29 -0
- package/src/lib/evolution/controlled-skill-pilot-ledger-adapter.js +551 -0
- package/src/lib/evolution/controlled-skill-production-pilot.js +308 -18
- package/src/lib/evolution/evidence-backed-wiki-maintainer.js +10 -1
- package/src/lib/evolution/evidence-json-text.js +236 -0
- package/src/lib/evolution/evolution-artifact-ports.js +193 -21
- package/src/lib/evolution/evolution-deployment-loader.js +163 -2
- package/src/lib/evolution/evolution-eval-child-evidence-ledger-adapter.js +373 -0
- package/src/lib/evolution/evolution-eval-gate.js +14 -1
- package/src/lib/evolution/evolution-eval-process-supervisor-worker.mjs +14 -0
- package/src/lib/evolution/evolution-eval-process-supervisor.js +607 -0
- package/src/lib/evolution/evolution-evidence-artifact-adapter.js +14 -1
- package/src/lib/evolution/evolution-evidence-projector.js +240 -37
- package/src/lib/evolution/evolution-file-witness.js +153 -30
- package/src/lib/evolution/evolution-ledger-ports.js +1027 -66
- package/src/lib/evolution/evolution-ledger.js +66 -2
- package/src/lib/evolution/evolution-raw-crypto-shred.js +29 -15
- package/src/lib/evolution/evolution-raw-deletion-ledger-adapter.js +865 -0
- package/src/lib/evolution/evolution-release-train-domain-stages.js +769 -0
- package/src/lib/evolution/evolution-release-train-stage-output-ledger-adapter.js +333 -0
- package/src/lib/evolution/evolution-release-train.js +54 -6
- package/src/lib/evolution/evolution-workbench-batch-executor.js +101 -144
- package/src/lib/evolution/evolution-workbench-control-ports.js +203 -0
- package/src/lib/evolution/evolution-workbench-file-resources.js +403 -0
- package/src/lib/evolution/evolution-workbench-projection.js +134 -26
- package/src/lib/evolution/evolution-workbench-registry-source.js +482 -0
- package/src/lib/evolution/evolution-workbench-review-ledger-adapter.js +823 -0
- package/src/lib/evolution/evolution-workbench-review-protocol.js +157 -0
- package/src/lib/evolution/evolution-workbench-rollback-authorization.js +57 -0
- package/src/lib/evolution/evolution-workbench-rollback-ledger-adapter.js +1016 -0
- package/src/lib/evolution/evolution-workbench-runtime.js +133 -0
- package/src/lib/evolution/evolution-workbench-version-control.js +70 -36
- package/src/lib/evolution/evolvable-artifact-ledger-adapter.js +48 -0
- package/src/lib/evolution/governed-knowledge-candidate-rejection.js +343 -0
- package/src/lib/evolution/governed-knowledge-dependency-authority.js +227 -44
- package/src/lib/evolution/governed-knowledge-dependency-ledger-executor.js +95 -83
- package/src/lib/evolution/governed-knowledge-record.js +148 -0
- package/src/lib/evolution/governed-knowledge-revocation-record.js +135 -0
- package/src/lib/evolution/governed-knowledge-skill-rollback.js +475 -0
- package/src/lib/evolution/governed-knowledge-sync.js +17 -94
- package/src/lib/evolution/governed-knowledge-wiki-tombstone.js +462 -0
- package/src/lib/evolution/governed-skill-marketplace-badge.js +208 -0
- package/src/lib/evolution/governed-skill-marketplace-candidate.js +330 -0
- package/src/lib/evolution/governed-skill-marketplace-cli-host.js +308 -0
- package/src/lib/evolution/governed-skill-marketplace-ledger-adapter.js +420 -0
- package/src/lib/evolution/governed-skill-marketplace.js +288 -5
- package/src/lib/evolution/governed-wiki-pruning-journal.js +302 -0
- package/src/lib/evolution/governed-wiki-pruning-ledger-adapter.js +459 -0
- package/src/lib/evolution/governed-wiki-pruning-maintenance.js +576 -0
- package/src/lib/evolution/governed-wiki-pruning-plan-authority.js +169 -0
- package/src/lib/evolution/governed-wiki-pruning-raw-shred.js +207 -0
- package/src/lib/evolution/governed-wiki-pruning-retrieval.js +587 -0
- package/src/lib/evolution/governed-wiki-pruning-runtime.js +153 -0
- package/src/lib/evolution/governed-wiki-pruning-skill-rollback.js +360 -0
- package/src/lib/evolution/governed-wiki-pruning.js +322 -143
- package/src/lib/evolution/independent-skill-revocation-source.js +231 -0
- package/src/lib/evolution/knowledge-wiki-source-admission.js +124 -0
- package/src/lib/evolution/knowledge-wiki-source-provenance.js +359 -0
- package/src/lib/evolution/progressive-canary-external-watchdog.js +578 -0
- package/src/lib/evolution/progressive-canary-traffic-worker.js +628 -0
- package/src/lib/evolution/progressive-canary-watchdog-file-store.js +285 -0
- package/src/lib/evolution/progressive-canary-watchdog-node-pki.js +265 -0
- package/src/lib/evolution/skill-candidate-registry.js +22 -0
- package/src/lib/evolution/skill-promotion-controller.js +25 -0
- package/src/lib/evolution/skill-promotion-review-ledger-adapter.js +100 -0
- package/src/lib/evolution/skill-registry-transition-ledger-adapter.js +131 -2
- package/src/lib/evolution/skill-release-registry.js +25 -4
- package/src/lib/evolution/skill-retrieval-revocation-authority.js +361 -0
- package/src/lib/evolution/skill-retrieval-revocation-ledger-adapter.js +346 -0
- package/src/lib/evolution/skill-revocation-propagation.js +467 -0
- package/src/lib/evolution/skill-target-matrix-eval.js +162 -11
- package/src/lib/evolution/skill-wiki-reconciliation.js +985 -0
- package/src/lib/evolution/skill-writer-inventory-manifest.js +8 -6
- package/src/lib/evolution/statistical-progressive-canary.js +165 -3
- package/src/lib/evolution/structured-memory-agent-control-plane.js +120 -0
- package/src/lib/evolution/structured-memory-authority-ledger-adapter.js +5 -1
- package/src/lib/evolution/structured-memory-promotion-receipt-writer.js +126 -0
- package/src/lib/evolution/wiki-informed-skill-proposer.js +127 -21
- package/src/lib/evolution/wiki-maintainer-ledger-adapter.js +760 -100
- package/src/lib/evolution/wiki-revision-protocol.js +120 -0
- package/src/lib/evolution/wiki-skill-proposal-ledger-adapter.js +307 -0
- package/src/lib/evolution/wiki-target-tombstone-revision.js +101 -0
- package/src/lib/evolution/wikiskill-benchmark-cli-host.js +178 -0
- package/src/lib/evolution/wikiskill-benchmark-execution-host.js +702 -0
- package/src/lib/evolution/wikiskill-benchmark-ledger-adapter.js +613 -0
- package/src/lib/evolution/wikiskill-benchmark.js +80 -16
- package/src/lib/goal-assess.js +17 -10
- package/src/lib/interactive-planner.js +9 -1
- package/src/lib/iteration-budget.js +16 -2
- package/src/lib/micro-compact.js +4 -1
- package/src/lib/model-failure-policy.js +21 -0
- package/src/lib/process-execution-broker/index.js +1 -0
- package/src/lib/process-execution-broker/windows-sandbox-helper.dll +0 -0
- package/src/lib/process-execution-broker/windows-sandbox-helper.exe +0 -0
- package/src/lib/process-execution-broker/windows-sandbox.cs +33 -15
- package/src/lib/read-file-page.js +191 -0
- package/src/lib/runnable-provider.js +2 -1
- package/src/lib/skill-retrieval-router.js +22 -1
- package/src/repl/agent-repl.js +127 -33
- package/src/runtime/agent-core.js +163 -73
- package/src/runtime/agent-runtime.js +43 -0
- package/src/runtime/coding-agent-contract-shared.cjs +7 -1
- package/src/runtime/fallback-model.js +143 -62
- package/src/runtime/headless-runner.js +54 -10
- package/src/runtime/headless-stream.js +50 -6
- package/src/runtime/runtime-factory.js +41 -2
- package/src/assets/web-panel/assets/Projects-CvtU5peJ.js +0 -1
- package/src/assets/web-panel/assets/SpeechSettings-BudpA5kr.js +0 -1
- package/src/assets/web-panel/assets/devWarning-CF3xafX2.js +0 -1
- package/src/assets/web-panel/assets/index-C907rPwd.js +0 -1
- package/src/assets/web-panel/assets/index-wueRSK2d.js +0 -1
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
|
|
17
17
|
import fs from "fs";
|
|
18
18
|
import path from "path";
|
|
19
|
+
import { buildReadFilePage } from "../lib/read-file-page.js";
|
|
19
20
|
import broker from "../lib/process-execution-broker/index.js";
|
|
20
21
|
import os from "os";
|
|
21
22
|
import { createHash, randomUUID } from "node:crypto";
|
|
22
23
|
import skillInvocationReceipt from "@chainlesschain/session-core/skill-invocation-receipt";
|
|
23
24
|
import { isProxy } from "node:util/types";
|
|
25
|
+
import { captureAgentEvolutionIngress } from "../lib/evolution/agent-evolution-ingress.js";
|
|
24
26
|
|
|
25
27
|
const { startSkillInvocation, settleSkillInvocation } = skillInvocationReceipt;
|
|
26
28
|
import sharedCodingAgentPolicy from "./coding-agent-policy.cjs";
|
|
@@ -1084,7 +1086,7 @@ Key behaviors:
|
|
|
1084
1086
|
- When asked to run/test something, use run_shell to execute it
|
|
1085
1087
|
- For long-running commands (builds, full test suites, dev servers) set run_shell { run_in_background: true } to get a task_id back immediately, then poll output and completion with check_shell { task_id }. Kill a backgrounded server with check_shell { task_id, kill: true } when finished
|
|
1086
1088
|
- When asked about git status, diff, log, or other repository operations, use the git tool instead of run_shell
|
|
1087
|
-
- When asked about files or code, use read_file
|
|
1089
|
+
- When asked about files or code, use search_files to locate relevant sections, then read_file with offset/limit. Follow nextRead for large files. Reuse unchanged content already in context instead of repeatedly reading the same page; re-read when the file changes or the earlier content is no longer available.
|
|
1088
1090
|
- Before renaming or changing a symbol, use code_intelligence (action: references/definition) to find every real usage instead of guessing with text search. It degrades to "unavailable" when no language server is installed — fall back to search_files then.
|
|
1089
1091
|
- After an edit, if the tool result includes a "newDiagnostics" array, you just introduced (or exposed) those errors/warnings — read them and fix before moving on. You can also run code_intelligence (action: diagnostics) on any file to check it on demand.
|
|
1090
1092
|
- If a tool result includes a "subtreeInstructions" array, you just entered a subdirectory that carries its own cc.md/CLAUDE.md/AGENTS.md — treat that content as authoritative project rules for work in that subtree (it is injected once, the first time you touch the subtree).
|
|
@@ -3573,6 +3575,7 @@ export async function executeTool(name, args, context = {}) {
|
|
|
3573
3575
|
skillAllowlist: context.skillAllowlist ?? null,
|
|
3574
3576
|
skillOutcomeIndex: context.skillOutcomeIndex,
|
|
3575
3577
|
skillVectorAuthority: context.skillVectorAuthority,
|
|
3578
|
+
skillRetrievalRevocationReader: context.skillRetrievalRevocationReader,
|
|
3576
3579
|
cwd,
|
|
3577
3580
|
parentMessages: context.parentMessages,
|
|
3578
3581
|
interaction: context.interaction,
|
|
@@ -3628,6 +3631,7 @@ export async function executeTool(name, args, context = {}) {
|
|
|
3628
3631
|
subAgentBudget: context.subAgentBudget || null,
|
|
3629
3632
|
sessionBudget: context.sessionBudget || null,
|
|
3630
3633
|
hostResourceBudget: context.hostResourceBudget || null,
|
|
3634
|
+
readFileCache: context.readFileCache || null,
|
|
3631
3635
|
// Effective contract of THIS loop (parent ceiling for a nested spawn) +
|
|
3632
3636
|
// the MCP tool definitions this loop exposes (inheritable by a spawn).
|
|
3633
3637
|
subAgentContract: context.subAgentContract || null,
|
|
@@ -5118,6 +5122,7 @@ async function executeToolInner(
|
|
|
5118
5122
|
skillAllowlist = null,
|
|
5119
5123
|
skillOutcomeIndex,
|
|
5120
5124
|
skillVectorAuthority,
|
|
5125
|
+
skillRetrievalRevocationReader,
|
|
5121
5126
|
cwd,
|
|
5122
5127
|
parentMessages,
|
|
5123
5128
|
interaction,
|
|
@@ -5171,6 +5176,7 @@ async function executeToolInner(
|
|
|
5171
5176
|
backgroundUsageFailureState = null,
|
|
5172
5177
|
toolAdmission = null,
|
|
5173
5178
|
hostResourceBudget = null,
|
|
5179
|
+
readFileCache = null,
|
|
5174
5180
|
unattendedActionPolicy = null,
|
|
5175
5181
|
managedCheckpoint = false,
|
|
5176
5182
|
fileMutationScope = null,
|
|
@@ -5239,11 +5245,37 @@ async function executeToolInner(
|
|
|
5239
5245
|
}
|
|
5240
5246
|
// A clear, self-correcting error beats the cryptic "EISDIR: illegal
|
|
5241
5247
|
// operation on a directory" that readFileSync throws on a directory.
|
|
5242
|
-
|
|
5248
|
+
const fileStat = fs.statSync(filePath);
|
|
5249
|
+
if (fileStat.isDirectory()) {
|
|
5243
5250
|
return attachDescriptor({
|
|
5244
5251
|
error: `Path is a directory, not a file: ${filePath}. Use list_dir to see its contents.`,
|
|
5245
5252
|
});
|
|
5246
5253
|
}
|
|
5254
|
+
const fileVersion = `${fileStat.size}:${fileStat.mtimeMs}:${fileStat.ctimeMs}`;
|
|
5255
|
+
const cacheKey = JSON.stringify([
|
|
5256
|
+
filePath,
|
|
5257
|
+
args.offset ?? null,
|
|
5258
|
+
args.limit ?? null,
|
|
5259
|
+
args.column ?? null,
|
|
5260
|
+
args.hashed === true,
|
|
5261
|
+
args.raw === true,
|
|
5262
|
+
]);
|
|
5263
|
+
const cached = readFileCache?.get(cacheKey);
|
|
5264
|
+
if (cached?.fileVersion === fileVersion) {
|
|
5265
|
+
// All permission checks ran before this point. A fresh stat still
|
|
5266
|
+
// invalidates changed/deleted files; cache only bounded pages per run.
|
|
5267
|
+
_recordFileObservation(filePath);
|
|
5268
|
+
readFileCache.delete(cacheKey);
|
|
5269
|
+
readFileCache.set(cacheKey, cached);
|
|
5270
|
+
return attachDescriptor(
|
|
5271
|
+
await _withSubtreeInstructions(
|
|
5272
|
+
structuredClone(cached.page),
|
|
5273
|
+
filePath,
|
|
5274
|
+
cwd,
|
|
5275
|
+
subtreeInstructionScope,
|
|
5276
|
+
),
|
|
5277
|
+
);
|
|
5278
|
+
}
|
|
5247
5279
|
const content = fs.readFileSync(filePath, "utf8");
|
|
5248
5280
|
// Record the mtime so a later edit can detect an external change that
|
|
5249
5281
|
// happened between this read and the edit (read-freshness guard).
|
|
@@ -5252,69 +5284,32 @@ async function executeToolInner(
|
|
|
5252
5284
|
// outputs summarized) so the model can find cells for notebook_edit
|
|
5253
5285
|
// without ingesting raw JSON / base64 output blobs. `raw:true` returns the
|
|
5254
5286
|
// underlying JSON. Non-.ipynb reads are unchanged.
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
nbView.length > 50000
|
|
5260
|
-
? {
|
|
5261
|
-
content: nbView.substring(0, 50000) + "\n...(truncated)",
|
|
5262
|
-
size: nbView.length,
|
|
5263
|
-
notebook: true,
|
|
5264
|
-
}
|
|
5265
|
-
: { content: nbView, notebook: true },
|
|
5266
|
-
);
|
|
5267
|
-
}
|
|
5268
|
-
}
|
|
5287
|
+
const nbView =
|
|
5288
|
+
args.raw !== true && /\.ipynb$/i.test(filePath)
|
|
5289
|
+
? renderNotebook(content)
|
|
5290
|
+
: null;
|
|
5269
5291
|
// Hashline mode: prefix each line with a 6-char content hash tag
|
|
5270
5292
|
// so downstream edit_file_hashed calls can anchor by hash.
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
const end = limit != null ? start + limit : lines.length;
|
|
5288
|
-
rendered = lines.slice(start, end).join("\n");
|
|
5289
|
-
range = {
|
|
5290
|
-
startLine: Math.min(start + 1, lines.length),
|
|
5291
|
-
endLine: Math.min(end, lines.length),
|
|
5292
|
-
totalLines: lines.length,
|
|
5293
|
-
};
|
|
5294
|
-
}
|
|
5295
|
-
|
|
5296
|
-
if (rendered.length > 50000) {
|
|
5297
|
-
return attachDescriptor(
|
|
5298
|
-
await _withSubtreeInstructions(
|
|
5299
|
-
{
|
|
5300
|
-
content: rendered.substring(0, 50000) + "\n...(truncated)",
|
|
5301
|
-
size: rendered.length,
|
|
5302
|
-
hashed: args.hashed === true,
|
|
5303
|
-
...(range ? { range } : {}),
|
|
5304
|
-
},
|
|
5305
|
-
filePath,
|
|
5306
|
-
cwd,
|
|
5307
|
-
subtreeInstructionScope,
|
|
5308
|
-
),
|
|
5309
|
-
);
|
|
5293
|
+
const rendered =
|
|
5294
|
+
nbView || (args.hashed === true ? annotateLines(content) : content);
|
|
5295
|
+
const page = buildReadFilePage(rendered, args, {
|
|
5296
|
+
filePath,
|
|
5297
|
+
fileVersion,
|
|
5298
|
+
maxChars: MAX_TOOL_RESULT_CHARS,
|
|
5299
|
+
});
|
|
5300
|
+
if (nbView) page.notebook = true;
|
|
5301
|
+
if (readFileCache && !page.error) {
|
|
5302
|
+
readFileCache.delete(cacheKey);
|
|
5303
|
+
readFileCache.set(cacheKey, {
|
|
5304
|
+
fileVersion,
|
|
5305
|
+
page: structuredClone(page),
|
|
5306
|
+
});
|
|
5307
|
+
while (readFileCache.size > 8)
|
|
5308
|
+
readFileCache.delete(readFileCache.keys().next().value);
|
|
5310
5309
|
}
|
|
5311
5310
|
return attachDescriptor(
|
|
5312
5311
|
await _withSubtreeInstructions(
|
|
5313
|
-
|
|
5314
|
-
content: rendered,
|
|
5315
|
-
hashed: args.hashed === true,
|
|
5316
|
-
...(range ? { range } : {}),
|
|
5317
|
-
},
|
|
5312
|
+
page,
|
|
5318
5313
|
filePath,
|
|
5319
5314
|
cwd,
|
|
5320
5315
|
subtreeInstructionScope,
|
|
@@ -8283,6 +8278,7 @@ async function executeToolInner(
|
|
|
8283
8278
|
target: { os: process.platform },
|
|
8284
8279
|
vectorScores: vector?.scores ?? null,
|
|
8285
8280
|
outcomeMetrics: outcomeAuthority.metrics,
|
|
8281
|
+
revocationReader: skillRetrievalRevocationReader ?? null,
|
|
8286
8282
|
topK: Math.min(64, Math.max(1, skills.length)),
|
|
8287
8283
|
});
|
|
8288
8284
|
const byDigest = new Map(
|
|
@@ -9326,6 +9322,46 @@ export function capToolResultString(serialized, max = MAX_TOOL_RESULT_CHARS) {
|
|
|
9326
9322
|
);
|
|
9327
9323
|
}
|
|
9328
9324
|
|
|
9325
|
+
/** Avoid injecting the same file page twice while its original is still visible. */
|
|
9326
|
+
export function toolResultForModel(tool, result, messages) {
|
|
9327
|
+
const serialized = capToolResultString(safeStringifyToolResult(result));
|
|
9328
|
+
if (
|
|
9329
|
+
tool !== "read_file" ||
|
|
9330
|
+
result?.error ||
|
|
9331
|
+
!result?.path ||
|
|
9332
|
+
!result.content ||
|
|
9333
|
+
result.subtreeInstructions?.length
|
|
9334
|
+
) {
|
|
9335
|
+
return serialized;
|
|
9336
|
+
}
|
|
9337
|
+
const previous = messages.find((message) => {
|
|
9338
|
+
if (message.role !== "tool" || typeof message.content !== "string")
|
|
9339
|
+
return false;
|
|
9340
|
+
try {
|
|
9341
|
+
const prior = JSON.parse(message.content.split("\n\n[Budget ")[0]);
|
|
9342
|
+
return (
|
|
9343
|
+
prior.path === result.path &&
|
|
9344
|
+
prior.fileVersion === result.fileVersion &&
|
|
9345
|
+
prior.content === result.content &&
|
|
9346
|
+
prior.hashed === result.hashed &&
|
|
9347
|
+
JSON.stringify(prior.range) === JSON.stringify(result.range)
|
|
9348
|
+
);
|
|
9349
|
+
} catch {
|
|
9350
|
+
return false;
|
|
9351
|
+
}
|
|
9352
|
+
});
|
|
9353
|
+
if (!previous) return serialized;
|
|
9354
|
+
return JSON.stringify({
|
|
9355
|
+
path: result.path,
|
|
9356
|
+
alreadyRead: true,
|
|
9357
|
+
previousToolCallId: previous.tool_call_id,
|
|
9358
|
+
readAt: result.toolTelemetryRecord?.timestamp,
|
|
9359
|
+
...(result.range ? { range: result.range } : {}),
|
|
9360
|
+
...(result.nextRead ? { nextRead: result.nextRead } : {}),
|
|
9361
|
+
hint: "This unchanged file page is already present in the earlier tool result. Use that content to continue the task. For more content, use nextRead or search_files for a different section; do not repeat this same read.",
|
|
9362
|
+
});
|
|
9363
|
+
}
|
|
9364
|
+
|
|
9329
9365
|
/**
|
|
9330
9366
|
* Serialize a tool result for the transcript without ever throwing. A plain
|
|
9331
9367
|
* `JSON.stringify` throws on a circular reference, a BigInt, or a value whose
|
|
@@ -10730,6 +10766,10 @@ function _openAIProviderRequestReceipt(response, data, clientRequestId) {
|
|
|
10730
10766
|
* @returns {Promise<object>} response with .message
|
|
10731
10767
|
*/
|
|
10732
10768
|
export async function chatWithTools(rawMessages, options) {
|
|
10769
|
+
const evolutionIngress =
|
|
10770
|
+
options.evolutionIngress == null
|
|
10771
|
+
? null
|
|
10772
|
+
: captureAgentEvolutionIngress(options.evolutionIngress);
|
|
10733
10773
|
const {
|
|
10734
10774
|
provider,
|
|
10735
10775
|
model,
|
|
@@ -10771,13 +10811,22 @@ export async function chatWithTools(rawMessages, options) {
|
|
|
10771
10811
|
const lastUserMsg = [...providerMessages]
|
|
10772
10812
|
.reverse()
|
|
10773
10813
|
.find((m) => m.role === "user");
|
|
10774
|
-
|
|
10814
|
+
let messages =
|
|
10775
10815
|
ce && !canonicalPlan
|
|
10776
10816
|
? ce.buildOptimizedMessages(providerMessages, {
|
|
10777
10817
|
userQuery: lastUserMsg?.content,
|
|
10778
10818
|
})
|
|
10779
10819
|
: providerMessages;
|
|
10780
10820
|
|
|
10821
|
+
if (evolutionIngress !== null) {
|
|
10822
|
+
const projected = await evolutionIngress.prepareModelRequest({
|
|
10823
|
+
messages,
|
|
10824
|
+
tools,
|
|
10825
|
+
});
|
|
10826
|
+
messages = projected.messages;
|
|
10827
|
+
tools = projected.tools;
|
|
10828
|
+
}
|
|
10829
|
+
|
|
10781
10830
|
throwIfAborted(signal);
|
|
10782
10831
|
|
|
10783
10832
|
if (provider === "ollama") {
|
|
@@ -12889,7 +12938,26 @@ function _instrumentAutoCompactorUsage(compactor, options) {
|
|
|
12889
12938
|
* loaded — callers treat that as "don't compact". Cached (including null) so we
|
|
12890
12939
|
* import once per run, not once per iteration.
|
|
12891
12940
|
*/
|
|
12941
|
+
const evolutionAutoCompactors = new WeakMap();
|
|
12942
|
+
|
|
12892
12943
|
async function _getAutoCompactor(options) {
|
|
12944
|
+
const evolutionIngress =
|
|
12945
|
+
options.evolutionIngress == null
|
|
12946
|
+
? null
|
|
12947
|
+
: captureAgentEvolutionIngress(options.evolutionIngress);
|
|
12948
|
+
if (
|
|
12949
|
+
evolutionIngress !== null &&
|
|
12950
|
+
(typeof options.compactionLlmQuery === "function" ||
|
|
12951
|
+
(options._autoCompactor != null &&
|
|
12952
|
+
evolutionAutoCompactors.get(options._autoCompactor) !==
|
|
12953
|
+
evolutionIngress))
|
|
12954
|
+
) {
|
|
12955
|
+
const error = new TypeError(
|
|
12956
|
+
"Evolution auto-compaction requires the canonical model transport and owned compressor",
|
|
12957
|
+
);
|
|
12958
|
+
error.code = "CC_AGENT_EVOLUTION_INGRESS_FAILED";
|
|
12959
|
+
throw error;
|
|
12960
|
+
}
|
|
12893
12961
|
if (Object.prototype.hasOwnProperty.call(options, "_autoCompactor")) {
|
|
12894
12962
|
return _instrumentAutoCompactorUsage(options._autoCompactor, options);
|
|
12895
12963
|
}
|
|
@@ -12983,8 +13051,11 @@ async function _getAutoCompactor(options) {
|
|
|
12983
13051
|
}
|
|
12984
13052
|
} catch (error) {
|
|
12985
13053
|
if (canonicalRequired) throw error;
|
|
13054
|
+
if (error?.code === "CC_AGENT_EVOLUTION_INGRESS_FAILED") throw error;
|
|
12986
13055
|
compressor = null;
|
|
12987
13056
|
}
|
|
13057
|
+
if (evolutionIngress !== null && compressor !== null)
|
|
13058
|
+
evolutionAutoCompactors.set(compressor, evolutionIngress);
|
|
12988
13059
|
try {
|
|
12989
13060
|
options._autoCompactor = compressor;
|
|
12990
13061
|
} catch {
|
|
@@ -13207,6 +13278,20 @@ function permissionDecision(callId, tool, result) {
|
|
|
13207
13278
|
}
|
|
13208
13279
|
|
|
13209
13280
|
export async function* agentLoop(messages, options) {
|
|
13281
|
+
const configuredChatFn = options.chatFn;
|
|
13282
|
+
const evolutionIngress =
|
|
13283
|
+
options.evolutionIngress == null
|
|
13284
|
+
? null
|
|
13285
|
+
: captureAgentEvolutionIngress(options.evolutionIngress);
|
|
13286
|
+
let llmCall = configuredChatFn || chatWithTools;
|
|
13287
|
+
if (evolutionIngress !== null && configuredChatFn) {
|
|
13288
|
+
const { captureCanonicalFallbackChatFn } =
|
|
13289
|
+
await import("./fallback-model.js");
|
|
13290
|
+
llmCall = captureCanonicalFallbackChatFn(
|
|
13291
|
+
configuredChatFn,
|
|
13292
|
+
evolutionIngress,
|
|
13293
|
+
);
|
|
13294
|
+
}
|
|
13210
13295
|
// Shared iteration budget — replaces hardcoded MAX_ITERATIONS.
|
|
13211
13296
|
// When options.iterationBudget is provided (e.g. from parent agent),
|
|
13212
13297
|
// the same budget instance is shared, so parent+child consume from one pool.
|
|
@@ -13273,10 +13358,12 @@ export async function* agentLoop(messages, options) {
|
|
|
13273
13358
|
options.mcpConflictScheduler || createMcpConflictScheduler();
|
|
13274
13359
|
|
|
13275
13360
|
const toolContext = {
|
|
13361
|
+
readFileCache: new Map(),
|
|
13276
13362
|
hookDb: hermeticExecution ? null : options.hookDb || null,
|
|
13277
13363
|
skillLoader: options.skillLoader || _defaultSkillLoader,
|
|
13278
13364
|
skillOutcomeIndex: options.skillOutcomeIndex,
|
|
13279
13365
|
skillVectorAuthority: options.skillVectorAuthority,
|
|
13366
|
+
skillRetrievalRevocationReader: options.skillRetrievalRevocationReader,
|
|
13280
13367
|
// Hook-envelope tracing (P2 unified event bus): every settings-hook payload
|
|
13281
13368
|
// fired during this run carries trace_id = this run's id; a spawned child
|
|
13282
13369
|
// loop carries parent_id = the spawning run's id (threaded by
|
|
@@ -13346,6 +13433,7 @@ export async function* agentLoop(messages, options) {
|
|
|
13346
13433
|
// Parent LLM config — forwarded to spawn_sub_agent so a delegated subagent
|
|
13347
13434
|
// inherits the provider/key and can override just the model (cc agents `model:`).
|
|
13348
13435
|
llmOptions: {
|
|
13436
|
+
...(evolutionIngress === null ? {} : { evolutionIngress }),
|
|
13349
13437
|
provider: options.provider || null,
|
|
13350
13438
|
model: options.model || null,
|
|
13351
13439
|
baseUrl: options.baseUrl || null,
|
|
@@ -13521,11 +13609,8 @@ export async function* agentLoop(messages, options) {
|
|
|
13521
13609
|
}
|
|
13522
13610
|
}
|
|
13523
13611
|
|
|
13524
|
-
//
|
|
13525
|
-
//
|
|
13526
|
-
// real provider. Production code path is unchanged — the fallback is the
|
|
13527
|
-
// real `chatWithTools`.
|
|
13528
|
-
let llmCall = options.chatFn || chatWithTools;
|
|
13612
|
+
// llmCall was captured before startup awaits. With evolution ingress, only
|
|
13613
|
+
// a factory-owned canonical fallback bound to this Run may replace it.
|
|
13529
13614
|
|
|
13530
13615
|
// Runnable-first auth recovery: if the resolved provider's key is missing /
|
|
13531
13616
|
// wrong / expired, self-heal to a provider we can actually run (endpoint-
|
|
@@ -14066,6 +14151,7 @@ export async function* agentLoop(messages, options) {
|
|
|
14066
14151
|
} catch (_e) {
|
|
14067
14152
|
if (isAbortError(_e) || signal?.aborted) throw _e;
|
|
14068
14153
|
if (_e?.runtimeLedgerPersistence === true) throw _e;
|
|
14154
|
+
if (_e?.code === "CC_AGENT_EVOLUTION_INGRESS_FAILED") throw _e;
|
|
14069
14155
|
if (
|
|
14070
14156
|
_e?.workflowEffectOutcomeUnknown === true &&
|
|
14071
14157
|
_e?.compactionFailureReported === true
|
|
@@ -14250,9 +14336,13 @@ export async function* agentLoop(messages, options) {
|
|
|
14250
14336
|
canonicalProviderContext.selectedToolNames,
|
|
14251
14337
|
}
|
|
14252
14338
|
: effectiveToolOptions;
|
|
14253
|
-
const
|
|
14339
|
+
const requestOptions = providerRequestId
|
|
14254
14340
|
? { ...plannedProviderOptions, providerRequestId }
|
|
14255
14341
|
: plannedProviderOptions;
|
|
14342
|
+
const providerCallOptions =
|
|
14343
|
+
evolutionIngress !== null
|
|
14344
|
+
? { ...requestOptions, evolutionIngress }
|
|
14345
|
+
: requestOptions;
|
|
14256
14346
|
const modelUsageCall = {
|
|
14257
14347
|
type: "model-usage-started",
|
|
14258
14348
|
callId: _newModelUsageCallId("model"),
|
|
@@ -14700,8 +14790,10 @@ export async function* agentLoop(messages, options) {
|
|
|
14700
14790
|
failed,
|
|
14701
14791
|
});
|
|
14702
14792
|
const warningMsg = budget.toWarningMessage();
|
|
14703
|
-
const resultStr =
|
|
14704
|
-
|
|
14793
|
+
const resultStr = toolResultForModel(
|
|
14794
|
+
call.function.name,
|
|
14795
|
+
toolResult,
|
|
14796
|
+
messages,
|
|
14705
14797
|
);
|
|
14706
14798
|
const toolContent = warningMsg
|
|
14707
14799
|
? `${resultStr}\n\n${warningMsg}`
|
|
@@ -15150,9 +15242,7 @@ export async function* agentLoop(messages, options) {
|
|
|
15150
15242
|
// Cap an individual tool result so one giant output can't blow the
|
|
15151
15243
|
// context — but tell the model when we cut it (no more silent
|
|
15152
15244
|
// mid-content slice). See MAX_TOOL_RESULT_CHARS / capToolResultString.
|
|
15153
|
-
const resultStr =
|
|
15154
|
-
safeStringifyToolResult(toolResult),
|
|
15155
|
-
);
|
|
15245
|
+
const resultStr = toolResultForModel(toolName, toolResult, messages);
|
|
15156
15246
|
const toolContent = warningMsg
|
|
15157
15247
|
? `${resultStr}\n\n${warningMsg}`
|
|
15158
15248
|
: resultStr;
|
|
@@ -15243,7 +15333,7 @@ export async function* agentLoop(messages, options) {
|
|
|
15243
15333
|
backgroundUsageFailureState,
|
|
15244
15334
|
);
|
|
15245
15335
|
yield* _drainSubAgentUsage(subAgentUsageSink);
|
|
15246
|
-
yield { type: "iteration-budget-exhausted", budget: budget.
|
|
15336
|
+
yield { type: "iteration-budget-exhausted", budget: budget.limit };
|
|
15247
15337
|
yield {
|
|
15248
15338
|
type: "response-complete",
|
|
15249
15339
|
content: `(Iteration budget exhausted — ${budget.toSummary()})`,
|
|
@@ -34,8 +34,13 @@ 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 {
|
|
38
|
+
AGENT_EVOLUTION_SESSION_SCHEMA,
|
|
39
|
+
waitForAgentEvolutionSession,
|
|
40
|
+
} from "../lib/evolution/agent-evolution-session-lifecycle.js";
|
|
37
41
|
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
38
42
|
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
43
|
+
import { captureSkillRetrievalRevocationReader } from "../lib/evolution/skill-retrieval-revocation-authority.js";
|
|
39
44
|
|
|
40
45
|
const {
|
|
41
46
|
DEFAULT_ALLOWED_MCP_SERVER_NAMES,
|
|
@@ -79,6 +84,12 @@ export class AgentRuntime {
|
|
|
79
84
|
deps.skillVectorAuthority == null
|
|
80
85
|
? null
|
|
81
86
|
: captureSkillVectorAuthority(deps.skillVectorAuthority);
|
|
87
|
+
this.skillRetrievalRevocationReader =
|
|
88
|
+
deps.skillRetrievalRevocationReader == null
|
|
89
|
+
? null
|
|
90
|
+
: captureSkillRetrievalRevocationReader(
|
|
91
|
+
deps.skillRetrievalRevocationReader,
|
|
92
|
+
);
|
|
82
93
|
if (
|
|
83
94
|
this.evolutionIngress !== null &&
|
|
84
95
|
this.skillOutcomeIndex !== null &&
|
|
@@ -99,6 +110,21 @@ export class AgentRuntime {
|
|
|
99
110
|
) {
|
|
100
111
|
throw new Error("Agent retrieval authorities must share one tenant");
|
|
101
112
|
}
|
|
113
|
+
if (
|
|
114
|
+
this.skillVectorAuthority !== null &&
|
|
115
|
+
this.skillRetrievalRevocationReader !== null &&
|
|
116
|
+
this.skillVectorAuthority.tenantId !==
|
|
117
|
+
this.skillRetrievalRevocationReader.tenantId
|
|
118
|
+
) {
|
|
119
|
+
throw new Error("Agent retrieval authorities must share one tenant");
|
|
120
|
+
}
|
|
121
|
+
if (
|
|
122
|
+
retrievalTenant !== null &&
|
|
123
|
+
this.skillRetrievalRevocationReader !== null &&
|
|
124
|
+
retrievalTenant !== this.skillRetrievalRevocationReader.tenantId
|
|
125
|
+
) {
|
|
126
|
+
throw new Error("Agent retrieval authorities must share one tenant");
|
|
127
|
+
}
|
|
102
128
|
this.structuredMemoryControlPlane =
|
|
103
129
|
deps.structuredMemoryControlPlane == null
|
|
104
130
|
? null
|
|
@@ -333,8 +359,20 @@ export class AgentRuntime {
|
|
|
333
359
|
...(this.skillVectorAuthority === null
|
|
334
360
|
? {}
|
|
335
361
|
: { skillVectorAuthority: this.skillVectorAuthority }),
|
|
362
|
+
...(this.skillRetrievalRevocationReader === null
|
|
363
|
+
? {}
|
|
364
|
+
: {
|
|
365
|
+
skillRetrievalRevocationReader: this.skillRetrievalRevocationReader,
|
|
366
|
+
}),
|
|
336
367
|
});
|
|
337
368
|
if (this.evolutionIngress !== null) {
|
|
369
|
+
if (result?.schema === AGENT_EVOLUTION_SESSION_SCHEMA) {
|
|
370
|
+
return await waitForAgentEvolutionSession(
|
|
371
|
+
result,
|
|
372
|
+
this.evolutionIngress,
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
if (result?.started === false) return result;
|
|
338
376
|
await this.evolutionIngress.complete();
|
|
339
377
|
}
|
|
340
378
|
return result;
|
|
@@ -510,6 +548,11 @@ export class AgentRuntime {
|
|
|
510
548
|
...(this.skillVectorAuthority === null
|
|
511
549
|
? {}
|
|
512
550
|
: { skillVectorAuthority: this.skillVectorAuthority }),
|
|
551
|
+
...(this.skillRetrievalRevocationReader === null
|
|
552
|
+
? {}
|
|
553
|
+
: {
|
|
554
|
+
skillRetrievalRevocationReader: this.skillRetrievalRevocationReader,
|
|
555
|
+
}),
|
|
513
556
|
});
|
|
514
557
|
|
|
515
558
|
server.on("connection", ({ clientId, ip }) => {
|
|
@@ -28,7 +28,7 @@ const CODING_AGENT_TOOL_CONTRACTS = Object.freeze([
|
|
|
28
28
|
kind: "filesystem",
|
|
29
29
|
tier: "mvp",
|
|
30
30
|
description:
|
|
31
|
-
"Read a file's content.
|
|
31
|
+
"Read a file's content. Use search_files to locate relevant sections and offset+limit to read them. For large files, follow the returned nextRead cursor; range describes only the lines actually returned. Reuse unchanged content already in context instead of re-reading the same page. Jupyter notebooks (.ipynb) are rendered as a compact cell listing for notebook_edit — pass raw:true for underlying JSON.",
|
|
32
32
|
inputSchema: {
|
|
33
33
|
type: "object",
|
|
34
34
|
properties: {
|
|
@@ -43,6 +43,12 @@ const CODING_AGENT_TOOL_CONTRACTS = Object.freeze([
|
|
|
43
43
|
description:
|
|
44
44
|
"Maximum number of lines to return starting at offset (omit to read to end, subject to the size cap).",
|
|
45
45
|
},
|
|
46
|
+
column: {
|
|
47
|
+
type: "integer",
|
|
48
|
+
minimum: 1,
|
|
49
|
+
description:
|
|
50
|
+
"1-based character position within the first rendered line. Use the column from nextRead to continue an oversized single line without repeating its beginning.",
|
|
51
|
+
},
|
|
46
52
|
hashed: {
|
|
47
53
|
type: "boolean",
|
|
48
54
|
description:
|