@openclaw/mxc-sandbox 2026.9.3 → 2026.9.5
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/assets/activity.svg +3 -0
- package/assets/icon.png +0 -0
- package/dist/index.js +3 -0
- package/node_modules/@microsoft/mxc-sdk/README.md +170 -35
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0822172244460.json +1 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0822172716178.json +1 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0822173234482.json +1 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/bsi.cose +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/bsi.json +1 -1
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/manifest.cat +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/manifest.spdx.json +1 -25812
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/lxc-exec +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/mxc-diagnostic-console.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/mxc-exec-mac +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/plm.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/unix-test-proxy +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/winhttp-proxy-shim.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/wslcsdk.dll +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/wxc-exec.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/wxc-host-prep.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/wxc-test-proxy.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/wxc-windows-sandbox-daemon.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/wxc-windows-sandbox-guest.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/wxc-wslc-daemon.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/ESRPClientLogs0822172331980.json +1 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/ESRPClientLogs0822175617587.json +1 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/bsi.cose +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/bsi.json +1 -1
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/manifest.cat +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/manifest.spdx.json +1 -25812
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
- package/node_modules/@microsoft/mxc-sdk/bin/x64/lxc-exec +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/mxc-diagnostic-console.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/plm.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/unix-test-proxy +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/winhttp-proxy-shim.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/wslcsdk.dll +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/wxc-exec.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/wxc-host-prep.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/wxc-test-proxy.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/wxc-windows-sandbox-daemon.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/wxc-windows-sandbox-guest.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/wxc-wslc-daemon.exe +0 -0
- package/node_modules/@microsoft/mxc-sdk/dist/errors.d.ts +68 -2
- package/node_modules/@microsoft/mxc-sdk/dist/errors.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/errors.js +41 -4
- package/node_modules/@microsoft/mxc-sdk/dist/errors.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/generated/v0_8_0_alpha/wire.d.ts +930 -0
- package/node_modules/@microsoft/mxc-sdk/dist/generated/v0_8_0_alpha/wire.d.ts.map +1 -0
- package/node_modules/@microsoft/mxc-sdk/dist/generated/v0_8_0_alpha/wire.js +4 -0
- package/node_modules/@microsoft/mxc-sdk/dist/generated/v0_8_0_alpha/wire.js.map +1 -0
- package/node_modules/@microsoft/mxc-sdk/dist/generated/wire.d.ts +639 -0
- package/node_modules/@microsoft/mxc-sdk/dist/generated/wire.d.ts.map +1 -0
- package/node_modules/@microsoft/mxc-sdk/dist/generated/wire.js +4 -0
- package/node_modules/@microsoft/mxc-sdk/dist/generated/wire.js.map +1 -0
- package/node_modules/@microsoft/mxc-sdk/dist/helper.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/helper.js +19 -1
- package/node_modules/@microsoft/mxc-sdk/dist/helper.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/index.d.ts +13 -4
- package/node_modules/@microsoft/mxc-sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/index.js +18 -4
- package/node_modules/@microsoft/mxc-sdk/dist/index.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/platform.d.ts +60 -10
- package/node_modules/@microsoft/mxc-sdk/dist/platform.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/platform.js +217 -90
- package/node_modules/@microsoft/mxc-sdk/dist/platform.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/sandbox.d.ts +23 -3
- package/node_modules/@microsoft/mxc-sdk/dist/sandbox.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/sandbox.js +86 -37
- package/node_modules/@microsoft/mxc-sdk/dist/sandbox.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-helper.d.ts +7 -5
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-helper.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-helper.js +55 -8
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-helper.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-types.d.ts +238 -46
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-types.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-types.js +1 -18
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware-types.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware.d.ts +17 -2
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware.js +18 -4
- package/node_modules/@microsoft/mxc-sdk/dist/state-aware.js.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/dist/types.d.ts +145 -12
- package/node_modules/@microsoft/mxc-sdk/dist/types.d.ts.map +1 -1
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/lib/windowsConoutConnection.js +18 -12
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/lib/windowsPtyAgent.js +44 -12
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/package.json +1 -1
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
- package/node_modules/@microsoft/mxc-sdk/package.json +2 -2
- package/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +10 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +272 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/openclaw.plugin.json +21 -0
- package/package.json +10 -7
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0613045248271.json +0 -1
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0613045452045.json +0 -1
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0613050048636.json +0 -1
- package/node_modules/@microsoft/mxc-sdk/bin/arm64/linux-test-proxy +0 -0
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/ESRPClientLogs0613045534391.json +0 -1
- package/node_modules/@microsoft/mxc-sdk/bin/x64/_manifest/spdx_2.2/ESRPClientLogs0613050929378.json +0 -1
- package/node_modules/@microsoft/mxc-sdk/bin/x64/linux-test-proxy +0 -0
- package/node_modules/zod/src/v4/core/config.ts +0 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.js","sourceRoot":"","sources":["../../src/generated/wire.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,eAAe,EAAwF,MAAM,YAAY,CAAC;AAEnI,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,8DAA8D;AAC9D,eAAO,MAAM,WAAW,EAAE,MAWtB,CAAC;AAIL,wEAAwE;AACxE,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAID;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CASjF;AAED,mFAAmF;AACnF,wBAAgB,uCAAuC,IAAI,IAAI,CAE9D;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yEAAyE;IACzE,MAAM,CAAC,EAAE,UAAU,CAAC;I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,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yEAAyE;IACzE,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAInD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAmBrE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,mBAAmB,GAC3B;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAiD5C;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,mBAAwB,GAChC;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAkF5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CA6BpB"}
|
|
@@ -212,7 +212,25 @@ export function resolveExecutableAndArgs(config, options = {}) {
|
|
|
212
212
|
`Available methods: ${platformSupport.availableMethods.join(', ')}`);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
|
|
215
|
+
// `network.proxy.builtinTestServer` is testing-only, deliberately-permissive
|
|
216
|
+
// scaffolding that the native binary gates behind `--allow-testing-features`.
|
|
217
|
+
// Mirror that fail-closed posture at the SDK boundary: the caller must opt in
|
|
218
|
+
// explicitly via `allowTestingFeatures` (a distinct axis from `experimental`).
|
|
219
|
+
// Forwarding the flag automatically whenever the policy used the feature would
|
|
220
|
+
// make the gate meaningless — requesting the dangerous feature would silently
|
|
221
|
+
// enable the gate that is supposed to guard it.
|
|
222
|
+
const proxy = config.network?.proxy;
|
|
223
|
+
const usesBuiltinTestServer = proxy?.builtinTestServer === true;
|
|
224
|
+
if (usesBuiltinTestServer && !options.allowTestingFeatures) {
|
|
225
|
+
throw new Error("network.proxy.builtinTestServer is a testing-only feature. Set " +
|
|
226
|
+
"'allowTestingFeatures: true' in SandboxSpawnOptions to enable it. For " +
|
|
227
|
+
"production, point network.proxy at a real HTTP proxy via 'localhost' or 'url'.");
|
|
228
|
+
}
|
|
229
|
+
const resolved = resolveBinaryAndCommonArgs(JSON.stringify(config), options);
|
|
230
|
+
if (usesBuiltinTestServer) {
|
|
231
|
+
resolved.args.push('--allow-testing-features');
|
|
232
|
+
}
|
|
233
|
+
return resolved;
|
|
216
234
|
}
|
|
217
235
|
/**
|
|
218
236
|
* Sets up logging and resolves the executable path + args.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAuC,gBAAgB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACnI,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEjH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAW,CAAC,GAAG,EAAE;IACrC,IAAI,CAAC;QAC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AG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE;QACrC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;QACvB,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;QACf,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC3E,kFAAkF;QAClF,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,CAAC;QACD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;QAC3E,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC9D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
* MXC SDK - TypeScript SDK for Microsoft eXecution Containers
|
|
3
3
|
*
|
|
4
4
|
* This package provides a Node.js interface for spawning sandboxed containers.
|
|
5
|
+
* For direct Windows ProcessContainer configs, set
|
|
6
|
+
* `processContainer.learningMode: true` to enable deny-and-record learning
|
|
7
|
+
* mode. Learning-mode capability names are reserved and must not be supplied
|
|
8
|
+
* directly in `processContainer.capabilities`.
|
|
9
|
+
*
|
|
10
|
+
* Schema `0.8.0-alpha` policies may use directional
|
|
11
|
+
* `network.egress` / `network.ingress`, `runtimeConfig.networkProxy`, and
|
|
12
|
+
* `processContainer.network.allowedProxyPeer` through `createConfigFromPolicy`.
|
|
13
|
+
* These fields cannot be mixed with legacy network fields.
|
|
5
14
|
*
|
|
6
15
|
* @example
|
|
7
16
|
* ```typescript
|
|
@@ -9,7 +18,7 @@
|
|
|
9
18
|
*
|
|
10
19
|
* if (getPlatformSupport().isSupported) {
|
|
11
20
|
* const policy: SandboxPolicy = {
|
|
12
|
-
* version: '0.
|
|
21
|
+
* version: '0.6.0-alpha',
|
|
13
22
|
* network: { allowOutbound: true },
|
|
14
23
|
* };
|
|
15
24
|
*
|
|
@@ -21,11 +30,11 @@
|
|
|
21
30
|
*
|
|
22
31
|
* @packageDocumentation
|
|
23
32
|
*/
|
|
24
|
-
export { SandboxPolicy, SandboxingMethod, IsolationTier, ContainmentType, ContainmentTypes, ContainmentBackend, ExperimentalBackends, ContainerConfig, PlatformSupport, UiCapabilitySupport, } from './types.js';
|
|
33
|
+
export { SandboxPolicy, SandboxingMethod, IsolationTier, ContainmentType, ContainmentTypes, ContainmentBackend, ExperimentalBackends, ContainerConfig, ProcessContainerConfig, NetworkAction, NetworkProtocol, NetworkPeerConfig, NetworkPortConfig, NetworkRuleConfig, NetworkEgressConfig, NetworkIngressConfig, RuntimeConfig, PlatformSupport, UiCapabilitySupport, } from './types.js';
|
|
25
34
|
export { getPlatformSupport, } from './platform.js';
|
|
26
35
|
export { createConfigFromPolicy, spawnSandbox, spawnSandboxAsync, spawnSandboxFromConfig, buildSandboxPayload, SandboxSpawnOptions, } from './sandbox.js';
|
|
27
36
|
export { getAvailableToolsPolicy, getUserProfilePolicy, getTemporaryFilesPolicy, FilesystemPolicyResult, ToolsPolicyOptions, } from './policy.js';
|
|
28
|
-
export { ErrorCode, MxcError, mxcErrorFromCode, } from './errors.js';
|
|
29
|
-
export { Phase, StateAwareContainmentBackend, SandboxId,
|
|
37
|
+
export { ErrorCode, MxcError, MxcErrorFields, mxcErrorFromCode, } from './errors.js';
|
|
38
|
+
export { Phase, StateAwareContainmentBackend, SandboxId, IsolationSessionProvisionConfig, IsolationSessionStartConfig, IsolationSessionExecConfig, IsolationSessionStopConfig, IsolationSessionDeprovisionConfig, IsolationSessionProvisionMetadata, WindowsSandboxProvisionConfig, WindowsSandboxStartConfig, WindowsSandboxExecConfig, WindowsSandboxStopConfig, WindowsSandboxDeprovisionConfig, WslcProvisionConfig, WslcStartConfig, WslcExecConfig, WslcStopConfig, WslcDeprovisionConfig, ConfigsForBackend, ProvisionConfigFor, StartConfigFor, ExecConfigFor, StopConfigFor, DeprovisionConfigFor, StateAwareMetadata, ProvisionMetadataFor, StartMetadataFor, StopMetadataFor, DeprovisionMetadataFor, ProvisionResult, StartResult, StopResult, DeprovisionResult, ExecResult, } from './state-aware-types.js';
|
|
30
39
|
export { provisionSandbox, startSandbox, execInSandbox, execInSandboxAsync, stopSandbox, deprovisionSandbox, } from './state-aware.js';
|
|
31
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAUrB,OAAO,EACL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,EACL,4BAA4B,EAC5B,SAAS,EACT,+BAA+B,EAC/B,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,iCAAiC,EACjC,iCAAiC,EACjC,6BAA6B,EAC7B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,+BAA+B,EAC/B,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,UAAU,GACX,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* MXC SDK - TypeScript SDK for Microsoft eXecution Containers
|
|
5
5
|
*
|
|
6
6
|
* This package provides a Node.js interface for spawning sandboxed containers.
|
|
7
|
+
* For direct Windows ProcessContainer configs, set
|
|
8
|
+
* `processContainer.learningMode: true` to enable deny-and-record learning
|
|
9
|
+
* mode. Learning-mode capability names are reserved and must not be supplied
|
|
10
|
+
* directly in `processContainer.capabilities`.
|
|
11
|
+
*
|
|
12
|
+
* Schema `0.8.0-alpha` policies may use directional
|
|
13
|
+
* `network.egress` / `network.ingress`, `runtimeConfig.networkProxy`, and
|
|
14
|
+
* `processContainer.network.allowedProxyPeer` through `createConfigFromPolicy`.
|
|
15
|
+
* These fields cannot be mixed with legacy network fields.
|
|
7
16
|
*
|
|
8
17
|
* @example
|
|
9
18
|
* ```typescript
|
|
@@ -11,7 +20,7 @@
|
|
|
11
20
|
*
|
|
12
21
|
* if (getPlatformSupport().isSupported) {
|
|
13
22
|
* const policy: SandboxPolicy = {
|
|
14
|
-
* version: '0.
|
|
23
|
+
* version: '0.6.0-alpha',
|
|
15
24
|
* network: { allowOutbound: true },
|
|
16
25
|
* };
|
|
17
26
|
*
|
|
@@ -31,10 +40,15 @@ export { getPlatformSupport, } from './platform.js';
|
|
|
31
40
|
export { createConfigFromPolicy, spawnSandbox, spawnSandboxAsync, spawnSandboxFromConfig, buildSandboxPayload, } from './sandbox.js';
|
|
32
41
|
// Export policy discovery functions
|
|
33
42
|
export { getAvailableToolsPolicy, getUserProfilePolicy, getTemporaryFilesPolicy, } from './policy.js';
|
|
34
|
-
// Export typed wire-format errors
|
|
43
|
+
// Export typed wire-format errors.
|
|
44
|
+
//
|
|
45
|
+
// `WireError` and `mxcErrorFromEnvelope` are deliberately NOT re-exported:
|
|
46
|
+
// they exist so the SDK's own envelope-parsing sites share one widening
|
|
47
|
+
// point, and keeping them module-internal leaves the wire-parsing internals
|
|
48
|
+
// free to change. `MxcErrorFields` *is* exported because it is the parameter
|
|
49
|
+
// type of a public `MxcError` constructor overload — hiding the name would
|
|
50
|
+
// leave the type usable via an object literal but impossible to name.
|
|
35
51
|
export { MxcError, mxcErrorFromCode, } from './errors.js';
|
|
36
|
-
// Export state-aware lifecycle types
|
|
37
|
-
export { IsolationSessionUserConfig, } from './state-aware-types.js';
|
|
38
52
|
// Export state-aware lifecycle functions
|
|
39
53
|
export { provisionSandbox, startSandbox, execInSandbox, execInSandboxAsync, stopSandbox, deprovisionSandbox, } from './state-aware.js';
|
|
40
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,eAAe;AACf,OAAO,EAKL,gBAAgB,EAEhB,oBAAoB,GAarB,MAAM,YAAY,CAAC;AAEpB,sCAAsC;AACtC,OAAO,EACL,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB,oCAAoC;AACpC,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,oCAAoC;AACpC,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,GAGxB,MAAM,aAAa,CAAC;AAErB,mCAAmC;AACnC,EAAE;AACF,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,sEAAsE;AACtE,OAAO,EAEL,QAAQ,EAER,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAyCrB,yCAAyC;AACzC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { PlatformSupport } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Result of querying the host's Windows build number, or `null` when the
|
|
4
|
-
* registry values are missing or unparseable.
|
|
5
|
-
*/
|
|
6
|
-
type WindowsBuild = {
|
|
7
|
-
major: number;
|
|
8
|
-
minor: number;
|
|
9
|
-
} | null;
|
|
10
|
-
/** @internal Test-only: override the Windows build lookup. */
|
|
11
|
-
export declare function _setWindowsBuildQuery(fn: (() => WindowsBuild) | null): void;
|
|
12
2
|
/**
|
|
13
3
|
* Get platform support information.
|
|
14
4
|
*
|
|
@@ -31,6 +21,66 @@ export declare function _resetPlatformSupportCache(): void;
|
|
|
31
21
|
type ProbeRunner = () => string;
|
|
32
22
|
/** @internal Test-only: override the probe runner. */
|
|
33
23
|
export declare function _setProbeRunner(runner: ProbeRunner | null): void;
|
|
24
|
+
/** Outcome of the Bubblewrap probe: available, or unavailable with a reason. */
|
|
25
|
+
type BubblewrapProbe = {
|
|
26
|
+
available: true;
|
|
27
|
+
} | {
|
|
28
|
+
available: false;
|
|
29
|
+
reason: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Raw result of running `bwrap --version`, normalized across the ways the call
|
|
33
|
+
* can fail. Mirrors the cases the Rust `probe_bwrap` distinguishes.
|
|
34
|
+
*/
|
|
35
|
+
type BwrapVersionResult = {
|
|
36
|
+
kind: 'output';
|
|
37
|
+
stdout: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'notFound';
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'failed';
|
|
42
|
+
status: number | null;
|
|
43
|
+
detail: string;
|
|
44
|
+
};
|
|
45
|
+
/** @internal Test-only: override the `bwrap --version` runner. */
|
|
46
|
+
export declare function _setBwrapVersionRunner(fn: (() => BwrapVersionResult) | null): void;
|
|
47
|
+
/**
|
|
48
|
+
* Parse the version out of a `bwrap --version` line such as
|
|
49
|
+
* `"bubblewrap 0.11.2"`.
|
|
50
|
+
*
|
|
51
|
+
* Anchored on the `bubblewrap` package name, which is what makes unrecognized
|
|
52
|
+
* output fail closed: without it any numeric token in arbitrary output (say
|
|
53
|
+
* `"some other tool 999"`) would be read as a version and clear the
|
|
54
|
+
* minimum-version gate.
|
|
55
|
+
*
|
|
56
|
+
* Lenient about what *surrounds* each number so distro-patched version strings
|
|
57
|
+
* (`0.4.1-1`, a bare `0.6`) still resolve: the version token is split on `.`
|
|
58
|
+
* and each of the (up to three) components contributes its leading digits.
|
|
59
|
+
* Debian's `+really` marker is honored rather than ignored — see below.
|
|
60
|
+
*
|
|
61
|
+
* Strict about components that are *present but not numeric*: only a component
|
|
62
|
+
* that is genuinely absent defaults to `0`, so `"0.6.invalid"` is rejected
|
|
63
|
+
* rather than silently read as `0.6.0`.
|
|
64
|
+
*
|
|
65
|
+
* @internal Exported for unit tests.
|
|
66
|
+
* @returns `[major, minor, patch]`, or `null` when the version cannot be determined.
|
|
67
|
+
*/
|
|
68
|
+
export declare function _parseBwrapVersion(output: string): [number, number, number] | null;
|
|
69
|
+
/**
|
|
70
|
+
* Check whether Bubblewrap (bwrap) is installed *and* new enough.
|
|
71
|
+
*
|
|
72
|
+
* Presence on PATH is not sufficient: a `bwrap` older than
|
|
73
|
+
* {@link MIN_BWRAP_VERSION} would reject flags the backend always emits and
|
|
74
|
+
* fail at spawn time with an opaque "unknown option" error. Unparsable output
|
|
75
|
+
* fails closed — without a version we cannot assert the required flags exist.
|
|
76
|
+
*
|
|
77
|
+
* Mirrors `probe_bwrap` in
|
|
78
|
+
* `src/backends/bubblewrap/common/src/bwrap_version.rs`, including the
|
|
79
|
+
* distinction between a missing binary and a present-but-broken one.
|
|
80
|
+
*
|
|
81
|
+
* @internal Exported for unit tests.
|
|
82
|
+
*/
|
|
83
|
+
export declare function _probeBubblewrap(): BubblewrapProbe;
|
|
34
84
|
/**
|
|
35
85
|
* Find the wxc-exec executable
|
|
36
86
|
* Searches in common locations relative to the SDK package,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAKA,OAAO,EAAqC,eAAe,EAAuB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAKA,OAAO,EAAqC,eAAe,EAAuB,MAAM,YAAY,CAAC;AAuDrG;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAOpD;AAID,6DAA6D;AAC7D,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED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LToPath } from 'node:url';
|
|
6
|
+
import { diagLog } from './diagnostic.js';
|
|
6
7
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
8
|
const __dirname = path.dirname(__filename);
|
|
8
9
|
/**
|
|
@@ -20,75 +21,6 @@ function getSdkPackageRoot() {
|
|
|
20
21
|
return path.join(__dirname, '..');
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Query Windows Registry for a value
|
|
25
|
-
* @param key - Registry key path (e.g., "HKLM\\Software\\...")
|
|
26
|
-
* @param valueName - Name of the value to query
|
|
27
|
-
* @returns The registry value as a string, or null if not found
|
|
28
|
-
*/
|
|
29
|
-
function queryWindowsRegistry(key, valueName) {
|
|
30
|
-
try {
|
|
31
|
-
const command = `reg query "${key}" /v "${valueName}"`;
|
|
32
|
-
const output = execSync(command, { encoding: 'utf-8', stdio: 'pipe' });
|
|
33
|
-
// Parse output - format is:
|
|
34
|
-
// HKEY_LOCAL_MACHINE\...
|
|
35
|
-
// ValueName REG_SZ Value
|
|
36
|
-
const lines = output.split('\n');
|
|
37
|
-
for (const line of lines) {
|
|
38
|
-
if (line.includes(valueName)) {
|
|
39
|
-
// Extract value after REG_SZ or REG_DWORD
|
|
40
|
-
const match = line.match(/REG_\w+\s+(.+)/);
|
|
41
|
-
if (match) {
|
|
42
|
-
return match[1].trim();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
catch {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Default implementation that reads `CurrentBuild` / `UBR` from the
|
|
54
|
-
* registry. Replaceable via {@link _setWindowsBuildQuery} in tests so we
|
|
55
|
-
* can exercise the IsolationSession version gate deterministically.
|
|
56
|
-
*/
|
|
57
|
-
function defaultWindowsBuildQuery() {
|
|
58
|
-
const registryPath = 'HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion';
|
|
59
|
-
const currentBuild = queryWindowsRegistry(registryPath, 'CurrentBuild');
|
|
60
|
-
const ubrValue = queryWindowsRegistry(registryPath, 'UBR');
|
|
61
|
-
if (!currentBuild || !ubrValue) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
const major = parseInt(currentBuild, 10);
|
|
65
|
-
const minor = Number(ubrValue);
|
|
66
|
-
if (isNaN(major) || isNaN(minor)) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return { major, minor };
|
|
70
|
-
}
|
|
71
|
-
let windowsBuildQuery = defaultWindowsBuildQuery;
|
|
72
|
-
/** @internal Test-only: override the Windows build lookup. */
|
|
73
|
-
export function _setWindowsBuildQuery(fn) {
|
|
74
|
-
windowsBuildQuery = fn ?? defaultWindowsBuildQuery;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Check whether the host supports the IsolationSession backend.
|
|
78
|
-
* Requires Windows Insider Preview build 26300.8553 or later.
|
|
79
|
-
*
|
|
80
|
-
* No internal cache — `getPlatformSupport` memoizes the full result, and
|
|
81
|
-
* registry reads are cheap relative to the rest of the probe.
|
|
82
|
-
*/
|
|
83
|
-
function isIsoSessionSupported() {
|
|
84
|
-
const build = windowsBuildQuery();
|
|
85
|
-
if (!build) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
// Pin to the Windows Insider Preview build that introduced IsolationSession
|
|
89
|
-
// (26300.8553+). Other major builds are not yet supported.
|
|
90
|
-
return build.major === 26300 && build.minor >= 8553;
|
|
91
|
-
}
|
|
92
24
|
let windowsSandboxAvailableCache;
|
|
93
25
|
/**
|
|
94
26
|
* Check if Windows Sandbox feature is enabled via DISM.
|
|
@@ -177,11 +109,12 @@ function isUiCapabilitySupport(value) {
|
|
|
177
109
|
return UI_CAPABILITY_FIELDS.every((field) => typeof capabilities[field] === 'boolean');
|
|
178
110
|
}
|
|
179
111
|
/**
|
|
180
|
-
* Run the probe binary and merge its results into `support
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
112
|
+
* Run the probe binary and merge its results into `support`: the isolation
|
|
113
|
+
* tier, any warnings, portable UI capabilities, and — when the probe reports
|
|
114
|
+
* the isolation-session service available — the `isolation_session` method.
|
|
115
|
+
* On any failure (binary missing, timeout, malformed JSON), the function
|
|
116
|
+
* silently leaves those fields unset, so callers see the same contract as
|
|
117
|
+
* pre-probe SDKs.
|
|
185
118
|
*/
|
|
186
119
|
function populateIsolationFromProbe(support) {
|
|
187
120
|
try {
|
|
@@ -202,6 +135,9 @@ function populateIsolationFromProbe(support) {
|
|
|
202
135
|
if (isUiCapabilitySupport(facts.uiCapabilities)) {
|
|
203
136
|
support.uiCapabilities = facts.uiCapabilities;
|
|
204
137
|
}
|
|
138
|
+
if (facts.isolationSessionAvailable === true) {
|
|
139
|
+
support.availableMethods.push('isolation_session');
|
|
140
|
+
}
|
|
205
141
|
}
|
|
206
142
|
}
|
|
207
143
|
}
|
|
@@ -233,15 +169,24 @@ function computeSupport() {
|
|
|
233
169
|
const methods = [];
|
|
234
170
|
if (isLxcAvailable())
|
|
235
171
|
methods.push('lxc');
|
|
236
|
-
|
|
172
|
+
const bubblewrap = _probeBubblewrap();
|
|
173
|
+
if (bubblewrap.available) {
|
|
237
174
|
methods.push('bubblewrap');
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
// Always surface why bwrap is unavailable. When LXC is present the
|
|
178
|
+
// platform is still supported, so `reason` — documented as why the
|
|
179
|
+
// platform is *not* supported — must stay unset, and the detail would
|
|
180
|
+
// otherwise be dropped with no way to diagnose the missing backend.
|
|
181
|
+
diagLog(`getPlatformSupport: bubblewrap unavailable — ${bubblewrap.reason}`);
|
|
182
|
+
if (methods.length === 0) {
|
|
183
|
+
support.reason = `Neither LXC nor Bubblewrap is available on this system (${bubblewrap.reason})`;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
238
186
|
if (methods.length > 0) {
|
|
239
187
|
support.isSupported = true;
|
|
240
188
|
support.availableMethods = methods;
|
|
241
189
|
}
|
|
242
|
-
else {
|
|
243
|
-
support.reason = 'Neither LXC nor Bubblewrap is available on this system';
|
|
244
|
-
}
|
|
245
190
|
return support;
|
|
246
191
|
}
|
|
247
192
|
if (platform !== 'win32') {
|
|
@@ -253,9 +198,6 @@ function computeSupport() {
|
|
|
253
198
|
if (isWindowsSandboxAvailable()) {
|
|
254
199
|
support.availableMethods.push('windows_sandbox');
|
|
255
200
|
}
|
|
256
|
-
if (isIsoSessionSupported()) {
|
|
257
|
-
support.availableMethods.push('isolation_session');
|
|
258
|
-
}
|
|
259
201
|
populateIsolationFromProbe(support);
|
|
260
202
|
return support;
|
|
261
203
|
}
|
|
@@ -272,16 +214,201 @@ function isLxcAvailable() {
|
|
|
272
214
|
}
|
|
273
215
|
}
|
|
274
216
|
/**
|
|
275
|
-
*
|
|
217
|
+
* Minimum `bwrap` version the Bubblewrap backend supports, as
|
|
218
|
+
* `[major, minor, patch]`.
|
|
219
|
+
*
|
|
220
|
+
* This is the oldest release that has **every** flag the Rust argument builder
|
|
221
|
+
* emits. `--ro-bind-try` (deny-by-default baseline mounts) landed in bwrap
|
|
222
|
+
* 0.3.1 and `--clearenv` (minimal sandbox environment) in 0.5.0, so
|
|
223
|
+
* `--clearenv` sets the floor.
|
|
224
|
+
*
|
|
225
|
+
* Mirrors `MIN_BWRAP_VERSION` in
|
|
226
|
+
* `src/backends/bubblewrap/common/src/bwrap_version.rs` — keep both in sync.
|
|
227
|
+
*/
|
|
228
|
+
const MIN_BWRAP_VERSION = [0, 5, 0];
|
|
229
|
+
/**
|
|
230
|
+
* Whether a `bwrap` candidate exists anywhere on `PATH`.
|
|
231
|
+
*
|
|
232
|
+
* Linux reports `ENOENT` both for a genuinely absent binary and for one that
|
|
233
|
+
* exists but cannot be executed (a missing ELF interpreter or script shebang
|
|
234
|
+
* target), so the spawn error alone cannot tell `notFound` from `failed`. A
|
|
235
|
+
* candidate on `PATH` means the package is installed and the failure is a
|
|
236
|
+
* broken install.
|
|
276
237
|
*/
|
|
277
|
-
function
|
|
238
|
+
function bwrapExistsOnPath() {
|
|
239
|
+
const pathVar = process.env.PATH;
|
|
240
|
+
if (!pathVar)
|
|
241
|
+
return false;
|
|
242
|
+
return pathVar
|
|
243
|
+
.split(path.delimiter)
|
|
244
|
+
.some((dir) => dir !== '' && fs.existsSync(path.join(dir, 'bwrap')));
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* How long to wait for `bwrap --version` before giving up.
|
|
248
|
+
*
|
|
249
|
+
* `getPlatformSupport()` is synchronous, so without a bound a `bwrap` that
|
|
250
|
+
* hangs — a wrapper script on PATH, a binary on a stalled network mount —
|
|
251
|
+
* would block the caller indefinitely. Printing a version string is
|
|
252
|
+
* near-instant, so this is generous.
|
|
253
|
+
*/
|
|
254
|
+
const BWRAP_VERSION_TIMEOUT_MS = 5000;
|
|
255
|
+
/**
|
|
256
|
+
* Default runner for `bwrap --version`. Uses `execFileSync` rather than a
|
|
257
|
+
* shell so a missing binary surfaces as `ENOENT` instead of the shell's
|
|
258
|
+
* indistinguishable exit code 127 — that separation is what lets us report
|
|
259
|
+
* "not installed" and "installed but broken" differently.
|
|
260
|
+
*
|
|
261
|
+
* Replaceable in unit tests via {@link _setBwrapVersionRunner}.
|
|
262
|
+
*/
|
|
263
|
+
function defaultBwrapVersionRunner() {
|
|
278
264
|
try {
|
|
279
|
-
|
|
280
|
-
|
|
265
|
+
return {
|
|
266
|
+
kind: 'output',
|
|
267
|
+
stdout: execFileSync('bwrap', ['--version'], {
|
|
268
|
+
encoding: 'utf-8',
|
|
269
|
+
stdio: 'pipe',
|
|
270
|
+
timeout: BWRAP_VERSION_TIMEOUT_MS,
|
|
271
|
+
}),
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
catch (err) {
|
|
275
|
+
const e = err;
|
|
276
|
+
// `ENOENT` covers both an absent binary and a present-but-unusable one
|
|
277
|
+
// (missing ELF interpreter / shebang target), so confirm the binary is
|
|
278
|
+
// really absent before blaming the package manager.
|
|
279
|
+
if (e.code === 'ENOENT' && !bwrapExistsOnPath()) {
|
|
280
|
+
return { kind: 'notFound' };
|
|
281
|
+
}
|
|
282
|
+
// Timed out: the child was killed, so there is no meaningful exit status.
|
|
283
|
+
if (e.code === 'ETIMEDOUT' || e.killed) {
|
|
284
|
+
return {
|
|
285
|
+
kind: 'failed',
|
|
286
|
+
status: null,
|
|
287
|
+
detail: `timed out after ${BWRAP_VERSION_TIMEOUT_MS}ms`,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
return {
|
|
291
|
+
kind: 'failed',
|
|
292
|
+
status: e.status ?? null,
|
|
293
|
+
detail: e.stderr?.toString().trim() || e.message,
|
|
294
|
+
};
|
|
281
295
|
}
|
|
282
|
-
|
|
283
|
-
|
|
296
|
+
}
|
|
297
|
+
let bwrapVersionRunner = defaultBwrapVersionRunner;
|
|
298
|
+
/** @internal Test-only: override the `bwrap --version` runner. */
|
|
299
|
+
export function _setBwrapVersionRunner(fn) {
|
|
300
|
+
bwrapVersionRunner = fn ?? defaultBwrapVersionRunner;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Parse the version out of a `bwrap --version` line such as
|
|
304
|
+
* `"bubblewrap 0.11.2"`.
|
|
305
|
+
*
|
|
306
|
+
* Anchored on the `bubblewrap` package name, which is what makes unrecognized
|
|
307
|
+
* output fail closed: without it any numeric token in arbitrary output (say
|
|
308
|
+
* `"some other tool 999"`) would be read as a version and clear the
|
|
309
|
+
* minimum-version gate.
|
|
310
|
+
*
|
|
311
|
+
* Lenient about what *surrounds* each number so distro-patched version strings
|
|
312
|
+
* (`0.4.1-1`, a bare `0.6`) still resolve: the version token is split on `.`
|
|
313
|
+
* and each of the (up to three) components contributes its leading digits.
|
|
314
|
+
* Debian's `+really` marker is honored rather than ignored — see below.
|
|
315
|
+
*
|
|
316
|
+
* Strict about components that are *present but not numeric*: only a component
|
|
317
|
+
* that is genuinely absent defaults to `0`, so `"0.6.invalid"` is rejected
|
|
318
|
+
* rather than silently read as `0.6.0`.
|
|
319
|
+
*
|
|
320
|
+
* @internal Exported for unit tests.
|
|
321
|
+
* @returns `[major, minor, patch]`, or `null` when the version cannot be determined.
|
|
322
|
+
*/
|
|
323
|
+
export function _parseBwrapVersion(output) {
|
|
324
|
+
// bwrap prints its PACKAGE_STRING, "bubblewrap <version>"; that leading name
|
|
325
|
+
// has been stable since 0.1.0.
|
|
326
|
+
const tokens = output.trim().split(/\s+/);
|
|
327
|
+
if (tokens[0]?.toLowerCase() !== 'bubblewrap' || !tokens[1])
|
|
328
|
+
return null;
|
|
329
|
+
// Debian's `+really` marker means the package ships the version that FOLLOWS
|
|
330
|
+
// it, so `0.5.0+really0.4.1` is really 0.4.1 — which predates `--clearenv`
|
|
331
|
+
// and must not clear the gate.
|
|
332
|
+
const marker = tokens[1].lastIndexOf('+really');
|
|
333
|
+
const token = marker === -1 ? tokens[1] : tokens[1].slice(marker + '+really'.length);
|
|
334
|
+
const components = [];
|
|
335
|
+
// Every component must be numeric, including ones past the patch: they are
|
|
336
|
+
// not significant, but `0.5.0.invalid` is an unrecognized banner rather than
|
|
337
|
+
// 0.5.0. Validating (rather than rejecting on count) keeps a distro
|
|
338
|
+
// four-part build such as `0.6.0.1` working.
|
|
339
|
+
for (const part of token.split('.')) {
|
|
340
|
+
const digits = /^\d+/.exec(part);
|
|
341
|
+
// Present but non-numeric: fail closed rather than guessing 0.
|
|
342
|
+
if (!digits)
|
|
343
|
+
return null;
|
|
344
|
+
const value = parseInt(digits[0], 10);
|
|
345
|
+
// Mirror the Rust parser's `u32`: a larger value is not something bwrap
|
|
346
|
+
// could print, and accepting it would let this gate admit a banner the
|
|
347
|
+
// backend's gate rejects.
|
|
348
|
+
if (value > 0xffffffff)
|
|
349
|
+
return null;
|
|
350
|
+
components.push(value);
|
|
351
|
+
}
|
|
352
|
+
// Only a genuinely absent component defaults to 0, so "0.6" is 0.6.0.
|
|
353
|
+
return [components[0], components[1] ?? 0, components[2] ?? 0];
|
|
354
|
+
}
|
|
355
|
+
/** Compare two `[major, minor, patch]` tuples lexicographically. */
|
|
356
|
+
function compareVersions(a, b) {
|
|
357
|
+
for (let i = 0; i < 3; i++) {
|
|
358
|
+
if (a[i] !== b[i])
|
|
359
|
+
return a[i] - b[i];
|
|
284
360
|
}
|
|
361
|
+
return 0;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Check whether Bubblewrap (bwrap) is installed *and* new enough.
|
|
365
|
+
*
|
|
366
|
+
* Presence on PATH is not sufficient: a `bwrap` older than
|
|
367
|
+
* {@link MIN_BWRAP_VERSION} would reject flags the backend always emits and
|
|
368
|
+
* fail at spawn time with an opaque "unknown option" error. Unparsable output
|
|
369
|
+
* fails closed — without a version we cannot assert the required flags exist.
|
|
370
|
+
*
|
|
371
|
+
* Mirrors `probe_bwrap` in
|
|
372
|
+
* `src/backends/bubblewrap/common/src/bwrap_version.rs`, including the
|
|
373
|
+
* distinction between a missing binary and a present-but-broken one.
|
|
374
|
+
*
|
|
375
|
+
* @internal Exported for unit tests.
|
|
376
|
+
*/
|
|
377
|
+
export function _probeBubblewrap() {
|
|
378
|
+
const minVersion = MIN_BWRAP_VERSION.join('.');
|
|
379
|
+
const result = bwrapVersionRunner();
|
|
380
|
+
if (result.kind === 'notFound') {
|
|
381
|
+
return {
|
|
382
|
+
available: false,
|
|
383
|
+
reason: `Bubblewrap (bwrap) is not installed or not on PATH; version ${minVersion} or newer is required`,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
if (result.kind === 'failed') {
|
|
387
|
+
// Present but broken: do not send the user to their package manager for a
|
|
388
|
+
// package they already have.
|
|
389
|
+
// Covers both a spawn failure and termination by a signal, neither of
|
|
390
|
+
// which yields an exit code.
|
|
391
|
+
const where = result.status === null ? 'failed without an exit status' : `exited with status ${result.status}`;
|
|
392
|
+
const detail = result.detail ? `: ${result.detail}` : '';
|
|
393
|
+
return {
|
|
394
|
+
available: false,
|
|
395
|
+
reason: `Bubblewrap (bwrap) is present but \`bwrap --version\` ${where}${detail}; version ${minVersion} or newer is required`,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
const version = _parseBwrapVersion(result.stdout);
|
|
399
|
+
if (!version) {
|
|
400
|
+
return {
|
|
401
|
+
available: false,
|
|
402
|
+
reason: `could not determine the Bubblewrap (bwrap) version from ${JSON.stringify(result.stdout.trim())}; version ${minVersion} or newer is required`,
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
if (compareVersions(version, MIN_BWRAP_VERSION) < 0) {
|
|
406
|
+
return {
|
|
407
|
+
available: false,
|
|
408
|
+
reason: `Bubblewrap (bwrap) ${version.join('.')} is too old; version ${minVersion} or newer is required`,
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
return { available: true };
|
|
285
412
|
}
|
|
286
413
|
/**
|
|
287
414
|
* Check if the macOS sandbox is available. `/usr/bin/sandbox-exec` is part
|
|
@@ -352,7 +479,7 @@ export function findWxcExecutable() {
|
|
|
352
479
|
}
|
|
353
480
|
const pkgRoot = getSdkPackageRoot();
|
|
354
481
|
const targetTriple = getRustTargetTriple();
|
|
355
|
-
const targetDir = path.join(pkgRoot, '..', 'src', 'target');
|
|
482
|
+
const targetDir = path.join(pkgRoot, '..', '..', 'src', 'target');
|
|
356
483
|
const possiblePaths = [
|
|
357
484
|
// Bundled in the SDK package (e.g. when installed via npm)
|
|
358
485
|
path.join(pkgRoot, 'bin', getSdkArch(), 'wxc-exec.exe'),
|
|
@@ -419,7 +546,7 @@ export function findLxcExecutable() {
|
|
|
419
546
|
}
|
|
420
547
|
const pkgRoot = getSdkPackageRoot();
|
|
421
548
|
const targetTriple = getLinuxRustTargetTriple();
|
|
422
|
-
const targetDir = path.join(pkgRoot, '..', 'src', 'target');
|
|
549
|
+
const targetDir = path.join(pkgRoot, '..', '..', 'src', 'target');
|
|
423
550
|
const possiblePaths = [
|
|
424
551
|
// Bundled in the SDK package
|
|
425
552
|
path.join(pkgRoot, 'bin', getSdkArch(), 'lxc-exec'),
|
|
@@ -454,7 +581,7 @@ export function findSeatbeltExecutable() {
|
|
|
454
581
|
}
|
|
455
582
|
}
|
|
456
583
|
const targetTriple = getDarwinRustTargetTriple();
|
|
457
|
-
const targetDir = path.join(__dirname, '..', '..', 'src', 'target');
|
|
584
|
+
const targetDir = path.join(__dirname, '..', '..', '..', 'src', 'target');
|
|
458
585
|
const possiblePaths = [
|
|
459
586
|
// Bundled in the SDK package
|
|
460
587
|
path.join(__dirname, '..', 'bin', getSdkArch(), 'mxc-exec-mac'),
|