chainlesschain 0.166.21 → 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/README.md +67 -9
- package/package.json +4 -3
- package/src/assets/web-panel/assets/{AIOps-BjMnsUci.js → AIOps-DR-MWcZc.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-DdYFP03A.js → ActionButton-DT8B7sEb.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-Bb8TuuK_.js → Analytics-asjh3dQJ.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-Kn3TIOtk.js → AppLayout-DivQ491i.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-4IxpqI_b.js → Artifacts-DPH2uUmy.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-BOV2caqU.js → Audit-Bp2nLyc-.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-B86k-ay4.js → BackgroundAgents-CHS28khl.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-C5_ie1e3.js → Backup-CKeaFSfz.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-xpwg6QCW.js → BaseInput-CxwM9BAH.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-CVZOcZau.js → Chat-DYLDwaCv.js} +4 -4
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-D8fPYhUu.js → ChatBubbleRenderer-DdBJDBP0.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-MKTq3zdP.js → Checkbox-uYTWOB8j.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-JUk3wzep.js → Codegen-CvYa_dwT.js} +1 -1
- package/src/assets/web-panel/assets/{Col-JPvTA0kC.js → Col-CanMAX4m.js} +1 -1
- package/src/assets/web-panel/assets/{Community-Tqgl87NQ.js → Community-B4WaDtHw.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-BuAFYBmN.js → Compact-K93Uof_3.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-CXS9WIPZ.js → Compliance-CKeDLgUW.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-Ds2bFHrr.js → Cowork-P93grAeB.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-C_dV_OeW.js → Cron-BSHnMtDn.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-BsO6tIRo.js → Crosschain-epAOpUVJ.js} +1 -1
- package/src/assets/web-panel/assets/{DID-rNOFqBac.js → DID-ByjXfP7t.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-C2fcKKVY.js → Dashboard-QztTU8tb.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-Y7Ndr0X_.js → Dropdown-DhUc9yhN.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-DcP_uPmL.js → EmailListRenderer-C2sLhJJN.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-Cwn3gDzk.js → FamilyGuardDashboard-CdfbWNDn.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-ClQuOsqb.js → Federation-CcF_R7NW.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-DfwtmlcK.js → FormItemContext-Cm_X2IBk.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-zNZhtbC5.js → GenericCardRenderer-DUi4NWlb.js} +1 -1
- package/src/assets/web-panel/assets/{Git-BZmdW-G5.js → Git-4Sq5FjBt.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CqBk4lEn.js → Governance-Dx2_v4V6.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-Dbmt3ZXk.js → Inference-7Vr1xekR.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-hMTH6qf3.js → KnowledgeGraph-Cnd2XOzf.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-CkiYgiW2.js → Logs-B66QPVf-.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-BL1FElXg.js → MarkdownRenderer-PLsEvhly.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-CbB6wfin.js → Marketplace-BMIK9BmC.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-BSwiFtte.js → McpTools-BDbyp3J_.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-B03PeHrz.js → Memory-CJdzfZGi.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-CRGrnd-X.js → MobileBridge-C2TH5Y3-.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-CE_5v2kO.js → MobileProjects-D1dYXkvV.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-Dp11QVx1.js → Mtc-B-4A1I1j.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-CYu-3JBu.js → MtcAudit-Bgcc9UOl.js} +5 -5
- package/src/assets/web-panel/assets/{Multisig-CGyJ0Xl3.js → Multisig-DqOe-etP.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-CoWi_ov1.js → NLProgramming-7VnhzE_6.js} +1 -1
- package/src/assets/web-panel/assets/Notes-BxawpeUQ.js +7 -0
- package/src/assets/web-panel/assets/{NotificationSettings-DX4I2b4W.js → NotificationSettings-Cr08G2aE.js} +1 -1
- package/src/assets/web-panel/assets/OrderTableRenderer-Ce8bEGlK.js +1 -0
- package/src/assets/web-panel/assets/{Organization-oopLO_tk.js → Organization-BC7lveGv.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-BFVvjMyf.js → Overflow-CakOW-G0.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CBy5t-Tk.js → P2P-Cf8CaOBZ.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser--YWJNsu6.js → PdhVaultBrowser-Dc7b98W9.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-C2dZ8scb.js → Permissions-DGJyMEfS.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-Bs3l7Hlx.js → PersonalDataHub-DNIwSdwu.js} +6 -6
- package/src/assets/web-panel/assets/{Pipeline-DEBWbZuD.js → Pipeline-5B1S12wa.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-CjHBb6NU.js → Privacy-CMB6Ke5t.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-D2WipUz5.js → ProjectInit-D5PqTFiT.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-B6WfnrGB.js → ProjectSettings-CbKNdSjV.js} +2 -2
- package/src/assets/web-panel/assets/Projects-ccXaHzYL.js +1 -0
- package/src/assets/web-panel/assets/{Providers-CCv5M_Dv.js → Providers-CJF5_-Gs.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-CGthxU54.js → QrScannerModal-CT6iEAdi.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-CnPmXPFb.js → QuickAsk-Ci0h9mJ_.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-Df_tGEa9.js → Recommend-Da5mobZu.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-Z58N0Loe.js → RemoteSession-BaCY8eey.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-CZTBQ2Vt.js → Reputation-CaITfTsI.js} +1 -1
- package/src/assets/web-panel/assets/{Row-CdK3YpCQ.js → Row-DtUDamyP.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-CFMVT5sb.js → RssFeed-DX27gFpg.js} +3 -3
- package/src/assets/web-panel/assets/{Search-DrF8RIvD.js → Search-DFL69osN.js} +1 -1
- package/src/assets/web-panel/assets/{Security-Ddk2f2DM.js → Security-BqGeoWv-.js} +3 -3
- package/src/assets/web-panel/assets/{Services-CCuK-VOo.js → Services-3z1WnEAc.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-DxCpHzeM.js → Skeleton-C_OJQQ9Z.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-t2oTDgcv.js → Skills-BY7aT6Mo.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Df63M9_R.js → Sla-BZv7DSaD.js} +1 -1
- package/src/assets/web-panel/assets/SpeechSettings-6lJKLhCn.js +1 -0
- package/src/assets/web-panel/assets/{SyncSettings-COd_tgPp.js → SyncSettings-B6D7STlI.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-CzDCcrik.js → Tasks-Co_FCZAO.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-D-vfxTGA.js → Templates-CnY-9fgz.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BlpT_Gxc.js → Tenant-B71yXfZ8.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-D5rq52Hg.js → Terminal-Dd_P7awo.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-DdoMndkK.js → TimelineRenderer-CvIEMyli.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-BhgBsI6g.js → Tokens-DknFBGOi.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-DwwzoikZ.js → Trigger-D_4nJONB.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-HkTpzXFb.js → Trust-BNl21fa7.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-D9nk6Ehe.js → UkeySign-CFrCI7uK.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-BKk0rfoy.js → VideoEditing-BVfY6JLg.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-IVWIU_Lq.js → Wallet-Cj9CAK0J.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-CFTCpfsG.js → WebAuthn-DcqZlzA3.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-Dnf4Obif.js → WorkflowEditor-Dfr_dMld.js} +1 -1
- package/src/assets/web-panel/assets/{chat-D2snERdj.js → chat-Yv6UF0AD.js} +1 -1
- package/src/assets/web-panel/assets/{colors-DKEjK1N1.js → colors-CDW_-1fs.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-BEDLwQdt.js → compact-item-BYOQvd-6.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-DA9iW1a0.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-5l2xEcY9.js → hasIn-DY-70cfQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-B7_W_rYd.js → index-366wfQBU.js} +1 -1
- package/src/assets/web-panel/assets/index-B0o4MeNK.js +1 -0
- package/src/assets/web-panel/assets/{index-CxEtQYdi.js → index-B9ZogJJM.js} +1 -1
- package/src/assets/web-panel/assets/{index-B00GeekA.js → index-B9m5QAMg.js} +1 -1
- package/src/assets/web-panel/assets/{index-C7sKbM5s.js → index-BBs2mv5M.js} +1 -1
- package/src/assets/web-panel/assets/{index-CX1x4AFn.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-DU2TXJu-.js → index-BXlEx4UH.js} +1 -1
- package/src/assets/web-panel/assets/{index-e-e40id6.js → index-BayRTE5w.js} +1 -1
- package/src/assets/web-panel/assets/{index-DXet1xol.js → index-Bb9nyts1.js} +1 -1
- package/src/assets/web-panel/assets/{index-D7z4zB_a.js → index-Bf_Va0S-.js} +1 -1
- package/src/assets/web-panel/assets/{index-fccZmC_h.js → index-Br3wQLVY.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bqc8tdIF.js → index-BvK4fjkk.js} +1 -1
- package/src/assets/web-panel/assets/{index-BO9dQjpt.js → index-C40UdtlS.js} +1 -1
- package/src/assets/web-panel/assets/{index-Csfb-7hw.js → index-C4UJA2ju.js} +1 -1
- package/src/assets/web-panel/assets/{index-Td8ZwyoC.js → index-CB_Iw73G.js} +1 -1
- package/src/assets/web-panel/assets/{index-BZ5lY2zx.js → index-CCwWp3mT.js} +1 -1
- package/src/assets/web-panel/assets/{index-DpqtbXdE.js → index-CFa2fPCk.js} +1 -1
- package/src/assets/web-panel/assets/{index-NJieh3T1.js → index-CIyHxV4u.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dbkghqn_.js → index-CUP-A2_h.js} +1 -1
- package/src/assets/web-panel/assets/{index-DqwPFbOb.js → index-CUo27q9J.js} +3 -3
- package/src/assets/web-panel/assets/{index-B4QYBliR.js → index-CaT8trvf.js} +1 -1
- package/src/assets/web-panel/assets/{index-BgfImyZI.js → index-CnZNbcux.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dbd7eEex.js → index-Cy2NE6AO.js} +1 -1
- package/src/assets/web-panel/assets/{index-CbTPvp2_.js → index-CzeEEazr.js} +1 -1
- package/src/assets/web-panel/assets/{index-5pW4t1iD.js → index-D--TEyDj.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dg2a9owQ.js → index-DCtsjhhT.js} +1 -1
- package/src/assets/web-panel/assets/{index-B_eCoZgW.js → index-DLOf7BSz.js} +1 -1
- package/src/assets/web-panel/assets/{index-7P1b8HZo.js → index-DM5c4pc-.js} +1 -1
- package/src/assets/web-panel/assets/{index-CRPrHE7h.js → index-DRFC2Qt0.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bq5P3piS.js → index-DT_qVaaV.js} +1 -1
- package/src/assets/web-panel/assets/{index-CjWltbi_.js → index-DUDoRk9r.js} +1 -1
- package/src/assets/web-panel/assets/{index-CkMKuqUs.js → index-Dg-AQYDf.js} +1 -1
- package/src/assets/web-panel/assets/{index-DLoalqRX.js → index-DuIPq5MX.js} +1 -1
- package/src/assets/web-panel/assets/{index-CGlotREA.js → index-NYVBUAVN.js} +1 -1
- package/src/assets/web-panel/assets/{index-yYEQXYaU.js → index-NaCESahy.js} +1 -1
- package/src/assets/web-panel/assets/{index-CmruhzFi.js → index-RjIMPG0u.js} +1 -1
- package/src/assets/web-panel/assets/{index-fgYk0QXO.js → index-Y9akzgFO.js} +1 -1
- package/src/assets/web-panel/assets/{index-DvV03Ayk.js → index-hZ0Eyrrw.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-CPrcB1TC.js → initDefaultProps-CG99CcR4.js} +1 -1
- package/src/assets/web-panel/assets/{motion-BQ7mWRh_.js → motion-Z7MH0_0G.js} +1 -1
- package/src/assets/web-panel/assets/{move-CzOEq99p.js → move-BX67lOdq.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-BlQI5jrw.js → mtc-parser-CmAbG1fE.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DlW4gxmv.js → omit-DiU5tI1_.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-BBYms5nP.js → pickAttrs-BGfvLrYL.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-az2MPJ_7.js → placementArrow-CggLEgaJ.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-D1-ibEol.js → responsiveObserve-t3nlghPZ.js} +1 -1
- package/src/assets/web-panel/assets/{slide-DHGqa4GA.js → slide-BkV4dL9s.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CYGDo6lD.js → statusUtils-qec1PUoC.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-Cl2EM9K6.js → styleChecker-ChjX6T8D.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-DdYhzuv1.js → useFlexGapSupport-B1jLoZcM.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-DWumPuBW.js → useFs-C3X53s4E.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DxAO-Aqi.js → usePersonalDataHub-DOvbbnkZ.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-CplsQf_N.js → vnode-Ie0TEVFT.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-Cw5HXNSG.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 +41 -0
- package/src/commands/skill.js +3 -0
- package/src/data/changelog.json +39 -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 +30 -4
- package/src/lazy-dispatch.js +15 -1
- 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 +23 -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 +202 -21
- package/src/lib/evolution/evolution-deployment-loader.js +369 -0
- 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-ledger-adapter.js +335 -0
- package/src/lib/evolution/evolution-release-train-stage-output-ledger-adapter.js +333 -0
- package/src/lib/evolution/evolution-release-train.js +586 -0
- 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 +152 -25
- 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 +736 -0
- package/src/lib/evolution/governed-knowledge-artifact-lifecycle.js +364 -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-merge-ledger-executor.js +29 -2
- package/src/lib/evolution/governed-knowledge-merge-publisher-authority.js +31 -3
- 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-ledger-adapter.js +92 -6
- package/src/lib/evolution/governed-knowledge-sync-merge-publisher.js +57 -4
- package/src/lib/evolution/governed-knowledge-sync.js +332 -99
- 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 +15 -12
- package/src/lib/evolution/statistical-progressive-canary.js +845 -0
- 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 +574 -0
- 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/session-host-lease.js +11 -16
- package/src/lib/skill-retrieval-router.js +22 -1
- package/src/repl/agent-repl.js +127 -33
- package/src/runtime/agent-core.js +224 -80
- 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 +53 -6
- package/src/runtime/runtime-factory.js +41 -2
- package/src/assets/web-panel/assets/Notes-CgU9DDo9.js +0 -7
- package/src/assets/web-panel/assets/OrderTableRenderer-CwHc15Zs.js +0 -1
- package/src/assets/web-panel/assets/Projects-FF_thRi6.js +0 -1
- package/src/assets/web-panel/assets/SpeechSettings-l7ox6KuX.js +0 -1
- package/src/assets/web-panel/assets/devWarning-DyhgpXPf.js +0 -1
- package/src/assets/web-panel/assets/index-Ck1jhFE0.js +0 -1
- package/src/assets/web-panel/assets/index-c8jJEHVs.js +0 -1
package/src/commands/serve.js
CHANGED
|
@@ -7,8 +7,37 @@ import { logger } from "../lib/logger.js";
|
|
|
7
7
|
import { createAgentRuntimeFactory } from "../runtime/runtime-factory.js";
|
|
8
8
|
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
9
9
|
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
10
|
+
import { captureSkillRetrievalRevocationReader } from "../lib/evolution/skill-retrieval-revocation-authority.js";
|
|
11
|
+
import { isEvolutionWorkbenchCliHost } from "../lib/evolution/evolution-workbench-cli-host.js";
|
|
12
|
+
import { isGovernedKnowledgeReviewHost } from "../lib/evolution/governed-knowledge-review-host.js";
|
|
10
13
|
import path from "node:path";
|
|
11
14
|
|
|
15
|
+
export function captureServeGovernanceHosts({
|
|
16
|
+
evolutionWorkbenchHost = null,
|
|
17
|
+
governedKnowledgeReviewHost = null,
|
|
18
|
+
} = {}) {
|
|
19
|
+
if (
|
|
20
|
+
evolutionWorkbenchHost !== null &&
|
|
21
|
+
!isEvolutionWorkbenchCliHost(evolutionWorkbenchHost)
|
|
22
|
+
) {
|
|
23
|
+
throw new TypeError(
|
|
24
|
+
"serve evolutionWorkbenchHost must be a branded Workbench host",
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
if (
|
|
28
|
+
governedKnowledgeReviewHost !== null &&
|
|
29
|
+
!isGovernedKnowledgeReviewHost(governedKnowledgeReviewHost)
|
|
30
|
+
) {
|
|
31
|
+
throw new TypeError(
|
|
32
|
+
"serve governedKnowledgeReviewHost must be a branded review host",
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
return Object.freeze({
|
|
36
|
+
evolutionWorkbenchHost,
|
|
37
|
+
governedKnowledgeReviewHost,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
12
41
|
export function registerServeCommand(program, dependencies = {}) {
|
|
13
42
|
const evolutionCompositionFactory =
|
|
14
43
|
dependencies.evolutionCompositionFactory ?? null;
|
|
@@ -20,6 +49,13 @@ export function registerServeCommand(program, dependencies = {}) {
|
|
|
20
49
|
dependencies.skillVectorAuthority == null
|
|
21
50
|
? null
|
|
22
51
|
: captureSkillVectorAuthority(dependencies.skillVectorAuthority);
|
|
52
|
+
const skillRetrievalRevocationReader =
|
|
53
|
+
dependencies.skillRetrievalRevocationReader == null
|
|
54
|
+
? null
|
|
55
|
+
: captureSkillRetrievalRevocationReader(
|
|
56
|
+
dependencies.skillRetrievalRevocationReader,
|
|
57
|
+
);
|
|
58
|
+
const governanceHosts = captureServeGovernanceHosts(dependencies);
|
|
23
59
|
const serve = program
|
|
24
60
|
.command("serve")
|
|
25
61
|
.description("Start WebSocket server for remote CLI access")
|
|
@@ -141,6 +177,8 @@ export function registerServeCommand(program, dependencies = {}) {
|
|
|
141
177
|
evolutionCompositionFactory,
|
|
142
178
|
skillOutcomeIndex,
|
|
143
179
|
skillVectorAuthority,
|
|
180
|
+
skillRetrievalRevocationReader,
|
|
181
|
+
...governanceHosts,
|
|
144
182
|
maxQueuedRequests,
|
|
145
183
|
});
|
|
146
184
|
const info = await host.start();
|
|
@@ -173,6 +211,8 @@ export function registerServeCommand(program, dependencies = {}) {
|
|
|
173
211
|
evolutionCompositionFactory,
|
|
174
212
|
skillOutcomeIndex,
|
|
175
213
|
skillVectorAuthority,
|
|
214
|
+
skillRetrievalRevocationReader,
|
|
215
|
+
...governanceHosts,
|
|
176
216
|
maxQueuedRequests,
|
|
177
217
|
});
|
|
178
218
|
} finally {
|
|
@@ -187,6 +227,7 @@ export function registerServeCommand(program, dependencies = {}) {
|
|
|
187
227
|
: { evolutionCompositionFactory },
|
|
188
228
|
skillOutcomeIndex,
|
|
189
229
|
skillVectorAuthority,
|
|
230
|
+
skillRetrievalRevocationReader,
|
|
190
231
|
}).createServerRuntime({
|
|
191
232
|
port: parseInt(opts.port, 10),
|
|
192
233
|
host: opts.host,
|
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,45 @@
|
|
|
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
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"productVersion": null,
|
|
32
|
+
"cliVersion": "0.166.22",
|
|
33
|
+
"cliVersions": ["0.166.21", "0.166.22"],
|
|
34
|
+
"date": "2026-09-05",
|
|
35
|
+
"title": "",
|
|
36
|
+
"sections": [
|
|
37
|
+
{
|
|
38
|
+
"heading": "Fixed - cc CLI 0.166.22: keep IDE Agent streams alive during slow commands",
|
|
39
|
+
"body": "> `chainlesschain` **0.166.21 -> 0.166.22** (release candidate,\n> 2026-09-05).\n\n- **Responsive persistent IDE streams**: execute foreground shell commands\n asynchronously for `stream-json` hosts, so a slow networked command such as\n `git push` no longer blocks the Agent protocol pump or session-lease\n heartbeat.\n- **Safe late heartbeat recovery**: let the exact live local lease owner renew\n after an event-loop stall. A revocation or successor still changes the\n durable authority tuple and fences the old host before any guarded write.\n- **Regression coverage**: verify event-loop responsiveness, late renewal, and\n the IDE stream's non-blocking shell option while retaining the existing\n takeover, revocation, and delegated-writer fences.\n- **Release inventory coherence**: align the Skill-writer inventory with the\n current candidate-only sync and inactive marketplace-plugin staging paths,\n removing stale evidence for legacy active hot-loading.\n- **Release boundary**: publication requires this exact release commit to pass\n every configured Linux, Windows, and macOS job in `CLI CI` and\n `CLI Strict Sandbox`; no Session Core, Agent SDK/Protocol, Personal Data Hub,\n or other npm workspace version changes are required for this CLI-only fix."
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
4
43
|
{
|
|
5
44
|
"productVersion": null,
|
|
6
45
|
"cliVersion": "0.166.21",
|
|
@@ -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
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
startDefaultEventRuntimeHost,
|
|
14
14
|
stopDefaultEventRuntimeHost,
|
|
15
15
|
} from "./lib/event-runtime-host.js";
|
|
16
|
+
import { loadEvolutionDeploymentCommandDependencies } from "./lib/evolution/evolution-deployment-loader.js";
|
|
16
17
|
|
|
17
18
|
// The manifest entry is the canonical registration point for learning. Keep
|
|
18
19
|
// these names visible here for tooling that audits the CLI's command surface:
|
|
@@ -25,14 +26,22 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
25
26
|
const commandModules = [];
|
|
26
27
|
|
|
27
28
|
for (const entry of manifest.commands) {
|
|
29
|
+
let deploymentStarted = false;
|
|
28
30
|
try {
|
|
29
31
|
const modulePath = join(__dirname, entry.module.replace("./", ""));
|
|
30
32
|
const moduleUrl = pathToFileURL(modulePath).href;
|
|
31
33
|
const mod = await import(moduleUrl);
|
|
32
|
-
|
|
34
|
+
deploymentStarted = true;
|
|
35
|
+
const deploymentDependencies =
|
|
36
|
+
await loadEvolutionDeploymentCommandDependencies(entry.name);
|
|
37
|
+
commandModules.push({ entry, mod, deploymentDependencies });
|
|
33
38
|
} catch (err) {
|
|
34
39
|
// Store error for later reporting
|
|
35
|
-
commandModules.push({
|
|
40
|
+
commandModules.push({
|
|
41
|
+
entry,
|
|
42
|
+
error: err,
|
|
43
|
+
deploymentError: deploymentStarted,
|
|
44
|
+
});
|
|
36
45
|
}
|
|
37
46
|
}
|
|
38
47
|
|
|
@@ -79,9 +88,16 @@ export function createProgram(options = {}) {
|
|
|
79
88
|
});
|
|
80
89
|
|
|
81
90
|
// Register all preloaded commands
|
|
82
|
-
for (const {
|
|
91
|
+
for (const {
|
|
92
|
+
entry,
|
|
93
|
+
mod,
|
|
94
|
+
error,
|
|
95
|
+
deploymentError,
|
|
96
|
+
deploymentDependencies,
|
|
97
|
+
} of commandModules) {
|
|
83
98
|
if (shouldFilter && !allowedCommands.has(entry.name)) continue;
|
|
84
99
|
if (error) {
|
|
100
|
+
if (deploymentError) throw error;
|
|
85
101
|
if (process.env.DEBUG) {
|
|
86
102
|
console.warn(
|
|
87
103
|
chalk.yellow(
|
|
@@ -99,8 +115,18 @@ export function createProgram(options = {}) {
|
|
|
99
115
|
`Register function '${entry.register}' not found in ${entry.module}`,
|
|
100
116
|
);
|
|
101
117
|
}
|
|
102
|
-
registerFn(
|
|
118
|
+
registerFn(
|
|
119
|
+
program,
|
|
120
|
+
options.commandDependencies?.[entry.name] ??
|
|
121
|
+
deploymentDependencies ??
|
|
122
|
+
undefined,
|
|
123
|
+
);
|
|
103
124
|
} catch (err) {
|
|
125
|
+
if (
|
|
126
|
+
options.commandDependencies?.[entry.name] != null ||
|
|
127
|
+
deploymentDependencies != null
|
|
128
|
+
)
|
|
129
|
+
throw err;
|
|
104
130
|
if (process.env.DEBUG) {
|
|
105
131
|
console.warn(
|
|
106
132
|
chalk.yellow(
|
package/src/lazy-dispatch.js
CHANGED
|
@@ -682,6 +682,12 @@ async function defaultLoadFullProgram() {
|
|
|
682
682
|
return createProgramAsync();
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
+
async function defaultLoadCommandDependencies(commandName) {
|
|
686
|
+
const { loadEvolutionDeploymentCommandDependencies } =
|
|
687
|
+
await import("./lib/evolution/evolution-deployment-loader.js");
|
|
688
|
+
return loadEvolutionDeploymentCommandDependencies(commandName);
|
|
689
|
+
}
|
|
690
|
+
|
|
685
691
|
/**
|
|
686
692
|
* Load/register may fall back to the compatibility program. parseAsync is
|
|
687
693
|
* intentionally outside that catch: once an action begins, any failure must
|
|
@@ -692,6 +698,7 @@ export async function dispatchManifestEntry(
|
|
|
692
698
|
entry,
|
|
693
699
|
{
|
|
694
700
|
loadCommandModule = defaultLoadCommandModule,
|
|
701
|
+
loadCommandDependencies = defaultLoadCommandDependencies,
|
|
695
702
|
createBaseProgram = defaultCreateBaseProgram,
|
|
696
703
|
loadFullProgram = defaultLoadFullProgram,
|
|
697
704
|
stderr = process.stderr,
|
|
@@ -699,6 +706,7 @@ export async function dispatchManifestEntry(
|
|
|
699
706
|
} = {},
|
|
700
707
|
) {
|
|
701
708
|
let program;
|
|
709
|
+
let allowCompatibilityFallback = true;
|
|
702
710
|
try {
|
|
703
711
|
program = await createBaseProgram();
|
|
704
712
|
const mod = await loadCommandModule(entry);
|
|
@@ -708,8 +716,14 @@ export async function dispatchManifestEntry(
|
|
|
708
716
|
`Register function '${entry.register}' not found in ${entry.module}`,
|
|
709
717
|
);
|
|
710
718
|
}
|
|
711
|
-
|
|
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;
|
|
722
|
+
const dependencies = await loadCommandDependencies(entry.name);
|
|
723
|
+
allowCompatibilityFallback = dependencies == null;
|
|
724
|
+
registerFn(program, dependencies ?? undefined);
|
|
712
725
|
} catch (error) {
|
|
726
|
+
if (!allowCompatibilityFallback) throw error;
|
|
713
727
|
if (env.DEBUG || env.CC_DEBUG) {
|
|
714
728
|
stderr.write(
|
|
715
729
|
`Lazy command registration failed; loading compatibility program: ${error.message}\n`,
|