chainlesschain 0.162.182 → 0.162.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assets/web-panel/assets/{AIOps-DzZ5_xoj.js → AIOps-BapS7lz4.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-DeLXddIg.js → ActionButton-CXYdXEUI.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-rvDCmet1.js → Analytics-CKR5Lexn.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-Yt6QVDnp.js → AppLayout-DATVUOXB.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-BS112K5L.js → Artifacts-vb_0ZlV1.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-0wJuQrNu.js → Audit-BI1l9GWt.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-B90PMgbn.js → BackgroundAgents-BFXbaUEf.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-TkgMglQQ.js → Backup-DEYBJJ6H.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-CQVS9p1l.js → BaseInput-COdzeO0M.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-YTjQHoC7.js → Chat-oSN6sfM5.js} +6 -6
- package/src/assets/web-panel/assets/ChatBubbleRenderer-CI_jT0ru.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-5bwaOabq.js → Checkbox-BezEa4tm.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-BFmNQ_Xe.js → Codegen-CNEL0Ife.js} +1 -1
- package/src/assets/web-panel/assets/{Col-BT_u4Dzp.js → Col-Bf2Y2Bn1.js} +1 -1
- package/src/assets/web-panel/assets/{Community-CJP52u5b.js → Community-BfUlu4Hc.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-BpzhJE9i.js → Compact-BN4xWP9e.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-Cg7rfslp.js → Compliance-Bt6BKmEP.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-JisxL6Yy.js → Cowork-DKLp8YxO.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-Bu7Ug_MC.js → Cron-o7Hhw6ky.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-CvuqoLdj.js → Crosschain-DaNXWJIw.js} +1 -1
- package/src/assets/web-panel/assets/{DID-C2u9G8Pu.js → DID-B-Qa2mha.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-BFt5Yv3d.js → Dashboard-CMX0Qnxw.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-DIaT9Wxq.js → Dropdown-BLuLyRu_.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-D_A601Y4.js → EmailListRenderer-CFBAeMij.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard--IyQ8I8w.js → FamilyGuardDashboard-DWzXQ67V.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-BihWHxuY.js → Federation-DB1QSLgr.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-BB8dOXc_.js → FormItemContext-C-OKCToP.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-DQYhj1HH.js → GenericCardRenderer-DMJFtFZf.js} +1 -1
- package/src/assets/web-panel/assets/{Git-B-2QZxGf.js → Git-DsGSujOV.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CusSb-nG.js → Governance-B0iS9NEW.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-BAjmvPPL.js → Inference-CH004H7c.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DoNYWKYq.js → KnowledgeGraph-Q9MTQ83c.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-B8fKWD-n.js → Logs-B_fyjZK9.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-BlJm1J7E.js → MarkdownRenderer-C0o4FtpD.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-CyOscbSL.js → Marketplace-BIStF9d1.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-Ex6Om5da.js → McpTools-pGfal768.js} +5 -5
- package/src/assets/web-panel/assets/{Memory-CDcD8l8r.js → Memory-xbNqpIqB.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-xfBqoFDg.js → MobileBridge-B5EQGrIK.js} +1 -1
- package/src/assets/web-panel/assets/MobileProjects-VTc3gT1y.js +1 -0
- package/src/assets/web-panel/assets/{Mtc-CIWd36OV.js → Mtc-a_rmfxJH.js} +5 -5
- package/src/assets/web-panel/assets/{MtcAudit-CPX0ouuA.js → MtcAudit-BmKuofUr.js} +4 -4
- package/src/assets/web-panel/assets/{Multisig-BDJsIUuW.js → Multisig-BQbJ-CAN.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-DEkbuD3N.js → NLProgramming-JtPJKX25.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-DJpHRhH1.js → Notes-ZFKznTSG.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-C1UZ-Qd5.js → NotificationSettings-B6aHRBBR.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-GlJtqLjT.js → OrderTableRenderer-DdcsOqEz.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-Bbhj0fac.js → Organization-BFDTAUgS.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-1H04x3kx.js → Overflow-0FoTfbWH.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CDpPe3et.js → P2P-CWd90etw.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-MUX0Bpvw.js → PdhVaultBrowser-DtCGC-W-.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-A07-0Ci1.js → Permissions-CvQ7nr7T.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DhhDWxAZ.js → PersonalDataHub-rdNPcR-Z.js} +5 -5
- package/src/assets/web-panel/assets/{Pipeline-CyfbJfe-.js → Pipeline-CmrfiNOs.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-CNFps3ED.js → Privacy-D7ep1h_t.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit--T-u3Dr5.js → ProjectInit-C0xKINHS.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-DJmrK2fC.js → ProjectSettings-AOmZFp-F.js} +2 -2
- package/src/assets/web-panel/assets/Projects-BWHSkXZP.js +1 -0
- package/src/assets/web-panel/assets/{Providers-DLzzbOZd.js → Providers-Cb7JCTPL.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-CexOomKS.js → QrScannerModal-BDMehcXC.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-QklGi19_.js → QuickAsk-BF6_1nvx.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-Bb9kwSw8.js → Recommend-BHfT-A28.js} +1 -1
- package/src/assets/web-panel/assets/RemoteSession-B6EEf8hh.js +5 -0
- package/src/assets/web-panel/assets/{Reputation-Dr5cLP0N.js → Reputation-CsWHLEcj.js} +1 -1
- package/src/assets/web-panel/assets/{Row-oCQHYv5t.js → Row-D6srnWhm.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-IFDEykIR.js → RssFeed-Xhr-KyVd.js} +3 -3
- package/src/assets/web-panel/assets/{Search-CspVIxDc.js → Search-vIbIJvwL.js} +1 -1
- package/src/assets/web-panel/assets/{Security-Bm66o_DH.js → Security-Bzi5Aiko.js} +4 -4
- package/src/assets/web-panel/assets/{Services-DvanNqXl.js → Services-BHtVX52P.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CHjEe9_O.js → Skeleton-C0R8B2jf.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-Cb8jWjMX.js → Skills-DtT6rWOX.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-DxZm1491.js → Sla-0B37mxVU.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-DWxEEclC.js → SpeechSettings-0V2jE1Bs.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-FIvOFw5p.js → SyncSettings-CYedRzaj.js} +2 -2
- package/src/assets/web-panel/assets/Tasks-D-R1x8vm.js +1 -0
- package/src/assets/web-panel/assets/{Templates-CaNjzV_t.js → Templates-BKoHztGT.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-DjlP6TmH.js → Tenant--17nwVNZ.js} +1 -1
- package/src/assets/web-panel/assets/Terminal-Dnkos7vW.js +3 -0
- package/src/assets/web-panel/assets/{TimelineRenderer-DoZ8y7y8.js → TimelineRenderer-C5jx4AE3.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-390cg2TC.js → Tokens-DYJKYa9t.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-CLrtCj5_.js → Trigger-DChpWiQ9.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-DpESfSPn.js → Trust-DfWG52EA.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-CN6279O0.js → UkeySign-CMugYcyA.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-DPtAUlSe.js → VideoEditing-BOSmrHAd.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-nKOMV_1n.js → Wallet-D5g3k3Sa.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-HuXlSOc4.js → WebAuthn-D-7u4Mkc.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-CUfFjARi.js → WorkflowEditor-CFzZMSUJ.js} +1 -1
- package/src/assets/web-panel/assets/{chat-6Eq0PcZJ.js → chat-VbR6l6mc.js} +1 -1
- package/src/assets/web-panel/assets/{colors-BP_Sf6Iy.js → colors-BSZn8EDS.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-BufMKIh5.js → compact-item-y74obMEq.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-BBMXxWSW.js → createContext-C326bjex.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-D3Bho_6u.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-fUK_tRO2.js → hasIn-D_INJQT_.js} +1 -1
- package/src/assets/web-panel/assets/{index-LvCBfTLo.js → index-4PIeTM--.js} +1 -1
- package/src/assets/web-panel/assets/{index-CgiECHu2.js → index-4eyH-eC2.js} +1 -1
- package/src/assets/web-panel/assets/index-5iAFwYx1.js +1 -0
- package/src/assets/web-panel/assets/{index-DLpIs_P_.js → index-9PIVuXqo.js} +1 -1
- package/src/assets/web-panel/assets/{index-cpEli44X.js → index-B7SrC-On.js} +1 -1
- package/src/assets/web-panel/assets/{index-6GmBa4Kg.js → index-BJi3UqBt.js} +1 -1
- package/src/assets/web-panel/assets/{index-D9vU25ij.js → index-BY8-nCgs.js} +1 -1
- package/src/assets/web-panel/assets/index-BfnB7LPx.js +1 -0
- package/src/assets/web-panel/assets/{index-B2vS66eI.js → index-Bfw2hf2s.js} +1 -1
- package/src/assets/web-panel/assets/{index-DVsqvI4M.js → index-BjcWKg1S.js} +1 -1
- package/src/assets/web-panel/assets/{index-C44atv4k.js → index-BnSfnSMP.js} +1 -1
- package/src/assets/web-panel/assets/{index-BWKoBU8R.js → index-Bnua8IX3.js} +1 -1
- package/src/assets/web-panel/assets/{index-GwdRUZ-x.js → index-C-ZCaUJc.js} +1 -1
- package/src/assets/web-panel/assets/{index-pum7HYBA.js → index-C2NyllnW.js} +1 -1
- package/src/assets/web-panel/assets/{index-B9WYSn4m.js → index-C327pLbw.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bkg4ZePE.js → index-CMHqs3Jb.js} +1 -1
- package/src/assets/web-panel/assets/{index-DmkMXwnR.js → index-CfLJ42kv.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dyngbd29.js → index-Cr3uuz0C.js} +19 -19
- package/src/assets/web-panel/assets/{index-t8N1tSeX.js → index-CsovTpx9.js} +1 -1
- package/src/assets/web-panel/assets/{index-DocdRcbd.js → index-CzE53HiB.js} +1 -1
- package/src/assets/web-panel/assets/{index-fzaMtSJ8.js → index-DBkzrpiL.js} +1 -1
- package/src/assets/web-panel/assets/{index-CE2DdTP2.js → index-DNMxIsDg.js} +1 -1
- package/src/assets/web-panel/assets/{index-wKTLbKyc.js → index-DUU2606o.js} +1 -1
- package/src/assets/web-panel/assets/{index-uCbEN7cY.js → index-DdyjrCAu.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZ6Yt17L.js → index-DkH1JvEt.js} +1 -1
- package/src/assets/web-panel/assets/{index-CwSf5pnf.js → index-Dlxh9D8D.js} +1 -1
- package/src/assets/web-panel/assets/{index-3FuwBewR.js → index-DuIkfnTF.js} +1 -1
- package/src/assets/web-panel/assets/{index-CW_G-MXw.js → index-DwHSZLXg.js} +1 -1
- package/src/assets/web-panel/assets/{index-BHy6yNiF.js → index-E_v1ZCTP.js} +1 -1
- package/src/assets/web-panel/assets/{index-wV6iGdpY.js → index-FQBsuExX.js} +1 -1
- package/src/assets/web-panel/assets/{index-DASluSqY.js → index-GA80ir_u.js} +1 -1
- package/src/assets/web-panel/assets/{index-BMLHv389.js → index-IZAWt0H8.js} +1 -1
- package/src/assets/web-panel/assets/{index-B7Etk0Te.js → index-Iw0FfqUz.js} +1 -1
- package/src/assets/web-panel/assets/{index-D4_MuGkd.js → index-KF9Zmqln.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cp8vhyZy.js → index-abmn_8Yz.js} +1 -1
- package/src/assets/web-panel/assets/{index-2A5ph8b2.js → index-gINyI1rh.js} +1 -1
- package/src/assets/web-panel/assets/{index-CeASi4fr.js → index-jYaogFE8.js} +1 -1
- package/src/assets/web-panel/assets/{index-CGjmILDm.js → index-nSn2-C4N.js} +1 -1
- package/src/assets/web-panel/assets/{index-DPdUNk1i.js → index-qMA4GYdQ.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-V5Fo95FM.js → initDefaultProps-DI0Zaf8-.js} +1 -1
- package/src/assets/web-panel/assets/{motion-BYWU0hUT.js → motion-BZDKSy3Z.js} +1 -1
- package/src/assets/web-panel/assets/{move-Cr1M-J2h.js → move-DsIW01Vp.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-BysQKi2N.js → mtc-parser-CohkDhsf.js} +1 -1
- package/src/assets/web-panel/assets/{omit-D1zHU8GC.js → omit-DpiN5rzg.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-CUArxtfi.js → pickAttrs-qbuqni3y.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-ChoYEys0.js → placementArrow-mBky6714.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-BQRs3Mo7.js → responsiveObserve-Bas3eQ2K.js} +1 -1
- package/src/assets/web-panel/assets/{slide-B8zbsCkg.js → slide-CBx_SKoK.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-C2U8Gs6h.js → statusUtils-BlYguJSV.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-Dd8MgL_V.js → styleChecker-BCYQmRGv.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-hknqY5NH.js → useFlexGapSupport-Dp5dybLM.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-CLTAmcfw.js → useFs-DHAMBgA2.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-ByegHbiB.js → usePersonalDataHub-W6jsSw76.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-DqlAy5DP.js → vnode-BkI6aayc.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-DiXiztQn.js → zoom-C_IMGueq.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/commands/agent.js +9 -0
- package/src/commands/background-session.js +49 -0
- package/src/commands/plugin.js +235 -23
- package/src/commands/session.js +13 -0
- package/src/data/changelog.json +13 -0
- package/src/harness/jsonl-session-store.js +6 -4
- package/src/lib/agent-team/team-runner.js +19 -1
- package/src/lib/background-agent-supervisor.js +49 -0
- package/src/lib/plugin-runtime/install.js +226 -7
- package/src/lib/plugin-runtime/scopes.js +13 -2
- package/src/lib/plugin-usage-attribution.js +44 -0
- package/src/lib/process-execution-broker/index.js +252 -1
- package/src/lib/process-execution-broker/platform-sandbox.js +1251 -101
- package/src/lib/session-usage.js +77 -0
- package/src/repl/agent-repl.js +6 -6
- package/src/runtime/headless-runner.js +9 -1
- package/src/runtime/headless-stream.js +20 -1
- package/src/runtime/mcp-config.js +15 -5
- package/src/assets/web-panel/assets/ChatBubbleRenderer-PR074hUN.js +0 -1
- package/src/assets/web-panel/assets/MobileProjects-BwObMMA2.js +0 -1
- package/src/assets/web-panel/assets/Projects-Qx_MdX9k.js +0 -1
- package/src/assets/web-panel/assets/RemoteSession-DZuVNNN5.js +0 -5
- package/src/assets/web-panel/assets/Tasks-CyuLnDFR.js +0 -1
- package/src/assets/web-panel/assets/Terminal-DwzGMniO.js +0 -3
- package/src/assets/web-panel/assets/devWarning-DgVKduH2.js +0 -1
- package/src/assets/web-panel/assets/index-DOZTSoS7.js +0 -1
- package/src/assets/web-panel/assets/index-DhpvjpqI.js +0 -1
|
@@ -656,6 +656,9 @@ class ProcessExecutionBroker extends EventEmitter {
|
|
|
656
656
|
"targetRuntime",
|
|
657
657
|
"contentSnapshotScope",
|
|
658
658
|
"contentSnapshotMechanism",
|
|
659
|
+
"pluginTreeContentSnapshotScope",
|
|
660
|
+
"pluginTreeContentSnapshotMechanism",
|
|
661
|
+
"pluginTreeSnapshotConsistency",
|
|
659
662
|
]) {
|
|
660
663
|
if (
|
|
661
664
|
plan.runtimeProbe[field] !== undefined &&
|
|
@@ -668,7 +671,13 @@ class ProcessExecutionBroker extends EventEmitter {
|
|
|
668
671
|
);
|
|
669
672
|
}
|
|
670
673
|
}
|
|
671
|
-
for (const field of [
|
|
674
|
+
for (const field of [
|
|
675
|
+
"contentSnapshot",
|
|
676
|
+
"handleAtomic",
|
|
677
|
+
"pluginTreeContentSnapshot",
|
|
678
|
+
"pluginTreeSnapshotContractBound",
|
|
679
|
+
"pluginTreeSnapshotAtomic",
|
|
680
|
+
]) {
|
|
672
681
|
if (
|
|
673
682
|
plan.runtimeProbe[field] !== undefined &&
|
|
674
683
|
typeof plan.runtimeProbe[field] !== "boolean"
|
|
@@ -679,6 +688,217 @@ class ProcessExecutionBroker extends EventEmitter {
|
|
|
679
688
|
);
|
|
680
689
|
}
|
|
681
690
|
}
|
|
691
|
+
for (const field of [
|
|
692
|
+
"pluginTreeContentSnapshotFiles",
|
|
693
|
+
"pluginTreeContentSnapshotBytes",
|
|
694
|
+
]) {
|
|
695
|
+
if (
|
|
696
|
+
plan.runtimeProbe[field] !== undefined &&
|
|
697
|
+
(!Number.isSafeInteger(plan.runtimeProbe[field]) ||
|
|
698
|
+
plan.runtimeProbe[field] < 0)
|
|
699
|
+
) {
|
|
700
|
+
throw this._sandboxError(
|
|
701
|
+
"invalid_sandbox_plan",
|
|
702
|
+
`Sandbox runtime probe ${field} must be a non-negative safe integer`,
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
if (
|
|
707
|
+
plan.runtimeProbe.pluginTreeContentSnapshotDigest !== undefined &&
|
|
708
|
+
(typeof plan.runtimeProbe.pluginTreeContentSnapshotDigest !==
|
|
709
|
+
"string" ||
|
|
710
|
+
!/^[a-f0-9]{64}$/.test(
|
|
711
|
+
plan.runtimeProbe.pluginTreeContentSnapshotDigest,
|
|
712
|
+
))
|
|
713
|
+
) {
|
|
714
|
+
throw this._sandboxError(
|
|
715
|
+
"invalid_sandbox_plan",
|
|
716
|
+
"Sandbox runtime probe pluginTreeContentSnapshotDigest must be a lowercase SHA-256 value",
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
const pluginTreeSnapshot =
|
|
720
|
+
plan.runtimeProbe.pluginTreeContentSnapshot === true;
|
|
721
|
+
const pluginTreeEvidenceFields = [
|
|
722
|
+
"pluginTreeContentSnapshotScope",
|
|
723
|
+
"pluginTreeContentSnapshotMechanism",
|
|
724
|
+
"pluginTreeContentSnapshotFiles",
|
|
725
|
+
"pluginTreeContentSnapshotBytes",
|
|
726
|
+
"pluginTreeContentSnapshotDigest",
|
|
727
|
+
"pluginTreeSnapshotConsistency",
|
|
728
|
+
"pluginTreeSnapshotContractBound",
|
|
729
|
+
"pluginTreeSnapshotAtomic",
|
|
730
|
+
];
|
|
731
|
+
if (
|
|
732
|
+
pluginTreeSnapshot &&
|
|
733
|
+
(plan.applied !== true ||
|
|
734
|
+
plan.platform !== "linux" ||
|
|
735
|
+
plan.enforcement !== "linux-bwrap" ||
|
|
736
|
+
backend !== "linux-bwrap" ||
|
|
737
|
+
candidateBackend !== null ||
|
|
738
|
+
policyAttested !== true ||
|
|
739
|
+
policyDigest === null ||
|
|
740
|
+
!guarantees.includes(SANDBOX_BOUNDARIES.FILESYSTEM) ||
|
|
741
|
+
!guarantees.includes(SANDBOX_BOUNDARIES.NETWORK) ||
|
|
742
|
+
plan.runtimeProbe.attempted !== true ||
|
|
743
|
+
plan.runtimeProbe.runnable !== true ||
|
|
744
|
+
plan.runtimeProbe.reason !== null ||
|
|
745
|
+
plan.runtimeProbe.kind !== "linux-bwrap-plugin-node-policy-v1" ||
|
|
746
|
+
plan.runtimeProbe.probeRuntime !== "node" ||
|
|
747
|
+
plan.runtimeProbe.targetRuntime !== "node" ||
|
|
748
|
+
plan.runtimeProbe.contentSnapshot !== true ||
|
|
749
|
+
plan.runtimeProbe.contentSnapshotScope !== "plugin-entry-source" ||
|
|
750
|
+
plan.runtimeProbe.contentSnapshotMechanism !==
|
|
751
|
+
"verified-o_tmpfile-copy-bwrap-ro-bind-data-v1" ||
|
|
752
|
+
plan.runtimeProbe.handleAtomic !== false ||
|
|
753
|
+
plan.runtimeProbe.supervisorDescriptorBound !== true ||
|
|
754
|
+
plan.runtimeProbe.pluginTreeContentSnapshotScope !==
|
|
755
|
+
"all-pinned-plugin-regular-files" ||
|
|
756
|
+
plan.runtimeProbe.pluginTreeContentSnapshotMechanism !==
|
|
757
|
+
"verified-o_tmpfile-copy-bwrap-ro-bind-data-v1" ||
|
|
758
|
+
!Number.isSafeInteger(
|
|
759
|
+
plan.runtimeProbe.pluginTreeContentSnapshotFiles,
|
|
760
|
+
) ||
|
|
761
|
+
plan.runtimeProbe.pluginTreeContentSnapshotFiles < 1 ||
|
|
762
|
+
plan.runtimeProbe.pluginTreeContentSnapshotFiles > 256 ||
|
|
763
|
+
!Number.isSafeInteger(
|
|
764
|
+
plan.runtimeProbe.pluginTreeContentSnapshotBytes,
|
|
765
|
+
) ||
|
|
766
|
+
plan.runtimeProbe.pluginTreeContentSnapshotBytes < 0 ||
|
|
767
|
+
plan.runtimeProbe.pluginTreeContentSnapshotBytes >
|
|
768
|
+
256 * 1024 * 1024 ||
|
|
769
|
+
!/^[a-f0-9]{64}$/.test(
|
|
770
|
+
plan.runtimeProbe.pluginTreeContentSnapshotDigest || "",
|
|
771
|
+
) ||
|
|
772
|
+
plan.runtimeProbe.pluginTreeSnapshotConsistency !==
|
|
773
|
+
"per-file-pin-to-launch" ||
|
|
774
|
+
plan.runtimeProbe.pluginTreeSnapshotContractBound !== false ||
|
|
775
|
+
plan.runtimeProbe.pluginTreeSnapshotAtomic !== false)
|
|
776
|
+
) {
|
|
777
|
+
throw this._sandboxError(
|
|
778
|
+
"invalid_sandbox_plan",
|
|
779
|
+
"Sandbox runtime probe plugin tree snapshot evidence must use the typed complete-tree contract",
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
if (
|
|
783
|
+
!pluginTreeSnapshot &&
|
|
784
|
+
pluginTreeEvidenceFields.some(
|
|
785
|
+
(field) => plan.runtimeProbe[field] !== undefined,
|
|
786
|
+
)
|
|
787
|
+
) {
|
|
788
|
+
throw this._sandboxError(
|
|
789
|
+
"invalid_sandbox_plan",
|
|
790
|
+
"Sandbox runtime probe plugin tree snapshot evidence requires pluginTreeContentSnapshot",
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
const supervisorStringFields = [
|
|
794
|
+
"supervisorBindingScope",
|
|
795
|
+
"supervisorDescriptorBindingMechanism",
|
|
796
|
+
"supervisorPid1ExecutableExposure",
|
|
797
|
+
];
|
|
798
|
+
const supervisorBooleanFields = [
|
|
799
|
+
"supervisorDescriptorBound",
|
|
800
|
+
"supervisorExecutablePinned",
|
|
801
|
+
"supervisorDescriptorContained",
|
|
802
|
+
"supervisorDescriptorConsumedBeforeTarget",
|
|
803
|
+
"supervisorStagingPathHidden",
|
|
804
|
+
"supervisorTemporaryCopyObscured",
|
|
805
|
+
];
|
|
806
|
+
for (const field of supervisorStringFields) {
|
|
807
|
+
if (
|
|
808
|
+
plan.runtimeProbe[field] !== undefined &&
|
|
809
|
+
(typeof plan.runtimeProbe[field] !== "string" ||
|
|
810
|
+
!plan.runtimeProbe[field])
|
|
811
|
+
) {
|
|
812
|
+
throw this._sandboxError(
|
|
813
|
+
"invalid_sandbox_plan",
|
|
814
|
+
`Sandbox runtime probe ${field} must be a non-empty string`,
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
for (const field of supervisorBooleanFields) {
|
|
819
|
+
if (
|
|
820
|
+
plan.runtimeProbe[field] !== undefined &&
|
|
821
|
+
typeof plan.runtimeProbe[field] !== "boolean"
|
|
822
|
+
) {
|
|
823
|
+
throw this._sandboxError(
|
|
824
|
+
"invalid_sandbox_plan",
|
|
825
|
+
`Sandbox runtime probe ${field} must be boolean`,
|
|
826
|
+
);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
const supervisorIdentity = plan.runtimeProbe.supervisorExecutableIdentity;
|
|
830
|
+
if (supervisorIdentity !== undefined) {
|
|
831
|
+
const fileId = supervisorIdentity?.fileId;
|
|
832
|
+
if (
|
|
833
|
+
!supervisorIdentity ||
|
|
834
|
+
typeof supervisorIdentity !== "object" ||
|
|
835
|
+
Array.isArray(supervisorIdentity) ||
|
|
836
|
+
typeof supervisorIdentity.path !== "string" ||
|
|
837
|
+
!supervisorIdentity.path.startsWith("/") ||
|
|
838
|
+
!fileId ||
|
|
839
|
+
typeof fileId !== "object" ||
|
|
840
|
+
Array.isArray(fileId) ||
|
|
841
|
+
typeof fileId.dev !== "string" ||
|
|
842
|
+
!/^\d+$/.test(fileId.dev) ||
|
|
843
|
+
typeof fileId.ino !== "string" ||
|
|
844
|
+
!/^\d+$/.test(fileId.ino) ||
|
|
845
|
+
typeof supervisorIdentity.sha256 !== "string" ||
|
|
846
|
+
!/^[a-f0-9]{64}$/.test(supervisorIdentity.sha256) ||
|
|
847
|
+
!Number.isSafeInteger(supervisorIdentity.bytes) ||
|
|
848
|
+
supervisorIdentity.bytes <= 0 ||
|
|
849
|
+
supervisorIdentity.bytes > 256 * 1024 * 1024 ||
|
|
850
|
+
!Number.isFinite(supervisorIdentity.mtimeMs) ||
|
|
851
|
+
!Number.isSafeInteger(supervisorIdentity.mode) ||
|
|
852
|
+
supervisorIdentity.mode <= 0 ||
|
|
853
|
+
(supervisorIdentity.mode & 0o170000) !== 0o100000 ||
|
|
854
|
+
(supervisorIdentity.mode & 0o111) === 0 ||
|
|
855
|
+
(supervisorIdentity.mode & 0o022) !== 0 ||
|
|
856
|
+
!Number.isSafeInteger(supervisorIdentity.uid) ||
|
|
857
|
+
supervisorIdentity.uid !== 0 ||
|
|
858
|
+
!Number.isSafeInteger(supervisorIdentity.gid) ||
|
|
859
|
+
supervisorIdentity.gid < 0
|
|
860
|
+
) {
|
|
861
|
+
throw this._sandboxError(
|
|
862
|
+
"invalid_sandbox_plan",
|
|
863
|
+
"Sandbox runtime probe supervisorExecutableIdentity must use the typed executable identity contract",
|
|
864
|
+
);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
const supervisorBound =
|
|
868
|
+
plan.runtimeProbe.supervisorDescriptorBound === true;
|
|
869
|
+
if (
|
|
870
|
+
supervisorBound &&
|
|
871
|
+
(plan.runtimeProbe.supervisorExecutablePinned !== true ||
|
|
872
|
+
supervisorIdentity === undefined ||
|
|
873
|
+
plan.runtimeProbe.supervisorBindingScope !==
|
|
874
|
+
"host-path-replacement" ||
|
|
875
|
+
plan.runtimeProbe.supervisorDescriptorBindingMechanism !==
|
|
876
|
+
"pinned-child-fd3-file-consume-run-overmount-v1" ||
|
|
877
|
+
plan.runtimeProbe.supervisorPid1ExecutableExposure !== "procfs")
|
|
878
|
+
) {
|
|
879
|
+
throw this._sandboxError(
|
|
880
|
+
"invalid_sandbox_plan",
|
|
881
|
+
"Sandbox runtime probe bound supervisor evidence must include its typed identity and binding contract",
|
|
882
|
+
);
|
|
883
|
+
}
|
|
884
|
+
for (const field of [
|
|
885
|
+
"supervisorDescriptorContained",
|
|
886
|
+
"supervisorDescriptorConsumedBeforeTarget",
|
|
887
|
+
"supervisorStagingPathHidden",
|
|
888
|
+
"supervisorTemporaryCopyObscured",
|
|
889
|
+
]) {
|
|
890
|
+
if (
|
|
891
|
+
(plan.runtimeProbe[field] === true &&
|
|
892
|
+
(!supervisorBound || plan.runtimeProbe.runnable !== true)) ||
|
|
893
|
+
(supervisorBound &&
|
|
894
|
+
plan.runtimeProbe[field] !== plan.runtimeProbe.runnable)
|
|
895
|
+
) {
|
|
896
|
+
throw this._sandboxError(
|
|
897
|
+
"invalid_sandbox_plan",
|
|
898
|
+
`Sandbox runtime probe ${field} requires a runnable bound supervisor`,
|
|
899
|
+
);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
682
902
|
runtimeProbe = {
|
|
683
903
|
kind: plan.runtimeProbe.kind,
|
|
684
904
|
attempted: plan.runtimeProbe.attempted,
|
|
@@ -708,6 +928,37 @@ class ProcessExecutionBroker extends EventEmitter {
|
|
|
708
928
|
}
|
|
709
929
|
: {}),
|
|
710
930
|
};
|
|
931
|
+
for (const field of [
|
|
932
|
+
"pluginTreeContentSnapshot",
|
|
933
|
+
...pluginTreeEvidenceFields,
|
|
934
|
+
]) {
|
|
935
|
+
if (plan.runtimeProbe[field] !== undefined) {
|
|
936
|
+
runtimeProbe[field] = plan.runtimeProbe[field];
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
for (const field of [
|
|
940
|
+
...supervisorStringFields,
|
|
941
|
+
...supervisorBooleanFields,
|
|
942
|
+
]) {
|
|
943
|
+
if (plan.runtimeProbe[field] !== undefined) {
|
|
944
|
+
runtimeProbe[field] = plan.runtimeProbe[field];
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
if (supervisorIdentity !== undefined) {
|
|
948
|
+
runtimeProbe.supervisorExecutableIdentity = {
|
|
949
|
+
path: supervisorIdentity.path,
|
|
950
|
+
fileId: {
|
|
951
|
+
dev: supervisorIdentity.fileId.dev,
|
|
952
|
+
ino: supervisorIdentity.fileId.ino,
|
|
953
|
+
},
|
|
954
|
+
sha256: supervisorIdentity.sha256,
|
|
955
|
+
bytes: supervisorIdentity.bytes,
|
|
956
|
+
mtimeMs: supervisorIdentity.mtimeMs,
|
|
957
|
+
mode: supervisorIdentity.mode,
|
|
958
|
+
uid: supervisorIdentity.uid,
|
|
959
|
+
gid: supervisorIdentity.gid,
|
|
960
|
+
};
|
|
961
|
+
}
|
|
711
962
|
}
|
|
712
963
|
const postSpawn = plan.postSpawn || { required: false, mode: "none" };
|
|
713
964
|
if (
|