chainlesschain 0.166.22 → 0.166.25
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 +46 -3
- package/package.json +4 -3
- package/src/assets/web-panel/assets/{AIOps-oJ7USzMC.js → AIOps-RaxL_QQD.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BlgnZe_C.js → ActionButton-DD3ieFO-.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-D2rRbTLu.js → Analytics-CATDJukS.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-FwS3f0B2.js → AppLayout-BHGsnRDS.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-iF-_08Hi.js → Artifacts-BL6NunjN.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-D24p0zQw.js → Audit-D0nEWfbA.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-Cg3mRVi9.js → BackgroundAgents-BAP1MUol.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-EOqht3H-.js → Backup-R4y2OeSi.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-9XWYq2hj.js → BaseInput-ByQZ2z6S.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-Dq5yardA.js → Chat-32uV--xF.js} +4 -4
- package/src/assets/web-panel/assets/ChatBubbleRenderer-t1enanwz.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-CuyCBoBf.js → Checkbox-D1CB-7bq.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-DjWtYHNe.js → Codegen-BPx3dQ2q.js} +1 -1
- package/src/assets/web-panel/assets/{Col-CrVr_iuG.js → Col-DkPTQ2Gl.js} +1 -1
- package/src/assets/web-panel/assets/{Community-C6QxpfGc.js → Community-ZriaxRlr.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-B-v5r6Pa.js → Compact-C_qJ0P7F.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-zNiLiFgD.js → Compliance-Bgoy-saS.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-D9K7lMOu.js → Cowork-B5i9y6XK.js} +2 -2
- package/src/assets/web-panel/assets/{Cron-DAjO36z4.js → Cron-D7vBJ5-J.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-Bxqn0aqB.js → Crosschain-D4kvoGI_.js} +1 -1
- package/src/assets/web-panel/assets/{DID-DfRmLUe-.js → DID-BLOeBd-r.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-Cz8KF3fr.js → Dashboard-mecJaonC.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-C4oVfkP0.js → Dropdown-GPKwaFer.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-ivyZKN8k.js → EmailListRenderer-BML9m7Dd.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-DoxY1CPW.js → FamilyGuardDashboard-DN5bAtJC.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-C93gZxnb.js → Federation-DmD6Gecd.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-D_lEjYJE.js → FormItemContext-6wwplN_K.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BNFN9YjN.js → GenericCardRenderer-DUhpLkDL.js} +1 -1
- package/src/assets/web-panel/assets/{Git-mUu2HcLI.js → Git-eJfyXkwf.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CNuosrge.js → Governance-swAUW59x.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-DwY5pbCB.js → Inference-CbdwJPDJ.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-aRUxhACD.js → KnowledgeGraph-UuYpg1nm.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DFfsWYy_.js → Logs-CS0G057y.js} +2 -2
- package/src/assets/web-panel/assets/MarkdownRenderer-BxIIB4k3.js +1 -0
- package/src/assets/web-panel/assets/{Marketplace-COI-ciM-.js → Marketplace-CZRjuvvI.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-BJJwaIpe.js → McpTools-BOJ9A_Rf.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-CDO6SGDZ.js → Memory-BnkrR-Ok.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-BlZ5tFf4.js → MobileBridge-Do4mPi13.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-DuoxbgWz.js → MobileProjects-2JxWa6-p.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-6ec9j70b.js → Mtc-CS_mnpGd.js} +2 -2
- package/src/assets/web-panel/assets/{MtcAudit-BuL7HkC7.js → MtcAudit-DZ4J_351.js} +5 -5
- package/src/assets/web-panel/assets/{Multisig-CJxR85lk.js → Multisig-Jh74zKXu.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-B71O1S4l.js → NLProgramming-_4n2BfnS.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-Bsw5zbpV.js → Notes-CtENcKHv.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-BnAhXuK_.js → NotificationSettings-dgDCvpK9.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-BJ0R5GGz.js → OrderTableRenderer-D5VxCrmG.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-B7wwNxoP.js → Organization-CpIF8Xkd.js} +2 -2
- package/src/assets/web-panel/assets/{Overflow-CfAGr0gM.js → Overflow-aHnBZaez.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-KhMg22Fz.js → P2P-8ppzog2V.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-NdAXI9ft.js → PdhVaultBrowser-D3p1BXkp.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-CIYjqyT7.js → Permissions-D7vflD5q.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-D2ht3P_R.js → PersonalDataHub-D2hY-Ek2.js} +4 -4
- package/src/assets/web-panel/assets/{Pipeline-i6flZW1m.js → Pipeline-qK2VqhJC.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DE0lhYVc.js → Privacy-DHJr4uu0.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-BL3YbyxS.js → ProjectInit-DMBS6trm.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-CEtdg7ni.js → ProjectSettings-D3Ng74BT.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-CvtU5peJ.js → Projects-BfJFZiIW.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-DKt_Cg-j.js → Providers-DlNA95G0.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-DA61jNSx.js → QrScannerModal-CMOIYxIm.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-fS9ryUmq.js → QuickAsk-D6MyGp5I.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-CR9dZU5Y.js → Recommend-W6WcShtf.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-BV0BR2Dz.js → RemoteSession-Dm_MjlV_.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-BIeGUvYD.js → Reputation-Ctvij6eX.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DHDT1aro.js → Row-DivbeDE-.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Cq6YKb1h.js → RssFeed-D4famoAw.js} +3 -3
- package/src/assets/web-panel/assets/{Search-DEF6vsy6.js → Search-6gOAh3zG.js} +1 -1
- package/src/assets/web-panel/assets/{Security-CHtYiKY9.js → Security-DApb9kK8.js} +4 -4
- package/src/assets/web-panel/assets/{Services-u16lvBJN.js → Services-B8OomyE2.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CGbizyDj.js → Skeleton-BTJ2g2E3.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-BZMQcAa7.js → Skills-NIRr4DD1.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Bm-CycVi.js → Sla-BQHP_6px.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-BudpA5kr.js → SpeechSettings-BVQTDSVS.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-B8q1C1eC.js → SyncSettings-BOD4Mar6.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-SU1pBWc-.js → Tasks-Ciu7H2-y.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CyOfJzmt.js → Templates-CtlwavRU.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-xqWSm2GP.js → Tenant-QLWYJdL6.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-D1Ttgjsi.js → Terminal-B3q10mjm.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-Da2lYs5D.js → TimelineRenderer-CqltBA_8.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-B34-SduO.js → Tokens-CJOKrj4y.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-C8zyYm4R.js → Trigger-CPMGgfdM.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-D1Pvqems.js → Trust-DiJms7Bl.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-Do3VVnAy.js → UkeySign-rakR8eel.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-Dz7egVIA.js → VideoEditing-DAWZUM5o.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-Dcuw-OxR.js → Wallet-DqUPnl7K.js} +3 -3
- package/src/assets/web-panel/assets/{WebAuthn-DPlw-QsB.js → WebAuthn-BnVUwvMm.js} +3 -3
- package/src/assets/web-panel/assets/{WorkflowEditor-h4OsnU5q.js → WorkflowEditor-B1CAwxgs.js} +1 -1
- package/src/assets/web-panel/assets/{chat-eO9wEwrW.js → chat-k2-0Jzfy.js} +1 -1
- package/src/assets/web-panel/assets/{colors-34lSmOXw.js → colors-BAu8xBmW.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-CK4kEWJ4.js → compact-item-DMlqcdfI.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-E0A57xed.js → createContext-BU9kfiSw.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-DuGrUMAS.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-BD9ZMGAl.js → hasIn-2vacgdcl.js} +1 -1
- package/src/assets/web-panel/assets/{index--N0u6kTG.js → index-B-C-Ruft.js} +1 -1
- package/src/assets/web-panel/assets/{index-DzXjP44T.js → index-B7wDjYUd.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZBaqe3d.js → index-BMq0frKK.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrOalGut.js → index-BUX4W-2v.js} +1 -1
- package/src/assets/web-panel/assets/{index-CT1_eRL-.js → index-BZz2eB33.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrsDA_md.js → index-BblNQlaA.js} +1 -1
- package/src/assets/web-panel/assets/{index-DP-UZAQN.js → index-BdfKoqsK.js} +1 -1
- package/src/assets/web-panel/assets/{index-DiT_REby.js → index-Bf8YofPE.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cx3Jn1r0.js → index-Bn8tARil.js} +1 -1
- package/src/assets/web-panel/assets/{index-B0rkHxKK.js → index-Bpe2CJd-.js} +1 -1
- package/src/assets/web-panel/assets/{index-B_G_ElKO.js → index-BxctzdYQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-MIg5Z8qe.js → index-C24NoPpy.js} +1 -1
- package/src/assets/web-panel/assets/{index-BmNbU2Z6.js → index-C5C4kSi8.js} +1 -1
- package/src/assets/web-panel/assets/{index-BsGmo6v1.js → index-C6ICn9Y6.js} +1 -1
- package/src/assets/web-panel/assets/{index-CsrKJJcX.js → index-C8ldqZi6.js} +1 -1
- package/src/assets/web-panel/assets/{index-BbX_Dted.js → index-C9WsM29I.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ch175NUw.js → index-CONPVaxw.js} +1 -1
- package/src/assets/web-panel/assets/{index-DONOUtlz.js → index-CPyYXKFB.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFLE2qO9.js → index-CSvSf9px.js} +1 -1
- package/src/assets/web-panel/assets/{index-o8pYehRq.js → index-CXmpR6N3.js} +3 -3
- package/src/assets/web-panel/assets/{index-Cz3unNfL.js → index-Chybe7Ge.js} +1 -1
- package/src/assets/web-panel/assets/{index-yAGBu2E0.js → index-CyXmP3PW.js} +1 -1
- package/src/assets/web-panel/assets/{index-CuSau5ya.js → index-DCusBOqR.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcE1BspQ.js → index-DH01oIaj.js} +1 -1
- package/src/assets/web-panel/assets/{index-DrSAAuJj.js → index-DHg3LMNP.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZkFMeWL.js → index-DWLTSIka.js} +1 -1
- package/src/assets/web-panel/assets/{index-DvKcroix.js → index-DaUGdvtU.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bjs90Eh9.js → index-DcA-tEQd.js} +1 -1
- package/src/assets/web-panel/assets/{index-DGRxt5wj.js → index-DfWvcu4p.js} +1 -1
- package/src/assets/web-panel/assets/{index-DCn-ECvK.js → index-DmZNnZz7.js} +1 -1
- package/src/assets/web-panel/assets/index-DvFfMAux.js +1 -0
- package/src/assets/web-panel/assets/{index-8qMA1DWQ.js → index-JsyGqKmD.js} +1 -1
- package/src/assets/web-panel/assets/{index-D4bB_x_v.js → index-TtrpHmYx.js} +1 -1
- package/src/assets/web-panel/assets/{index-Brqc9Emx.js → index-Ygh0wmKz.js} +1 -1
- package/src/assets/web-panel/assets/{index-Da5fmOHB.js → index-dIYqw3f0.js} +1 -1
- package/src/assets/web-panel/assets/{index-DpfisY1g.js → index-hDHHJYno.js} +1 -1
- package/src/assets/web-panel/assets/index-n6p-1A77.js +1 -0
- package/src/assets/web-panel/assets/{index-DeXNCyQJ.js → index-oElehY4F.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcbgVLOH.js → index-z4_YwZDW.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-DMTkAomF.js → initDefaultProps-B9OXWu2e.js} +1 -1
- package/src/assets/web-panel/assets/{motion-Cnti1F5g.js → motion-IQ47MCDQ.js} +1 -1
- package/src/assets/web-panel/assets/{move-CGxmHUga.js → move-CLCU4kjV.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-CuwwLoq7.js → mtc-parser-CXnVlSPq.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BpdlTkPM.js → omit-BJjLXB0f.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-D7nWrThp.js → pickAttrs-BHdtvdy6.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-Bhx0TV8F.js → placementArrow-oq8X_Bwc.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-CZ1KesZh.js → responsiveObserve-DTD02LAO.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CnldF8J6.js → slide-DbEeq8to.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CZfo_GOA.js → statusUtils-Do2fy1CJ.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-B2QCcAv5.js → styleChecker-CFWD63T-.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-DzzjIS4J.js → useFlexGapSupport-BeozAWOo.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-B_atg9M0.js → useFs-0-rIgnBL.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DhZs3QYN.js → usePersonalDataHub-CeiNoI31.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-DcePTYAm.js → vnode-Dj0ReRNg.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-BYmlnjRk.js → zoom-DD7MC4Dy.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-knowledge.js +40 -1
- 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 +21 -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/generated/cc-agent-protocol.schema.json +3 -1
- 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 +94 -1
- package/src/lib/app-server/websocket-transport.js +15 -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 +437 -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 +32 -10
- package/src/lib/evolution/evidence-json-text.js +236 -0
- package/src/lib/evolution/evolution-artifact-ports.js +196 -21
- package/src/lib/evolution/evolution-deployment-loader.js +240 -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 +271 -37
- package/src/lib/evolution/evolution-file-witness.js +153 -30
- package/src/lib/evolution/evolution-ledger-ports.js +1219 -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-inventory.js +392 -0
- package/src/lib/evolution/governed-knowledge-dependency-ledger-executor.js +217 -82
- package/src/lib/evolution/governed-knowledge-quarantine-release.js +1013 -0
- package/src/lib/evolution/governed-knowledge-record.js +148 -0
- package/src/lib/evolution/governed-knowledge-revocation-host.js +59 -0
- package/src/lib/evolution/governed-knowledge-revocation-record.js +135 -0
- package/src/lib/evolution/governed-knowledge-skill-rollback.js +510 -0
- package/src/lib/evolution/governed-knowledge-sync.js +181 -95
- package/src/lib/evolution/governed-knowledge-wiki-tombstone.js +516 -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 +283 -0
- package/src/lib/evolution/knowledge-wiki-source-provenance.js +360 -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 +43 -3
- 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 +168 -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 +822 -101
- 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 +109 -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-loop-guard.js +113 -0
- 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 +133 -34
- package/src/runtime/agent-core.js +196 -74
- 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/ChatBubbleRenderer-Ds3pA-ET.js +0 -1
- package/src/assets/web-panel/assets/MarkdownRenderer-DqTx7_u1.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",
|
|
@@ -79,13 +90,22 @@ export const EVOLUTION_ARTIFACT_LEDGER_RETENTION_TYPES = Object.freeze([
|
|
|
79
90
|
"governed-knowledge-sync-record",
|
|
80
91
|
"governed-knowledge-merge-operation",
|
|
81
92
|
"governed-knowledge-dependency-operation",
|
|
93
|
+
"governed-knowledge-quarantine-release",
|
|
82
94
|
"governed-knowledge-trust-record",
|
|
95
|
+
"governed-skill-marketplace-state",
|
|
83
96
|
"structured-memory-authority-receipt",
|
|
84
97
|
"structured-memory-event",
|
|
85
98
|
"structured-memory-snapshot",
|
|
86
99
|
"wiki-maintenance-request",
|
|
87
100
|
"wiki-maintenance-settlement",
|
|
88
101
|
"wiki-revision",
|
|
102
|
+
"wiki-pruning-journal",
|
|
103
|
+
"wiki-pruning-retrieval-projection",
|
|
104
|
+
"wiki-skill-proposal",
|
|
105
|
+
"wikiskill-benchmark-envelope-manifest",
|
|
106
|
+
"wikiskill-benchmark-execution-manifest",
|
|
107
|
+
"wikiskill-benchmark-plan",
|
|
108
|
+
"wikiskill-benchmark-report-chunk",
|
|
89
109
|
]);
|
|
90
110
|
export const EVOLUTION_ARTIFACT_LEDGER_RETENTION_PURPOSES = Object.freeze([
|
|
91
111
|
"evolution-ledger",
|
|
@@ -101,6 +121,7 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
101
121
|
"actor",
|
|
102
122
|
"candidate",
|
|
103
123
|
"candidate-diff",
|
|
124
|
+
"controlled-skill-pilot-state",
|
|
104
125
|
"diff",
|
|
105
126
|
"eval",
|
|
106
127
|
"eval-policy",
|
|
@@ -109,7 +130,11 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
109
130
|
"evaluation",
|
|
110
131
|
"evaluation-result",
|
|
111
132
|
"evolution-run-event",
|
|
133
|
+
"evolution-eval-child-evidence",
|
|
134
|
+
"evolution-raw-deletion-receipt",
|
|
135
|
+
"evolution-raw-deletion-tombstone",
|
|
112
136
|
"evolution-release-train-checkpoint",
|
|
137
|
+
"evolution-release-train-stage-output",
|
|
113
138
|
"evolvable-artifact-candidate",
|
|
114
139
|
"evolvable-artifact-transition",
|
|
115
140
|
"evolution-workbench-metrics-receipt-retention",
|
|
@@ -117,7 +142,9 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
117
142
|
"governed-knowledge-sync-record",
|
|
118
143
|
"governed-knowledge-merge-operation",
|
|
119
144
|
"governed-knowledge-dependency-operation",
|
|
145
|
+
"governed-knowledge-quarantine-release",
|
|
120
146
|
"governed-knowledge-trust-record",
|
|
147
|
+
"governed-skill-marketplace-state",
|
|
121
148
|
"evidence",
|
|
122
149
|
"model-projection",
|
|
123
150
|
"policy",
|
|
@@ -132,9 +159,15 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
132
159
|
"skill-mutation-nonce-claim",
|
|
133
160
|
"skill-promotion-review-decision",
|
|
134
161
|
"skill-promotion-review-packet",
|
|
162
|
+
"evolution-workbench-projection",
|
|
163
|
+
"evolution-workbench-review-preparation",
|
|
164
|
+
"evolution-workbench-review-settlement",
|
|
165
|
+
"evolution-workbench-rollback-preparation",
|
|
166
|
+
"evolution-workbench-rollback-settlement",
|
|
135
167
|
"skill-registry-transition-attempt",
|
|
136
168
|
"skill-registry-transition-request",
|
|
137
169
|
"skill-registry-transition-settlement",
|
|
170
|
+
"skill-retrieval-revocation-state",
|
|
138
171
|
"skill-release-finalization",
|
|
139
172
|
"skill-release-state-migration",
|
|
140
173
|
"structured-memory-authority-receipt",
|
|
@@ -143,6 +176,13 @@ export const EVOLUTION_ARTIFACT_TYPES = Object.freeze([
|
|
|
143
176
|
"wiki-maintenance-request",
|
|
144
177
|
"wiki-maintenance-settlement",
|
|
145
178
|
"wiki-revision",
|
|
179
|
+
"wiki-pruning-journal",
|
|
180
|
+
"wiki-pruning-retrieval-projection",
|
|
181
|
+
"wiki-skill-proposal",
|
|
182
|
+
"wikiskill-benchmark-envelope-manifest",
|
|
183
|
+
"wikiskill-benchmark-execution-manifest",
|
|
184
|
+
"wikiskill-benchmark-plan",
|
|
185
|
+
"wikiskill-benchmark-report-chunk",
|
|
146
186
|
"skill-release-transition-intent",
|
|
147
187
|
"source",
|
|
148
188
|
"source-evidence",
|
|
@@ -298,6 +338,7 @@ const CONSTRUCTOR_REQUIRED_KEYS = new Set([
|
|
|
298
338
|
]);
|
|
299
339
|
const LEDGER_RESOLVER_OPTION_KEYS = new Set(["purpose"]);
|
|
300
340
|
const EVOLUTION_LEDGER_ARTIFACT_RESOLVERS = new WeakSet();
|
|
341
|
+
const EVOLUTION_LEDGER_BATCH_RESOLVERS = new WeakMap();
|
|
301
342
|
const isProxy = Object.freeze(utilTypes.isProxy.bind(utilTypes));
|
|
302
343
|
const isDate = Object.freeze(utilTypes.isDate.bind(utilTypes));
|
|
303
344
|
const dateGetTime = Object.freeze(
|
|
@@ -305,6 +346,7 @@ const dateGetTime = Object.freeze(
|
|
|
305
346
|
);
|
|
306
347
|
const RETENTION_SET = new Set(EVOLUTION_ARTIFACT_RETENTIONS);
|
|
307
348
|
const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
349
|
+
["controlled-skill-pilot-state", new Set(["evolution-ledger"])],
|
|
308
350
|
[
|
|
309
351
|
"skill-release-transition-intent",
|
|
310
352
|
new Set(["evolution-ledger", "skill-release-transition"]),
|
|
@@ -321,11 +363,23 @@ const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
|
321
363
|
],
|
|
322
364
|
["skill-promotion-review-decision", new Set(["evolution-ledger"])],
|
|
323
365
|
["skill-promotion-review-packet", new Set(["evolution-ledger"])],
|
|
366
|
+
["evolution-workbench-projection", new Set(["evolution-ledger"])],
|
|
367
|
+
["evolution-workbench-review-preparation", new Set(["evolution-ledger"])],
|
|
368
|
+
["evolution-workbench-review-settlement", new Set(["evolution-ledger"])],
|
|
369
|
+
["evolution-workbench-rollback-preparation", new Set(["evolution-ledger"])],
|
|
370
|
+
["evolution-workbench-rollback-settlement", new Set(["evolution-ledger"])],
|
|
324
371
|
["skill-registry-transition-attempt", new Set(["evolution-ledger"])],
|
|
325
372
|
["skill-registry-transition-request", new Set(["evolution-ledger"])],
|
|
326
373
|
["skill-registry-transition-settlement", new Set(["evolution-ledger"])],
|
|
374
|
+
["skill-retrieval-revocation-state", new Set(["evolution-ledger"])],
|
|
375
|
+
["wiki-pruning-journal", new Set(["evolution-ledger"])],
|
|
376
|
+
["wiki-pruning-retrieval-projection", new Set(["evolution-ledger"])],
|
|
327
377
|
["evolution-run-event", new Set(["evolution-ledger"])],
|
|
378
|
+
["evolution-eval-child-evidence", new Set(["evolution-ledger"])],
|
|
379
|
+
["evolution-raw-deletion-receipt", new Set(["evolution-ledger"])],
|
|
380
|
+
["evolution-raw-deletion-tombstone", new Set(["evolution-ledger"])],
|
|
328
381
|
["evolution-release-train-checkpoint", new Set(["evolution-ledger"])],
|
|
382
|
+
["evolution-release-train-stage-output", new Set(["evolution-ledger"])],
|
|
329
383
|
["evolvable-artifact-candidate", new Set(["evolution-ledger"])],
|
|
330
384
|
["evolvable-artifact-transition", new Set(["evolution-ledger"])],
|
|
331
385
|
[
|
|
@@ -336,8 +390,15 @@ const LEDGER_RETENTION_PURPOSES_BY_TYPE = new Map([
|
|
|
336
390
|
["governed-knowledge-sync-record", new Set(["evolution-ledger"])],
|
|
337
391
|
["governed-knowledge-merge-operation", new Set(["evolution-ledger"])],
|
|
338
392
|
["governed-knowledge-dependency-operation", new Set(["evolution-ledger"])],
|
|
393
|
+
["governed-knowledge-quarantine-release", new Set(["evolution-ledger"])],
|
|
339
394
|
["governed-knowledge-trust-record", new Set(["evolution-ledger"])],
|
|
395
|
+
["governed-skill-marketplace-state", new Set(["evolution-ledger"])],
|
|
340
396
|
["wiki-revision", new Set(["evolution-ledger"])],
|
|
397
|
+
["wiki-skill-proposal", new Set(["evolution-ledger"])],
|
|
398
|
+
["wikiskill-benchmark-envelope-manifest", new Set(["evolution-ledger"])],
|
|
399
|
+
["wikiskill-benchmark-execution-manifest", new Set(["evolution-ledger"])],
|
|
400
|
+
["wikiskill-benchmark-plan", new Set(["evolution-ledger"])],
|
|
401
|
+
["wikiskill-benchmark-report-chunk", new Set(["evolution-ledger"])],
|
|
341
402
|
["structured-memory-authority-receipt", new Set(["evolution-ledger"])],
|
|
342
403
|
["structured-memory-event", new Set(["evolution-ledger"])],
|
|
343
404
|
["structured-memory-snapshot", new Set(["evolution-ledger"])],
|
|
@@ -949,6 +1010,12 @@ function samePath(left, right) {
|
|
|
949
1010
|
: normalizedLeft === normalizedRight;
|
|
950
1011
|
}
|
|
951
1012
|
|
|
1013
|
+
// The native implementation performs the same physical canonicalization
|
|
1014
|
+
// without the JS fallback's repeated ancestor lstats (especially costly on
|
|
1015
|
+
// Windows). Identity, containment, no-link and descriptor readback checks
|
|
1016
|
+
// below remain mandatory on every access; this does not cache any pathname.
|
|
1017
|
+
const physicalRealpath = (fs.realpathSync.native ?? fs.realpathSync).bind(fs);
|
|
1018
|
+
|
|
952
1019
|
function isContained(root, candidate) {
|
|
953
1020
|
const relative = path.relative(root, candidate);
|
|
954
1021
|
return (
|
|
@@ -1017,7 +1084,7 @@ function inspectPhysicalDirectory(directory, label) {
|
|
|
1017
1084
|
try {
|
|
1018
1085
|
stat = fs.lstatSync(directory);
|
|
1019
1086
|
assertDirectory(stat, label);
|
|
1020
|
-
realPath =
|
|
1087
|
+
realPath = physicalRealpath(directory);
|
|
1021
1088
|
} catch (cause) {
|
|
1022
1089
|
if (isEvolutionArtifactPortError(cause)) throw cause;
|
|
1023
1090
|
throw artifactError(
|
|
@@ -1045,7 +1112,7 @@ function inspectPhysicalIndex(indexPath, rootRealPath) {
|
|
|
1045
1112
|
try {
|
|
1046
1113
|
pathStat = fs.lstatSync(indexPath);
|
|
1047
1114
|
assertRegularSingleLink(pathStat, "ArtifactStore index");
|
|
1048
|
-
realPath =
|
|
1115
|
+
realPath = physicalRealpath(indexPath);
|
|
1049
1116
|
if (
|
|
1050
1117
|
!samePath(realPath, indexPath) ||
|
|
1051
1118
|
!isContained(rootRealPath, realPath)
|
|
@@ -1324,7 +1391,7 @@ function readTrustedIndexSnapshot(layout) {
|
|
|
1324
1391
|
"ArtifactStore index physical identity changed",
|
|
1325
1392
|
);
|
|
1326
1393
|
}
|
|
1327
|
-
indexRealPath =
|
|
1394
|
+
indexRealPath = physicalRealpath(layout.indexPath);
|
|
1328
1395
|
if (
|
|
1329
1396
|
!samePath(indexRealPath, layout.indexRealPath) ||
|
|
1330
1397
|
!samePath(indexRealPath, layout.indexPath) ||
|
|
@@ -1381,7 +1448,7 @@ function readTrustedIndexSnapshot(layout) {
|
|
|
1381
1448
|
if (
|
|
1382
1449
|
!sameFileIdentity(beforePathStat, afterPathStat) ||
|
|
1383
1450
|
!samePhysicalIdentity(afterPathStat, layout.indexIdentity) ||
|
|
1384
|
-
!samePath(
|
|
1451
|
+
!samePath(physicalRealpath(layout.indexPath), indexRealPath)
|
|
1385
1452
|
) {
|
|
1386
1453
|
throw artifactError(
|
|
1387
1454
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2084,9 +2151,13 @@ export class EvolutionArtifactPorts {
|
|
|
2084
2151
|
}
|
|
2085
2152
|
}
|
|
2086
2153
|
|
|
2087
|
-
#assertUniqueRecordDigest(
|
|
2154
|
+
#assertUniqueRecordDigest(
|
|
2155
|
+
recordDigest,
|
|
2156
|
+
artifactId,
|
|
2157
|
+
entries = this.#boundedIndexEntries(),
|
|
2158
|
+
) {
|
|
2088
2159
|
const matches = this.#entriesByDataField(
|
|
2089
|
-
|
|
2160
|
+
entries,
|
|
2090
2161
|
"recordDigest",
|
|
2091
2162
|
recordDigest,
|
|
2092
2163
|
);
|
|
@@ -2115,6 +2186,33 @@ export class EvolutionArtifactPorts {
|
|
|
2115
2186
|
}
|
|
2116
2187
|
}
|
|
2117
2188
|
|
|
2189
|
+
#loadLedgerEntry(artifactId, recordDigest = null, snapshot = null) {
|
|
2190
|
+
// Ledger resolution is read-only. Read the already attested physical index
|
|
2191
|
+
// directly instead of invoking ArtifactStore.list/get (both acquire writer
|
|
2192
|
+
// locks). Each read/batch obtains a fresh bounded descriptor snapshot;
|
|
2193
|
+
// nothing caches index contents, signatures or current authority.
|
|
2194
|
+
const { entries } =
|
|
2195
|
+
snapshot ?? readTrustedIndexSnapshot(this.#store.layout);
|
|
2196
|
+
const matches = this.#entriesByDataField(entries, "id", artifactId);
|
|
2197
|
+
if (matches.length === 0) {
|
|
2198
|
+
throw artifactError(
|
|
2199
|
+
EVOLUTION_ARTIFACT_NOT_FOUND_CODE,
|
|
2200
|
+
"evolution artifact index entry was removed or expired",
|
|
2201
|
+
{ artifactId },
|
|
2202
|
+
);
|
|
2203
|
+
}
|
|
2204
|
+
if (matches.length !== 1) {
|
|
2205
|
+
throw artifactError(
|
|
2206
|
+
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
2207
|
+
"evolution artifact id has duplicate index rows",
|
|
2208
|
+
{ artifactId },
|
|
2209
|
+
);
|
|
2210
|
+
}
|
|
2211
|
+
if (recordDigest !== null)
|
|
2212
|
+
this.#assertUniqueRecordDigest(recordDigest, artifactId, entries);
|
|
2213
|
+
return matches[0];
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2118
2216
|
#validateLineage(value, envelope, core, envelopeDigest) {
|
|
2119
2217
|
assertExactRecord(
|
|
2120
2218
|
value,
|
|
@@ -2264,7 +2362,7 @@ export class EvolutionArtifactPorts {
|
|
|
2264
2362
|
let afterDescriptorStat;
|
|
2265
2363
|
let bytes;
|
|
2266
2364
|
try {
|
|
2267
|
-
rootRealPath =
|
|
2365
|
+
rootRealPath = physicalRealpath(filesRoot);
|
|
2268
2366
|
if (!samePath(rootRealPath, this.#store.layout.filesRealPath)) {
|
|
2269
2367
|
throw artifactError(
|
|
2270
2368
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2273,7 +2371,7 @@ export class EvolutionArtifactPorts {
|
|
|
2273
2371
|
}
|
|
2274
2372
|
beforePathStat = fs.lstatSync(resolvedStoredPath);
|
|
2275
2373
|
assertRegularSingleLink(beforePathStat, "stored artifact path");
|
|
2276
|
-
targetRealPath =
|
|
2374
|
+
targetRealPath = physicalRealpath(resolvedStoredPath);
|
|
2277
2375
|
if (!isContained(rootRealPath, targetRealPath)) {
|
|
2278
2376
|
throw artifactError(
|
|
2279
2377
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2323,7 +2421,7 @@ export class EvolutionArtifactPorts {
|
|
|
2323
2421
|
"stored artifact pathname changed during readback",
|
|
2324
2422
|
);
|
|
2325
2423
|
}
|
|
2326
|
-
const afterRealPath =
|
|
2424
|
+
const afterRealPath = physicalRealpath(resolvedStoredPath);
|
|
2327
2425
|
if (!samePath(targetRealPath, afterRealPath)) {
|
|
2328
2426
|
throw artifactError(
|
|
2329
2427
|
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
@@ -2798,14 +2896,21 @@ export class EvolutionArtifactPorts {
|
|
|
2798
2896
|
options,
|
|
2799
2897
|
artifactId,
|
|
2800
2898
|
preauthenticated = null,
|
|
2899
|
+
ledgerRead = false,
|
|
2900
|
+
capturedLedgerEntry = null,
|
|
2901
|
+
batchWindow = null,
|
|
2801
2902
|
) {
|
|
2802
2903
|
const authentication =
|
|
2803
2904
|
preauthenticated || this.#authenticateEnvelope(envelope, options);
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2905
|
+
if (!ledgerRead)
|
|
2906
|
+
this.#assertUniqueRecordDigest(
|
|
2907
|
+
authentication.core.recordDigest,
|
|
2908
|
+
artifactId,
|
|
2909
|
+
);
|
|
2910
|
+
const entry = ledgerRead
|
|
2911
|
+
? (capturedLedgerEntry ??
|
|
2912
|
+
this.#loadLedgerEntry(artifactId, authentication.core.recordDigest))
|
|
2913
|
+
: this.#loadCurrentEntryById(artifactId);
|
|
2809
2914
|
const normalizedEntry = this.#validateIndexEntry(
|
|
2810
2915
|
entry,
|
|
2811
2916
|
envelope,
|
|
@@ -2824,11 +2929,25 @@ export class EvolutionArtifactPorts {
|
|
|
2824
2929
|
authentication.core.recordDigest,
|
|
2825
2930
|
);
|
|
2826
2931
|
const record = this.#parseRecordBytes(bytes, authentication.core);
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2932
|
+
if (ledgerRead && batchWindow === null) {
|
|
2933
|
+
const after = this.#loadLedgerEntry(
|
|
2934
|
+
artifactId,
|
|
2935
|
+
authentication.core.recordDigest,
|
|
2936
|
+
);
|
|
2937
|
+
if (canonicalJson(after) !== canonicalJson(entry)) {
|
|
2938
|
+
throw artifactError(
|
|
2939
|
+
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
2940
|
+
"ArtifactStore index entry was replaced during ledger readback",
|
|
2941
|
+
{ artifactId },
|
|
2942
|
+
);
|
|
2943
|
+
}
|
|
2944
|
+
} else if (!ledgerRead) {
|
|
2945
|
+
this.#assertEntryStable(artifactId, entry);
|
|
2946
|
+
this.#assertUniqueRecordDigest(
|
|
2947
|
+
authentication.core.recordDigest,
|
|
2948
|
+
artifactId,
|
|
2949
|
+
);
|
|
2950
|
+
}
|
|
2832
2951
|
const releaseClock = this.#clock();
|
|
2833
2952
|
if (
|
|
2834
2953
|
releaseClock.milliseconds <
|
|
@@ -2868,6 +2987,13 @@ export class EvolutionArtifactPorts {
|
|
|
2868
2987
|
...receiptCore,
|
|
2869
2988
|
receiptDigest: domainDigest(RESOLUTION_RECEIPT_DOMAIN, receiptCore),
|
|
2870
2989
|
});
|
|
2990
|
+
batchWindow?.push({
|
|
2991
|
+
checkedAt: releaseClock.milliseconds,
|
|
2992
|
+
expiresAt: Math.min(
|
|
2993
|
+
authentication.core.expiresAtMs ?? Infinity,
|
|
2994
|
+
authentication.authority.decisionExpiresAtMs,
|
|
2995
|
+
),
|
|
2996
|
+
});
|
|
2871
2997
|
return {
|
|
2872
2998
|
artifactRef,
|
|
2873
2999
|
authentication,
|
|
@@ -3221,7 +3347,7 @@ export class EvolutionArtifactPorts {
|
|
|
3221
3347
|
});
|
|
3222
3348
|
}
|
|
3223
3349
|
|
|
3224
|
-
#resolveLedgerRequest(request, purpose) {
|
|
3350
|
+
#resolveLedgerRequest(request, purpose, snapshot = null, batchWindow = null) {
|
|
3225
3351
|
assertExactRecord(
|
|
3226
3352
|
request,
|
|
3227
3353
|
LEDGER_REQUEST_KEYS,
|
|
@@ -3248,7 +3374,7 @@ export class EvolutionArtifactPorts {
|
|
|
3248
3374
|
const artifactRef = normalizeArtifactRef(
|
|
3249
3375
|
ownData(request, "ref", "evolution ledger artifact request"),
|
|
3250
3376
|
);
|
|
3251
|
-
const entry = this.#
|
|
3377
|
+
const entry = this.#loadLedgerEntry(artifactRef.artifactId, null, snapshot);
|
|
3252
3378
|
assertExactRecord(
|
|
3253
3379
|
entry,
|
|
3254
3380
|
INDEX_ENTRY_KEYS,
|
|
@@ -3276,11 +3402,20 @@ export class EvolutionArtifactPorts {
|
|
|
3276
3402
|
tenantId: this.#tenantId,
|
|
3277
3403
|
});
|
|
3278
3404
|
const authentication = this.#authenticateEnvelope(envelope, options);
|
|
3405
|
+
if (snapshot !== null)
|
|
3406
|
+
this.#assertUniqueRecordDigest(
|
|
3407
|
+
authentication.core.recordDigest,
|
|
3408
|
+
artifactRef.artifactId,
|
|
3409
|
+
snapshot.entries,
|
|
3410
|
+
);
|
|
3279
3411
|
const resolved = this.#resolveAuthenticatedEntry(
|
|
3280
3412
|
envelope,
|
|
3281
3413
|
options,
|
|
3282
3414
|
artifactRef.artifactId,
|
|
3283
3415
|
authentication,
|
|
3416
|
+
true,
|
|
3417
|
+
entry,
|
|
3418
|
+
batchWindow,
|
|
3284
3419
|
);
|
|
3285
3420
|
const ledgerReceiptCore = {
|
|
3286
3421
|
artifactReceiptDigest: resolved.receipt.receiptDigest,
|
|
@@ -3305,6 +3440,36 @@ export class EvolutionArtifactPorts {
|
|
|
3305
3440
|
});
|
|
3306
3441
|
}
|
|
3307
3442
|
|
|
3443
|
+
#resolveLedgerBatch(input, purpose) {
|
|
3444
|
+
assertDenseDataArray(input, "ledger artifact batch", 128);
|
|
3445
|
+
const requests = frozenCanonicalClone(input);
|
|
3446
|
+
const snapshot = readTrustedIndexSnapshot(this.#store.layout);
|
|
3447
|
+
const window = [];
|
|
3448
|
+
const results = requests.map((request) =>
|
|
3449
|
+
this.#resolveLedgerRequest(request, purpose, snapshot, window),
|
|
3450
|
+
);
|
|
3451
|
+
// One bounded synchronous read, not a cache: every envelope/current
|
|
3452
|
+
// authority and payload is authenticated individually. Re-attest the full
|
|
3453
|
+
// index after ALL reads, and all decision leases before releasing bytes.
|
|
3454
|
+
const after = readTrustedIndexSnapshot(this.#store.layout);
|
|
3455
|
+
if (after.bytesDigest !== snapshot.bytesDigest)
|
|
3456
|
+
throw artifactError(
|
|
3457
|
+
EVOLUTION_ARTIFACT_INTEGRITY_FAILED_CODE,
|
|
3458
|
+
"ArtifactStore index changed during ledger batch readback",
|
|
3459
|
+
);
|
|
3460
|
+
const completed = this.#clock().milliseconds;
|
|
3461
|
+
if (
|
|
3462
|
+
window.some(
|
|
3463
|
+
(entry) => completed < entry.checkedAt || completed >= entry.expiresAt,
|
|
3464
|
+
)
|
|
3465
|
+
)
|
|
3466
|
+
throw artifactError(
|
|
3467
|
+
EVOLUTION_ARTIFACT_EXPIRED_CODE,
|
|
3468
|
+
"artifact authority expired before ledger batch release",
|
|
3469
|
+
);
|
|
3470
|
+
return Object.freeze(results);
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3308
3473
|
/** Return a frozen read-only function; it exposes no put/signing authority. */
|
|
3309
3474
|
createEvolutionLedgerArtifactResolver(options = {}) {
|
|
3310
3475
|
assertOptionalExactRecord(
|
|
@@ -3325,6 +3490,9 @@ export class EvolutionArtifactPorts {
|
|
|
3325
3490
|
const resolveReadOnly = (request) =>
|
|
3326
3491
|
this.#resolveLedgerRequest(request, normalizedPurpose);
|
|
3327
3492
|
EVOLUTION_LEDGER_ARTIFACT_RESOLVERS.add(resolveReadOnly);
|
|
3493
|
+
EVOLUTION_LEDGER_BATCH_RESOLVERS.set(resolveReadOnly, (requests) =>
|
|
3494
|
+
this.#resolveLedgerBatch(requests, normalizedPurpose),
|
|
3495
|
+
);
|
|
3328
3496
|
return Object.freeze(resolveReadOnly);
|
|
3329
3497
|
}
|
|
3330
3498
|
}
|
|
@@ -3352,4 +3520,11 @@ export function isEvolutionLedgerArtifactResolver(value) {
|
|
|
3352
3520
|
);
|
|
3353
3521
|
}
|
|
3354
3522
|
|
|
3523
|
+
export function captureEvolutionLedgerBatchResolver(value) {
|
|
3524
|
+
const resolve = EVOLUTION_LEDGER_BATCH_RESOLVERS.get(value);
|
|
3525
|
+
if (!resolve)
|
|
3526
|
+
throw new TypeError("a branded ledger artifact resolver is required");
|
|
3527
|
+
return resolve;
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3355
3530
|
Object.freeze(EvolutionArtifactPorts.prototype);
|