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
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { LLMProviderRegistry, BUILT_IN_PROVIDERS } from "./llm-providers.js";
|
|
11
11
|
import { loadConfig } from "./config-manager.js";
|
|
12
12
|
import { applyConfigLlmDefaults } from "./llm-config-defaults.js";
|
|
13
|
+
import { captureAgentEvolutionIngress } from "./evolution/agent-evolution-ingress.js";
|
|
13
14
|
|
|
14
15
|
function plainUsage(value) {
|
|
15
16
|
return value && typeof value === "object" && !Array.isArray(value)
|
|
@@ -106,6 +107,8 @@ async function invokeChatCall(callWrapper, provider, model, call) {
|
|
|
106
107
|
* @param {string} [options.model] - Model name override
|
|
107
108
|
* @param {string} [options.baseUrl] - Base URL override
|
|
108
109
|
* @param {string} [options.apiKey] - API key override
|
|
110
|
+
* @param {object} [options.evolutionIngress] - Branded session ingress captured
|
|
111
|
+
* by the adapter; per-call options cannot remove or replace it.
|
|
109
112
|
* @param {(request: {call: function, provider: string, model: string}) => Promise<object>} [options.callWrapper]
|
|
110
113
|
* Optional host boundary around each real provider call. The callback
|
|
111
114
|
* may invoke `call({ signal })` to bind cancellation and resolves to a
|
|
@@ -114,6 +117,10 @@ async function invokeChatCall(callWrapper, provider, model, call) {
|
|
|
114
117
|
* @returns {(messages: object[], opts?: object) => Promise<string>}
|
|
115
118
|
*/
|
|
116
119
|
export function createChatFn(options = {}) {
|
|
120
|
+
const evolutionIngress =
|
|
121
|
+
options.evolutionIngress == null
|
|
122
|
+
? null
|
|
123
|
+
: captureAgentEvolutionIngress(options.evolutionIngress);
|
|
117
124
|
// Fill provider/model/baseUrl/apiKey from config.llm only when the caller
|
|
118
125
|
// gave no explicit provider AND no LLM_PROVIDER env override (both still win).
|
|
119
126
|
// Fail-open: a config read must never break chat construction.
|
|
@@ -140,6 +147,20 @@ export function createChatFn(options = {}) {
|
|
|
140
147
|
return async function chat(messages, opts = {}) {
|
|
141
148
|
const currentModel = opts.model || model;
|
|
142
149
|
const maxTokens = opts.maxTokens || 2048;
|
|
150
|
+
const requestSignal = (hostSignal) => {
|
|
151
|
+
const signals = [
|
|
152
|
+
...new Set([hostSignal, opts.signal, resolved.signal].filter(Boolean)),
|
|
153
|
+
];
|
|
154
|
+
return signals.length > 1 ? AbortSignal.any(signals) : signals[0];
|
|
155
|
+
};
|
|
156
|
+
// Run inside the host's per-call meter, immediately before provider encoding.
|
|
157
|
+
// Every invocation (including concurrent reviewers) gets fresh durable
|
|
158
|
+
// admission; the original conversation is never replaced in place.
|
|
159
|
+
const prepareMessages = async () =>
|
|
160
|
+
evolutionIngress === null
|
|
161
|
+
? messages
|
|
162
|
+
: (await evolutionIngress.prepareModelRequest({ messages, tools: [] }))
|
|
163
|
+
.messages;
|
|
143
164
|
|
|
144
165
|
if (provider === "ollama") {
|
|
145
166
|
const envelope = await invokeChatCall(
|
|
@@ -147,13 +168,14 @@ export function createChatFn(options = {}) {
|
|
|
147
168
|
provider,
|
|
148
169
|
currentModel,
|
|
149
170
|
async ({ signal = opts.signal || resolved.signal } = {}) => {
|
|
171
|
+
const modelMessages = await prepareMessages();
|
|
150
172
|
const res = await fetch(`${baseUrl}/api/chat`, {
|
|
151
173
|
method: "POST",
|
|
152
|
-
signal,
|
|
174
|
+
signal: requestSignal(signal),
|
|
153
175
|
headers: { "Content-Type": "application/json" },
|
|
154
176
|
body: JSON.stringify({
|
|
155
177
|
model: currentModel,
|
|
156
|
-
messages,
|
|
178
|
+
messages: modelMessages,
|
|
157
179
|
stream: false,
|
|
158
180
|
options: { num_predict: maxTokens },
|
|
159
181
|
}),
|
|
@@ -172,25 +194,24 @@ export function createChatFn(options = {}) {
|
|
|
172
194
|
if (provider === "anthropic") {
|
|
173
195
|
const key = resolved.apiKey || process.env[providerDef.apiKeyEnv];
|
|
174
196
|
if (!key) throw new Error("ANTHROPIC_API_KEY not set");
|
|
175
|
-
// Extract system message if present
|
|
176
|
-
const systemMsgs = messages.filter((m) => m.role === "system");
|
|
177
|
-
const otherMsgs = messages.filter((m) => m.role !== "system");
|
|
178
|
-
const body = {
|
|
179
|
-
model: currentModel,
|
|
180
|
-
max_tokens: maxTokens,
|
|
181
|
-
messages: otherMsgs,
|
|
182
|
-
};
|
|
183
|
-
if (systemMsgs.length > 0) {
|
|
184
|
-
body.system = systemMsgs.map((m) => m.content).join("\n");
|
|
185
|
-
}
|
|
186
197
|
const envelope = await invokeChatCall(
|
|
187
198
|
callWrapper,
|
|
188
199
|
provider,
|
|
189
200
|
currentModel,
|
|
190
201
|
async ({ signal = opts.signal || resolved.signal } = {}) => {
|
|
202
|
+
const modelMessages = await prepareMessages();
|
|
203
|
+
const systemMsgs = modelMessages.filter((m) => m.role === "system");
|
|
204
|
+
const body = {
|
|
205
|
+
model: currentModel,
|
|
206
|
+
max_tokens: maxTokens,
|
|
207
|
+
messages: modelMessages.filter((m) => m.role !== "system"),
|
|
208
|
+
...(systemMsgs.length
|
|
209
|
+
? { system: systemMsgs.map((m) => m.content).join("\n") }
|
|
210
|
+
: {}),
|
|
211
|
+
};
|
|
191
212
|
const res = await fetch(`${baseUrl}/messages`, {
|
|
192
213
|
method: "POST",
|
|
193
|
-
signal,
|
|
214
|
+
signal: requestSignal(signal),
|
|
194
215
|
headers: {
|
|
195
216
|
"Content-Type": "application/json",
|
|
196
217
|
"x-api-key": key,
|
|
@@ -218,16 +239,17 @@ export function createChatFn(options = {}) {
|
|
|
218
239
|
provider,
|
|
219
240
|
currentModel,
|
|
220
241
|
async ({ signal = opts.signal || resolved.signal } = {}) => {
|
|
242
|
+
const modelMessages = await prepareMessages();
|
|
221
243
|
const res = await fetch(`${baseUrl}/chat/completions`, {
|
|
222
244
|
method: "POST",
|
|
223
|
-
signal,
|
|
245
|
+
signal: requestSignal(signal),
|
|
224
246
|
headers: {
|
|
225
247
|
"Content-Type": "application/json",
|
|
226
248
|
Authorization: `Bearer ${key}`,
|
|
227
249
|
},
|
|
228
250
|
body: JSON.stringify({
|
|
229
251
|
model: currentModel,
|
|
230
|
-
messages,
|
|
252
|
+
messages: modelMessages,
|
|
231
253
|
max_tokens: maxTokens,
|
|
232
254
|
}),
|
|
233
255
|
});
|
|
@@ -2,9 +2,15 @@ import crypto from "node:crypto";
|
|
|
2
2
|
import evolutionRun from "@chainlesschain/session-core/evolution-run";
|
|
3
3
|
|
|
4
4
|
import { EvolutionEvidenceArtifactAdapter } from "./evolution-evidence-artifact-adapter.js";
|
|
5
|
+
import { EVOLUTION_AGENT_MODEL_PROJECTION_RULESET_DIGEST } from "./evolution-evidence-projector.js";
|
|
5
6
|
import { EvolutionRunLedgerAdapter } from "./evolution-run-ledger-adapter.js";
|
|
6
7
|
import { captureEvolutionRunWikiMaintenanceProducer } from "./evolution-run-wiki-maintenance-source.js";
|
|
7
8
|
import { WIKI_MAINTENANCE_TRIGGER_KIND } from "./wiki-maintenance-trigger-ledger-adapter.js";
|
|
9
|
+
import { captureEvolutionReleaseTrain } from "./evolution-release-train.js";
|
|
10
|
+
import {
|
|
11
|
+
snapshotAgentModelRequest,
|
|
12
|
+
buildAgentModelRequest,
|
|
13
|
+
} from "./agent-model-projection.js";
|
|
8
14
|
|
|
9
15
|
const { EVOLUTION_RUN_EVENT_SCHEMA, EVENT_TYPES } = evolutionRun;
|
|
10
16
|
|
|
@@ -80,15 +86,19 @@ function normalizeId(value, label) {
|
|
|
80
86
|
return result;
|
|
81
87
|
}
|
|
82
88
|
|
|
89
|
+
function ingressFailure(cause) {
|
|
90
|
+
if (cause?.code === AGENT_EVOLUTION_INGRESS_FAILED_CODE) return cause;
|
|
91
|
+
const error = new Error(
|
|
92
|
+
`Agent evolution ingress failed: ${cause?.message || String(cause)}`,
|
|
93
|
+
{ cause },
|
|
94
|
+
);
|
|
95
|
+
error.code = AGENT_EVOLUTION_INGRESS_FAILED_CODE;
|
|
96
|
+
return error;
|
|
97
|
+
}
|
|
98
|
+
|
|
83
99
|
function guardIngress(operation) {
|
|
84
100
|
return Promise.resolve(operation).catch((cause) => {
|
|
85
|
-
|
|
86
|
-
const error = new Error(
|
|
87
|
-
`Agent evolution ingress failed: ${cause?.message || String(cause)}`,
|
|
88
|
-
{ cause },
|
|
89
|
-
);
|
|
90
|
-
error.code = AGENT_EVOLUTION_INGRESS_FAILED_CODE;
|
|
91
|
-
throw error;
|
|
101
|
+
throw ingressFailure(cause);
|
|
92
102
|
});
|
|
93
103
|
}
|
|
94
104
|
|
|
@@ -97,6 +107,7 @@ export function createAgentEvolutionIngress({
|
|
|
97
107
|
runAdapter,
|
|
98
108
|
sourceEnvelopeAuthority,
|
|
99
109
|
wikiMaintenanceProducer = null,
|
|
110
|
+
releaseTrain = null,
|
|
100
111
|
completionTriggerKind = WIKI_MAINTENANCE_TRIGGER_KIND.SESSION_END,
|
|
101
112
|
now = () => new Date(),
|
|
102
113
|
idGenerator = () => crypto.randomUUID(),
|
|
@@ -117,6 +128,8 @@ export function createAgentEvolutionIngress({
|
|
|
117
128
|
wikiMaintenanceProducer === null
|
|
118
129
|
? null
|
|
119
130
|
: captureEvolutionRunWikiMaintenanceProducer(wikiMaintenanceProducer);
|
|
131
|
+
const completionReleaseTrain =
|
|
132
|
+
releaseTrain === null ? null : captureEvolutionReleaseTrain(releaseTrain);
|
|
120
133
|
if (
|
|
121
134
|
![
|
|
122
135
|
WIKI_MAINTENANCE_TRIGGER_KIND.SESSION_END,
|
|
@@ -132,9 +145,22 @@ export function createAgentEvolutionIngress({
|
|
|
132
145
|
);
|
|
133
146
|
const descriptor = runAdapter.descriptor;
|
|
134
147
|
let tail = Promise.resolve();
|
|
148
|
+
let modelAdmissionFailure = null;
|
|
135
149
|
|
|
136
|
-
const serialize = (operation) => {
|
|
137
|
-
const
|
|
150
|
+
const serialize = (operation, latchModelFailure = false) => {
|
|
151
|
+
const invoke = latchModelFailure
|
|
152
|
+
? async () => {
|
|
153
|
+
try {
|
|
154
|
+
return await operation();
|
|
155
|
+
} catch (cause) {
|
|
156
|
+
// Latch inside the serialized operation, before releasing the queue.
|
|
157
|
+
// A complete() already queued by another caller cannot win this race.
|
|
158
|
+
modelAdmissionFailure = ingressFailure(cause);
|
|
159
|
+
throw modelAdmissionFailure;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
: operation;
|
|
163
|
+
const pending = tail.then(invoke, invoke);
|
|
138
164
|
tail = pending.catch(() => undefined);
|
|
139
165
|
return pending;
|
|
140
166
|
};
|
|
@@ -164,9 +190,10 @@ export function createAgentEvolutionIngress({
|
|
|
164
190
|
}).projection;
|
|
165
191
|
};
|
|
166
192
|
|
|
167
|
-
const ingest = (kind, evidence, options = {}) =>
|
|
193
|
+
const ingest = (kind, evidence, options = {}, modelRequest = null) =>
|
|
168
194
|
guardIngress(
|
|
169
195
|
serialize(async () => {
|
|
196
|
+
if (modelAdmissionFailure !== null) throw modelAdmissionFailure;
|
|
170
197
|
const projection = appendStarted();
|
|
171
198
|
if (projection.status === "completed") {
|
|
172
199
|
throw new Error(
|
|
@@ -181,7 +208,7 @@ export function createAgentEvolutionIngress({
|
|
|
181
208
|
options.occurredAt ?? currentTimestamp(),
|
|
182
209
|
"Agent evidence occurredAt",
|
|
183
210
|
);
|
|
184
|
-
const payload = clone(evidence);
|
|
211
|
+
const payload = modelRequest ?? clone(evidence);
|
|
185
212
|
const sourceEnvelope = await issueSourceEnvelope(
|
|
186
213
|
Object.freeze({
|
|
187
214
|
schema: AGENT_EVOLUTION_INGRESS_SCHEMA,
|
|
@@ -193,10 +220,17 @@ export function createAgentEvolutionIngress({
|
|
|
193
220
|
evidence: payload,
|
|
194
221
|
}),
|
|
195
222
|
);
|
|
196
|
-
const
|
|
223
|
+
const projectionInput = {
|
|
197
224
|
sourceEnvelope,
|
|
198
225
|
payload,
|
|
199
|
-
}
|
|
226
|
+
};
|
|
227
|
+
const persisted =
|
|
228
|
+
modelRequest === null
|
|
229
|
+
? await evidenceAdapter.projectAndPersist(projectionInput)
|
|
230
|
+
: await EvolutionEvidenceArtifactAdapter.prototype.projectAndPersistAgentModelRequest.call(
|
|
231
|
+
evidenceAdapter,
|
|
232
|
+
projectionInput,
|
|
233
|
+
);
|
|
200
234
|
if (
|
|
201
235
|
persisted?.tenantId !== descriptor.tenantId ||
|
|
202
236
|
persisted.evidenceId == null ||
|
|
@@ -208,7 +242,7 @@ export function createAgentEvolutionIngress({
|
|
|
208
242
|
);
|
|
209
243
|
}
|
|
210
244
|
const current = runAdapter.load();
|
|
211
|
-
|
|
245
|
+
const appended = runAdapter.appendEvent({
|
|
212
246
|
schema: EVOLUTION_RUN_EVENT_SCHEMA,
|
|
213
247
|
tenantId: descriptor.tenantId,
|
|
214
248
|
runId: descriptor.runId,
|
|
@@ -225,7 +259,37 @@ export function createAgentEvolutionIngress({
|
|
|
225
259
|
derivationManifestDigest: persisted.manifest.digest,
|
|
226
260
|
},
|
|
227
261
|
});
|
|
228
|
-
|
|
262
|
+
if (modelRequest === null) return appended;
|
|
263
|
+
// Resolve the published manifest and every attested component afresh.
|
|
264
|
+
// The prototype call requires the real adapter's private state; an
|
|
265
|
+
// instance-shaped facade cannot mint model-visible input.
|
|
266
|
+
const resolved =
|
|
267
|
+
await EvolutionEvidenceArtifactAdapter.prototype.resolve.call(
|
|
268
|
+
evidenceAdapter,
|
|
269
|
+
persisted,
|
|
270
|
+
);
|
|
271
|
+
if (
|
|
272
|
+
resolved.verification.verified !== true ||
|
|
273
|
+
resolved.verification.tenantId !== descriptor.tenantId ||
|
|
274
|
+
resolved.bundle.modelProjection.rulesetDigest !==
|
|
275
|
+
EVOLUTION_AGENT_MODEL_PROJECTION_RULESET_DIGEST ||
|
|
276
|
+
resolved.bundle.modelProjection.evidenceId !== persisted.evidenceId
|
|
277
|
+
) {
|
|
278
|
+
throw new Error("Agent model projection readback is unbound");
|
|
279
|
+
}
|
|
280
|
+
// A concurrent writer/completion must not make this stale admission
|
|
281
|
+
// authoritative. Reauthenticate the exact committed Run frontier.
|
|
282
|
+
if (
|
|
283
|
+
digest(runAdapter.load().projection) !== digest(appended.projection)
|
|
284
|
+
) {
|
|
285
|
+
throw new Error("Agent model projection Run frontier changed");
|
|
286
|
+
}
|
|
287
|
+
if (modelAdmissionFailure !== null) throw modelAdmissionFailure;
|
|
288
|
+
return buildAgentModelRequest(
|
|
289
|
+
modelRequest,
|
|
290
|
+
resolved.bundle.modelProjection,
|
|
291
|
+
);
|
|
292
|
+
}, modelRequest !== null),
|
|
229
293
|
);
|
|
230
294
|
|
|
231
295
|
const ingress = Object.freeze({
|
|
@@ -233,6 +297,18 @@ export function createAgentEvolutionIngress({
|
|
|
233
297
|
tenantId: descriptor.tenantId,
|
|
234
298
|
runId: descriptor.runId,
|
|
235
299
|
start: () => guardIngress(serialize(() => appendStarted())),
|
|
300
|
+
prepareModelRequest: (request) => {
|
|
301
|
+
if (modelAdmissionFailure !== null)
|
|
302
|
+
return Promise.reject(modelAdmissionFailure);
|
|
303
|
+
let snapshot;
|
|
304
|
+
try {
|
|
305
|
+
snapshot = snapshotAgentModelRequest(request);
|
|
306
|
+
} catch (error) {
|
|
307
|
+
modelAdmissionFailure = ingressFailure(error);
|
|
308
|
+
return Promise.reject(modelAdmissionFailure);
|
|
309
|
+
}
|
|
310
|
+
return ingest("model-input", snapshot, {}, snapshot);
|
|
311
|
+
},
|
|
236
312
|
ingestUserPrompt: (input, options) =>
|
|
237
313
|
ingest("user-prompt", { input: clone(input) }, options),
|
|
238
314
|
ingestAgentEvent: (event, options) => {
|
|
@@ -250,6 +326,7 @@ export function createAgentEvolutionIngress({
|
|
|
250
326
|
complete: (options = {}) =>
|
|
251
327
|
guardIngress(
|
|
252
328
|
serialize(async () => {
|
|
329
|
+
if (modelAdmissionFailure !== null) throw modelAdmissionFailure;
|
|
253
330
|
const loaded = runAdapter.load();
|
|
254
331
|
let projection;
|
|
255
332
|
if (loaded.projection?.status === "completed") {
|
|
@@ -281,6 +358,9 @@ export function createAgentEvolutionIngress({
|
|
|
281
358
|
runId: descriptor.runId,
|
|
282
359
|
});
|
|
283
360
|
}
|
|
361
|
+
if (completionReleaseTrain !== null) {
|
|
362
|
+
await completionReleaseTrain.run();
|
|
363
|
+
}
|
|
284
364
|
return projection;
|
|
285
365
|
}),
|
|
286
366
|
),
|
|
@@ -19,6 +19,11 @@ import {
|
|
|
19
19
|
} from "./evolution-ledger-file-backend.js";
|
|
20
20
|
import { EvolutionRunLedgerAdapter } from "./evolution-run-ledger-adapter.js";
|
|
21
21
|
import { EvolutionWorkbenchMetricsLedgerAdapter } from "./evolution-workbench-metrics-ledger-adapter.js";
|
|
22
|
+
import { EvolutionReleaseTrainLedgerAdapter } from "./evolution-release-train-ledger-adapter.js";
|
|
23
|
+
import { WikiSkillProposalLedgerAdapter } from "./wiki-skill-proposal-ledger-adapter.js";
|
|
24
|
+
import { EvolutionReleaseTrainStageOutputLedgerAdapter } from "./evolution-release-train-stage-output-ledger-adapter.js";
|
|
25
|
+
import { createEvolutionReleaseTrainDomainStages } from "./evolution-release-train-domain-stages.js";
|
|
26
|
+
import { createEvolutionReleaseTrain } from "./evolution-release-train.js";
|
|
22
27
|
import { captureSkillOutcomeSourceCatalogAuthority } from "./skill-outcome-source-catalog-authority.js";
|
|
23
28
|
import {
|
|
24
29
|
captureAgentEvolutionIngress,
|
|
@@ -55,6 +60,8 @@ const ARTIFACT_AUTHORITY_KEYS = new Set([
|
|
|
55
60
|
const SKILL_OUTCOME_SOURCE_KEYS = new Set(["composition", "skillName"]);
|
|
56
61
|
const SKILL_OUTCOME_CATALOG_ENTRY_KEYS = new Set(["runId", "skillNames"]);
|
|
57
62
|
const MAX_SKILL_OUTCOME_SOURCES = 128;
|
|
63
|
+
const RELEASE_TRAIN_STAGE_KEYS = new Set(["plan", "stages"]);
|
|
64
|
+
const RELEASE_TRAIN_DOMAIN_KEYS = new Set(["plan", "domain"]);
|
|
58
65
|
|
|
59
66
|
function exactRecord(value, keys, label) {
|
|
60
67
|
if (
|
|
@@ -183,6 +190,7 @@ export function createAgentEvolutionRuntimeComposition({
|
|
|
183
190
|
evidenceIdGenerator,
|
|
184
191
|
ingressIdGenerator,
|
|
185
192
|
wikiMaintenanceProducer = null,
|
|
193
|
+
releaseTrain: releaseTrainInput = null,
|
|
186
194
|
completionTriggerKind,
|
|
187
195
|
secure = true,
|
|
188
196
|
fsImpl,
|
|
@@ -376,11 +384,84 @@ export function createAgentEvolutionRuntimeComposition({
|
|
|
376
384
|
skillOutcomeReaders.set(skillName, reader);
|
|
377
385
|
return reader;
|
|
378
386
|
});
|
|
387
|
+
let releaseTrain = null;
|
|
388
|
+
if (releaseTrainInput !== null) {
|
|
389
|
+
const releaseTrainKeys = Object.hasOwn(releaseTrainInput, "domain")
|
|
390
|
+
? RELEASE_TRAIN_DOMAIN_KEYS
|
|
391
|
+
: RELEASE_TRAIN_STAGE_KEYS;
|
|
392
|
+
const releaseTrainConfig = exactRecord(
|
|
393
|
+
releaseTrainInput,
|
|
394
|
+
releaseTrainKeys,
|
|
395
|
+
"releaseTrain",
|
|
396
|
+
);
|
|
397
|
+
if (
|
|
398
|
+
releaseTrainConfig.plan?.tenantId !== tenantId ||
|
|
399
|
+
typeof releaseTrainConfig.plan?.skillId !== "string"
|
|
400
|
+
) {
|
|
401
|
+
throw new TypeError(
|
|
402
|
+
"releaseTrain plan must belong to the composition tenant",
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
const releaseTrainAdapter = new EvolutionReleaseTrainLedgerAdapter({
|
|
406
|
+
descriptor: {
|
|
407
|
+
tenantId,
|
|
408
|
+
artifactTenantId: tenantId,
|
|
409
|
+
skillName: releaseTrainConfig.plan.skillId,
|
|
410
|
+
audience,
|
|
411
|
+
purpose: "evolution-ledger",
|
|
412
|
+
},
|
|
413
|
+
artifactPorts,
|
|
414
|
+
ledger: backend.ledger,
|
|
415
|
+
ledgerArtifactResolver,
|
|
416
|
+
clock: () => new Date(clock()).toISOString(),
|
|
417
|
+
});
|
|
418
|
+
let stages = releaseTrainConfig.stages;
|
|
419
|
+
if (Object.hasOwn(releaseTrainConfig, "domain")) {
|
|
420
|
+
const proposalLedger = new WikiSkillProposalLedgerAdapter({
|
|
421
|
+
descriptor: {
|
|
422
|
+
tenantId,
|
|
423
|
+
artifactTenantId: tenantId,
|
|
424
|
+
evolutionRunId: runId,
|
|
425
|
+
skillName: releaseTrainConfig.plan.skillId,
|
|
426
|
+
audience,
|
|
427
|
+
purpose: "evolution-ledger",
|
|
428
|
+
},
|
|
429
|
+
artifactPorts,
|
|
430
|
+
ledger: backend.ledger,
|
|
431
|
+
ledgerArtifactResolver,
|
|
432
|
+
});
|
|
433
|
+
const outputLedger = new EvolutionReleaseTrainStageOutputLedgerAdapter({
|
|
434
|
+
descriptor: {
|
|
435
|
+
tenantId,
|
|
436
|
+
artifactTenantId: tenantId,
|
|
437
|
+
skillName: releaseTrainConfig.plan.skillId,
|
|
438
|
+
audience,
|
|
439
|
+
purpose: "evolution-ledger",
|
|
440
|
+
},
|
|
441
|
+
artifactPorts,
|
|
442
|
+
ledger: backend.ledger,
|
|
443
|
+
ledgerArtifactResolver,
|
|
444
|
+
});
|
|
445
|
+
stages = createEvolutionReleaseTrainDomainStages({
|
|
446
|
+
domain: releaseTrainConfig.domain,
|
|
447
|
+
proposalLedger,
|
|
448
|
+
outputLedger,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
releaseTrain = createEvolutionReleaseTrain({
|
|
452
|
+
plan: releaseTrainConfig.plan,
|
|
453
|
+
stateStore: releaseTrainAdapter.createStateStore(),
|
|
454
|
+
stages,
|
|
455
|
+
clock,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
379
459
|
const evolutionIngress = createAgentEvolutionIngress({
|
|
380
460
|
evidenceAdapter,
|
|
381
461
|
runAdapter,
|
|
382
462
|
sourceEnvelopeAuthority: ports.sourceEnvelope,
|
|
383
463
|
wikiMaintenanceProducer,
|
|
464
|
+
releaseTrain,
|
|
384
465
|
...(completionTriggerKind === undefined ? {} : { completionTriggerKind }),
|
|
385
466
|
now: () => new Date(clock()),
|
|
386
467
|
idGenerator: ingressIdGenerator,
|
|
@@ -395,6 +476,7 @@ export function createAgentEvolutionRuntimeComposition({
|
|
|
395
476
|
loadRun: Object.freeze(() => runAdapter.load()),
|
|
396
477
|
ledgerDescriptor: backend.descriptor,
|
|
397
478
|
storage,
|
|
479
|
+
releaseTrain,
|
|
398
480
|
});
|
|
399
481
|
return composition;
|
|
400
482
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { captureAgentEvolutionIngress } from "./agent-evolution-ingress.js";
|
|
2
|
+
|
|
3
|
+
export const AGENT_EVOLUTION_SESSION_SCHEMA = "agent-evolution-session/v1";
|
|
4
|
+
const sessions = new WeakMap();
|
|
5
|
+
|
|
6
|
+
// readline startup returns before the interactive session ends. Its owner must
|
|
7
|
+
// finish the durable Run during teardown, before process.exit can terminate it.
|
|
8
|
+
// The runtime receives only an opaque waiter, never the ability to close early.
|
|
9
|
+
export function createAgentEvolutionSessionLifecycle(value) {
|
|
10
|
+
const ingress = captureAgentEvolutionIngress(value);
|
|
11
|
+
let resolveFinished;
|
|
12
|
+
let rejectFinished;
|
|
13
|
+
const finished = new Promise((resolve, reject) => {
|
|
14
|
+
resolveFinished = resolve;
|
|
15
|
+
rejectFinished = reject;
|
|
16
|
+
});
|
|
17
|
+
// Teardown can fail before startup has returned the handle to its consumer.
|
|
18
|
+
void finished.catch(() => {});
|
|
19
|
+
const handle = Object.freeze({ schema: AGENT_EVOLUTION_SESSION_SCHEMA });
|
|
20
|
+
sessions.set(handle, { ingress, finished });
|
|
21
|
+
let closing = null;
|
|
22
|
+
return Object.freeze({
|
|
23
|
+
handle,
|
|
24
|
+
close(error = null) {
|
|
25
|
+
if (closing === null) {
|
|
26
|
+
closing = (async () => {
|
|
27
|
+
if (error !== null) throw error;
|
|
28
|
+
await ingress.complete();
|
|
29
|
+
})();
|
|
30
|
+
void closing.then(resolveFinished, rejectFinished);
|
|
31
|
+
}
|
|
32
|
+
return closing;
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function waitForAgentEvolutionSession(handle, value) {
|
|
38
|
+
const ingress = captureAgentEvolutionIngress(value);
|
|
39
|
+
const session = sessions.get(handle);
|
|
40
|
+
if (!session || session.ingress !== ingress) {
|
|
41
|
+
throw Object.assign(new Error("Agent evolution session is unbound"), {
|
|
42
|
+
code: "CC_AGENT_EVOLUTION_INGRESS_FAILED",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return session.finished;
|
|
46
|
+
}
|