chainlesschain 0.166.22 → 0.166.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/src/assets/web-panel/assets/{AIOps-oJ7USzMC.js → AIOps-DR-MWcZc.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BlgnZe_C.js → ActionButton-DT8B7sEb.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-D2rRbTLu.js → Analytics-asjh3dQJ.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-FwS3f0B2.js → AppLayout-DivQ491i.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-iF-_08Hi.js → Artifacts-DPH2uUmy.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-D24p0zQw.js → Audit-Bp2nLyc-.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-Cg3mRVi9.js → BackgroundAgents-CHS28khl.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-EOqht3H-.js → Backup-CKeaFSfz.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-9XWYq2hj.js → BaseInput-CxwM9BAH.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-Dq5yardA.js → Chat-DYLDwaCv.js} +4 -4
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-Ds3pA-ET.js → ChatBubbleRenderer-DdBJDBP0.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-CuyCBoBf.js → Checkbox-uYTWOB8j.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-DjWtYHNe.js → Codegen-CvYa_dwT.js} +1 -1
- package/src/assets/web-panel/assets/{Col-CrVr_iuG.js → Col-CanMAX4m.js} +1 -1
- package/src/assets/web-panel/assets/{Community-C6QxpfGc.js → Community-B4WaDtHw.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-B-v5r6Pa.js → Compact-K93Uof_3.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-zNiLiFgD.js → Compliance-CKeDLgUW.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-D9K7lMOu.js → Cowork-P93grAeB.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-DAjO36z4.js → Cron-BSHnMtDn.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-Bxqn0aqB.js → Crosschain-epAOpUVJ.js} +1 -1
- package/src/assets/web-panel/assets/{DID-DfRmLUe-.js → DID-ByjXfP7t.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-Cz8KF3fr.js → Dashboard-QztTU8tb.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-C4oVfkP0.js → Dropdown-DhUc9yhN.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-ivyZKN8k.js → EmailListRenderer-C2sLhJJN.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-DoxY1CPW.js → FamilyGuardDashboard-CdfbWNDn.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-C93gZxnb.js → Federation-CcF_R7NW.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-D_lEjYJE.js → FormItemContext-Cm_X2IBk.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BNFN9YjN.js → GenericCardRenderer-DUi4NWlb.js} +1 -1
- package/src/assets/web-panel/assets/{Git-mUu2HcLI.js → Git-4Sq5FjBt.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CNuosrge.js → Governance-Dx2_v4V6.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-DwY5pbCB.js → Inference-7Vr1xekR.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-aRUxhACD.js → KnowledgeGraph-Cnd2XOzf.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DFfsWYy_.js → Logs-B66QPVf-.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-DqTx7_u1.js → MarkdownRenderer-PLsEvhly.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-COI-ciM-.js → Marketplace-BMIK9BmC.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-BJJwaIpe.js → McpTools-BDbyp3J_.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-CDO6SGDZ.js → Memory-CJdzfZGi.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-BlZ5tFf4.js → MobileBridge-C2TH5Y3-.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-DuoxbgWz.js → MobileProjects-D1dYXkvV.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-6ec9j70b.js → Mtc-B-4A1I1j.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-BuL7HkC7.js → MtcAudit-Bgcc9UOl.js} +5 -5
- package/src/assets/web-panel/assets/{Multisig-CJxR85lk.js → Multisig-DqOe-etP.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-B71O1S4l.js → NLProgramming-7VnhzE_6.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-Bsw5zbpV.js → Notes-BxawpeUQ.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-BnAhXuK_.js → NotificationSettings-Cr08G2aE.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-BJ0R5GGz.js → OrderTableRenderer-Ce8bEGlK.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-B7wwNxoP.js → Organization-BC7lveGv.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-CfAGr0gM.js → Overflow-CakOW-G0.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-KhMg22Fz.js → P2P-Cf8CaOBZ.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-NdAXI9ft.js → PdhVaultBrowser-Dc7b98W9.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-CIYjqyT7.js → Permissions-DGJyMEfS.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-D2ht3P_R.js → PersonalDataHub-DNIwSdwu.js} +6 -6
- package/src/assets/web-panel/assets/{Pipeline-i6flZW1m.js → Pipeline-5B1S12wa.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DE0lhYVc.js → Privacy-CMB6Ke5t.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-BL3YbyxS.js → ProjectInit-D5PqTFiT.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-CEtdg7ni.js → ProjectSettings-CbKNdSjV.js} +2 -2
- package/src/assets/web-panel/assets/Projects-ccXaHzYL.js +1 -0
- package/src/assets/web-panel/assets/{Providers-DKt_Cg-j.js → Providers-CJF5_-Gs.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-DA61jNSx.js → QrScannerModal-CT6iEAdi.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-fS9ryUmq.js → QuickAsk-Ci0h9mJ_.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-CR9dZU5Y.js → Recommend-Da5mobZu.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-BV0BR2Dz.js → RemoteSession-BaCY8eey.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-BIeGUvYD.js → Reputation-CaITfTsI.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DHDT1aro.js → Row-DtUDamyP.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Cq6YKb1h.js → RssFeed-DX27gFpg.js} +3 -3
- package/src/assets/web-panel/assets/{Search-DEF6vsy6.js → Search-DFL69osN.js} +1 -1
- package/src/assets/web-panel/assets/{Security-CHtYiKY9.js → Security-BqGeoWv-.js} +4 -4
- package/src/assets/web-panel/assets/{Services-u16lvBJN.js → Services-3z1WnEAc.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CGbizyDj.js → Skeleton-C_OJQQ9Z.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-BZMQcAa7.js → Skills-BY7aT6Mo.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Bm-CycVi.js → Sla-BZv7DSaD.js} +1 -1
- package/src/assets/web-panel/assets/SpeechSettings-6lJKLhCn.js +1 -0
- package/src/assets/web-panel/assets/{SyncSettings-B8q1C1eC.js → SyncSettings-B6D7STlI.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-SU1pBWc-.js → Tasks-Co_FCZAO.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CyOfJzmt.js → Templates-CnY-9fgz.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-xqWSm2GP.js → Tenant-B71yXfZ8.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-D1Ttgjsi.js → Terminal-Dd_P7awo.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-Da2lYs5D.js → TimelineRenderer-CvIEMyli.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-B34-SduO.js → Tokens-DknFBGOi.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-C8zyYm4R.js → Trigger-D_4nJONB.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-D1Pvqems.js → Trust-BNl21fa7.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-Do3VVnAy.js → UkeySign-CFrCI7uK.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-Dz7egVIA.js → VideoEditing-BVfY6JLg.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-Dcuw-OxR.js → Wallet-Cj9CAK0J.js} +3 -3
- package/src/assets/web-panel/assets/{WebAuthn-DPlw-QsB.js → WebAuthn-DcqZlzA3.js} +3 -3
- package/src/assets/web-panel/assets/{WorkflowEditor-h4OsnU5q.js → WorkflowEditor-Dfr_dMld.js} +1 -1
- package/src/assets/web-panel/assets/{chat-eO9wEwrW.js → chat-Yv6UF0AD.js} +1 -1
- package/src/assets/web-panel/assets/{colors-34lSmOXw.js → colors-CDW_-1fs.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-CK4kEWJ4.js → compact-item-BYOQvd-6.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-E0A57xed.js → createContext-BCGO0BiP.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-H-kXSuf-.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-BD9ZMGAl.js → hasIn-DY-70cfQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-B_G_ElKO.js → index-366wfQBU.js} +1 -1
- package/src/assets/web-panel/assets/index-B0o4MeNK.js +1 -0
- package/src/assets/web-panel/assets/{index-B0rkHxKK.js → index-B9ZogJJM.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrsDA_md.js → index-B9m5QAMg.js} +1 -1
- package/src/assets/web-panel/assets/{index--N0u6kTG.js → index-BBs2mv5M.js} +1 -1
- package/src/assets/web-panel/assets/{index-DiT_REby.js → index-BFv1hzF6.js} +1 -1
- package/src/assets/web-panel/assets/index-BVafOL_I.js +1 -0
- package/src/assets/web-panel/assets/{index-8qMA1DWQ.js → index-BXlEx4UH.js} +1 -1
- package/src/assets/web-panel/assets/{index-CsrKJJcX.js → index-BayRTE5w.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcbgVLOH.js → index-Bb9nyts1.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZkFMeWL.js → index-Bf_Va0S-.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cz3unNfL.js → index-Br3wQLVY.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcE1BspQ.js → index-BvK4fjkk.js} +1 -1
- package/src/assets/web-panel/assets/{index-DeXNCyQJ.js → index-C40UdtlS.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrOalGut.js → index-C4UJA2ju.js} +1 -1
- package/src/assets/web-panel/assets/{index-MIg5Z8qe.js → index-CB_Iw73G.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFLE2qO9.js → index-CCwWp3mT.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrSAAuJj.js → index-CFa2fPCk.js} +1 -1
- package/src/assets/web-panel/assets/{index-D4bB_x_v.js → index-CIyHxV4u.js} +1 -1
- package/src/assets/web-panel/assets/{index-BmNbU2Z6.js → index-CUP-A2_h.js} +1 -1
- package/src/assets/web-panel/assets/{index-o8pYehRq.js → index-CUo27q9J.js} +3 -3
- package/src/assets/web-panel/assets/{index-BbX_Dted.js → index-CaT8trvf.js} +1 -1
- package/src/assets/web-panel/assets/{index-Brqc9Emx.js → index-CnZNbcux.js} +1 -1
- package/src/assets/web-panel/assets/{index-Da5fmOHB.js → index-Cy2NE6AO.js} +1 -1
- package/src/assets/web-panel/assets/{index-yAGBu2E0.js → index-CzeEEazr.js} +1 -1
- package/src/assets/web-panel/assets/{index-BsGmo6v1.js → index-D--TEyDj.js} +1 -1
- package/src/assets/web-panel/assets/{index-DvKcroix.js → index-DCtsjhhT.js} +1 -1
- package/src/assets/web-panel/assets/{index-DGRxt5wj.js → index-DLOf7BSz.js} +1 -1
- package/src/assets/web-panel/assets/{index-DONOUtlz.js → index-DM5c4pc-.js} +1 -1
- package/src/assets/web-panel/assets/{index-CT1_eRL-.js → index-DRFC2Qt0.js} +1 -1
- package/src/assets/web-panel/assets/{index-DpfisY1g.js → index-DT_qVaaV.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cx3Jn1r0.js → index-DUDoRk9r.js} +1 -1
- package/src/assets/web-panel/assets/{index-DCn-ECvK.js → index-Dg-AQYDf.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bjs90Eh9.js → index-DuIPq5MX.js} +1 -1
- package/src/assets/web-panel/assets/{index-CuSau5ya.js → index-NYVBUAVN.js} +1 -1
- package/src/assets/web-panel/assets/{index-DP-UZAQN.js → index-NaCESahy.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ch175NUw.js → index-RjIMPG0u.js} +1 -1
- package/src/assets/web-panel/assets/{index-DzXjP44T.js → index-Y9akzgFO.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZBaqe3d.js → index-hZ0Eyrrw.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-DMTkAomF.js → initDefaultProps-CG99CcR4.js} +1 -1
- package/src/assets/web-panel/assets/{motion-Cnti1F5g.js → motion-Z7MH0_0G.js} +1 -1
- package/src/assets/web-panel/assets/{move-CGxmHUga.js → move-BX67lOdq.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-CuwwLoq7.js → mtc-parser-CmAbG1fE.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BpdlTkPM.js → omit-DiU5tI1_.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-D7nWrThp.js → pickAttrs-BGfvLrYL.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-Bhx0TV8F.js → placementArrow-CggLEgaJ.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-CZ1KesZh.js → responsiveObserve-t3nlghPZ.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CnldF8J6.js → slide-BkV4dL9s.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CZfo_GOA.js → statusUtils-qec1PUoC.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-B2QCcAv5.js → styleChecker-ChjX6T8D.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-DzzjIS4J.js → useFlexGapSupport-B1jLoZcM.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-B_atg9M0.js → useFs-C3X53s4E.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DhZs3QYN.js → usePersonalDataHub-DOvbbnkZ.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-DcePTYAm.js → vnode-Ie0TEVFT.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-BYmlnjRk.js → zoom-CRUMVS8l.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +3 -3
- package/src/commands/agent.js +18 -1
- package/src/commands/evolution-benchmark.js +72 -0
- package/src/commands/evolution.js +2 -0
- package/src/commands/governed-skill-marketplace.js +142 -0
- package/src/commands/marketplace.js +4 -1
- package/src/commands/serve.js +10 -0
- package/src/commands/skill.js +3 -0
- package/src/data/changelog.json +26 -0
- package/src/gateways/ws/ws-agent-handler.js +59 -2
- package/src/gateways/ws/ws-server.js +2 -0
- package/src/harness/golden-transcript.js +1 -0
- package/src/harness/prompt-compressor.js +51 -5
- package/src/harness/provider-backed-compaction.js +28 -1
- package/src/harness/remote-session-registry.js +15 -3
- package/src/index.js +20 -2
- package/src/lazy-dispatch.js +6 -0
- package/src/lib/advisor-runtime.js +55 -2
- package/src/lib/app-server/cli-agent-kernel-adapter.js +4 -0
- package/src/lib/app-server/graph-runtime.js +32 -0
- package/src/lib/app-server/server.js +45 -1
- package/src/lib/app-server/websocket-transport.js +2 -0
- package/src/lib/autonomous-agent.js +63 -13
- package/src/lib/cowork/ab-comparator-cli.js +4 -3
- package/src/lib/cowork/debate-review-cli.js +4 -3
- package/src/lib/cowork/decision-kb-cli.js +5 -0
- package/src/lib/cowork-adapter.js +38 -16
- package/src/lib/evolution/agent-evolution-ingress.js +95 -15
- package/src/lib/evolution/agent-evolution-runtime-composition.js +82 -0
- package/src/lib/evolution/agent-evolution-session-lifecycle.js +46 -0
- package/src/lib/evolution/agent-model-projection.js +217 -0
- package/src/lib/evolution/bounded-descriptor-read.js +29 -0
- package/src/lib/evolution/controlled-skill-pilot-ledger-adapter.js +551 -0
- package/src/lib/evolution/controlled-skill-production-pilot.js +308 -18
- package/src/lib/evolution/evidence-backed-wiki-maintainer.js +10 -1
- package/src/lib/evolution/evidence-json-text.js +236 -0
- package/src/lib/evolution/evolution-artifact-ports.js +193 -21
- package/src/lib/evolution/evolution-deployment-loader.js +163 -2
- package/src/lib/evolution/evolution-eval-child-evidence-ledger-adapter.js +373 -0
- package/src/lib/evolution/evolution-eval-gate.js +14 -1
- package/src/lib/evolution/evolution-eval-process-supervisor-worker.mjs +14 -0
- package/src/lib/evolution/evolution-eval-process-supervisor.js +607 -0
- package/src/lib/evolution/evolution-evidence-artifact-adapter.js +14 -1
- package/src/lib/evolution/evolution-evidence-projector.js +240 -37
- package/src/lib/evolution/evolution-file-witness.js +153 -30
- package/src/lib/evolution/evolution-ledger-ports.js +1027 -66
- package/src/lib/evolution/evolution-ledger.js +66 -2
- package/src/lib/evolution/evolution-raw-crypto-shred.js +29 -15
- package/src/lib/evolution/evolution-raw-deletion-ledger-adapter.js +865 -0
- package/src/lib/evolution/evolution-release-train-domain-stages.js +769 -0
- package/src/lib/evolution/evolution-release-train-stage-output-ledger-adapter.js +333 -0
- package/src/lib/evolution/evolution-release-train.js +54 -6
- package/src/lib/evolution/evolution-workbench-batch-executor.js +101 -144
- package/src/lib/evolution/evolution-workbench-control-ports.js +203 -0
- package/src/lib/evolution/evolution-workbench-file-resources.js +403 -0
- package/src/lib/evolution/evolution-workbench-projection.js +134 -26
- package/src/lib/evolution/evolution-workbench-registry-source.js +482 -0
- package/src/lib/evolution/evolution-workbench-review-ledger-adapter.js +823 -0
- package/src/lib/evolution/evolution-workbench-review-protocol.js +157 -0
- package/src/lib/evolution/evolution-workbench-rollback-authorization.js +57 -0
- package/src/lib/evolution/evolution-workbench-rollback-ledger-adapter.js +1016 -0
- package/src/lib/evolution/evolution-workbench-runtime.js +133 -0
- package/src/lib/evolution/evolution-workbench-version-control.js +70 -36
- package/src/lib/evolution/evolvable-artifact-ledger-adapter.js +48 -0
- package/src/lib/evolution/governed-knowledge-candidate-rejection.js +343 -0
- package/src/lib/evolution/governed-knowledge-dependency-authority.js +227 -44
- package/src/lib/evolution/governed-knowledge-dependency-ledger-executor.js +95 -83
- package/src/lib/evolution/governed-knowledge-record.js +148 -0
- package/src/lib/evolution/governed-knowledge-revocation-record.js +135 -0
- package/src/lib/evolution/governed-knowledge-skill-rollback.js +475 -0
- package/src/lib/evolution/governed-knowledge-sync.js +17 -94
- package/src/lib/evolution/governed-knowledge-wiki-tombstone.js +462 -0
- package/src/lib/evolution/governed-skill-marketplace-badge.js +208 -0
- package/src/lib/evolution/governed-skill-marketplace-candidate.js +330 -0
- package/src/lib/evolution/governed-skill-marketplace-cli-host.js +308 -0
- package/src/lib/evolution/governed-skill-marketplace-ledger-adapter.js +420 -0
- package/src/lib/evolution/governed-skill-marketplace.js +288 -5
- package/src/lib/evolution/governed-wiki-pruning-journal.js +302 -0
- package/src/lib/evolution/governed-wiki-pruning-ledger-adapter.js +459 -0
- package/src/lib/evolution/governed-wiki-pruning-maintenance.js +576 -0
- package/src/lib/evolution/governed-wiki-pruning-plan-authority.js +169 -0
- package/src/lib/evolution/governed-wiki-pruning-raw-shred.js +207 -0
- package/src/lib/evolution/governed-wiki-pruning-retrieval.js +587 -0
- package/src/lib/evolution/governed-wiki-pruning-runtime.js +153 -0
- package/src/lib/evolution/governed-wiki-pruning-skill-rollback.js +360 -0
- package/src/lib/evolution/governed-wiki-pruning.js +322 -143
- package/src/lib/evolution/independent-skill-revocation-source.js +231 -0
- package/src/lib/evolution/knowledge-wiki-source-admission.js +124 -0
- package/src/lib/evolution/knowledge-wiki-source-provenance.js +359 -0
- package/src/lib/evolution/progressive-canary-external-watchdog.js +578 -0
- package/src/lib/evolution/progressive-canary-traffic-worker.js +628 -0
- package/src/lib/evolution/progressive-canary-watchdog-file-store.js +285 -0
- package/src/lib/evolution/progressive-canary-watchdog-node-pki.js +265 -0
- package/src/lib/evolution/skill-candidate-registry.js +22 -0
- package/src/lib/evolution/skill-promotion-controller.js +25 -0
- package/src/lib/evolution/skill-promotion-review-ledger-adapter.js +100 -0
- package/src/lib/evolution/skill-registry-transition-ledger-adapter.js +131 -2
- package/src/lib/evolution/skill-release-registry.js +25 -4
- package/src/lib/evolution/skill-retrieval-revocation-authority.js +361 -0
- package/src/lib/evolution/skill-retrieval-revocation-ledger-adapter.js +346 -0
- package/src/lib/evolution/skill-revocation-propagation.js +467 -0
- package/src/lib/evolution/skill-target-matrix-eval.js +162 -11
- package/src/lib/evolution/skill-wiki-reconciliation.js +985 -0
- package/src/lib/evolution/skill-writer-inventory-manifest.js +8 -6
- package/src/lib/evolution/statistical-progressive-canary.js +165 -3
- package/src/lib/evolution/structured-memory-agent-control-plane.js +120 -0
- package/src/lib/evolution/structured-memory-authority-ledger-adapter.js +5 -1
- package/src/lib/evolution/structured-memory-promotion-receipt-writer.js +126 -0
- package/src/lib/evolution/wiki-informed-skill-proposer.js +127 -21
- package/src/lib/evolution/wiki-maintainer-ledger-adapter.js +760 -100
- package/src/lib/evolution/wiki-revision-protocol.js +120 -0
- package/src/lib/evolution/wiki-skill-proposal-ledger-adapter.js +307 -0
- package/src/lib/evolution/wiki-target-tombstone-revision.js +101 -0
- package/src/lib/evolution/wikiskill-benchmark-cli-host.js +178 -0
- package/src/lib/evolution/wikiskill-benchmark-execution-host.js +702 -0
- package/src/lib/evolution/wikiskill-benchmark-ledger-adapter.js +613 -0
- package/src/lib/evolution/wikiskill-benchmark.js +80 -16
- package/src/lib/goal-assess.js +17 -10
- package/src/lib/interactive-planner.js +9 -1
- package/src/lib/iteration-budget.js +16 -2
- package/src/lib/micro-compact.js +4 -1
- package/src/lib/model-failure-policy.js +21 -0
- package/src/lib/process-execution-broker/index.js +1 -0
- package/src/lib/process-execution-broker/windows-sandbox-helper.dll +0 -0
- package/src/lib/process-execution-broker/windows-sandbox-helper.exe +0 -0
- package/src/lib/process-execution-broker/windows-sandbox.cs +33 -15
- package/src/lib/read-file-page.js +191 -0
- package/src/lib/runnable-provider.js +2 -1
- package/src/lib/skill-retrieval-router.js +22 -1
- package/src/repl/agent-repl.js +127 -33
- package/src/runtime/agent-core.js +163 -73
- package/src/runtime/agent-runtime.js +43 -0
- package/src/runtime/coding-agent-contract-shared.cjs +7 -1
- package/src/runtime/fallback-model.js +143 -62
- package/src/runtime/headless-runner.js +54 -10
- package/src/runtime/headless-stream.js +50 -6
- package/src/runtime/runtime-factory.js +41 -2
- package/src/assets/web-panel/assets/Projects-CvtU5peJ.js +0 -1
- package/src/assets/web-panel/assets/SpeechSettings-BudpA5kr.js +0 -1
- package/src/assets/web-panel/assets/devWarning-CF3xafX2.js +0 -1
- package/src/assets/web-panel/assets/index-C907rPwd.js +0 -1
- package/src/assets/web-panel/assets/index-wueRSK2d.js +0 -1
|
@@ -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,11 +68,21 @@ 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",
|
|
74
84
|
"evolution-release-train-checkpoint",
|
|
85
|
+
"evolution-release-train-stage-output",
|
|
75
86
|
"evolvable-artifact-candidate",
|
|
76
87
|
"evolvable-artifact-transition",
|
|
77
88
|
"evolution-workbench-metrics-receipt-retention",
|
|
@@ -80,12 +91,20 @@ export const EVOLUTION_ARTIFACT_LEDGER_RETENTION_TYPES = Object.freeze([
|
|
|
80
91
|
"governed-knowledge-merge-operation",
|
|
81
92
|
"governed-knowledge-dependency-operation",
|
|
82
93
|
"governed-knowledge-trust-record",
|
|
94
|
+
"governed-skill-marketplace-state",
|
|
83
95
|
"structured-memory-authority-receipt",
|
|
84
96
|
"structured-memory-event",
|
|
85
97
|
"structured-memory-snapshot",
|
|
86
98
|
"wiki-maintenance-request",
|
|
87
99
|
"wiki-maintenance-settlement",
|
|
88
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",
|
|
89
108
|
]);
|
|
90
109
|
export const EVOLUTION_ARTIFACT_LEDGER_RETENTION_PURPOSES = Object.freeze([
|
|
91
110
|
"evolution-ledger",
|
|
@@ -101,6 +120,7 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
101
120
|
"actor",
|
|
102
121
|
"candidate",
|
|
103
122
|
"candidate-diff",
|
|
123
|
+
"controlled-skill-pilot-state",
|
|
104
124
|
"diff",
|
|
105
125
|
"eval",
|
|
106
126
|
"eval-policy",
|
|
@@ -109,7 +129,11 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
109
129
|
"evaluation",
|
|
110
130
|
"evaluation-result",
|
|
111
131
|
"evolution-run-event",
|
|
132
|
+
"evolution-eval-child-evidence",
|
|
133
|
+
"evolution-raw-deletion-receipt",
|
|
134
|
+
"evolution-raw-deletion-tombstone",
|
|
112
135
|
"evolution-release-train-checkpoint",
|
|
136
|
+
"evolution-release-train-stage-output",
|
|
113
137
|
"evolvable-artifact-candidate",
|
|
114
138
|
"evolvable-artifact-transition",
|
|
115
139
|
"evolution-workbench-metrics-receipt-retention",
|
|
@@ -118,6 +142,7 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
118
142
|
"governed-knowledge-merge-operation",
|
|
119
143
|
"governed-knowledge-dependency-operation",
|
|
120
144
|
"governed-knowledge-trust-record",
|
|
145
|
+
"governed-skill-marketplace-state",
|
|
121
146
|
"evidence",
|
|
122
147
|
"model-projection",
|
|
123
148
|
"policy",
|
|
@@ -132,9 +157,15 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
132
157
|
"skill-mutation-nonce-claim",
|
|
133
158
|
"skill-promotion-review-decision",
|
|
134
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",
|
|
135
165
|
"skill-registry-transition-attempt",
|
|
136
166
|
"skill-registry-transition-request",
|
|
137
167
|
"skill-registry-transition-settlement",
|
|
168
|
+
"skill-retrieval-revocation-state",
|
|
138
169
|
"skill-release-finalization",
|
|
139
170
|
"skill-release-state-migration",
|
|
140
171
|
"structured-memory-authority-receipt",
|
|
@@ -143,6 +174,13 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
143
174
|
"wiki-maintenance-request",
|
|
144
175
|
"wiki-maintenance-settlement",
|
|
145
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",
|
|
146
184
|
"skill-release-transition-intent",
|
|
147
185
|
"source",
|
|
148
186
|
"source-evidence",
|
|
@@ -298,6 +336,7 @@ const CONSTRUCTOR_REQUIRED_KEYS = new Set([
|
|
|
298
336
|
]);
|
|
299
337
|
const LEDGER_RESOLVER_OPTION_KEYS = new Set(["purpose"]);
|
|
300
338
|
const EVOLUTION_LEDGER_ARTIFACT_RESOLVERS = new WeakSet();
|
|
339
|
+
const EVOLUTION_LEDGER_BATCH_RESOLVERS = new WeakMap();
|
|
301
340
|
const isProxy = Object.freeze(utilTypes.isProxy.bind(utilTypes));
|
|
302
341
|
const isDate = Object.freeze(utilTypes.isDate.bind(utilTypes));
|
|
303
342
|
const dateGetTime = Object.freeze(
|
|
@@ -305,6 +344,7 @@ const dateGetTime = Object.freeze(
|
|
|
305
344
|
);
|
|
306
345
|
const RETENTION_SET = new Set(EVOLUTION_ARTIFACT_RETENTIONS);
|
|
307
346
|
const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
347
|
+
["controlled-skill-pilot-state", new Set(["evolution-ledger"])],
|
|
308
348
|
[
|
|
309
349
|
"skill-release-transition-intent",
|
|
310
350
|
new Set(["evolution-ledger", "skill-release-transition"]),
|
|
@@ -321,11 +361,23 @@ const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
|
321
361
|
],
|
|
322
362
|
["skill-promotion-review-decision", new Set(["evolution-ledger"])],
|
|
323
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"])],
|
|
324
369
|
["skill-registry-transition-attempt", new Set(["evolution-ledger"])],
|
|
325
370
|
["skill-registry-transition-request", new Set(["evolution-ledger"])],
|
|
326
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"])],
|
|
327
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"])],
|
|
328
379
|
["evolution-release-train-checkpoint", new Set(["evolution-ledger"])],
|
|
380
|
+
["evolution-release-train-stage-output", new Set(["evolution-ledger"])],
|
|
329
381
|
["evolvable-artifact-candidate", new Set(["evolution-ledger"])],
|
|
330
382
|
["evolvable-artifact-transition", new Set(["evolution-ledger"])],
|
|
331
383
|
[
|
|
@@ -337,7 +389,13 @@ const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
|
337
389
|
["governed-knowledge-merge-operation", new Set(["evolution-ledger"])],
|
|
338
390
|
["governed-knowledge-dependency-operation", new Set(["evolution-ledger"])],
|
|
339
391
|
["governed-knowledge-trust-record", new Set(["evolution-ledger"])],
|
|
392
|
+
["governed-skill-marketplace-state", new Set(["evolution-ledger"])],
|
|
340
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"])],
|
|
341
399
|
["structured-memory-authority-receipt", new Set(["evolution-ledger"])],
|
|
342
400
|
["structured-memory-event", new Set(["evolution-ledger"])],
|
|
343
401
|
["structured-memory-snapshot", new Set(["evolution-ledger"])],
|
|
@@ -949,6 +1007,12 @@ function samePath(left, right) {
|
|
|
949
1007
|
: normalizedLeft === normalizedRight;
|
|
950
1008
|
}
|
|
951
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
|
+
|
|
952
1016
|
function isContained(root, candidate) {
|
|
953
1017
|
const relative = path.relative(root, candidate);
|
|
954
1018
|
return (
|
|
@@ -1017,7 +1081,7 @@ function inspectPhysicalDirectory(directory, label) {
|
|
|
1017
1081
|
try {
|
|
1018
1082
|
stat = fs.lstatSync(directory);
|
|
1019
1083
|
assertDirectory(stat, label);
|
|
1020
|
-
realPath =
|
|
1084
|
+
realPath = physicalRealpath(directory);
|
|
1021
1085
|
} catch (cause) {
|
|
1022
1086
|
if (isEvolutionArtifactPortError(cause)) throw cause;
|
|
1023
1087
|
throw artifactError(
|
|
@@ -1045,7 +1109,7 @@ function inspectPhysicalIndex(indexPath, rootRealPath) {
|
|
|
1045
1109
|
try {
|
|
1046
1110
|
pathStat = fs.lstatSync(indexPath);
|
|
1047
1111
|
assertRegularSingleLink(pathStat, "ArtifactStore index");
|
|
1048
|
-
realPath =
|
|
1112
|
+
realPath = physicalRealpath(indexPath);
|
|
1049
1113
|
if (
|
|
1050
1114
|
!samePath(realPath, indexPath) ||
|
|
1051
1115
|
!isContained(rootRealPath, realPath)
|
|
@@ -1324,7 +1388,7 @@ function readTrustedIndexSnapshot(layout) {
|
|
|
1324
1388
|
"ArtifactStore index physical identity changed",
|
|
1325
1389
|
);
|
|
1326
1390
|
}
|
|
1327
|
-
indexRealPath =
|
|
1391
|
+
indexRealPath = physicalRealpath(layout.indexPath);
|
|
1328
1392
|
if (
|
|
1329
1393
|
!samePath(indexRealPath, layout.indexRealPath) ||
|
|
1330
1394
|
!samePath(indexRealPath, layout.indexPath) ||
|
|
@@ -1381,7 +1445,7 @@ function readTrustedIndexSnapshot(layout) {
|
|
|
1381
1445
|
if (
|
|
1382
1446
|
!sameFileIdentity(beforePathStat, afterPathStat) ||
|
|
1383
1447
|
!samePhysicalIdentity(afterPathStat, layout.indexIdentity) ||
|
|
1384
|
-
!samePath(
|
|
1448
|
+
!samePath(physicalRealpath(layout.indexPath), indexRealPath)
|
|
1385
1449
|
) {
|
|
1386
1450
|
throw artifactError(
|
|
1387
1451
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2084,9 +2148,13 @@ export class EvolutionArtifactPorts {
|
|
|
2084
2148
|
}
|
|
2085
2149
|
}
|
|
2086
2150
|
|
|
2087
|
-
#assertUniqueRecordDigest(
|
|
2151
|
+
#assertUniqueRecordDigest(
|
|
2152
|
+
recordDigest,
|
|
2153
|
+
artifactId,
|
|
2154
|
+
entries = this.#boundedIndexEntries(),
|
|
2155
|
+
) {
|
|
2088
2156
|
const matches = this.#entriesByDataField(
|
|
2089
|
-
|
|
2157
|
+
entries,
|
|
2090
2158
|
"recordDigest",
|
|
2091
2159
|
recordDigest,
|
|
2092
2160
|
);
|
|
@@ -2115,6 +2183,33 @@ export class EvolutionArtifactPorts {
|
|
|
2115
2183
|
}
|
|
2116
2184
|
}
|
|
2117
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
|
+
|
|
2118
2213
|
#validateLineage(value, envelope, core, envelopeDigest) {
|
|
2119
2214
|
assertExactRecord(
|
|
2120
2215
|
value,
|
|
@@ -2264,7 +2359,7 @@ export class EvolutionArtifactPorts {
|
|
|
2264
2359
|
let afterDescriptorStat;
|
|
2265
2360
|
let bytes;
|
|
2266
2361
|
try {
|
|
2267
|
-
rootRealPath =
|
|
2362
|
+
rootRealPath = physicalRealpath(filesRoot);
|
|
2268
2363
|
if (!samePath(rootRealPath, this.#store.layout.filesRealPath)) {
|
|
2269
2364
|
throw artifactError(
|
|
2270
2365
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2273,7 +2368,7 @@ export class EvolutionArtifactPorts {
|
|
|
2273
2368
|
}
|
|
2274
2369
|
beforePathStat = fs.lstatSync(resolvedStoredPath);
|
|
2275
2370
|
assertRegularSingleLink(beforePathStat, "stored artifact path");
|
|
2276
|
-
targetRealPath =
|
|
2371
|
+
targetRealPath = physicalRealpath(resolvedStoredPath);
|
|
2277
2372
|
if (!isContained(rootRealPath, targetRealPath)) {
|
|
2278
2373
|
throw artifactError(
|
|
2279
2374
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2323,7 +2418,7 @@ export class EvolutionArtifactPorts {
|
|
|
2323
2418
|
"stored artifact pathname changed during readback",
|
|
2324
2419
|
);
|
|
2325
2420
|
}
|
|
2326
|
-
const afterRealPath =
|
|
2421
|
+
const afterRealPath = physicalRealpath(resolvedStoredPath);
|
|
2327
2422
|
if (!samePath(targetRealPath, afterRealPath)) {
|
|
2328
2423
|
throw artifactError(
|
|
2329
2424
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2798,14 +2893,21 @@ export class EvolutionArtifactPorts {
|
|
|
2798
2893
|
options,
|
|
2799
2894
|
artifactId,
|
|
2800
2895
|
preauthenticated = null,
|
|
2896
|
+
ledgerRead = false,
|
|
2897
|
+
capturedLedgerEntry = null,
|
|
2898
|
+
batchWindow = null,
|
|
2801
2899
|
) {
|
|
2802
2900
|
const authentication =
|
|
2803
2901
|
preauthenticated || this.#authenticateEnvelope(envelope, options);
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
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);
|
|
2809
2911
|
const normalizedEntry = this.#validateIndexEntry(
|
|
2810
2912
|
entry,
|
|
2811
2913
|
envelope,
|
|
@@ -2824,11 +2926,25 @@ export class EvolutionArtifactPorts {
|
|
|
2824
2926
|
authentication.core.recordDigest,
|
|
2825
2927
|
);
|
|
2826
2928
|
const record = this.#parseRecordBytes(bytes, authentication.core);
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
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
|
+
}
|
|
2832
2948
|
const releaseClock = this.#clock();
|
|
2833
2949
|
if (
|
|
2834
2950
|
releaseClock.milliseconds <
|
|
@@ -2868,6 +2984,13 @@ export class EvolutionArtifactPorts {
|
|
|
2868
2984
|
...receiptCore,
|
|
2869
2985
|
receiptDigest: domainDigest(RESOLUTION_RECEIPT_DOMAIN, receiptCore),
|
|
2870
2986
|
});
|
|
2987
|
+
batchWindow?.push({
|
|
2988
|
+
checkedAt: releaseClock.milliseconds,
|
|
2989
|
+
expiresAt: Math.min(
|
|
2990
|
+
authentication.core.expiresAtMs ?? Infinity,
|
|
2991
|
+
authentication.authority.decisionExpiresAtMs,
|
|
2992
|
+
),
|
|
2993
|
+
});
|
|
2871
2994
|
return {
|
|
2872
2995
|
artifactRef,
|
|
2873
2996
|
authentication,
|
|
@@ -3221,7 +3344,7 @@ export class EvolutionArtifactPorts {
|
|
|
3221
3344
|
});
|
|
3222
3345
|
}
|
|
3223
3346
|
|
|
3224
|
-
#resolveLedgerRequest(request, purpose) {
|
|
3347
|
+
#resolveLedgerRequest(request, purpose, snapshot = null, batchWindow = null) {
|
|
3225
3348
|
assertExactRecord(
|
|
3226
3349
|
request,
|
|
3227
3350
|
LEDGER_REQUEST_KEYS,
|
|
@@ -3248,7 +3371,7 @@ export class EvolutionArtifactPorts {
|
|
|
3248
3371
|
const artifactRef = normalizeArtifactRef(
|
|
3249
3372
|
ownData(request, "ref", "evolution ledger artifact request"),
|
|
3250
3373
|
);
|
|
3251
|
-
const entry = this.#
|
|
3374
|
+
const entry = this.#loadLedgerEntry(artifactRef.artifactId, null, snapshot);
|
|
3252
3375
|
assertExactRecord(
|
|
3253
3376
|
entry,
|
|
3254
3377
|
INDEX_ENTRY_KEYS,
|
|
@@ -3276,11 +3399,20 @@ export class EvolutionArtifactPorts {
|
|
|
3276
3399
|
tenantId: this.#tenantId,
|
|
3277
3400
|
});
|
|
3278
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
|
+
);
|
|
3279
3408
|
const resolved = this.#resolveAuthenticatedEntry(
|
|
3280
3409
|
envelope,
|
|
3281
3410
|
options,
|
|
3282
3411
|
artifactRef.artifactId,
|
|
3283
3412
|
authentication,
|
|
3413
|
+
true,
|
|
3414
|
+
entry,
|
|
3415
|
+
batchWindow,
|
|
3284
3416
|
);
|
|
3285
3417
|
const ledgerReceiptCore = {
|
|
3286
3418
|
artifactReceiptDigest: resolved.receipt.receiptDigest,
|
|
@@ -3305,6 +3437,36 @@ export class EvolutionArtifactPorts {
|
|
|
3305
3437
|
});
|
|
3306
3438
|
}
|
|
3307
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
|
+
|
|
3308
3470
|
/** Return a frozen read-only function; it exposes no put/signing authority. */
|
|
3309
3471
|
createEvolutionLedgerArtifactResolver(options = {}) {
|
|
3310
3472
|
assertOptionalExactRecord(
|
|
@@ -3325,6 +3487,9 @@ export class EvolutionArtifactPorts {
|
|
|
3325
3487
|
const resolveReadOnly = (request) =>
|
|
3326
3488
|
this.#resolveLedgerRequest(request, normalizedPurpose);
|
|
3327
3489
|
EVOLUTION_LEDGER_ARTIFACT_RESOLVERS.add(resolveReadOnly);
|
|
3490
|
+
EVOLUTION_LEDGER_BATCH_RESOLVERS.set(resolveReadOnly, (requests) =>
|
|
3491
|
+
this.#resolveLedgerBatch(requests, normalizedPurpose),
|
|
3492
|
+
);
|
|
3328
3493
|
return Object.freeze(resolveReadOnly);
|
|
3329
3494
|
}
|
|
3330
3495
|
}
|
|
@@ -3352,4 +3517,11 @@ export function isEvolutionLedgerArtifactResolver(value) {
|
|
|
3352
3517
|
);
|
|
3353
3518
|
}
|
|
3354
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
|
+
|
|
3355
3527
|
Object.freeze(EvolutionArtifactPorts.prototype);
|