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
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
// Decode data only: no evaluation, revivers, prototype setters or permissive
|
|
2
|
+
// JSON repair. Budgets belong to the entire projection, including nested text.
|
|
3
|
+
export const EVIDENCE_JSON_POLICY = Object.freeze({
|
|
4
|
+
version: 1,
|
|
5
|
+
maxLayers: 4,
|
|
6
|
+
maxDepth: 16,
|
|
7
|
+
maxNodes: 4096,
|
|
8
|
+
maxDecodedBytes: 4 * 1024 * 1024,
|
|
9
|
+
duplicates: "reject-decoded-keys",
|
|
10
|
+
malformed: "reject-recognized-json",
|
|
11
|
+
arguments: "object-only",
|
|
12
|
+
numbers: "finite-safe-integers-pii-to-string",
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export function isAgentToolArgumentsPath(path) {
|
|
16
|
+
return (
|
|
17
|
+
path.length === 6 &&
|
|
18
|
+
path[0] === "messages" &&
|
|
19
|
+
/^\d+$/u.test(path[1]) &&
|
|
20
|
+
path[2] === "tool_calls" &&
|
|
21
|
+
/^\d+$/u.test(path[3]) &&
|
|
22
|
+
path[4] === "function" &&
|
|
23
|
+
path[5] === "arguments"
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function assignmentKeyBefore(text, start, end) {
|
|
28
|
+
let index = end - 1;
|
|
29
|
+
while (index >= start && /\s/u.test(text[index])) index--;
|
|
30
|
+
if (text[index] !== ":" && text[index] !== "=") return undefined;
|
|
31
|
+
index--;
|
|
32
|
+
while (index >= start && /\s/u.test(text[index])) index--;
|
|
33
|
+
const keyEnd = index + 1;
|
|
34
|
+
while (index >= start && !/[\s"'{}[\],:=]/u.test(text[index])) index--;
|
|
35
|
+
return keyEnd > index + 1 ? text.slice(index + 1, keyEnd) : undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function createEvidenceJsonTextBoundary(fail) {
|
|
39
|
+
let nodes = 0;
|
|
40
|
+
let bytes = 0;
|
|
41
|
+
const reject = () => {
|
|
42
|
+
throw fail(
|
|
43
|
+
"Agent model JSON text is malformed, ambiguous or exceeds its budget",
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
const parser = (text, start) => {
|
|
47
|
+
let index = start;
|
|
48
|
+
const whitespace = () => {
|
|
49
|
+
while (/[ \t\r\n]/u.test(text[index] ?? "x")) index++;
|
|
50
|
+
};
|
|
51
|
+
const string = () => {
|
|
52
|
+
const begin = index++;
|
|
53
|
+
while (index < text.length) {
|
|
54
|
+
const char = text[index++];
|
|
55
|
+
if (char === "\\") index++;
|
|
56
|
+
else if (char === '"') {
|
|
57
|
+
try {
|
|
58
|
+
return JSON.parse(text.slice(begin, index));
|
|
59
|
+
} catch {
|
|
60
|
+
return reject();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return reject();
|
|
65
|
+
};
|
|
66
|
+
const value = (depth = 0) => {
|
|
67
|
+
if (
|
|
68
|
+
++nodes > EVIDENCE_JSON_POLICY.maxNodes ||
|
|
69
|
+
depth > EVIDENCE_JSON_POLICY.maxDepth
|
|
70
|
+
)
|
|
71
|
+
reject();
|
|
72
|
+
whitespace();
|
|
73
|
+
const char = text[index];
|
|
74
|
+
if (char === '"') return string();
|
|
75
|
+
if (char === "{" || char === "[") {
|
|
76
|
+
const array = char === "[";
|
|
77
|
+
const end = array ? "]" : "}";
|
|
78
|
+
const output = array ? [] : Object.create(null);
|
|
79
|
+
index++;
|
|
80
|
+
whitespace();
|
|
81
|
+
if (text[index] === end) {
|
|
82
|
+
index++;
|
|
83
|
+
return output;
|
|
84
|
+
}
|
|
85
|
+
while (index < text.length) {
|
|
86
|
+
let key;
|
|
87
|
+
if (!array) {
|
|
88
|
+
if (text[index] !== '"') reject();
|
|
89
|
+
key = string();
|
|
90
|
+
if (Object.hasOwn(output, key)) reject();
|
|
91
|
+
whitespace();
|
|
92
|
+
if (text[index++] !== ":") reject();
|
|
93
|
+
}
|
|
94
|
+
const child = value(depth + 1);
|
|
95
|
+
if (array) output.push(child);
|
|
96
|
+
else
|
|
97
|
+
Object.defineProperty(output, key, {
|
|
98
|
+
value: child,
|
|
99
|
+
enumerable: true,
|
|
100
|
+
});
|
|
101
|
+
whitespace();
|
|
102
|
+
if (text[index] === end) {
|
|
103
|
+
index++;
|
|
104
|
+
return output;
|
|
105
|
+
}
|
|
106
|
+
if (text[index++] !== ",") reject();
|
|
107
|
+
whitespace();
|
|
108
|
+
}
|
|
109
|
+
return reject();
|
|
110
|
+
}
|
|
111
|
+
const token =
|
|
112
|
+
/^(?:true|false|null|-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)/u.exec(
|
|
113
|
+
text.slice(index),
|
|
114
|
+
)?.[0];
|
|
115
|
+
if (!token) return reject();
|
|
116
|
+
index += token.length;
|
|
117
|
+
const parsed = JSON.parse(token);
|
|
118
|
+
if (
|
|
119
|
+
typeof parsed === "number" &&
|
|
120
|
+
(!Number.isFinite(parsed) ||
|
|
121
|
+
(Number.isInteger(parsed) && !Number.isSafeInteger(parsed)))
|
|
122
|
+
)
|
|
123
|
+
reject();
|
|
124
|
+
return parsed;
|
|
125
|
+
};
|
|
126
|
+
return {
|
|
127
|
+
value,
|
|
128
|
+
end: () => index,
|
|
129
|
+
whitespace,
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
return (text, { layer = 0, objectOnly = false, visit, plain, equal }) => {
|
|
134
|
+
bytes += Buffer.byteLength(text, "utf8");
|
|
135
|
+
if (bytes > EVIDENCE_JSON_POLICY.maxDecodedBytes) reject();
|
|
136
|
+
const transform = (parsed) => {
|
|
137
|
+
if (layer >= EVIDENCE_JSON_POLICY.maxLayers) reject();
|
|
138
|
+
return visit(parsed, layer + 1);
|
|
139
|
+
};
|
|
140
|
+
if (objectOnly) {
|
|
141
|
+
const reader = parser(text, 0);
|
|
142
|
+
const parsed = reader.value();
|
|
143
|
+
reader.whitespace();
|
|
144
|
+
if (
|
|
145
|
+
reader.end() !== text.length ||
|
|
146
|
+
!parsed ||
|
|
147
|
+
typeof parsed !== "object" ||
|
|
148
|
+
Array.isArray(parsed)
|
|
149
|
+
)
|
|
150
|
+
reject();
|
|
151
|
+
const safe = transform(parsed);
|
|
152
|
+
return equal(parsed, safe) ? text : JSON.stringify(safe);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Scan once, consuming each JSON span in full. Quoted scalar fragments
|
|
156
|
+
// decode escaped secrets; quoted key/value fragments use the same key rules
|
|
157
|
+
// as objects. Ordinary code braces and projection markers are not JSON.
|
|
158
|
+
let output = "";
|
|
159
|
+
let plainStart = 0;
|
|
160
|
+
for (let index = 0; index < text.length;) {
|
|
161
|
+
const char = text[index];
|
|
162
|
+
const next =
|
|
163
|
+
char === "{" || char === "["
|
|
164
|
+
? text.slice(index + 1).match(/^\s*(.)/u)?.[1]
|
|
165
|
+
: undefined;
|
|
166
|
+
const container =
|
|
167
|
+
(char === "{" &&
|
|
168
|
+
(next === '"' || next === "}" || next === "'" || next === "\\")) ||
|
|
169
|
+
(char === "[" &&
|
|
170
|
+
next !== undefined &&
|
|
171
|
+
(["[", "{", '"', "]"].includes(next) ||
|
|
172
|
+
/[0-9]/u.test(next) ||
|
|
173
|
+
/^\s*(?:-\d|(?:true|false|null)(?=[\s,\]]))/u.test(
|
|
174
|
+
text.slice(index + 1),
|
|
175
|
+
)));
|
|
176
|
+
if (!container && char !== '"') {
|
|
177
|
+
index++;
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
// A prose quotation can contain newlines/ordinary backslashes. Only a
|
|
181
|
+
// lexically valid JSON string is a candidate outside JSON containers.
|
|
182
|
+
if (
|
|
183
|
+
!container &&
|
|
184
|
+
// eslint-disable-next-line no-control-regex -- JSON strings exclude literal U+0000 through U+001F.
|
|
185
|
+
!/^"(?:[^"\\\x00-\x1f]|\\(?:["\\/bfnrt]|u[0-9a-fA-F]{4}))*"/u.test(
|
|
186
|
+
text.slice(index),
|
|
187
|
+
)
|
|
188
|
+
) {
|
|
189
|
+
index++;
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
const reader = parser(text, index);
|
|
193
|
+
let parsed = reader.value();
|
|
194
|
+
const valueEnd = reader.end();
|
|
195
|
+
reader.whitespace();
|
|
196
|
+
const pair = char === '"' && text[reader.end()] === ":";
|
|
197
|
+
const assignmentKey =
|
|
198
|
+
char === '"' && !pair
|
|
199
|
+
? // Scan backward once; an unanchored greedy key regex would retry at
|
|
200
|
+
// every offset of a long ordinary prefix before a quoted fragment.
|
|
201
|
+
assignmentKeyBefore(text, plainStart, index)
|
|
202
|
+
: undefined;
|
|
203
|
+
let end = valueEnd;
|
|
204
|
+
if (pair) {
|
|
205
|
+
const rhs = parser(text, reader.end() + 1);
|
|
206
|
+
const entry = rhs.value();
|
|
207
|
+
parsed = Object.defineProperty(Object.create(null), parsed, {
|
|
208
|
+
value: entry,
|
|
209
|
+
enumerable: true,
|
|
210
|
+
});
|
|
211
|
+
end = rhs.end();
|
|
212
|
+
} else if (assignmentKey) {
|
|
213
|
+
// Bare assignments followed by a quoted value cross a text/JSON span.
|
|
214
|
+
// Reuse decoded field rules rather than a second credential-key list.
|
|
215
|
+
parsed = Object.defineProperty(Object.create(null), assignmentKey, {
|
|
216
|
+
value: parsed,
|
|
217
|
+
enumerable: true,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
const safe = transform(parsed);
|
|
221
|
+
let replacement = text.slice(index, end);
|
|
222
|
+
if (!equal(parsed, safe)) {
|
|
223
|
+
replacement = JSON.stringify(safe);
|
|
224
|
+
if (pair) replacement = replacement.slice(1, -1);
|
|
225
|
+
else if (assignmentKey) {
|
|
226
|
+
if (!Object.hasOwn(safe, assignmentKey)) reject();
|
|
227
|
+
replacement = JSON.stringify(safe[assignmentKey]);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
output += plain(text.slice(plainStart, index)) + replacement;
|
|
231
|
+
index = end;
|
|
232
|
+
plainStart = index;
|
|
233
|
+
}
|
|
234
|
+
return output + plain(text.slice(plainStart));
|
|
235
|
+
};
|
|
236
|
+
}
|
|
@@ -60,6 +60,7 @@ export const EVOLUTION_ARTIFACT_DEFAULT_TTL_MS = 15 * 60 * 1000;
|
|
|
60
60
|
export const EVOLUTION_ARTIFACT_MAX_TTL_MS = 24 * 60 * 60 * 1000;
|
|
61
61
|
export const EVOLUTION_ARTIFACT_RETENTIONS = Object.freeze(["ttl", "ledger"]);
|
|
62
62
|
export const EVOLUTION_ARTIFACT_LEDGER_RETENTION_TYPES = Object.freeze([
|
|
63
|
+
"controlled-skill-pilot-state",
|
|
63
64
|
"skill-release-transition-intent",
|
|
64
65
|
"skill-release-finalization",
|
|
65
66
|
"skill-release-state-migration",
|
|
@@ -67,22 +68,43 @@ export const EVOLUTION_ARTIFACT_LEDGER_RETENTION_TYPES = Object.freeze([
|
|
|
67
68
|
"skill-mutation-nonce-claim",
|
|
68
69
|
"skill-promotion-review-decision",
|
|
69
70
|
"skill-promotion-review-packet",
|
|
71
|
+
"evolution-workbench-projection",
|
|
72
|
+
"evolution-workbench-review-preparation",
|
|
73
|
+
"evolution-workbench-review-settlement",
|
|
74
|
+
"evolution-workbench-rollback-preparation",
|
|
75
|
+
"evolution-workbench-rollback-settlement",
|
|
70
76
|
"skill-registry-transition-attempt",
|
|
71
77
|
"skill-registry-transition-request",
|
|
72
78
|
"skill-registry-transition-settlement",
|
|
79
|
+
"skill-retrieval-revocation-state",
|
|
73
80
|
"evolution-run-event",
|
|
81
|
+
"evolution-eval-child-evidence",
|
|
82
|
+
"evolution-raw-deletion-receipt",
|
|
83
|
+
"evolution-raw-deletion-tombstone",
|
|
84
|
+
"evolution-release-train-checkpoint",
|
|
85
|
+
"evolution-release-train-stage-output",
|
|
86
|
+
"evolvable-artifact-candidate",
|
|
87
|
+
"evolvable-artifact-transition",
|
|
74
88
|
"evolution-workbench-metrics-receipt-retention",
|
|
75
89
|
"evolution-workbench-metrics-snapshot",
|
|
76
90
|
"governed-knowledge-sync-record",
|
|
77
91
|
"governed-knowledge-merge-operation",
|
|
78
92
|
"governed-knowledge-dependency-operation",
|
|
79
93
|
"governed-knowledge-trust-record",
|
|
94
|
+
"governed-skill-marketplace-state",
|
|
80
95
|
"structured-memory-authority-receipt",
|
|
81
96
|
"structured-memory-event",
|
|
82
97
|
"structured-memory-snapshot",
|
|
83
98
|
"wiki-maintenance-request",
|
|
84
99
|
"wiki-maintenance-settlement",
|
|
85
100
|
"wiki-revision",
|
|
101
|
+
"wiki-pruning-journal",
|
|
102
|
+
"wiki-pruning-retrieval-projection",
|
|
103
|
+
"wiki-skill-proposal",
|
|
104
|
+
"wikiskill-benchmark-envelope-manifest",
|
|
105
|
+
"wikiskill-benchmark-execution-manifest",
|
|
106
|
+
"wikiskill-benchmark-plan",
|
|
107
|
+
"wikiskill-benchmark-report-chunk",
|
|
86
108
|
]);
|
|
87
109
|
export const EVOLUTION_ARTIFACT_LEDGER_RETENTION_PURPOSES = Object.freeze([
|
|
88
110
|
"evolution-ledger",
|
|
@@ -98,6 +120,7 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
98
120
|
"actor",
|
|
99
121
|
"candidate",
|
|
100
122
|
"candidate-diff",
|
|
123
|
+
"controlled-skill-pilot-state",
|
|
101
124
|
"diff",
|
|
102
125
|
"eval",
|
|
103
126
|
"eval-policy",
|
|
@@ -106,12 +129,20 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
106
129
|
"evaluation",
|
|
107
130
|
"evaluation-result",
|
|
108
131
|
"evolution-run-event",
|
|
132
|
+
"evolution-eval-child-evidence",
|
|
133
|
+
"evolution-raw-deletion-receipt",
|
|
134
|
+
"evolution-raw-deletion-tombstone",
|
|
135
|
+
"evolution-release-train-checkpoint",
|
|
136
|
+
"evolution-release-train-stage-output",
|
|
137
|
+
"evolvable-artifact-candidate",
|
|
138
|
+
"evolvable-artifact-transition",
|
|
109
139
|
"evolution-workbench-metrics-receipt-retention",
|
|
110
140
|
"evolution-workbench-metrics-snapshot",
|
|
111
141
|
"governed-knowledge-sync-record",
|
|
112
142
|
"governed-knowledge-merge-operation",
|
|
113
143
|
"governed-knowledge-dependency-operation",
|
|
114
144
|
"governed-knowledge-trust-record",
|
|
145
|
+
"governed-skill-marketplace-state",
|
|
115
146
|
"evidence",
|
|
116
147
|
"model-projection",
|
|
117
148
|
"policy",
|
|
@@ -126,9 +157,15 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
126
157
|
"skill-mutation-nonce-claim",
|
|
127
158
|
"skill-promotion-review-decision",
|
|
128
159
|
"skill-promotion-review-packet",
|
|
160
|
+
"evolution-workbench-projection",
|
|
161
|
+
"evolution-workbench-review-preparation",
|
|
162
|
+
"evolution-workbench-review-settlement",
|
|
163
|
+
"evolution-workbench-rollback-preparation",
|
|
164
|
+
"evolution-workbench-rollback-settlement",
|
|
129
165
|
"skill-registry-transition-attempt",
|
|
130
166
|
"skill-registry-transition-request",
|
|
131
167
|
"skill-registry-transition-settlement",
|
|
168
|
+
"skill-retrieval-revocation-state",
|
|
132
169
|
"skill-release-finalization",
|
|
133
170
|
"skill-release-state-migration",
|
|
134
171
|
"structured-memory-authority-receipt",
|
|
@@ -137,6 +174,13 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
137
174
|
"wiki-maintenance-request",
|
|
138
175
|
"wiki-maintenance-settlement",
|
|
139
176
|
"wiki-revision",
|
|
177
|
+
"wiki-pruning-journal",
|
|
178
|
+
"wiki-pruning-retrieval-projection",
|
|
179
|
+
"wiki-skill-proposal",
|
|
180
|
+
"wikiskill-benchmark-envelope-manifest",
|
|
181
|
+
"wikiskill-benchmark-execution-manifest",
|
|
182
|
+
"wikiskill-benchmark-plan",
|
|
183
|
+
"wikiskill-benchmark-report-chunk",
|
|
140
184
|
"skill-release-transition-intent",
|
|
141
185
|
"source",
|
|
142
186
|
"source-evidence",
|
|
@@ -292,6 +336,7 @@ const CONSTRUCTOR_REQUIRED_KEYS = new Set([
|
|
|
292
336
|
]);
|
|
293
337
|
const LEDGER_RESOLVER_OPTION_KEYS = new Set(["purpose"]);
|
|
294
338
|
const EVOLUTION_LEDGER_ARTIFACT_RESOLVERS = new WeakSet();
|
|
339
|
+
const EVOLUTION_LEDGER_BATCH_RESOLVERS = new WeakMap();
|
|
295
340
|
const isProxy = Object.freeze(utilTypes.isProxy.bind(utilTypes));
|
|
296
341
|
const isDate = Object.freeze(utilTypes.isDate.bind(utilTypes));
|
|
297
342
|
const dateGetTime = Object.freeze(
|
|
@@ -299,6 +344,7 @@ const dateGetTime = Object.freeze(
|
|
|
299
344
|
);
|
|
300
345
|
const RETENTION_SET = new Set(EVOLUTION_ARTIFACT_RETENTIONS);
|
|
301
346
|
const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
347
|
+
["controlled-skill-pilot-state", new Set(["evolution-ledger"])],
|
|
302
348
|
[
|
|
303
349
|
"skill-release-transition-intent",
|
|
304
350
|
new Set(["evolution-ledger", "skill-release-transition"]),
|
|
@@ -315,10 +361,25 @@ const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
|
315
361
|
],
|
|
316
362
|
["skill-promotion-review-decision", new Set(["evolution-ledger"])],
|
|
317
363
|
["skill-promotion-review-packet", new Set(["evolution-ledger"])],
|
|
364
|
+
["evolution-workbench-projection", new Set(["evolution-ledger"])],
|
|
365
|
+
["evolution-workbench-review-preparation", new Set(["evolution-ledger"])],
|
|
366
|
+
["evolution-workbench-review-settlement", new Set(["evolution-ledger"])],
|
|
367
|
+
["evolution-workbench-rollback-preparation", new Set(["evolution-ledger"])],
|
|
368
|
+
["evolution-workbench-rollback-settlement", new Set(["evolution-ledger"])],
|
|
318
369
|
["skill-registry-transition-attempt", new Set(["evolution-ledger"])],
|
|
319
370
|
["skill-registry-transition-request", new Set(["evolution-ledger"])],
|
|
320
371
|
["skill-registry-transition-settlement", new Set(["evolution-ledger"])],
|
|
372
|
+
["skill-retrieval-revocation-state", new Set(["evolution-ledger"])],
|
|
373
|
+
["wiki-pruning-journal", new Set(["evolution-ledger"])],
|
|
374
|
+
["wiki-pruning-retrieval-projection", new Set(["evolution-ledger"])],
|
|
321
375
|
["evolution-run-event", new Set(["evolution-ledger"])],
|
|
376
|
+
["evolution-eval-child-evidence", new Set(["evolution-ledger"])],
|
|
377
|
+
["evolution-raw-deletion-receipt", new Set(["evolution-ledger"])],
|
|
378
|
+
["evolution-raw-deletion-tombstone", new Set(["evolution-ledger"])],
|
|
379
|
+
["evolution-release-train-checkpoint", new Set(["evolution-ledger"])],
|
|
380
|
+
["evolution-release-train-stage-output", new Set(["evolution-ledger"])],
|
|
381
|
+
["evolvable-artifact-candidate", new Set(["evolution-ledger"])],
|
|
382
|
+
["evolvable-artifact-transition", new Set(["evolution-ledger"])],
|
|
322
383
|
[
|
|
323
384
|
"evolution-workbench-metrics-receipt-retention",
|
|
324
385
|
new Set(["evolution-ledger"]),
|
|
@@ -328,7 +389,13 @@ const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
|
328
389
|
["governed-knowledge-merge-operation", new Set(["evolution-ledger"])],
|
|
329
390
|
["governed-knowledge-dependency-operation", new Set(["evolution-ledger"])],
|
|
330
391
|
["governed-knowledge-trust-record", new Set(["evolution-ledger"])],
|
|
392
|
+
["governed-skill-marketplace-state", new Set(["evolution-ledger"])],
|
|
331
393
|
["wiki-revision", new Set(["evolution-ledger"])],
|
|
394
|
+
["wiki-skill-proposal", new Set(["evolution-ledger"])],
|
|
395
|
+
["wikiskill-benchmark-envelope-manifest", new Set(["evolution-ledger"])],
|
|
396
|
+
["wikiskill-benchmark-execution-manifest", new Set(["evolution-ledger"])],
|
|
397
|
+
["wikiskill-benchmark-plan", new Set(["evolution-ledger"])],
|
|
398
|
+
["wikiskill-benchmark-report-chunk", new Set(["evolution-ledger"])],
|
|
332
399
|
["structured-memory-authority-receipt", new Set(["evolution-ledger"])],
|
|
333
400
|
["structured-memory-event", new Set(["evolution-ledger"])],
|
|
334
401
|
["structured-memory-snapshot", new Set(["evolution-ledger"])],
|
|
@@ -940,6 +1007,12 @@ function samePath(left, right) {
|
|
|
940
1007
|
: normalizedLeft === normalizedRight;
|
|
941
1008
|
}
|
|
942
1009
|
|
|
1010
|
+
// The native implementation performs the same physical canonicalization
|
|
1011
|
+
// without the JS fallback's repeated ancestor lstats (especially costly on
|
|
1012
|
+
// Windows). Identity, containment, no-link and descriptor readback checks
|
|
1013
|
+
// below remain mandatory on every access; this does not cache any pathname.
|
|
1014
|
+
const physicalRealpath = (fs.realpathSync.native ?? fs.realpathSync).bind(fs);
|
|
1015
|
+
|
|
943
1016
|
function isContained(root, candidate) {
|
|
944
1017
|
const relative = path.relative(root, candidate);
|
|
945
1018
|
return (
|
|
@@ -1008,7 +1081,7 @@ function inspectPhysicalDirectory(directory, label) {
|
|
|
1008
1081
|
try {
|
|
1009
1082
|
stat = fs.lstatSync(directory);
|
|
1010
1083
|
assertDirectory(stat, label);
|
|
1011
|
-
realPath =
|
|
1084
|
+
realPath = physicalRealpath(directory);
|
|
1012
1085
|
} catch (cause) {
|
|
1013
1086
|
if (isEvolutionArtifactPortError(cause)) throw cause;
|
|
1014
1087
|
throw artifactError(
|
|
@@ -1036,7 +1109,7 @@ function inspectPhysicalIndex(indexPath, rootRealPath) {
|
|
|
1036
1109
|
try {
|
|
1037
1110
|
pathStat = fs.lstatSync(indexPath);
|
|
1038
1111
|
assertRegularSingleLink(pathStat, "ArtifactStore index");
|
|
1039
|
-
realPath =
|
|
1112
|
+
realPath = physicalRealpath(indexPath);
|
|
1040
1113
|
if (
|
|
1041
1114
|
!samePath(realPath, indexPath) ||
|
|
1042
1115
|
!isContained(rootRealPath, realPath)
|
|
@@ -1315,7 +1388,7 @@ function readTrustedIndexSnapshot(layout) {
|
|
|
1315
1388
|
"ArtifactStore index physical identity changed",
|
|
1316
1389
|
);
|
|
1317
1390
|
}
|
|
1318
|
-
indexRealPath =
|
|
1391
|
+
indexRealPath = physicalRealpath(layout.indexPath);
|
|
1319
1392
|
if (
|
|
1320
1393
|
!samePath(indexRealPath, layout.indexRealPath) ||
|
|
1321
1394
|
!samePath(indexRealPath, layout.indexPath) ||
|
|
@@ -1372,7 +1445,7 @@ function readTrustedIndexSnapshot(layout) {
|
|
|
1372
1445
|
if (
|
|
1373
1446
|
!sameFileIdentity(beforePathStat, afterPathStat) ||
|
|
1374
1447
|
!samePhysicalIdentity(afterPathStat, layout.indexIdentity) ||
|
|
1375
|
-
!samePath(
|
|
1448
|
+
!samePath(physicalRealpath(layout.indexPath), indexRealPath)
|
|
1376
1449
|
) {
|
|
1377
1450
|
throw artifactError(
|
|
1378
1451
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2075,9 +2148,13 @@ export class EvolutionArtifactPorts {
|
|
|
2075
2148
|
}
|
|
2076
2149
|
}
|
|
2077
2150
|
|
|
2078
|
-
#assertUniqueRecordDigest(
|
|
2151
|
+
#assertUniqueRecordDigest(
|
|
2152
|
+
recordDigest,
|
|
2153
|
+
artifactId,
|
|
2154
|
+
entries = this.#boundedIndexEntries(),
|
|
2155
|
+
) {
|
|
2079
2156
|
const matches = this.#entriesByDataField(
|
|
2080
|
-
|
|
2157
|
+
entries,
|
|
2081
2158
|
"recordDigest",
|
|
2082
2159
|
recordDigest,
|
|
2083
2160
|
);
|
|
@@ -2106,6 +2183,33 @@ export class EvolutionArtifactPorts {
|
|
|
2106
2183
|
}
|
|
2107
2184
|
}
|
|
2108
2185
|
|
|
2186
|
+
#loadLedgerEntry(artifactId, recordDigest = null, snapshot = null) {
|
|
2187
|
+
// Ledger resolution is read-only. Read the already attested physical index
|
|
2188
|
+
// directly instead of invoking ArtifactStore.list/get (both acquire writer
|
|
2189
|
+
// locks). Each read/batch obtains a fresh bounded descriptor snapshot;
|
|
2190
|
+
// nothing caches index contents, signatures or current authority.
|
|
2191
|
+
const { entries } =
|
|
2192
|
+
snapshot ?? readTrustedIndexSnapshot(this.#store.layout);
|
|
2193
|
+
const matches = this.#entriesByDataField(entries, "id", artifactId);
|
|
2194
|
+
if (matches.length === 0) {
|
|
2195
|
+
throw artifactError(
|
|
2196
|
+
EVOLUTION_ARTIFACT_NOT_FOUND_CODE,
|
|
2197
|
+
"evolution artifact index entry was removed or expired",
|
|
2198
|
+
{ artifactId },
|
|
2199
|
+
);
|
|
2200
|
+
}
|
|
2201
|
+
if (matches.length !== 1) {
|
|
2202
|
+
throw artifactError(
|
|
2203
|
+
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
2204
|
+
"evolution artifact id has duplicate index rows",
|
|
2205
|
+
{ artifactId },
|
|
2206
|
+
);
|
|
2207
|
+
}
|
|
2208
|
+
if (recordDigest !== null)
|
|
2209
|
+
this.#assertUniqueRecordDigest(recordDigest, artifactId, entries);
|
|
2210
|
+
return matches[0];
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2109
2213
|
#validateLineage(value, envelope, core, envelopeDigest) {
|
|
2110
2214
|
assertExactRecord(
|
|
2111
2215
|
value,
|
|
@@ -2255,7 +2359,7 @@ export class EvolutionArtifactPorts {
|
|
|
2255
2359
|
let afterDescriptorStat;
|
|
2256
2360
|
let bytes;
|
|
2257
2361
|
try {
|
|
2258
|
-
rootRealPath =
|
|
2362
|
+
rootRealPath = physicalRealpath(filesRoot);
|
|
2259
2363
|
if (!samePath(rootRealPath, this.#store.layout.filesRealPath)) {
|
|
2260
2364
|
throw artifactError(
|
|
2261
2365
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2264,7 +2368,7 @@ export class EvolutionArtifactPorts {
|
|
|
2264
2368
|
}
|
|
2265
2369
|
beforePathStat = fs.lstatSync(resolvedStoredPath);
|
|
2266
2370
|
assertRegularSingleLink(beforePathStat, "stored artifact path");
|
|
2267
|
-
targetRealPath =
|
|
2371
|
+
targetRealPath = physicalRealpath(resolvedStoredPath);
|
|
2268
2372
|
if (!isContained(rootRealPath, targetRealPath)) {
|
|
2269
2373
|
throw artifactError(
|
|
2270
2374
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2314,7 +2418,7 @@ export class EvolutionArtifactPorts {
|
|
|
2314
2418
|
"stored artifact pathname changed during readback",
|
|
2315
2419
|
);
|
|
2316
2420
|
}
|
|
2317
|
-
const afterRealPath =
|
|
2421
|
+
const afterRealPath = physicalRealpath(resolvedStoredPath);
|
|
2318
2422
|
if (!samePath(targetRealPath, afterRealPath)) {
|
|
2319
2423
|
throw artifactError(
|
|
2320
2424
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2789,14 +2893,21 @@ export class EvolutionArtifactPorts {
|
|
|
2789
2893
|
options,
|
|
2790
2894
|
artifactId,
|
|
2791
2895
|
preauthenticated = null,
|
|
2896
|
+
ledgerRead = false,
|
|
2897
|
+
capturedLedgerEntry = null,
|
|
2898
|
+
batchWindow = null,
|
|
2792
2899
|
) {
|
|
2793
2900
|
const authentication =
|
|
2794
2901
|
preauthenticated || this.#authenticateEnvelope(envelope, options);
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2902
|
+
if (!ledgerRead)
|
|
2903
|
+
this.#assertUniqueRecordDigest(
|
|
2904
|
+
authentication.core.recordDigest,
|
|
2905
|
+
artifactId,
|
|
2906
|
+
);
|
|
2907
|
+
const entry = ledgerRead
|
|
2908
|
+
? (capturedLedgerEntry ??
|
|
2909
|
+
this.#loadLedgerEntry(artifactId, authentication.core.recordDigest))
|
|
2910
|
+
: this.#loadCurrentEntryById(artifactId);
|
|
2800
2911
|
const normalizedEntry = this.#validateIndexEntry(
|
|
2801
2912
|
entry,
|
|
2802
2913
|
envelope,
|
|
@@ -2815,11 +2926,25 @@ export class EvolutionArtifactPorts {
|
|
|
2815
2926
|
authentication.core.recordDigest,
|
|
2816
2927
|
);
|
|
2817
2928
|
const record = this.#parseRecordBytes(bytes, authentication.core);
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2929
|
+
if (ledgerRead && batchWindow === null) {
|
|
2930
|
+
const after = this.#loadLedgerEntry(
|
|
2931
|
+
artifactId,
|
|
2932
|
+
authentication.core.recordDigest,
|
|
2933
|
+
);
|
|
2934
|
+
if (canonicalJson(after) !== canonicalJson(entry)) {
|
|
2935
|
+
throw artifactError(
|
|
2936
|
+
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
2937
|
+
"ArtifactStore index entry was replaced during ledger readback",
|
|
2938
|
+
{ artifactId },
|
|
2939
|
+
);
|
|
2940
|
+
}
|
|
2941
|
+
} else if (!ledgerRead) {
|
|
2942
|
+
this.#assertEntryStable(artifactId, entry);
|
|
2943
|
+
this.#assertUniqueRecordDigest(
|
|
2944
|
+
authentication.core.recordDigest,
|
|
2945
|
+
artifactId,
|
|
2946
|
+
);
|
|
2947
|
+
}
|
|
2823
2948
|
const releaseClock = this.#clock();
|
|
2824
2949
|
if (
|
|
2825
2950
|
releaseClock.milliseconds <
|
|
@@ -2859,6 +2984,13 @@ export class EvolutionArtifactPorts {
|
|
|
2859
2984
|
...receiptCore,
|
|
2860
2985
|
receiptDigest: domainDigest(RESOLUTION_RECEIPT_DOMAIN, receiptCore),
|
|
2861
2986
|
});
|
|
2987
|
+
batchWindow?.push({
|
|
2988
|
+
checkedAt: releaseClock.milliseconds,
|
|
2989
|
+
expiresAt: Math.min(
|
|
2990
|
+
authentication.core.expiresAtMs ?? Infinity,
|
|
2991
|
+
authentication.authority.decisionExpiresAtMs,
|
|
2992
|
+
),
|
|
2993
|
+
});
|
|
2862
2994
|
return {
|
|
2863
2995
|
artifactRef,
|
|
2864
2996
|
authentication,
|
|
@@ -3212,7 +3344,7 @@ export class EvolutionArtifactPorts {
|
|
|
3212
3344
|
});
|
|
3213
3345
|
}
|
|
3214
3346
|
|
|
3215
|
-
#resolveLedgerRequest(request, purpose) {
|
|
3347
|
+
#resolveLedgerRequest(request, purpose, snapshot = null, batchWindow = null) {
|
|
3216
3348
|
assertExactRecord(
|
|
3217
3349
|
request,
|
|
3218
3350
|
LEDGER_REQUEST_KEYS,
|
|
@@ -3239,7 +3371,7 @@ export class EvolutionArtifactPorts {
|
|
|
3239
3371
|
const artifactRef = normalizeArtifactRef(
|
|
3240
3372
|
ownData(request, "ref", "evolution ledger artifact request"),
|
|
3241
3373
|
);
|
|
3242
|
-
const entry = this.#
|
|
3374
|
+
const entry = this.#loadLedgerEntry(artifactRef.artifactId, null, snapshot);
|
|
3243
3375
|
assertExactRecord(
|
|
3244
3376
|
entry,
|
|
3245
3377
|
INDEX_ENTRY_KEYS,
|
|
@@ -3267,11 +3399,20 @@ export class EvolutionArtifactPorts {
|
|
|
3267
3399
|
tenantId: this.#tenantId,
|
|
3268
3400
|
});
|
|
3269
3401
|
const authentication = this.#authenticateEnvelope(envelope, options);
|
|
3402
|
+
if (snapshot !== null)
|
|
3403
|
+
this.#assertUniqueRecordDigest(
|
|
3404
|
+
authentication.core.recordDigest,
|
|
3405
|
+
artifactRef.artifactId,
|
|
3406
|
+
snapshot.entries,
|
|
3407
|
+
);
|
|
3270
3408
|
const resolved = this.#resolveAuthenticatedEntry(
|
|
3271
3409
|
envelope,
|
|
3272
3410
|
options,
|
|
3273
3411
|
artifactRef.artifactId,
|
|
3274
3412
|
authentication,
|
|
3413
|
+
true,
|
|
3414
|
+
entry,
|
|
3415
|
+
batchWindow,
|
|
3275
3416
|
);
|
|
3276
3417
|
const ledgerReceiptCore = {
|
|
3277
3418
|
artifactReceiptDigest: resolved.receipt.receiptDigest,
|
|
@@ -3296,6 +3437,36 @@ export class EvolutionArtifactPorts {
|
|
|
3296
3437
|
});
|
|
3297
3438
|
}
|
|
3298
3439
|
|
|
3440
|
+
#resolveLedgerBatch(input, purpose) {
|
|
3441
|
+
assertDenseDataArray(input, "ledger artifact batch", 128);
|
|
3442
|
+
const requests = frozenCanonicalClone(input);
|
|
3443
|
+
const snapshot = readTrustedIndexSnapshot(this.#store.layout);
|
|
3444
|
+
const window = [];
|
|
3445
|
+
const results = requests.map((request) =>
|
|
3446
|
+
this.#resolveLedgerRequest(request, purpose, snapshot, window),
|
|
3447
|
+
);
|
|
3448
|
+
// One bounded synchronous read, not a cache: every envelope/current
|
|
3449
|
+
// authority and payload is authenticated individually. Re-attest the full
|
|
3450
|
+
// index after ALL reads, and all decision leases before releasing bytes.
|
|
3451
|
+
const after = readTrustedIndexSnapshot(this.#store.layout);
|
|
3452
|
+
if (after.bytesDigest !== snapshot.bytesDigest)
|
|
3453
|
+
throw artifactError(
|
|
3454
|
+
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
3455
|
+
"ArtifactStore index changed during ledger batch readback",
|
|
3456
|
+
);
|
|
3457
|
+
const completed = this.#clock().milliseconds;
|
|
3458
|
+
if (
|
|
3459
|
+
window.some(
|
|
3460
|
+
(entry) => completed < entry.checkedAt || completed >= entry.expiresAt,
|
|
3461
|
+
)
|
|
3462
|
+
)
|
|
3463
|
+
throw artifactError(
|
|
3464
|
+
EVOLUTION_ARTIFACT_EXPIRED_CODE,
|
|
3465
|
+
"artifact authority expired before ledger batch release",
|
|
3466
|
+
);
|
|
3467
|
+
return Object.freeze(results);
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3299
3470
|
/** Return a frozen read-only function; it exposes no put/signing authority. */
|
|
3300
3471
|
createEvolutionLedgerArtifactResolver(options = {}) {
|
|
3301
3472
|
assertOptionalExactRecord(
|
|
@@ -3316,6 +3487,9 @@ export class EvolutionArtifactPorts {
|
|
|
3316
3487
|
const resolveReadOnly = (request) =>
|
|
3317
3488
|
this.#resolveLedgerRequest(request, normalizedPurpose);
|
|
3318
3489
|
EVOLUTION_LEDGER_ARTIFACT_RESOLVERS.add(resolveReadOnly);
|
|
3490
|
+
EVOLUTION_LEDGER_BATCH_RESOLVERS.set(resolveReadOnly, (requests) =>
|
|
3491
|
+
this.#resolveLedgerBatch(requests, normalizedPurpose),
|
|
3492
|
+
);
|
|
3319
3493
|
return Object.freeze(resolveReadOnly);
|
|
3320
3494
|
}
|
|
3321
3495
|
}
|
|
@@ -3343,4 +3517,11 @@ export function isEvolutionLedgerArtifactResolver(value) {
|
|
|
3343
3517
|
);
|
|
3344
3518
|
}
|
|
3345
3519
|
|
|
3520
|
+
export function captureEvolutionLedgerBatchResolver(value) {
|
|
3521
|
+
const resolve = EVOLUTION_LEDGER_BATCH_RESOLVERS.get(value);
|
|
3522
|
+
if (!resolve)
|
|
3523
|
+
throw new TypeError("a branded ledger artifact resolver is required");
|
|
3524
|
+
return resolve;
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3346
3527
|
Object.freeze(EvolutionArtifactPorts.prototype);
|