chainlesschain 0.166.65 → 0.166.69
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 +20 -12
- package/package.json +4 -4
- package/src/assets/web-panel/assets/{AIOps-Byz17CTN.js → AIOps-FhevRfL6.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-C5LiW2-J.js → ActionButton-rOeOykx5.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-D1INcvZF.js → Analytics-BK_wYlfz.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-DZzHO1VV.js → AppLayout-_2cCtZKV.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-WfYQL6Ia.js → Artifacts-D5MSvVzk.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-DohBoGWO.js → Audit-yd-Ah-A3.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-Chtk-Hde.js → BackgroundAgents-yCaw_Gu_.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-B813PuMz.js → Backup-G3ADD4N-.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-DaDdWWgK.js → BaseInput-ByDhkLbF.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-D4pJ6oZ7.js → Chat-BMrc7qjz.js} +4 -4
- package/src/assets/web-panel/assets/ChatBubbleRenderer-nA7n0I6S.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-Clo9TvO6.js → Checkbox-BHYgyZWA.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-uejLg8Ih.js → Codegen-DJfcy0jC.js} +1 -1
- package/src/assets/web-panel/assets/{Col-B7nbx-iJ.js → Col-C27zROxc.js} +1 -1
- package/src/assets/web-panel/assets/{Community-FEyjPK1j.js → Community-CuS5tq_1.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-B6Fk0Kn6.js → Compact-BrYJNe7Q.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-BQG8goUl.js → Compliance-8hfahYHT.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CbBeEfHp.js → Cowork-DdE0n2lp.js} +2 -2
- package/src/assets/web-panel/assets/{Cron-DPzlFcEZ.js → Cron-CUq3aSiX.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-B8pWJrbg.js → Crosschain-BM4XSPWG.js} +1 -1
- package/src/assets/web-panel/assets/{DID-gGQHUlFN.js → DID-CdaBY57N.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-C2TMFHrn.js → Dashboard-Cwtd52So.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-BVPxGbll.js → Dropdown-BvlObh6U.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-CNPxs0hd.js → EmailListRenderer-e3fLhjnX.js} +1 -1
- package/src/assets/web-panel/assets/{EvolutionSettings-_XTiB7q1.js → EvolutionSettings-CTtk1Zo8.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-UyE3VWtI.js → FamilyGuardDashboard-BpPJUnCU.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-CLt6FHK-.js → Federation-vzjZ6_nQ.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-CdNQPRPw.js → FormItemContext-DEDNLhkE.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BJ0AMhrh.js → GenericCardRenderer-DEl2Te5f.js} +1 -1
- package/src/assets/web-panel/assets/{Git-CQnvMfOM.js → Git-BzsYQnCq.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-deYsHC-o.js → Governance-zxJs6Y8s.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-qaSck43z.js → Inference-5JUsrmF1.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-De0aJ3Ls.js → KnowledgeGraph-Br8b5Htz.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-ZtS98jCm.js → Logs-D-tubDMJ.js} +2 -2
- package/src/assets/web-panel/assets/MarkdownRenderer-In4itZX2.js +1 -0
- package/src/assets/web-panel/assets/{Marketplace-Byz3xCBN.js → Marketplace-s8MmWkS9.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-DOZUUW6z.js → McpTools-Wu-WRg4M.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-C33wC2hA.js → Memory-B_i-eX9w.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-zZe-T_6M.js → MobileBridge-Ca64kjVx.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-CRnUIume.js → MobileProjects-Cq9AFiO4.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-C1xlRVAN.js → Mtc-DKvGmG3y.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-D0U07bIi.js → MtcAudit-BVvWx8pF.js} +2 -2
- package/src/assets/web-panel/assets/{Multisig-DF8uvV3h.js → Multisig-wqeJ2O9x.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-bBPGAFlt.js → NLProgramming-DX87ysYu.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-BHAaOsgg.js → Notes-ChenGdu0.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-Cl0fG_rA.js → NotificationSettings-BZRa68-x.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-BEPAs8Zv.js → OrderTableRenderer-DZ6xG1M6.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-BAxSwgk5.js → Organization-BWJp4VPX.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-D68KubAu.js → Overflow-BoM4bYt5.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-bhdT17zk.js → P2P-Cvi8YV09.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-DqaO6wgH.js → PdhVaultBrowser-CNVC1NIj.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-Bq8fvkak.js → Permissions-DNd1MRjW.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-BYd2JEic.js → PersonalDataHub-DGSBYZ5-.js} +5 -5
- package/src/assets/web-panel/assets/{Pipeline-Csg_ja69.js → Pipeline-DkcoGMBo.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-lwxwLj4M.js → Privacy-DltwvMAW.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-BdBZkH8z.js → ProjectInit-ChYbpHg8.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-ClWgFy-K.js → ProjectSettings-B8FWiHTJ.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-Bu-qj8N1.js → Projects-DuyhtSm4.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-DEjxrxw3.js → Providers-Bo18Tx_6.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-eccy-8Vi.js → QrScannerModal-6W85KlsG.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-Vx3uDvFg.js → QuickAsk-DznRUedP.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-CfUivNps.js → Recommend-CQDN3_p-.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-BU4gk7GI.js → RemoteSession-CiJgokEj.js} +3 -3
- package/src/assets/web-panel/assets/{Reputation-CbPzdZ0C.js → Reputation-DexzGH7E.js} +1 -1
- package/src/assets/web-panel/assets/{Row-CYLrgfKA.js → Row-BgZOIvSi.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-DbY1oyuv.js → RssFeed-BWIZJ_Jr.js} +3 -3
- package/src/assets/web-panel/assets/{Search-QeW41K5r.js → Search-B376EwWJ.js} +1 -1
- package/src/assets/web-panel/assets/{Security-CJxf1kLZ.js → Security-92mUR5OD.js} +4 -4
- package/src/assets/web-panel/assets/{Services-CFO9ySZc.js → Services-ClSEAOHk.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CQFjeQN0.js → Skeleton-DVhLbv99.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-CLLB4INW.js → Skills-JTcXs_xI.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-DxeLIJk0.js → Sla-DnKY9zy9.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-D4FA9KYI.js → SpeechSettings-GO1JefAH.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-C6NOkcQK.js → SyncSettings-jX5tB2St.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-LmVPWDfQ.js → Tasks-BxRBzhUc.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-BdEfUoVB.js → Templates-CAVkbTG1.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-IUlESacN.js → Tenant-5Y7sHBkz.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-B9pDe7sn.js → Terminal-CbbLShYb.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-ZCwB-Pki.js → TimelineRenderer-2HptWihL.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-4qk16LX1.js → Tokens-B-jGxzHl.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-jXNyargn.js → Trigger-9DGa90DT.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-D13PydtT.js → Trust-BSJEkEOO.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-yPgws6mS.js → UkeySign-C807So5R.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-B329WjpG.js → VideoEditing-ByiieAv-.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-T8VM-Ttm.js → Wallet-BixbIOUv.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-XuRibrpP.js → WebAuthn-z7akhor4.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-D1Gwz3YR.js → WorkflowEditor-KvijuUuR.js} +1 -1
- package/src/assets/web-panel/assets/{chat-DjydtnT-.js → chat-BYKoh0YG.js} +1 -1
- package/src/assets/web-panel/assets/{colors-gFtBvPrr.js → colors-CLT8IYBt.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-CndxhGfx.js → compact-item-DlBIyYHF.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-DnfGpd0L.js → createContext-5XmAnNLr.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-BmcCIHwY.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-CmT5hRVW.js → hasIn-rPdRhm7K.js} +1 -1
- package/src/assets/web-panel/assets/{index-DoBKSzqu.js → index-8un-eUDI.js} +1 -1
- package/src/assets/web-panel/assets/{index-DGbKeg8G.js → index-B-0nAxf5.js} +1 -1
- package/src/assets/web-panel/assets/{index-DreYqebI.js → index-B1VfBUPB.js} +1 -1
- package/src/assets/web-panel/assets/{index-zQf599Uq.js → index-BBt2CSAx.js} +1 -1
- package/src/assets/web-panel/assets/{index-BlTcxT_L.js → index-BDtlwjSr.js} +1 -1
- package/src/assets/web-panel/assets/{index-CqpR0Des.js → index-BIRl2Ii5.js} +1 -1
- package/src/assets/web-panel/assets/{index-C3HvYeA3.js → index-BgevTkUv.js} +1 -1
- package/src/assets/web-panel/assets/{index-B0WFjxWs.js → index-Bve7Wsgf.js} +1 -1
- package/src/assets/web-panel/assets/{index-BNHdO6Jr.js → index-Bzd0sFkp.js} +1 -1
- package/src/assets/web-panel/assets/{index-DV2PR3Fa.js → index-C2sFDVb_.js} +1 -1
- package/src/assets/web-panel/assets/{index-D2d7358Y.js → index-CErvHCDe.js} +1 -1
- package/src/assets/web-panel/assets/{index-DaEPE2DC.js → index-CM_a9spK.js} +1 -1
- package/src/assets/web-panel/assets/{index-DKyuE_Y2.js → index-CY6TMc2m.js} +1 -1
- package/src/assets/web-panel/assets/{index-BVM_w30N.js → index-ChlzaTV3.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZLDbPTa.js → index-CsnbOKdI.js} +1 -1
- package/src/assets/web-panel/assets/{index-HHP1zzo7.js → index-D3-NL-x-.js} +1 -1
- package/src/assets/web-panel/assets/{index-BFif4Cev.js → index-D3f9Jzx2.js} +1 -1
- package/src/assets/web-panel/assets/{index-C14jryXi.js → index-DCDSycWo.js} +1 -1
- package/src/assets/web-panel/assets/{index-CB27echm.js → index-DIVrVGvf.js} +1 -1
- package/src/assets/web-panel/assets/{index-BGlmPbl_.js → index-DI_tYFBe.js} +1 -1
- package/src/assets/web-panel/assets/{index-BsRKmb6k.js → index-DPS4mWnI.js} +1 -1
- package/src/assets/web-panel/assets/{index-BXNUTiW8.js → index-DTslLzPJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dbpk75MO.js → index-DW8vozBS.js} +1 -1
- package/src/assets/web-panel/assets/index-DY8rmd6x.js +1 -0
- package/src/assets/web-panel/assets/{index-DjY-3sMA.js → index-DZiSMYoD.js} +3 -3
- package/src/assets/web-panel/assets/{index-DV6NrfJx.js → index-DZjGcIGU.js} +1 -1
- package/src/assets/web-panel/assets/{index-ktN-K1Tf.js → index-Dea32nOK.js} +1 -1
- package/src/assets/web-panel/assets/{index-DjcR-CwS.js → index-Djd7uqwM.js} +1 -1
- package/src/assets/web-panel/assets/{index-CuOx4Pbe.js → index-Dntid6oj.js} +1 -1
- package/src/assets/web-panel/assets/{index-BW3nWiu0.js → index-DqZU4_7J.js} +1 -1
- package/src/assets/web-panel/assets/{index-C4Mqhmas.js → index-DuvweiCz.js} +1 -1
- package/src/assets/web-panel/assets/{index-CRqz8TtI.js → index-DzExCCLS.js} +1 -1
- package/src/assets/web-panel/assets/{index-D5na0B7G.js → index-LKT-Ol0A.js} +1 -1
- package/src/assets/web-panel/assets/{index-_-wGLtAg.js → index-akwXS-FF.js} +1 -1
- package/src/assets/web-panel/assets/{index-CgMKElUh.js → index-b-rQCMkx.js} +1 -1
- package/src/assets/web-panel/assets/{index-DUlubR4l.js → index-eHbr3f5I.js} +1 -1
- package/src/assets/web-panel/assets/{index-D88-8bsB.js → index-kx6zDWew.js} +1 -1
- package/src/assets/web-panel/assets/{index-DuAvYTmY.js → index-rRuCGdKW.js} +1 -1
- package/src/assets/web-panel/assets/index-sbwcUeRS.js +1 -0
- package/src/assets/web-panel/assets/{initDefaultProps-KV3V-PNH.js → initDefaultProps-a8411LiK.js} +1 -1
- package/src/assets/web-panel/assets/{motion-PFGQg7_X.js → motion-oVcQdpCm.js} +1 -1
- package/src/assets/web-panel/assets/{move-Dnl79wq4.js → move-B-eyzzzL.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-Bwl5JH9V.js → mtc-parser-BCYIxuG7.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DCcTtM1l.js → omit-DuFtWiYh.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-Cl6BjjDf.js → pickAttrs-CVAoJhGu.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-fdqhyo42.js → placementArrow-Y2iub2bO.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-DYQpmcDW.js → responsiveObserve-BHenWIVD.js} +1 -1
- package/src/assets/web-panel/assets/{slide-C4l-VfO4.js → slide-CKrMaL29.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-DYDw_dyZ.js → statusUtils-w8eb_1da.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-BEsubSMu.js → styleChecker-CCVi_Ww3.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-Cj82ggQ_.js → useFlexGapSupport-BsmR_q0r.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-B7L1eJ0V.js → useFs-a8GMBjnc.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DVlJVD4d.js → usePersonalDataHub-BMUYSPn-.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-BBAbRN_Y.js → vnode-DL2pI31V.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-BYn48q-I.js → zoom-Cbi8fISi.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/data/changelog.json +33 -7
- package/src/lib/dependency-install-policy.js +1 -1
- package/src/lib/evolution/browser-download-action-authority.js +747 -0
- package/src/lib/evolution/browser-download-artifact-disposal-authority.js +436 -0
- package/src/lib/evolution/browser-filesystem-quarantine-custody.js +2453 -0
- package/src/lib/evolution/browser-filesystem-quarantine-disposal.js +36 -0
- package/src/lib/evolution/browser-keyboard-action-authority.js +560 -0
- package/src/lib/evolution/browser-navigation-action-authority.js +546 -0
- package/src/lib/evolution/browser-quarantine-lock-maintenance-authority.js +573 -0
- package/src/lib/evolution/browser-quarantine-operator-revocation-authority.js +442 -0
- package/src/lib/evolution/browser-quarantine-retention-authority.js +503 -0
- package/src/lib/evolution/browser-quarantine-retention-scheduler.js +207 -0
- package/src/lib/evolution/browser-quarantined-download-executor.js +525 -0
- package/src/lib/evolution/browser-tab-open-action-authority.js +491 -0
- package/src/lib/evolution/browser-vision-action-authority.js +444 -0
- package/src/lib/evolution/browser-vision-observation-authority.js +304 -0
- package/src/lib/evolution/evolution-deployment-loader.js +241 -1
- package/src/lib/evolution/evolution-eval-child-evidence-ledger-adapter.js +5 -0
- package/src/lib/evolution/evolution-eval-gate.js +2 -1
- package/src/lib/evolution/evolution-eval-process-supervisor-worker.mjs +71 -9
- package/src/lib/evolution/evolution-eval-process-supervisor.js +276 -9
- package/src/lib/evolution/evolution-workbench-metrics.js +81 -21
- package/src/lib/evolution/pm-exploration-benchmark.js +747 -0
- package/src/lib/evolution/pm-exploration-budget-executor.js +106 -9
- package/src/lib/evolution/pm-exploration-egress-authority.js +382 -0
- package/src/lib/evolution/pm-exploration-evidence-bundle.js +149 -44
- package/src/lib/evolution/pm-exploration-execution-host.js +1254 -8
- package/src/lib/evolution/pm-exploration-process-grader.js +458 -0
- package/src/lib/evolution/pm-exploration-process-reviewer.js +456 -0
- package/src/lib/evolution/pm-exploration-process-runner.js +500 -0
- package/src/lib/evolution/pm-exploration-receipts.js +211 -11
- package/src/lib/evolution/pm-exploration-recovery-snapshot-store.js +465 -46
- package/src/lib/evolution/pm-exploration-transition-committer.js +185 -34
- package/src/lib/evolution/skill-outcome-index-authority.js +7 -3
- package/src/lib/evolution/skill-writer-inventory-manifest.js +0 -39
- package/src/lib/evolution/volcengine-function-execution-authority.js +2949 -0
- package/src/lib/evolution/volcengine-function-process-executor.js +615 -0
- package/src/lib/evolution/volcengine-function-replay-store.js +836 -0
- package/src/lib/evolution/volcengine-function-revocation-status-floor-store.js +480 -0
- package/src/lib/governance-coverage.js +1 -1
- package/src/lib/headless-manifest.js +1 -1
- package/src/lib/protocol-replay.js +1 -1
- package/src/lib/skill-outcome-transcript-authority.js +45 -5
- package/src/runtime/agent-core.js +17 -0
- package/src/assets/web-panel/assets/ChatBubbleRenderer-Cf3LLgDc.js +0 -1
- package/src/assets/web-panel/assets/MarkdownRenderer-CTsYo9NN.js +0 -1
- package/src/assets/web-panel/assets/devWarning-D60SbiD-.js +0 -1
- package/src/assets/web-panel/assets/index-C0yR4_7h.js +0 -1
- package/src/assets/web-panel/assets/index-D4xuvo03.js +0 -1
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { types } from "node:util";
|
|
3
|
+
|
|
4
|
+
export const BROWSER_VISION_OBSERVATION_AUTHORITY_DESCRIPTOR_SCHEMA =
|
|
5
|
+
"chainlesschain.browser-vision-observation-authority-descriptor/v1";
|
|
6
|
+
export const BROWSER_VISION_OBSERVATION_REQUEST_SCHEMA =
|
|
7
|
+
"chainlesschain.browser-vision-observation-request/v1";
|
|
8
|
+
export const BROWSER_VISION_OBSERVATION_RECEIPT_SCHEMA =
|
|
9
|
+
"chainlesschain.browser-vision-observation-receipt/v1";
|
|
10
|
+
|
|
11
|
+
const DIGEST = /^sha256:[a-f0-9]{64}$/u;
|
|
12
|
+
const ID = /^[A-Za-z0-9._:-]{1,128}$/u;
|
|
13
|
+
const OPERATIONS = new Set(["analyze", "locate", "compare", "describe", "ocr"]);
|
|
14
|
+
const authorities = new WeakMap();
|
|
15
|
+
|
|
16
|
+
function canonical(value) {
|
|
17
|
+
if (value === null || typeof value === "boolean")
|
|
18
|
+
return JSON.stringify(value);
|
|
19
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
20
|
+
return JSON.stringify(value);
|
|
21
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
22
|
+
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
23
|
+
return `{${Object.keys(value)
|
|
24
|
+
.sort()
|
|
25
|
+
.map((key) => `${JSON.stringify(key)}:${canonical(value[key])}`)
|
|
26
|
+
.join(",")}}`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function digest(domain, value) {
|
|
30
|
+
return `sha256:${createHash("sha256")
|
|
31
|
+
.update(`${domain}\0`)
|
|
32
|
+
.update(canonical(value))
|
|
33
|
+
.digest("hex")}`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function exactObject(value, keys, label) {
|
|
37
|
+
if (
|
|
38
|
+
!value ||
|
|
39
|
+
typeof value !== "object" ||
|
|
40
|
+
Array.isArray(value) ||
|
|
41
|
+
types.isProxy(value) ||
|
|
42
|
+
![Object.prototype, null].includes(Object.getPrototypeOf(value)) ||
|
|
43
|
+
Object.keys(value).sort().join("\0") !== [...keys].sort().join("\0")
|
|
44
|
+
) {
|
|
45
|
+
throw new TypeError(`${label} has an invalid shape`);
|
|
46
|
+
}
|
|
47
|
+
for (const key of keys) {
|
|
48
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
49
|
+
if (!descriptor?.enumerable || !("value" in descriptor))
|
|
50
|
+
throw new TypeError(`${label} must contain plain data`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function snapshotJson(value, label) {
|
|
55
|
+
let nodes = 0;
|
|
56
|
+
const visit = (entry, depth) => {
|
|
57
|
+
if (++nodes > 2048 || depth > 12)
|
|
58
|
+
throw new TypeError(`${label} exceeds its structure budget`);
|
|
59
|
+
if (
|
|
60
|
+
entry === null ||
|
|
61
|
+
typeof entry === "boolean" ||
|
|
62
|
+
(typeof entry === "number" && Number.isFinite(entry)) ||
|
|
63
|
+
typeof entry === "string"
|
|
64
|
+
) {
|
|
65
|
+
return entry;
|
|
66
|
+
}
|
|
67
|
+
if (
|
|
68
|
+
!entry ||
|
|
69
|
+
typeof entry !== "object" ||
|
|
70
|
+
types.isProxy(entry) ||
|
|
71
|
+
![Object.prototype, null, Array.prototype].includes(
|
|
72
|
+
Object.getPrototypeOf(entry),
|
|
73
|
+
)
|
|
74
|
+
) {
|
|
75
|
+
throw new TypeError(`${label} must be finite plain JSON data`);
|
|
76
|
+
}
|
|
77
|
+
if (Array.isArray(entry))
|
|
78
|
+
return Object.freeze(entry.map((v) => visit(v, depth + 1)));
|
|
79
|
+
const output = {};
|
|
80
|
+
for (const key of Object.keys(entry)) {
|
|
81
|
+
const descriptor = Object.getOwnPropertyDescriptor(entry, key);
|
|
82
|
+
if (!descriptor?.enumerable || !("value" in descriptor))
|
|
83
|
+
throw new TypeError(`${label} must contain plain data`);
|
|
84
|
+
output[key] = visit(descriptor.value, depth + 1);
|
|
85
|
+
}
|
|
86
|
+
return Object.freeze(output);
|
|
87
|
+
};
|
|
88
|
+
const snapshot = visit(value, 0);
|
|
89
|
+
if (Buffer.byteLength(canonical(snapshot), "utf8") > 16 * 1024)
|
|
90
|
+
throw new TypeError(`${label} exceeds its byte budget`);
|
|
91
|
+
return snapshot;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function normalizeDescriptor(value) {
|
|
95
|
+
const keys = [
|
|
96
|
+
"schema",
|
|
97
|
+
"authorityId",
|
|
98
|
+
"tenantId",
|
|
99
|
+
"handlerArtifactDigest",
|
|
100
|
+
"policyRevision",
|
|
101
|
+
"maxGrantTtlMs",
|
|
102
|
+
];
|
|
103
|
+
exactObject(value, keys, "browser vision authority descriptor");
|
|
104
|
+
if (
|
|
105
|
+
value.schema !== BROWSER_VISION_OBSERVATION_AUTHORITY_DESCRIPTOR_SCHEMA ||
|
|
106
|
+
!ID.test(value.authorityId) ||
|
|
107
|
+
!ID.test(value.tenantId) ||
|
|
108
|
+
!DIGEST.test(value.handlerArtifactDigest) ||
|
|
109
|
+
!ID.test(value.policyRevision) ||
|
|
110
|
+
!Number.isSafeInteger(value.maxGrantTtlMs) ||
|
|
111
|
+
value.maxGrantTtlMs < 1 ||
|
|
112
|
+
value.maxGrantTtlMs > 60_000
|
|
113
|
+
) {
|
|
114
|
+
throw new TypeError("browser vision authority descriptor is invalid");
|
|
115
|
+
}
|
|
116
|
+
return Object.freeze({ ...value });
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function normalizeRequest(value) {
|
|
120
|
+
const keys = [
|
|
121
|
+
"schema",
|
|
122
|
+
"requestId",
|
|
123
|
+
"targetId",
|
|
124
|
+
"operation",
|
|
125
|
+
"senderId",
|
|
126
|
+
"frameUrlDigest",
|
|
127
|
+
"inputDigest",
|
|
128
|
+
"authorization",
|
|
129
|
+
"requestedAt",
|
|
130
|
+
];
|
|
131
|
+
exactObject(value, keys, "browser vision observation request");
|
|
132
|
+
const requestedAtMs = Date.parse(value.requestedAt);
|
|
133
|
+
if (
|
|
134
|
+
value.schema !== BROWSER_VISION_OBSERVATION_REQUEST_SCHEMA ||
|
|
135
|
+
!ID.test(value.requestId) ||
|
|
136
|
+
typeof value.targetId !== "string" ||
|
|
137
|
+
value.targetId.length < 1 ||
|
|
138
|
+
value.targetId.length > 512 ||
|
|
139
|
+
!OPERATIONS.has(value.operation) ||
|
|
140
|
+
!Number.isSafeInteger(value.senderId) ||
|
|
141
|
+
value.senderId < 1 ||
|
|
142
|
+
!DIGEST.test(value.frameUrlDigest) ||
|
|
143
|
+
!DIGEST.test(value.inputDigest) ||
|
|
144
|
+
!Number.isFinite(requestedAtMs)
|
|
145
|
+
) {
|
|
146
|
+
throw new TypeError("browser vision observation request is invalid");
|
|
147
|
+
}
|
|
148
|
+
const authorization = snapshotJson(
|
|
149
|
+
value.authorization,
|
|
150
|
+
"browser vision observation authorization",
|
|
151
|
+
);
|
|
152
|
+
return Object.freeze({ ...value, authorization, requestedAtMs });
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function requestEvidence(request) {
|
|
156
|
+
const authorizationDigest = digest(
|
|
157
|
+
"chainlesschain.browser-vision-observation-authorization/v1",
|
|
158
|
+
request.authorization,
|
|
159
|
+
);
|
|
160
|
+
const core = {
|
|
161
|
+
schema: request.schema,
|
|
162
|
+
requestId: request.requestId,
|
|
163
|
+
targetId: request.targetId,
|
|
164
|
+
operation: request.operation,
|
|
165
|
+
senderId: request.senderId,
|
|
166
|
+
frameUrlDigest: request.frameUrlDigest,
|
|
167
|
+
inputDigest: request.inputDigest,
|
|
168
|
+
authorizationDigest,
|
|
169
|
+
requestedAt: request.requestedAt,
|
|
170
|
+
};
|
|
171
|
+
return Object.freeze({
|
|
172
|
+
...core,
|
|
173
|
+
requestDigest: digest(
|
|
174
|
+
"chainlesschain.browser-vision-observation-request/v1",
|
|
175
|
+
core,
|
|
176
|
+
),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function normalizeDecision(value) {
|
|
181
|
+
if (
|
|
182
|
+
!value ||
|
|
183
|
+
typeof value !== "object" ||
|
|
184
|
+
Array.isArray(value) ||
|
|
185
|
+
types.isProxy(value) ||
|
|
186
|
+
![Object.prototype, null].includes(Object.getPrototypeOf(value))
|
|
187
|
+
) {
|
|
188
|
+
throw new TypeError("browser vision observation decision is invalid");
|
|
189
|
+
}
|
|
190
|
+
const decisionDescriptor = Object.getOwnPropertyDescriptor(value, "decision");
|
|
191
|
+
if (!decisionDescriptor?.enumerable || !("value" in decisionDescriptor))
|
|
192
|
+
throw new TypeError(
|
|
193
|
+
"browser vision observation decision must be plain data",
|
|
194
|
+
);
|
|
195
|
+
if (decisionDescriptor.value === "deny") {
|
|
196
|
+
const keys = Object.hasOwn(value, "reason")
|
|
197
|
+
? ["decision", "reason"]
|
|
198
|
+
: ["decision"];
|
|
199
|
+
exactObject(value, keys, "browser vision observation decision");
|
|
200
|
+
const reason = Object.hasOwn(value, "reason") ? value.reason : null;
|
|
201
|
+
if (reason !== null && (typeof reason !== "string" || reason.length > 512))
|
|
202
|
+
throw new TypeError(
|
|
203
|
+
"browser vision observation denial reason is invalid",
|
|
204
|
+
);
|
|
205
|
+
return Object.freeze({ decision: "deny", reason });
|
|
206
|
+
}
|
|
207
|
+
exactObject(
|
|
208
|
+
value,
|
|
209
|
+
["decision", "authorizationEvidenceRef", "validUntil"],
|
|
210
|
+
"browser vision observation decision",
|
|
211
|
+
);
|
|
212
|
+
if (decisionDescriptor.value !== "allow")
|
|
213
|
+
throw new TypeError("browser vision observation decision is invalid");
|
|
214
|
+
return Object.freeze({
|
|
215
|
+
decision: "allow",
|
|
216
|
+
authorizationEvidenceRef: value.authorizationEvidenceRef,
|
|
217
|
+
validUntil: value.validUntil,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function createBrowserVisionObservationAuthority({
|
|
222
|
+
descriptor,
|
|
223
|
+
authorize,
|
|
224
|
+
now = () => Date.now(),
|
|
225
|
+
} = {}) {
|
|
226
|
+
const normalizedDescriptor = normalizeDescriptor(descriptor);
|
|
227
|
+
if (typeof authorize !== "function" || types.isProxy(authorize))
|
|
228
|
+
throw new TypeError("browser vision observation authorize port is invalid");
|
|
229
|
+
if (typeof now !== "function" || types.isProxy(now))
|
|
230
|
+
throw new TypeError("browser vision observation clock is invalid");
|
|
231
|
+
const authority = Object.freeze({});
|
|
232
|
+
authorities.set(authority, {
|
|
233
|
+
descriptor: normalizedDescriptor,
|
|
234
|
+
authorize,
|
|
235
|
+
now,
|
|
236
|
+
});
|
|
237
|
+
return authority;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export function captureBrowserVisionObservationAuthority(value) {
|
|
241
|
+
const captured = authorities.get(value);
|
|
242
|
+
if (!captured)
|
|
243
|
+
throw new TypeError(
|
|
244
|
+
"A branded browser vision observation authority is required",
|
|
245
|
+
);
|
|
246
|
+
return Object.freeze({
|
|
247
|
+
descriptor: captured.descriptor,
|
|
248
|
+
authorizeObservation: async (value) => {
|
|
249
|
+
const request = normalizeRequest(value);
|
|
250
|
+
const evidence = requestEvidence(request);
|
|
251
|
+
const decision = normalizeDecision(
|
|
252
|
+
await captured.authorize(
|
|
253
|
+
Object.freeze({ ...request, requestDigest: evidence.requestDigest }),
|
|
254
|
+
),
|
|
255
|
+
);
|
|
256
|
+
if (decision.decision !== "allow") {
|
|
257
|
+
const error = new Error(
|
|
258
|
+
decision.reason ?? "Browser vision observation was denied",
|
|
259
|
+
);
|
|
260
|
+
error.code = "BROWSER_VISION_OBSERVATION_DENIED";
|
|
261
|
+
throw error;
|
|
262
|
+
}
|
|
263
|
+
const nowMs = captured.now();
|
|
264
|
+
const validUntilMs = Date.parse(decision.validUntil);
|
|
265
|
+
if (
|
|
266
|
+
typeof decision.authorizationEvidenceRef !== "string" ||
|
|
267
|
+
decision.authorizationEvidenceRef.length < 1 ||
|
|
268
|
+
decision.authorizationEvidenceRef.length > 512 ||
|
|
269
|
+
!Number.isFinite(nowMs) ||
|
|
270
|
+
!Number.isFinite(validUntilMs) ||
|
|
271
|
+
validUntilMs <= nowMs ||
|
|
272
|
+
validUntilMs > nowMs + captured.descriptor.maxGrantTtlMs
|
|
273
|
+
) {
|
|
274
|
+
throw new Error("Browser vision observation decision is invalid");
|
|
275
|
+
}
|
|
276
|
+
const authorizedAt = new Date(nowMs).toISOString();
|
|
277
|
+
const core = {
|
|
278
|
+
schema: BROWSER_VISION_OBSERVATION_RECEIPT_SCHEMA,
|
|
279
|
+
authorityId: captured.descriptor.authorityId,
|
|
280
|
+
tenantId: captured.descriptor.tenantId,
|
|
281
|
+
policyRevision: captured.descriptor.policyRevision,
|
|
282
|
+
handlerArtifactDigest: captured.descriptor.handlerArtifactDigest,
|
|
283
|
+
requestId: request.requestId,
|
|
284
|
+
targetId: request.targetId,
|
|
285
|
+
operation: request.operation,
|
|
286
|
+
senderId: request.senderId,
|
|
287
|
+
frameUrlDigest: request.frameUrlDigest,
|
|
288
|
+
inputDigest: request.inputDigest,
|
|
289
|
+
authorizationDigest: evidence.authorizationDigest,
|
|
290
|
+
requestDigest: evidence.requestDigest,
|
|
291
|
+
authorizationEvidenceRef: decision.authorizationEvidenceRef,
|
|
292
|
+
authorizedAt,
|
|
293
|
+
validUntil: new Date(validUntilMs).toISOString(),
|
|
294
|
+
};
|
|
295
|
+
return Object.freeze({
|
|
296
|
+
...core,
|
|
297
|
+
receiptDigest: digest(
|
|
298
|
+
"chainlesschain.browser-vision-observation-receipt/v1",
|
|
299
|
+
core,
|
|
300
|
+
),
|
|
301
|
+
});
|
|
302
|
+
},
|
|
303
|
+
});
|
|
304
|
+
}
|
|
@@ -264,6 +264,27 @@ async function loadBuiltInFactories(commandName) {
|
|
|
264
264
|
provider,
|
|
265
265
|
settlementAdapter,
|
|
266
266
|
businessGrader,
|
|
267
|
+
egressAuthority,
|
|
268
|
+
processSupervisor,
|
|
269
|
+
childEvidenceStore,
|
|
270
|
+
browserVisionObservation,
|
|
271
|
+
browserVisionAction,
|
|
272
|
+
browserNavigationAction,
|
|
273
|
+
browserKeyboardAction,
|
|
274
|
+
browserTabOpenAction,
|
|
275
|
+
browserDownloadAction,
|
|
276
|
+
browserQuarantinedDownloadExecutor,
|
|
277
|
+
browserFilesystemQuarantineCustody,
|
|
278
|
+
browserFilesystemQuarantineDisposal,
|
|
279
|
+
browserQuarantineRetention,
|
|
280
|
+
browserQuarantineRetentionScheduler,
|
|
281
|
+
browserQuarantineOperatorRevocation,
|
|
282
|
+
browserQuarantineLockMaintenance,
|
|
283
|
+
browserDownloadArtifactDisposal,
|
|
284
|
+
volcengineFunctionExecution,
|
|
285
|
+
volcengineFunctionProcessExecutor,
|
|
286
|
+
volcengineFunctionReplay,
|
|
287
|
+
volcengineFunctionRevocationStatusFloor,
|
|
267
288
|
ledgerPorts,
|
|
268
289
|
artifactPorts,
|
|
269
290
|
ledgerBackend,
|
|
@@ -279,6 +300,27 @@ async function loadBuiltInFactories(commandName) {
|
|
|
279
300
|
import("./pm-exploration-volcengine-provider.js"),
|
|
280
301
|
import("./pm-exploration-provider-settlement-adapter.js"),
|
|
281
302
|
import("./pm-exploration-business-grader.js"),
|
|
303
|
+
import("./pm-exploration-egress-authority.js"),
|
|
304
|
+
import("./evolution-eval-process-supervisor.js"),
|
|
305
|
+
import("./evolution-eval-child-evidence-ledger-adapter.js"),
|
|
306
|
+
import("./browser-vision-observation-authority.js"),
|
|
307
|
+
import("./browser-vision-action-authority.js"),
|
|
308
|
+
import("./browser-navigation-action-authority.js"),
|
|
309
|
+
import("./browser-keyboard-action-authority.js"),
|
|
310
|
+
import("./browser-tab-open-action-authority.js"),
|
|
311
|
+
import("./browser-download-action-authority.js"),
|
|
312
|
+
import("./browser-quarantined-download-executor.js"),
|
|
313
|
+
import("./browser-filesystem-quarantine-custody.js"),
|
|
314
|
+
import("./browser-filesystem-quarantine-disposal.js"),
|
|
315
|
+
import("./browser-quarantine-retention-authority.js"),
|
|
316
|
+
import("./browser-quarantine-retention-scheduler.js"),
|
|
317
|
+
import("./browser-quarantine-operator-revocation-authority.js"),
|
|
318
|
+
import("./browser-quarantine-lock-maintenance-authority.js"),
|
|
319
|
+
import("./browser-download-artifact-disposal-authority.js"),
|
|
320
|
+
import("./volcengine-function-execution-authority.js"),
|
|
321
|
+
import("./volcengine-function-process-executor.js"),
|
|
322
|
+
import("./volcengine-function-replay-store.js"),
|
|
323
|
+
import("./volcengine-function-revocation-status-floor-store.js"),
|
|
282
324
|
import("./evolution-ledger-ports.js"),
|
|
283
325
|
import("./evolution-artifact-ports.js"),
|
|
284
326
|
import("./evolution-ledger-file-backend.js"),
|
|
@@ -303,15 +345,39 @@ async function loadBuiltInFactories(commandName) {
|
|
|
303
345
|
receipts.inspectPmExplorationReceiptAuthority,
|
|
304
346
|
createPmExplorationExecutionManifest:
|
|
305
347
|
execution.createPmExplorationExecutionManifest,
|
|
348
|
+
createPmExplorationProcessCurriculum:
|
|
349
|
+
execution.createPmExplorationProcessCurriculum,
|
|
350
|
+
inspectPmExplorationCurriculumIsolation:
|
|
351
|
+
execution.inspectPmExplorationCurriculumIsolation,
|
|
306
352
|
createPmExplorationRunner: execution.createPmExplorationRunner,
|
|
353
|
+
createPmExplorationProcessRunner:
|
|
354
|
+
execution.createPmExplorationProcessRunner,
|
|
355
|
+
inspectPmExplorationRunnerIsolation:
|
|
356
|
+
execution.inspectPmExplorationRunnerIsolation,
|
|
307
357
|
createPmExplorationGrader: execution.createPmExplorationGrader,
|
|
358
|
+
createPmExplorationProcessGrader:
|
|
359
|
+
execution.createPmExplorationProcessGrader,
|
|
360
|
+
inspectPmExplorationGraderIsolation:
|
|
361
|
+
execution.inspectPmExplorationGraderIsolation,
|
|
308
362
|
createPmExplorationMerger: execution.createPmExplorationMerger,
|
|
363
|
+
createPmExplorationProcessMerger:
|
|
364
|
+
execution.createPmExplorationProcessMerger,
|
|
365
|
+
inspectPmExplorationMergerIsolation:
|
|
366
|
+
execution.inspectPmExplorationMergerIsolation,
|
|
309
367
|
createPmExplorationEvaluator: execution.createPmExplorationEvaluator,
|
|
368
|
+
createPmExplorationProcessEvaluator:
|
|
369
|
+
execution.createPmExplorationProcessEvaluator,
|
|
370
|
+
inspectPmExplorationEvaluatorIsolation:
|
|
371
|
+
execution.inspectPmExplorationEvaluatorIsolation,
|
|
310
372
|
createPmExplorationExecutionHost:
|
|
311
373
|
execution.createPmExplorationExecutionHost,
|
|
312
374
|
isPmExplorationExecutionHost: execution.isPmExplorationExecutionHost,
|
|
313
375
|
inspectPmExplorationExecutionHost:
|
|
314
376
|
execution.inspectPmExplorationExecutionHost,
|
|
377
|
+
createEvolutionEvalProcessSupervisor:
|
|
378
|
+
processSupervisor.createEvolutionEvalProcessSupervisor,
|
|
379
|
+
createEvolutionEvalChildEvidenceLedgerAdapter:
|
|
380
|
+
childEvidenceStore.createEvolutionEvalChildEvidenceLedgerAdapter,
|
|
315
381
|
createPmExplorationTransitionCommitter:
|
|
316
382
|
transitionCommitter.createPmExplorationTransitionCommitter,
|
|
317
383
|
capturePmExplorationTransitionCommitter:
|
|
@@ -325,6 +391,7 @@ async function loadBuiltInFactories(commandName) {
|
|
|
325
391
|
verifyPmExplorationRecoverySnapshotAck:
|
|
326
392
|
recoverySnapshotStore.verifyPmExplorationRecoverySnapshotAck,
|
|
327
393
|
executePmExplorationRound: execution.executePmExplorationRound,
|
|
394
|
+
selectPmExplorationTask: execution.selectPmExplorationTask,
|
|
328
395
|
mergePmExplorationBranches: execution.mergePmExplorationBranches,
|
|
329
396
|
evaluatePmExplorationMemory: execution.evaluatePmExplorationMemory,
|
|
330
397
|
createPmExplorationEvidenceBundle:
|
|
@@ -350,6 +417,56 @@ async function loadBuiltInFactories(commandName) {
|
|
|
350
417
|
businessGrader.inspectPmExplorationReadOnlyOutcomeSource,
|
|
351
418
|
createPmExplorationBusinessGrader:
|
|
352
419
|
businessGrader.createPmExplorationBusinessGrader,
|
|
420
|
+
createPmExplorationMemoryRetrievalAuthority:
|
|
421
|
+
egressAuthority.createPmExplorationMemoryRetrievalAuthority,
|
|
422
|
+
createPmExplorationModelEgressAuthority:
|
|
423
|
+
egressAuthority.createPmExplorationModelEgressAuthority,
|
|
424
|
+
inspectPmExplorationEgressAuthority:
|
|
425
|
+
egressAuthority.inspectPmExplorationEgressAuthority,
|
|
426
|
+
createBrowserVisionObservationAuthority:
|
|
427
|
+
browserVisionObservation.createBrowserVisionObservationAuthority,
|
|
428
|
+
createBrowserVisionActionAuthority:
|
|
429
|
+
browserVisionAction.createBrowserVisionActionAuthority,
|
|
430
|
+
createBrowserNavigationActionAuthority:
|
|
431
|
+
browserNavigationAction.createBrowserNavigationActionAuthority,
|
|
432
|
+
createBrowserKeyboardActionAuthority:
|
|
433
|
+
browserKeyboardAction.createBrowserKeyboardActionAuthority,
|
|
434
|
+
createBrowserTabOpenActionAuthority:
|
|
435
|
+
browserTabOpenAction.createBrowserTabOpenActionAuthority,
|
|
436
|
+
createBrowserDownloadActionAuthority:
|
|
437
|
+
browserDownloadAction.createBrowserDownloadActionAuthority,
|
|
438
|
+
createBrowserQuarantinedDownloadExecutor:
|
|
439
|
+
browserQuarantinedDownloadExecutor.createBrowserQuarantinedDownloadExecutor,
|
|
440
|
+
createBrowserFilesystemQuarantineCustody:
|
|
441
|
+
browserFilesystemQuarantineCustody.createBrowserFilesystemQuarantineCustody,
|
|
442
|
+
createBrowserFilesystemQuarantineDisposalAuthority:
|
|
443
|
+
browserFilesystemQuarantineDisposal.createBrowserFilesystemQuarantineDisposalAuthority,
|
|
444
|
+
createBrowserQuarantineRetentionAuthority:
|
|
445
|
+
browserQuarantineRetention.createBrowserQuarantineRetentionAuthority,
|
|
446
|
+
createBrowserQuarantineRetentionScheduler:
|
|
447
|
+
browserQuarantineRetentionScheduler.createBrowserQuarantineRetentionScheduler,
|
|
448
|
+
createBrowserQuarantineOperatorRevocationAuthority:
|
|
449
|
+
browserQuarantineOperatorRevocation.createBrowserQuarantineOperatorRevocationAuthority,
|
|
450
|
+
createBrowserQuarantineLockMaintenanceAuthority:
|
|
451
|
+
browserQuarantineLockMaintenance.createBrowserQuarantineLockMaintenanceAuthority,
|
|
452
|
+
createBrowserDownloadArtifactDisposalAuthority:
|
|
453
|
+
browserDownloadArtifactDisposal.createBrowserDownloadArtifactDisposalAuthority,
|
|
454
|
+
createVolcengineFunctionExecutionAuthority:
|
|
455
|
+
volcengineFunctionExecution.createVolcengineFunctionExecutionAuthority,
|
|
456
|
+
createVolcengineFunctionProcessExecutionAuthority:
|
|
457
|
+
volcengineFunctionExecution.createVolcengineFunctionProcessExecutionAuthority,
|
|
458
|
+
revokeVolcengineFunctionExecutionAuthority:
|
|
459
|
+
volcengineFunctionExecution.revokeVolcengineFunctionExecutionAuthority,
|
|
460
|
+
createVolcengineFunctionRevocationAuthority:
|
|
461
|
+
volcengineFunctionExecution.createVolcengineFunctionRevocationAuthority,
|
|
462
|
+
createVolcengineFunctionRevocationEvidenceResolver:
|
|
463
|
+
volcengineFunctionExecution.createVolcengineFunctionRevocationEvidenceResolver,
|
|
464
|
+
createVolcengineFunctionProcessExecutor:
|
|
465
|
+
volcengineFunctionProcessExecutor.createVolcengineFunctionProcessExecutor,
|
|
466
|
+
createVolcengineFunctionReplayStore:
|
|
467
|
+
volcengineFunctionReplay.createVolcengineFunctionReplayStore,
|
|
468
|
+
createVolcengineFunctionRevocationStatusFloorStore:
|
|
469
|
+
volcengineFunctionRevocationStatusFloor.createVolcengineFunctionRevocationStatusFloorStore,
|
|
353
470
|
createEvolutionLedgerDurableArtifactResolver:
|
|
354
471
|
ledgerPorts.createEvolutionLedgerDurableArtifactResolver,
|
|
355
472
|
createEvolutionArtifactPorts: (options) =>
|
|
@@ -417,6 +534,56 @@ async function loadBuiltInFactories(commandName) {
|
|
|
417
534
|
factories.createGovernedSkillMarketplaceCandidateInstaller =
|
|
418
535
|
createGovernedSkillMarketplaceCandidateInstaller;
|
|
419
536
|
}
|
|
537
|
+
if (commandName === "evolution" || commandName === "serve") {
|
|
538
|
+
const [
|
|
539
|
+
{ SkillCandidateRegistry },
|
|
540
|
+
{ createSkillEvaluatedPromotionProvider },
|
|
541
|
+
{ createSkillPromotionReviewProvider },
|
|
542
|
+
{ createSkillEvaluatedPromotionControlPlane },
|
|
543
|
+
{ createSkillEvaluatedPromotionDurabilityAdapter },
|
|
544
|
+
{ createSkillPromotionReviewLedgerAdapter },
|
|
545
|
+
{ createStructuredMemoryLedgerAdapter },
|
|
546
|
+
{ createStructuredMemoryAuthorityLedgerAdapter },
|
|
547
|
+
{ createStructuredMemoryPromotionReceiptWriter },
|
|
548
|
+
{ createStructuredMemoryPolicyReceiptWriter },
|
|
549
|
+
{ createStructuredMemoryAgentControlPlane },
|
|
550
|
+
{ createSkillRevocationPropagation },
|
|
551
|
+
{ openSkillRetrievalRevocationAuthority },
|
|
552
|
+
{ createSkillRetrievalRevocationLedgerAdapter },
|
|
553
|
+
] = await Promise.all([
|
|
554
|
+
import("./skill-candidate-registry.js"),
|
|
555
|
+
import("./skill-evaluated-promotion.js"),
|
|
556
|
+
import("./skill-promotion-review.js"),
|
|
557
|
+
import("./skill-promotion-controller.js"),
|
|
558
|
+
import("./skill-evaluated-promotion-durability.js"),
|
|
559
|
+
import("./skill-promotion-review-ledger-adapter.js"),
|
|
560
|
+
import("./structured-memory-ledger-adapter.js"),
|
|
561
|
+
import("./structured-memory-authority-ledger-adapter.js"),
|
|
562
|
+
import("./structured-memory-promotion-receipt-writer.js"),
|
|
563
|
+
import("./structured-memory-policy-receipt-writer.js"),
|
|
564
|
+
import("./structured-memory-agent-control-plane.js"),
|
|
565
|
+
import("./skill-revocation-propagation.js"),
|
|
566
|
+
import("./skill-retrieval-revocation-authority.js"),
|
|
567
|
+
import("./skill-retrieval-revocation-ledger-adapter.js"),
|
|
568
|
+
]);
|
|
569
|
+
Object.assign(factories, {
|
|
570
|
+
createSkillCandidateRegistry: (options) =>
|
|
571
|
+
new SkillCandidateRegistry(options),
|
|
572
|
+
createSkillEvaluatedPromotionProvider,
|
|
573
|
+
createSkillPromotionReviewProvider,
|
|
574
|
+
createSkillEvaluatedPromotionControlPlane,
|
|
575
|
+
createSkillEvaluatedPromotionDurabilityAdapter,
|
|
576
|
+
createSkillPromotionReviewLedgerAdapter,
|
|
577
|
+
createStructuredMemoryLedgerAdapter,
|
|
578
|
+
createStructuredMemoryAuthorityLedgerAdapter,
|
|
579
|
+
createStructuredMemoryPromotionReceiptWriter,
|
|
580
|
+
createStructuredMemoryPolicyReceiptWriter,
|
|
581
|
+
createStructuredMemoryAgentControlPlane,
|
|
582
|
+
createSkillRevocationPropagation,
|
|
583
|
+
openSkillRetrievalRevocationAuthority,
|
|
584
|
+
createSkillRetrievalRevocationLedgerAdapter,
|
|
585
|
+
});
|
|
586
|
+
}
|
|
420
587
|
if (commandName === "evolution" || commandName === "serve") {
|
|
421
588
|
const [
|
|
422
589
|
{ createEvolutionWorkbenchCliHost },
|
|
@@ -641,6 +808,27 @@ function bindFactoriesToModule(factories, moduleDigest) {
|
|
|
641
808
|
"createWikiSkillBenchmarkReportAttestor",
|
|
642
809
|
"createWikiSkillBenchmarkRunner",
|
|
643
810
|
"createEvolutionEvalRuntimeComposition",
|
|
811
|
+
"createEvolutionEvalChildEvidenceLedgerAdapter",
|
|
812
|
+
"createBrowserVisionObservationAuthority",
|
|
813
|
+
"createBrowserVisionActionAuthority",
|
|
814
|
+
"createBrowserNavigationActionAuthority",
|
|
815
|
+
"createBrowserKeyboardActionAuthority",
|
|
816
|
+
"createBrowserTabOpenActionAuthority",
|
|
817
|
+
"createBrowserDownloadActionAuthority",
|
|
818
|
+
"createBrowserQuarantinedDownloadExecutor",
|
|
819
|
+
"createBrowserFilesystemQuarantineCustody",
|
|
820
|
+
"createBrowserFilesystemQuarantineDisposalAuthority",
|
|
821
|
+
"createBrowserQuarantineRetentionAuthority",
|
|
822
|
+
"createBrowserQuarantineRetentionScheduler",
|
|
823
|
+
"createBrowserQuarantineOperatorRevocationAuthority",
|
|
824
|
+
"createBrowserQuarantineLockMaintenanceAuthority",
|
|
825
|
+
"createBrowserDownloadArtifactDisposalAuthority",
|
|
826
|
+
"createVolcengineFunctionExecutionAuthority",
|
|
827
|
+
"createVolcengineFunctionProcessExecutionAuthority",
|
|
828
|
+
"createVolcengineFunctionRevocationAuthority",
|
|
829
|
+
"createVolcengineFunctionRevocationEvidenceResolver",
|
|
830
|
+
"createVolcengineFunctionReplayStore",
|
|
831
|
+
"createVolcengineFunctionRevocationStatusFloorStore",
|
|
644
832
|
];
|
|
645
833
|
for (const name of providerFactories) {
|
|
646
834
|
if (typeof factories[name] !== "function") continue;
|
|
@@ -652,11 +840,49 @@ function bindFactoriesToModule(factories, moduleDigest) {
|
|
|
652
840
|
return factories[name](options);
|
|
653
841
|
};
|
|
654
842
|
}
|
|
843
|
+
for (const name of [
|
|
844
|
+
"createSkillEvaluatedPromotionProvider",
|
|
845
|
+
"createSkillPromotionReviewProvider",
|
|
846
|
+
]) {
|
|
847
|
+
if (typeof factories[name] !== "function") continue;
|
|
848
|
+
result[name] = (options = {}) => {
|
|
849
|
+
if (options?.handlerArtifactDigest !== moduleDigest)
|
|
850
|
+
throw new Error(
|
|
851
|
+
`${name} handlerArtifactDigest must equal the authenticated deployment module digest`,
|
|
852
|
+
);
|
|
853
|
+
return factories[name](options);
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
for (const name of ["createSkillPromotionReviewLedgerAdapter"]) {
|
|
857
|
+
if (typeof factories[name] !== "function") continue;
|
|
858
|
+
result[name] = (options = {}) => {
|
|
859
|
+
if (options?.descriptor?.handlerArtifactDigest !== moduleDigest)
|
|
860
|
+
throw new Error(
|
|
861
|
+
`${name} handlerArtifactDigest must equal the authenticated deployment module digest`,
|
|
862
|
+
);
|
|
863
|
+
return factories[name](options);
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
for (const name of [
|
|
867
|
+
"createStructuredMemoryPromotionReceiptWriter",
|
|
868
|
+
"createStructuredMemoryPolicyReceiptWriter",
|
|
869
|
+
]) {
|
|
870
|
+
if (typeof factories[name] !== "function") continue;
|
|
871
|
+
result[name] = (options = {}) => {
|
|
872
|
+
if (options?.descriptor?.issuerHandlerDigest !== moduleDigest)
|
|
873
|
+
throw new Error(
|
|
874
|
+
`${name} issuerHandlerDigest must equal the authenticated deployment module digest`,
|
|
875
|
+
);
|
|
876
|
+
return factories[name](options);
|
|
877
|
+
};
|
|
878
|
+
}
|
|
655
879
|
for (const name of [
|
|
656
880
|
"createPmExplorationReceiptAuthority",
|
|
657
881
|
"createPmExplorationReceiptSigner",
|
|
658
882
|
"createPmExplorationProviderSettlementAdapter",
|
|
659
883
|
"createPmExplorationReadOnlyOutcomeSource",
|
|
884
|
+
"createPmExplorationMemoryRetrievalAuthority",
|
|
885
|
+
"createPmExplorationModelEgressAuthority",
|
|
660
886
|
]) {
|
|
661
887
|
if (typeof factories[name] !== "function") continue;
|
|
662
888
|
result[name] = (options = {}) => {
|
|
@@ -675,7 +901,12 @@ function bindFactoriesToModule(factories, moduleDigest) {
|
|
|
675
901
|
}
|
|
676
902
|
if (typeof factories.createPmExplorationExecutionManifest === "function") {
|
|
677
903
|
result.createPmExplorationExecutionManifest = (input = {}) => {
|
|
678
|
-
|
|
904
|
+
const authorities = ["runner", "grader", "merger", "evaluator"];
|
|
905
|
+
if (Object.hasOwn(input, "curriculum")) authorities.unshift("curriculum");
|
|
906
|
+
if (Object.hasOwn(input, "memoryRetrieval")) {
|
|
907
|
+
authorities.push("memoryRetrieval", "modelEgress");
|
|
908
|
+
}
|
|
909
|
+
for (const authority of authorities) {
|
|
679
910
|
if (input?.[authority]?.handlerArtifactDigest !== moduleDigest)
|
|
680
911
|
throw new Error(
|
|
681
912
|
`PM exploration ${authority} handlerArtifactDigest must equal the authenticated deployment module digest`,
|
|
@@ -711,6 +942,15 @@ function bindFactoriesToModule(factories, moduleDigest) {
|
|
|
711
942
|
return factories.createEvolutionEvalProcessSupervisor(options);
|
|
712
943
|
};
|
|
713
944
|
}
|
|
945
|
+
if (typeof factories.createVolcengineFunctionProcessExecutor === "function") {
|
|
946
|
+
result.createVolcengineFunctionProcessExecutor = (options = {}) => {
|
|
947
|
+
if (options?.target?.handlerArtifactDigest !== moduleDigest)
|
|
948
|
+
throw new Error(
|
|
949
|
+
"Volcengine function process target handlerArtifactDigest must equal the authenticated deployment module digest",
|
|
950
|
+
);
|
|
951
|
+
return factories.createVolcengineFunctionProcessExecutor(options);
|
|
952
|
+
};
|
|
953
|
+
}
|
|
714
954
|
return Object.freeze(result);
|
|
715
955
|
}
|
|
716
956
|
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
EVOLUTION_EVAL_ATTESTATION_PURPOSES,
|
|
7
7
|
EVOLUTION_EVAL_RECEIPT_SCHEMA,
|
|
8
|
+
EVOLUTION_EVAL_SUPERVISION_SCHEMA,
|
|
8
9
|
EVOLUTION_EVAL_TARGET_INVOCATION_SCHEMA,
|
|
9
10
|
EVOLUTION_EVAL_TARGET_REVOCATION_SCHEMA,
|
|
10
11
|
computeEvolutionEvalReceiptDigest,
|
|
@@ -40,6 +41,10 @@ const KINDS = Object.freeze({
|
|
|
40
41
|
purpose: EVOLUTION_EVAL_ATTESTATION_PURPOSES.targetRevocation,
|
|
41
42
|
schema: EVOLUTION_EVAL_TARGET_REVOCATION_SCHEMA,
|
|
42
43
|
}),
|
|
44
|
+
supervision: Object.freeze({
|
|
45
|
+
purpose: EVOLUTION_EVAL_ATTESTATION_PURPOSES.supervisor,
|
|
46
|
+
schema: EVOLUTION_EVAL_SUPERVISION_SCHEMA,
|
|
47
|
+
}),
|
|
43
48
|
});
|
|
44
49
|
|
|
45
50
|
function requiredString(value, label) {
|
|
@@ -1058,7 +1058,8 @@ export function buildEvolutionEvalAttestationDigest(value, purpose) {
|
|
|
1058
1058
|
export function computeEvolutionEvalSignedEvidenceDigest(record, purpose) {
|
|
1059
1059
|
if (
|
|
1060
1060
|
purpose !== EVOLUTION_EVAL_ATTESTATION_PURPOSES.targetInvocation &&
|
|
1061
|
-
purpose !== EVOLUTION_EVAL_ATTESTATION_PURPOSES.targetRevocation
|
|
1061
|
+
purpose !== EVOLUTION_EVAL_ATTESTATION_PURPOSES.targetRevocation &&
|
|
1062
|
+
purpose !== EVOLUTION_EVAL_ATTESTATION_PURPOSES.supervisor
|
|
1062
1063
|
) {
|
|
1063
1064
|
throw evalError(
|
|
1064
1065
|
EVOLUTION_EVAL_INVALID_CODE,
|