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
package/src/commands/skill.js
CHANGED
|
@@ -131,6 +131,7 @@ export function routeSkillSearch(skills, query, options = {}) {
|
|
|
131
131
|
tags: options.tag ? [options.tag] : [],
|
|
132
132
|
target: { os: options.os || process.platform },
|
|
133
133
|
outcomeMetrics: options.outcomeMetrics ?? null,
|
|
134
|
+
revocationReader: options.revocationReader ?? null,
|
|
134
135
|
vectorScores: options.vectorScores ?? null,
|
|
135
136
|
topK: limit,
|
|
136
137
|
});
|
|
@@ -575,6 +576,8 @@ export function registerSkillCommand(program, dependencies = {}) {
|
|
|
575
576
|
{
|
|
576
577
|
...options,
|
|
577
578
|
outcomeMetrics: outcomeAuthority.metrics,
|
|
579
|
+
revocationReader:
|
|
580
|
+
dependencies.skillRetrievalRevocationReader ?? null,
|
|
578
581
|
},
|
|
579
582
|
skillVectorAuthority,
|
|
580
583
|
);
|
package/src/data/changelog.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": "CHANGELOG.md",
|
|
3
3
|
"releases": [
|
|
4
|
+
{
|
|
5
|
+
"productVersion": null,
|
|
6
|
+
"cliVersion": "0.166.24",
|
|
7
|
+
"cliVersions": ["0.166.23", "0.166.24"],
|
|
8
|
+
"date": "2026-09-06",
|
|
9
|
+
"title": "",
|
|
10
|
+
"sections": [
|
|
11
|
+
{
|
|
12
|
+
"heading": "Fixed - cc CLI 0.166.24: durable long-running IDE tasks",
|
|
13
|
+
"body": "> `chainlesschain` **0.166.23 -> 0.166.24** (release candidate,\n> 2026-09-06).\n\n- **Long-running interactive turns**: remove the implicit 50-model-call ceiling\n from interactive streamed Agent sessions. Explicit `--max-turns`, environment,\n cost, and session budgets remain authoritative, while unattended runs retain\n the conservative default ceiling.\n- **Bounded large-file traversal**: page reads by exact byte and line cursors,\n including oversized Unicode and escaped single lines, and return an explicit\n continuation cursor without claiming unread ranges.\n- **No redundant file reinjection**: cache a bounded set of unchanged read\n pages per Agent loop, invalidate entries when the file version changes, and\n reference an already-visible page instead of injecting the same content into\n the model again.\n- **Compaction-safe progress**: retain the newest file-read cursor through both\n micro-compaction and full context compression so a long task resumes from the\n correct page rather than restarting a large file.\n- **Regression coverage**: exercise an 80-page task using more than 50 model\n calls with repeated shadow and canonical compactions, proving completion with\n every page read exactly once.\n- **Release-runtime compatibility**: invoke the isolated evolution evaluator\n with the permission-system flag supported by the Node 22.12 release baseline,\n preventing the publish gate from failing before child-package publication.\n- **Release boundary**: no child npm package version changes are required. This\n exact commit must pass every configured Linux, Windows, and macOS job in\n `CLI CI` and `CLI Strict Sandbox` before the immutable npm tag is created."
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"productVersion": null,
|
|
19
|
+
"cliVersion": "0.166.23",
|
|
20
|
+
"cliVersions": ["0.1.5", "0.3.12", "0.166.22", "0.166.23"],
|
|
21
|
+
"date": "2026-09-06",
|
|
22
|
+
"title": "",
|
|
23
|
+
"sections": [
|
|
24
|
+
{
|
|
25
|
+
"heading": "Added - cc CLI 0.166.23: durable governed evolution and Workbench controls",
|
|
26
|
+
"body": "> `chainlesschain` **0.166.22 -> 0.166.23**,\n> `@chainlesschain/core-db` **0.1.4 -> 0.1.5**, and\n> `@chainlesschain/session-core` **0.3.11 -> 0.3.12** (release candidates,\n> 2026-09-06; not yet published).\n\n- **Public-install dependency closure**: ship Session Core's missing\n `./evolvable-artifact` export and structured evolution memory updates, plus\n Core DB's unprefixed named-parameter normalization. Publish these two child\n packages before the exactly pinned CLI; the other 11 audited related package\n payloads match their existing public releases and do not need a version bump.\n- **Governed knowledge rollback**: persist real Skill rollback, candidate\n rejection, revocation admission fences, and targeted Wiki tombstones;\n authenticate multi-hop Wiki provenance and recover interrupted settlement\n without duplicate effects or reactivation of revoked sources.\n- **Durable Wiki and model boundaries**: authenticate pruning checkpoints and\n retrieval projections, recover maintenance effects, and enforce bounded,\n redacted durable projections at the model ingress boundary.\n- **Trusted Workbench assembly**: provide authenticated current-state\n projections, durable review/rollback adapters, file-backed resources, and\n one-use-bound control ports for signed CLI/App Server deployment modules.\n Review batch completion uses the v2 receipt contract supported by the updated\n JetBrains source; installed IDE extensions do not update automatically.\n- **Atomic watchdog reservations**: serialize first acquisition and expired\n takeover across processes, publish only fully written records, and preserve\n prior reservations when staging fails.\n- **Windows sandbox identity publication**: flush and close the helper's\n identity record before a non-overwriting atomic move exposes it to the\n broker. Late helper errors cannot overwrite an already-published identity;\n post-spawn failures retain their original cause and remain fail-closed.\n- **Release and deployment boundary**: require the exact candidate SHA to pass\n both complete three-platform CLI gates, including independent Core DB and\n Session Core tests. Workbench remains unavailable without a real trusted\n deployment, identity, and policy configuration; this release does not enable\n unattended promotion or claim that the entire evolution roadmap is complete."
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
4
30
|
{
|
|
5
31
|
"productVersion": null,
|
|
6
32
|
"cliVersion": "0.166.22",
|
|
@@ -274,6 +274,7 @@ export class WSAgentHandler {
|
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
276
|
this._compactionLlmQuery = compactionLlmQuery || null;
|
|
277
|
+
this._customCompactionChatFn = typeof compactionChatFn === "function";
|
|
277
278
|
this._compactionSettlementBlock = null;
|
|
278
279
|
this._compactionChatFn =
|
|
279
280
|
compactionChatFn ||
|
|
@@ -836,7 +837,11 @@ export class WSAgentHandler {
|
|
|
836
837
|
return null;
|
|
837
838
|
}
|
|
838
839
|
|
|
839
|
-
async _compactCanonicalHistoryBeforeClaim(
|
|
840
|
+
async _compactCanonicalHistoryBeforeClaim(
|
|
841
|
+
requestId,
|
|
842
|
+
signal = null,
|
|
843
|
+
evolutionComposition = null,
|
|
844
|
+
) {
|
|
840
845
|
const { session } = this;
|
|
841
846
|
if (
|
|
842
847
|
session.autoCompact === false ||
|
|
@@ -873,6 +878,14 @@ export class WSAgentHandler {
|
|
|
873
878
|
preserveCompletedExchange: true,
|
|
874
879
|
llmQuery: this._compactionLlmQuery,
|
|
875
880
|
chatFn: this._compactionChatFn,
|
|
881
|
+
...(evolutionComposition === null
|
|
882
|
+
? {}
|
|
883
|
+
: {
|
|
884
|
+
evolutionIngress: evolutionComposition.evolutionIngress,
|
|
885
|
+
chatFn: this._customCompactionChatFn
|
|
886
|
+
? this._compactionChatFn
|
|
887
|
+
: undefined,
|
|
888
|
+
}),
|
|
876
889
|
chatOptions: {
|
|
877
890
|
cwd: session.projectRoot,
|
|
878
891
|
sessionId: session.id,
|
|
@@ -1395,9 +1408,13 @@ export class WSAgentHandler {
|
|
|
1395
1408
|
strictUsageTelemetry =
|
|
1396
1409
|
this._resolveCanonicalUsageProtocol() === "call-ledger";
|
|
1397
1410
|
if (strictUsageTelemetry) this._assertUsageLedgerWritable();
|
|
1411
|
+
if (this._evolutionCompositionFactory !== null) {
|
|
1412
|
+
evolutionComposition = await this._prepareEvolutionTurn(requestId);
|
|
1413
|
+
}
|
|
1398
1414
|
const compacted = await this._compactCanonicalHistoryBeforeClaim(
|
|
1399
1415
|
requestId,
|
|
1400
1416
|
turnSignal,
|
|
1417
|
+
evolutionComposition,
|
|
1401
1418
|
);
|
|
1402
1419
|
if (!compacted) return;
|
|
1403
1420
|
}
|
|
@@ -1429,7 +1446,10 @@ export class WSAgentHandler {
|
|
|
1429
1446
|
return;
|
|
1430
1447
|
}
|
|
1431
1448
|
}
|
|
1432
|
-
if (
|
|
1449
|
+
if (
|
|
1450
|
+
this._evolutionCompositionFactory !== null &&
|
|
1451
|
+
evolutionComposition === null
|
|
1452
|
+
) {
|
|
1433
1453
|
evolutionComposition = await this._prepareEvolutionTurn(requestId);
|
|
1434
1454
|
}
|
|
1435
1455
|
if (evolutionComposition !== null) {
|
|
@@ -1489,6 +1509,11 @@ export class WSAgentHandler {
|
|
|
1489
1509
|
const approvalGate = await this._ensureApprovalGate();
|
|
1490
1510
|
approvalGate?.beginTurn?.(requestId || `turn-${Date.now()}`);
|
|
1491
1511
|
const loopOptions = {
|
|
1512
|
+
...(evolutionComposition === null
|
|
1513
|
+
? {}
|
|
1514
|
+
: {
|
|
1515
|
+
evolutionIngress: evolutionComposition.evolutionIngress,
|
|
1516
|
+
}),
|
|
1492
1517
|
provider: session.provider,
|
|
1493
1518
|
model: activeModel,
|
|
1494
1519
|
baseUrl: session.baseUrl || "http://localhost:11434",
|
|
@@ -2228,11 +2253,15 @@ export class WSAgentHandler {
|
|
|
2228
2253
|
const expectedMessages = [...session.messages];
|
|
2229
2254
|
let result = null;
|
|
2230
2255
|
let commandError = null;
|
|
2256
|
+
let compactionEvolution = null;
|
|
2231
2257
|
let compactionUsageCall = null;
|
|
2232
2258
|
let compactionUsageSettled = false;
|
|
2233
2259
|
try {
|
|
2234
2260
|
this.assertSessionBudgetAdmission("WebSocket compaction");
|
|
2235
2261
|
this._sessionHostLease?.assert?.();
|
|
2262
|
+
compactionEvolution = await this._prepareEvolutionTurn(
|
|
2263
|
+
`compact:${requestId || randomUUID()}`,
|
|
2264
|
+
);
|
|
2236
2265
|
result = await this._compactContextMemory(
|
|
2237
2266
|
session.messages,
|
|
2238
2267
|
{
|
|
@@ -2246,6 +2275,14 @@ export class WSAgentHandler {
|
|
|
2246
2275
|
preserveCompletedExchange: true,
|
|
2247
2276
|
llmQuery: this._compactionLlmQuery,
|
|
2248
2277
|
chatFn: this._compactionChatFn,
|
|
2278
|
+
...(compactionEvolution === null
|
|
2279
|
+
? {}
|
|
2280
|
+
: {
|
|
2281
|
+
evolutionIngress: compactionEvolution.evolutionIngress,
|
|
2282
|
+
chatFn: this._customCompactionChatFn
|
|
2283
|
+
? this._compactionChatFn
|
|
2284
|
+
: undefined,
|
|
2285
|
+
}),
|
|
2249
2286
|
chatOptions: {
|
|
2250
2287
|
cwd: session.projectRoot,
|
|
2251
2288
|
sessionId: session.id,
|
|
@@ -2428,6 +2465,26 @@ export class WSAgentHandler {
|
|
|
2428
2465
|
// never retried by this command.
|
|
2429
2466
|
this._emitCompactionUsage(requestId, usageEvent);
|
|
2430
2467
|
}
|
|
2468
|
+
if (
|
|
2469
|
+
compactionEvolution !== null &&
|
|
2470
|
+
result !== null &&
|
|
2471
|
+
commandError === null
|
|
2472
|
+
) {
|
|
2473
|
+
try {
|
|
2474
|
+
await compactionEvolution.evolutionIngress.complete();
|
|
2475
|
+
} catch {
|
|
2476
|
+
commandError = this._latchCompactionSettlement({
|
|
2477
|
+
code: "CC_AGENT_EVOLUTION_INGRESS_FAILED",
|
|
2478
|
+
reason: "compaction_evolution_completion_failed",
|
|
2479
|
+
commitState: "evolution-unconfirmed",
|
|
2480
|
+
});
|
|
2481
|
+
this.interaction.emit("compaction-degraded", {
|
|
2482
|
+
requestId,
|
|
2483
|
+
...commandError,
|
|
2484
|
+
summaryMode: "none",
|
|
2485
|
+
});
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2431
2488
|
this.interaction.emit("command-response", {
|
|
2432
2489
|
requestId,
|
|
2433
2490
|
command: cmd,
|
|
@@ -392,6 +392,8 @@ export class ChainlessChainWSServer extends EventEmitter {
|
|
|
392
392
|
options.remoteMembershipCoordinator === null
|
|
393
393
|
? null
|
|
394
394
|
: () => this._requireRemoteMembershipCoordinator(),
|
|
395
|
+
refreshCoordinatorOnEnumeration:
|
|
396
|
+
options.remoteMembershipCoordinator != null,
|
|
395
397
|
membershipAuthority:
|
|
396
398
|
options.remoteMembershipAuthority === null
|
|
397
399
|
? null
|
|
@@ -10,13 +10,21 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
13
|
+
import {
|
|
14
|
+
collectFileReadProgress,
|
|
15
|
+
FILE_READ_PROGRESS_PREFIX,
|
|
16
|
+
fileReadProgressBody,
|
|
17
|
+
} from "../lib/read-file-page.js";
|
|
13
18
|
import { feature, featureVariant } from "../lib/feature-flags.js";
|
|
14
19
|
import { isAbortError } from "../lib/abort-utils.js";
|
|
15
20
|
import {
|
|
16
21
|
CONTEXT_WINDOWS,
|
|
17
22
|
getContextWindow,
|
|
18
23
|
} from "../lib/model-context-window.js";
|
|
19
|
-
export {
|
|
24
|
+
export {
|
|
25
|
+
CONTEXT_WINDOWS,
|
|
26
|
+
getContextWindow,
|
|
27
|
+
} from "../lib/model-context-window.js";
|
|
20
28
|
import {
|
|
21
29
|
DURABLE_SYSTEM_MESSAGE_KINDS,
|
|
22
30
|
getDurableSystemMessageProvenance,
|
|
@@ -107,7 +115,14 @@ function buildBoundedHistory(messages, maxChars) {
|
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
function summaryPrompt(messages, maxChars) {
|
|
110
|
-
const schema =
|
|
118
|
+
const schema = JSON.stringify(
|
|
119
|
+
Object.fromEntries(
|
|
120
|
+
STRUCTURED_HANDOFF_FIELDS.map((field) => [
|
|
121
|
+
field,
|
|
122
|
+
field === "objective" ? "" : [],
|
|
123
|
+
]),
|
|
124
|
+
),
|
|
125
|
+
);
|
|
111
126
|
const instructions = [
|
|
112
127
|
"Create a durable conversation handoff from the history below.",
|
|
113
128
|
`Return exactly one strict JSON object with all keys in this order: ${schema}.`,
|
|
@@ -356,6 +371,7 @@ export class PromptCompressor {
|
|
|
356
371
|
? messages.filter((m) => !isPinned(m))
|
|
357
372
|
: messages;
|
|
358
373
|
|
|
374
|
+
const readProgress = collectFileReadProgress(messages);
|
|
359
375
|
const originalTokens = estimateMessagesTokens(messages);
|
|
360
376
|
let result = [...working];
|
|
361
377
|
const applied = [];
|
|
@@ -397,7 +413,10 @@ export class PromptCompressor {
|
|
|
397
413
|
}
|
|
398
414
|
|
|
399
415
|
if (result.length > this.maxMessages) {
|
|
400
|
-
result = this._truncate(
|
|
416
|
+
result = this._truncate(
|
|
417
|
+
result,
|
|
418
|
+
this.maxMessages - (readProgress.length ? 1 : 0),
|
|
419
|
+
);
|
|
401
420
|
applied.push("truncate");
|
|
402
421
|
}
|
|
403
422
|
|
|
@@ -417,6 +436,32 @@ export class PromptCompressor {
|
|
|
417
436
|
result = sanitizeToolPairs(result);
|
|
418
437
|
}
|
|
419
438
|
|
|
439
|
+
// The LLM summary may omit paging state. Preserve bounded cursors from the
|
|
440
|
+
// actual read results even when old tool pairs are removed completely.
|
|
441
|
+
if (applied.length && readProgress.length) {
|
|
442
|
+
result = result.filter(
|
|
443
|
+
(message) => fileReadProgressBody(message) === null,
|
|
444
|
+
);
|
|
445
|
+
const insertion = result.findIndex(
|
|
446
|
+
(message) => message.role !== "system",
|
|
447
|
+
);
|
|
448
|
+
result.splice(
|
|
449
|
+
insertion < 0 ? result.length : insertion,
|
|
450
|
+
0,
|
|
451
|
+
markDurableSystemMessage(
|
|
452
|
+
{
|
|
453
|
+
role: "system",
|
|
454
|
+
content:
|
|
455
|
+
FILE_READ_PROGRESS_PREFIX +
|
|
456
|
+
JSON.stringify(readProgress) +
|
|
457
|
+
"\nHistorical read positions, not retained file contents. Continue with nextRead when relevant; if the file changed or an earlier section is needed, read that specific section.",
|
|
458
|
+
},
|
|
459
|
+
DURABLE_SYSTEM_MESSAGE_KINDS.COMPACT_SUMMARY,
|
|
460
|
+
),
|
|
461
|
+
);
|
|
462
|
+
applied.push("file-read-progress");
|
|
463
|
+
}
|
|
464
|
+
|
|
420
465
|
const compressedTokens = estimateMessagesTokens(result);
|
|
421
466
|
const stats = {
|
|
422
467
|
strategy: applied.join("+") || "none",
|
|
@@ -493,7 +538,7 @@ export class PromptCompressor {
|
|
|
493
538
|
return result;
|
|
494
539
|
}
|
|
495
540
|
|
|
496
|
-
_truncate(messages) {
|
|
541
|
+
_truncate(messages, maxMessages = this.maxMessages) {
|
|
497
542
|
const system = messages.filter(
|
|
498
543
|
(m) => m.role === "system" && !isCompactionArtifact(m),
|
|
499
544
|
);
|
|
@@ -502,7 +547,7 @@ export class PromptCompressor {
|
|
|
502
547
|
(m) => (m.role !== "system" || isCompactionArtifact(m)) && m !== last,
|
|
503
548
|
);
|
|
504
549
|
|
|
505
|
-
let slots =
|
|
550
|
+
let slots = maxMessages - system.length;
|
|
506
551
|
if (last) slots -= 1;
|
|
507
552
|
|
|
508
553
|
const recent = rest.slice(-Math.max(slots, 1));
|
|
@@ -627,6 +672,7 @@ export class PromptCompressor {
|
|
|
627
672
|
// A durable-ledger write failure is authoritative too. Falling back here
|
|
628
673
|
// would let the host continue after losing the model-call boundary.
|
|
629
674
|
if (error?.runtimeLedgerPersistence === true) throw error;
|
|
675
|
+
if (error?.code === "CC_AGENT_EVOLUTION_INGRESS_FAILED") throw error;
|
|
630
676
|
// A workflow-bound query may already have reached the provider. An
|
|
631
677
|
// extractive fallback would make the outer durable effect look completed
|
|
632
678
|
// and authorize a replay of that physically unknown request.
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
PromptCompressor,
|
|
4
4
|
sanitizeToolPairs,
|
|
5
5
|
} from "./prompt-compressor.js";
|
|
6
|
+
import { captureAgentEvolutionIngress } from "../lib/evolution/agent-evolution-ingress.js";
|
|
6
7
|
|
|
7
8
|
const DEFAULT_MAX_OUTPUT_TOKENS = 2048;
|
|
8
9
|
const MIN_MAX_OUTPUT_TOKENS = 256;
|
|
@@ -121,11 +122,35 @@ export function compactionTokenUsage(stats) {
|
|
|
121
122
|
* contract instead of falling back to positional truncation.
|
|
122
123
|
*/
|
|
123
124
|
export async function compactConversationWithProvider(messages, options = {}) {
|
|
125
|
+
const configuredIngress =
|
|
126
|
+
options.evolutionIngress ?? options.chatOptions?.evolutionIngress ?? null;
|
|
127
|
+
const evolutionIngress =
|
|
128
|
+
configuredIngress === null
|
|
129
|
+
? null
|
|
130
|
+
: captureAgentEvolutionIngress(configuredIngress);
|
|
124
131
|
const originalMessages = Array.isArray(messages) ? [...messages] : [];
|
|
125
132
|
const provider = options.provider || null;
|
|
126
133
|
const model = options.model || null;
|
|
127
134
|
const maxOutputTokens = boundedMaxOutputTokens(options.maxOutputTokens);
|
|
128
|
-
|
|
135
|
+
let chatFn = options.chatFn;
|
|
136
|
+
if (evolutionIngress !== null) {
|
|
137
|
+
const { chatWithTools } = await import("../runtime/agent-core.js");
|
|
138
|
+
if (
|
|
139
|
+
(chatFn != null && chatFn !== chatWithTools) ||
|
|
140
|
+
options.llmQuery != null ||
|
|
141
|
+
options.compressor != null ||
|
|
142
|
+
(options.evolutionIngress != null &&
|
|
143
|
+
options.chatOptions?.evolutionIngress != null &&
|
|
144
|
+
options.evolutionIngress !== options.chatOptions.evolutionIngress)
|
|
145
|
+
) {
|
|
146
|
+
const error = new TypeError(
|
|
147
|
+
"Evolution compaction requires the canonical model transport and compressor",
|
|
148
|
+
);
|
|
149
|
+
error.code = "CC_AGENT_EVOLUTION_INGRESS_FAILED";
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
chatFn = chatWithTools;
|
|
153
|
+
}
|
|
129
154
|
const invokeProviderCall = async (call) => {
|
|
130
155
|
const callId = safeUsageCallId(await options.onProviderCallStart?.());
|
|
131
156
|
try {
|
|
@@ -145,12 +170,14 @@ export async function compactConversationWithProvider(messages, options = {}) {
|
|
|
145
170
|
return invokeProviderCall(async () => {
|
|
146
171
|
const response = await chatFn([{ role: "user", content: prompt }], {
|
|
147
172
|
...(options.chatOptions || {}),
|
|
173
|
+
...(evolutionIngress === null ? {} : { evolutionIngress }),
|
|
148
174
|
provider,
|
|
149
175
|
model,
|
|
150
176
|
baseUrl: options.baseUrl,
|
|
151
177
|
apiKey: options.apiKey,
|
|
152
178
|
signal: options.signal,
|
|
153
179
|
contextEngine: null,
|
|
180
|
+
contextMemorySkipPlanning: true,
|
|
154
181
|
enabledToolNames: [],
|
|
155
182
|
extraToolDefinitions: [],
|
|
156
183
|
hostManagedToolPolicy: null,
|
|
@@ -268,6 +268,8 @@ export class RemoteSessionRegistry {
|
|
|
268
268
|
// explicitly require this authority and trigger its lazy construction.
|
|
269
269
|
this._membershipAuthority = options.membershipAuthority ?? null;
|
|
270
270
|
this._membershipCoordinator = options.membershipCoordinator ?? null;
|
|
271
|
+
this._refreshCoordinatorOnEnumeration =
|
|
272
|
+
options.refreshCoordinatorOnEnumeration === true;
|
|
271
273
|
this.sessions = new Map();
|
|
272
274
|
this.tokens = new Map();
|
|
273
275
|
this._transportBindings = new Map();
|
|
@@ -1175,11 +1177,21 @@ export class RemoteSessionRegistry {
|
|
|
1175
1177
|
}
|
|
1176
1178
|
|
|
1177
1179
|
findHosted(agentSessionId, hostClientId) {
|
|
1178
|
-
|
|
1180
|
+
const hasDurableSession = [...this.sessions.values()].some((session) =>
|
|
1181
|
+
Boolean(session.hostPrincipalId),
|
|
1182
|
+
);
|
|
1183
|
+
if (
|
|
1184
|
+
this._membershipCoordinator &&
|
|
1185
|
+
(this._refreshCoordinatorOnEnumeration ||
|
|
1186
|
+
this._coordinatorHydrated ||
|
|
1187
|
+
hasDurableSession)
|
|
1188
|
+
) {
|
|
1179
1189
|
// Enumeration cannot rely on the one-time startup hydration: another
|
|
1180
1190
|
// server may have created, closed, or re-enabled a durable session since
|
|
1181
|
-
// this process started.
|
|
1182
|
-
//
|
|
1191
|
+
// this process started. Explicit coordinator deployments and processes
|
|
1192
|
+
// already serving durable sessions refresh before matching local
|
|
1193
|
+
// transport attachments. A lazy default coordinator must stay unopened
|
|
1194
|
+
// for purely in-memory sessions.
|
|
1183
1195
|
this._hydrateCoordinatorSessions(this._resolveMembershipCoordinator());
|
|
1184
1196
|
}
|
|
1185
1197
|
const matches = [];
|
package/src/index.js
CHANGED
|
@@ -26,16 +26,22 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
26
26
|
const commandModules = [];
|
|
27
27
|
|
|
28
28
|
for (const entry of manifest.commands) {
|
|
29
|
+
let deploymentStarted = false;
|
|
29
30
|
try {
|
|
30
31
|
const modulePath = join(__dirname, entry.module.replace("./", ""));
|
|
31
32
|
const moduleUrl = pathToFileURL(modulePath).href;
|
|
32
33
|
const mod = await import(moduleUrl);
|
|
34
|
+
deploymentStarted = true;
|
|
33
35
|
const deploymentDependencies =
|
|
34
36
|
await loadEvolutionDeploymentCommandDependencies(entry.name);
|
|
35
37
|
commandModules.push({ entry, mod, deploymentDependencies });
|
|
36
38
|
} catch (err) {
|
|
37
39
|
// Store error for later reporting
|
|
38
|
-
commandModules.push({
|
|
40
|
+
commandModules.push({
|
|
41
|
+
entry,
|
|
42
|
+
error: err,
|
|
43
|
+
deploymentError: deploymentStarted,
|
|
44
|
+
});
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
|
|
@@ -82,9 +88,16 @@ export function createProgram(options = {}) {
|
|
|
82
88
|
});
|
|
83
89
|
|
|
84
90
|
// Register all preloaded commands
|
|
85
|
-
for (const {
|
|
91
|
+
for (const {
|
|
92
|
+
entry,
|
|
93
|
+
mod,
|
|
94
|
+
error,
|
|
95
|
+
deploymentError,
|
|
96
|
+
deploymentDependencies,
|
|
97
|
+
} of commandModules) {
|
|
86
98
|
if (shouldFilter && !allowedCommands.has(entry.name)) continue;
|
|
87
99
|
if (error) {
|
|
100
|
+
if (deploymentError) throw error;
|
|
88
101
|
if (process.env.DEBUG) {
|
|
89
102
|
console.warn(
|
|
90
103
|
chalk.yellow(
|
|
@@ -109,6 +122,11 @@ export function createProgram(options = {}) {
|
|
|
109
122
|
undefined,
|
|
110
123
|
);
|
|
111
124
|
} catch (err) {
|
|
125
|
+
if (
|
|
126
|
+
options.commandDependencies?.[entry.name] != null ||
|
|
127
|
+
deploymentDependencies != null
|
|
128
|
+
)
|
|
129
|
+
throw err;
|
|
112
130
|
if (process.env.DEBUG) {
|
|
113
131
|
console.warn(
|
|
114
132
|
chalk.yellow(
|
package/src/lazy-dispatch.js
CHANGED
|
@@ -706,6 +706,7 @@ export async function dispatchManifestEntry(
|
|
|
706
706
|
} = {},
|
|
707
707
|
) {
|
|
708
708
|
let program;
|
|
709
|
+
let allowCompatibilityFallback = true;
|
|
709
710
|
try {
|
|
710
711
|
program = await createBaseProgram();
|
|
711
712
|
const mod = await loadCommandModule(entry);
|
|
@@ -715,9 +716,14 @@ export async function dispatchManifestEntry(
|
|
|
715
716
|
`Register function '${entry.register}' not found in ${entry.module}`,
|
|
716
717
|
);
|
|
717
718
|
}
|
|
719
|
+
// Governed deployment loading may reconcile durable state. Do not hide a
|
|
720
|
+
// failed trust check or retry that assembly through the eager program.
|
|
721
|
+
allowCompatibilityFallback = false;
|
|
718
722
|
const dependencies = await loadCommandDependencies(entry.name);
|
|
723
|
+
allowCompatibilityFallback = dependencies == null;
|
|
719
724
|
registerFn(program, dependencies ?? undefined);
|
|
720
725
|
} catch (error) {
|
|
726
|
+
if (!allowCompatibilityFallback) throw error;
|
|
721
727
|
if (env.DEBUG || env.CC_DEBUG) {
|
|
722
728
|
stderr.write(
|
|
723
729
|
`Lazy command registration failed; loading compatibility program: ${error.message}\n`,
|
|
@@ -12,6 +12,7 @@ import { CostBudget } from "./cost-budget.js";
|
|
|
12
12
|
import { FREE_PROVIDERS, mergePricing } from "./llm-pricing.js";
|
|
13
13
|
import { redactSecrets } from "./secret-scan.js";
|
|
14
14
|
import { firstBalancedJson } from "./json-schema-output.js";
|
|
15
|
+
import { captureAgentEvolutionIngress } from "./evolution/agent-evolution-ingress.js";
|
|
15
16
|
|
|
16
17
|
export const ADVISOR_TRIGGERS = Object.freeze({
|
|
17
18
|
MANUAL: "manual",
|
|
@@ -609,7 +610,12 @@ export async function invokeToolFreeAdvisor({
|
|
|
609
610
|
apiKey,
|
|
610
611
|
maxTokens = DEFAULT_ADVISOR_MAX_TOKENS,
|
|
611
612
|
signal,
|
|
613
|
+
evolutionIngress = null,
|
|
612
614
|
} = {}) {
|
|
615
|
+
const ingress =
|
|
616
|
+
evolutionIngress == null
|
|
617
|
+
? null
|
|
618
|
+
: captureAgentEvolutionIngress(evolutionIngress);
|
|
613
619
|
const { chatWithTools } = await import("../runtime/agent-core.js");
|
|
614
620
|
let resolvedBaseUrl = baseUrl;
|
|
615
621
|
if (!resolvedBaseUrl) {
|
|
@@ -625,6 +631,7 @@ export async function invokeToolFreeAdvisor({
|
|
|
625
631
|
resolvedBaseUrl = "http://localhost:11434";
|
|
626
632
|
}
|
|
627
633
|
return chatWithTools(messages, {
|
|
634
|
+
...(ingress === null ? {} : { evolutionIngress: ingress }),
|
|
628
635
|
provider,
|
|
629
636
|
model,
|
|
630
637
|
baseUrl: resolvedBaseUrl,
|
|
@@ -640,6 +647,9 @@ export async function invokeToolFreeAdvisor({
|
|
|
640
647
|
}
|
|
641
648
|
|
|
642
649
|
export class AdvisorRuntime {
|
|
650
|
+
#evolutionIngress;
|
|
651
|
+
#callWrapper;
|
|
652
|
+
|
|
643
653
|
constructor({
|
|
644
654
|
config,
|
|
645
655
|
managed,
|
|
@@ -649,11 +659,28 @@ export class AdvisorRuntime {
|
|
|
649
659
|
baseUrl = null,
|
|
650
660
|
apiKey = null,
|
|
651
661
|
invoke = invokeToolFreeAdvisor,
|
|
662
|
+
evolutionIngress = null,
|
|
663
|
+
callWrapper = null,
|
|
652
664
|
onEvent = null,
|
|
653
665
|
priceTable = null,
|
|
654
666
|
now = () => Date.now(),
|
|
655
667
|
id = () => randomUUID(),
|
|
656
668
|
} = {}) {
|
|
669
|
+
this.#evolutionIngress =
|
|
670
|
+
evolutionIngress == null
|
|
671
|
+
? null
|
|
672
|
+
: captureAgentEvolutionIngress(evolutionIngress);
|
|
673
|
+
if (this.#evolutionIngress !== null && invoke !== invokeToolFreeAdvisor) {
|
|
674
|
+
throw Object.assign(
|
|
675
|
+
new TypeError(
|
|
676
|
+
"Evolution Advisor requires the canonical model transport",
|
|
677
|
+
),
|
|
678
|
+
{ code: "CC_AGENT_EVOLUTION_INGRESS_FAILED" },
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
if (callWrapper !== null && typeof callWrapper !== "function")
|
|
682
|
+
throw new TypeError("Advisor callWrapper must be a function");
|
|
683
|
+
this.#callWrapper = callWrapper;
|
|
657
684
|
this.config = resolveAdvisorConfig({
|
|
658
685
|
config,
|
|
659
686
|
managed,
|
|
@@ -837,7 +864,7 @@ export class AdvisorRuntime {
|
|
|
837
864
|
toolCount: 0,
|
|
838
865
|
});
|
|
839
866
|
try {
|
|
840
|
-
const
|
|
867
|
+
const request = {
|
|
841
868
|
messages: requestMessages,
|
|
842
869
|
provider: this.config.provider,
|
|
843
870
|
model: this.config.model,
|
|
@@ -846,7 +873,28 @@ export class AdvisorRuntime {
|
|
|
846
873
|
maxTokens: this.config.maxTokens,
|
|
847
874
|
signal,
|
|
848
875
|
enabledToolNames: [],
|
|
849
|
-
|
|
876
|
+
...(this.#evolutionIngress === null
|
|
877
|
+
? {}
|
|
878
|
+
: { evolutionIngress: this.#evolutionIngress }),
|
|
879
|
+
};
|
|
880
|
+
const invoke =
|
|
881
|
+
this.#evolutionIngress === null ? this.invoke : invokeToolFreeAdvisor;
|
|
882
|
+
const invokeCall = ({ signal: hostSignal = signal } = {}) =>
|
|
883
|
+
invoke({
|
|
884
|
+
...request,
|
|
885
|
+
signal:
|
|
886
|
+
hostSignal && signal && hostSignal !== signal
|
|
887
|
+
? AbortSignal.any([signal, hostSignal])
|
|
888
|
+
: hostSignal || signal,
|
|
889
|
+
});
|
|
890
|
+
const rawResult =
|
|
891
|
+
this.#callWrapper === null
|
|
892
|
+
? await invokeCall()
|
|
893
|
+
: await this.#callWrapper({
|
|
894
|
+
call: invokeCall,
|
|
895
|
+
provider: request.provider,
|
|
896
|
+
model: request.model,
|
|
897
|
+
});
|
|
850
898
|
const rawText = resultText(rawResult);
|
|
851
899
|
const advice = parseAdvisorAdvice(rawText);
|
|
852
900
|
const usage = usageFrom(rawResult, requestMessages, rawText);
|
|
@@ -889,6 +937,7 @@ export class AdvisorRuntime {
|
|
|
889
937
|
};
|
|
890
938
|
} catch (error) {
|
|
891
939
|
if (error?.runtimeLedgerPersistence === true) throw error;
|
|
940
|
+
if (error?.code === "CC_AGENT_EVOLUTION_INGRESS_FAILED") throw error;
|
|
892
941
|
const failure = {
|
|
893
942
|
callId,
|
|
894
943
|
trigger,
|
|
@@ -1019,6 +1068,8 @@ export async function createConfiguredAdvisorRuntime({
|
|
|
1019
1068
|
overrides = {},
|
|
1020
1069
|
onEvent = null,
|
|
1021
1070
|
invoke = invokeToolFreeAdvisor,
|
|
1071
|
+
evolutionIngress = null,
|
|
1072
|
+
callWrapper = null,
|
|
1022
1073
|
now,
|
|
1023
1074
|
id,
|
|
1024
1075
|
} = {}) {
|
|
@@ -1037,6 +1088,8 @@ export async function createConfiguredAdvisorRuntime({
|
|
|
1037
1088
|
baseUrl,
|
|
1038
1089
|
apiKey,
|
|
1039
1090
|
invoke,
|
|
1091
|
+
evolutionIngress,
|
|
1092
|
+
callWrapper,
|
|
1040
1093
|
onEvent,
|
|
1041
1094
|
priceTable: mergePricing(config?.llm?.pricing),
|
|
1042
1095
|
now,
|
|
@@ -208,6 +208,10 @@ export class CliAgentKernelAdapter {
|
|
|
208
208
|
turnOptions.skillVectorAuthority ??
|
|
209
209
|
this.sessionOptions.skillVectorAuthority ??
|
|
210
210
|
null,
|
|
211
|
+
skillRetrievalRevocationReader:
|
|
212
|
+
turnOptions.skillRetrievalRevocationReader ??
|
|
213
|
+
this.sessionOptions.skillRetrievalRevocationReader ??
|
|
214
|
+
null,
|
|
211
215
|
},
|
|
212
216
|
{
|
|
213
217
|
...this.dependencies,
|