@openclaw/mxc-sandbox 2026.9.4 → 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 -1
- 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
|
@@ -129,10 +129,24 @@ export interface ProcessContainerConfig {
|
|
|
129
129
|
name?: string;
|
|
130
130
|
/** Use least privilege mode with PROCESS_CREATION_ALL_APPLICATION_PACKAGES_OPT_OUT (default: false) */
|
|
131
131
|
leastPrivilege?: boolean;
|
|
132
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Enable deny-and-record learning mode. Failed access checks are logged while
|
|
134
|
+
* accesses remain denied and containment remains enforced.
|
|
135
|
+
*/
|
|
136
|
+
learningMode?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Additional AppContainer capabilities (e.g., "registryRead", "internetClient").
|
|
139
|
+
* Each entry must contain one capability name and must not contain a comma.
|
|
140
|
+
* The reserved learning-mode capability names must not be supplied directly.
|
|
141
|
+
*/
|
|
133
142
|
capabilities?: string[];
|
|
134
143
|
/** BaseProcess-specific UI settings (Windows only) */
|
|
135
144
|
ui?: BaseProcessUiConfig;
|
|
145
|
+
/** ProcessContainer-specific networking settings. */
|
|
146
|
+
network?: {
|
|
147
|
+
/** Package family name or AppContainer profile authorized as the loopback proxy peer. */
|
|
148
|
+
allowedProxyPeer?: string;
|
|
149
|
+
};
|
|
136
150
|
}
|
|
137
151
|
/**
|
|
138
152
|
* Filesystem access configuration
|
|
@@ -171,7 +185,25 @@ export interface NetworkConfig {
|
|
|
171
185
|
allowedHosts?: string[];
|
|
172
186
|
/** Hostnames or IP addresses to block (firewall mode only) */
|
|
173
187
|
blockedHosts?: string[];
|
|
174
|
-
/** Proxy configuration (supported on Windows ProcessContainer
|
|
188
|
+
/** Proxy configuration (supported on Windows ProcessContainer, Linux Bubblewrap,
|
|
189
|
+
* macOS Seatbelt, and WSLC). On Bubblewrap/Seatbelt/WSLC it is a cooperative
|
|
190
|
+
* env-var proxy (HTTP_PROXY/HTTPS_PROXY): well-behaved HTTP clients honor it,
|
|
191
|
+
* raw-socket clients can bypass it. `builtinTestServer` activates a bundled,
|
|
192
|
+
* testing-only proxy; the SDK rejects it unless `allowTestingFeatures: true` is
|
|
193
|
+
* set in SandboxSpawnOptions (which maps to the native `--allow-testing-features`
|
|
194
|
+
* flag).
|
|
195
|
+
*
|
|
196
|
+
* WSLC imposes additional parse-time constraints (a violating config is
|
|
197
|
+
* rejected before it runs):
|
|
198
|
+
* - Only the `{ url }` form is accepted — its containers run in their own
|
|
199
|
+
* network namespace, so the `localhost` / `builtinTestServer` loopback
|
|
200
|
+
* forms are unreachable and rejected.
|
|
201
|
+
* - The `url` scheme must be `http` or `https`.
|
|
202
|
+
* - `defaultPolicy` must be `"allow"` and both `allowedHosts` and
|
|
203
|
+
* `blockedHosts` must be empty/unset — WSLC has no in-kernel iptables, so
|
|
204
|
+
* it cannot enforce host lists, and the container needs outbound
|
|
205
|
+
* networking to reach the proxy at all.
|
|
206
|
+
* Enforcement is cooperative (no in-kernel iptables). */
|
|
175
207
|
proxy?: {
|
|
176
208
|
builtinTestServer: true;
|
|
177
209
|
} | {
|
|
@@ -181,6 +213,58 @@ export interface NetworkConfig {
|
|
|
181
213
|
};
|
|
182
214
|
/** Automatically remove firewall rules after execution (default: true). Deprecated: use lifecycle.preservePolicy. */
|
|
183
215
|
removeRulesOnExit?: boolean;
|
|
216
|
+
/** Outbound network policy. */
|
|
217
|
+
egress?: NetworkEgressConfig;
|
|
218
|
+
/** Inbound and host-loopback network policy. */
|
|
219
|
+
ingress?: NetworkIngressConfig;
|
|
220
|
+
}
|
|
221
|
+
/** Allow or deny network action. */
|
|
222
|
+
export type NetworkAction = 'allow' | 'deny';
|
|
223
|
+
/** Transport protocol selector. */
|
|
224
|
+
export type NetworkProtocol = 'tcp' | 'udp' | 'icmp' | 'any';
|
|
225
|
+
/** CIDR network peer. */
|
|
226
|
+
export interface NetworkPeerConfig {
|
|
227
|
+
/** IPv4 or IPv6 CIDR. */
|
|
228
|
+
cidr: string;
|
|
229
|
+
/** CIDRs excluded from this peer. */
|
|
230
|
+
except?: string[];
|
|
231
|
+
}
|
|
232
|
+
/** Protocol and destination-port selector. */
|
|
233
|
+
export interface NetworkPortConfig {
|
|
234
|
+
/** Transport protocol. Defaults to "any". */
|
|
235
|
+
protocol?: NetworkProtocol;
|
|
236
|
+
/** Destination port. Omission matches every port. */
|
|
237
|
+
port?: number;
|
|
238
|
+
/** Inclusive end of a destination-port range. Requires `port`. */
|
|
239
|
+
endPort?: number;
|
|
240
|
+
}
|
|
241
|
+
/** Outbound network rule. */
|
|
242
|
+
export interface NetworkRuleConfig {
|
|
243
|
+
/** Destination CIDRs. Omission matches both IP families; an explicit array must be non-empty. */
|
|
244
|
+
to?: NetworkPeerConfig[];
|
|
245
|
+
/** Destination protocols and ports. Omission matches all; an explicit array must be non-empty. */
|
|
246
|
+
ports?: NetworkPortConfig[];
|
|
247
|
+
}
|
|
248
|
+
/** Outbound network policy. */
|
|
249
|
+
export interface NetworkEgressConfig {
|
|
250
|
+
/** Action used when no explicit rule matches. Defaults to "deny". */
|
|
251
|
+
default?: NetworkAction;
|
|
252
|
+
/** Explicit allow rules. */
|
|
253
|
+
allow?: NetworkRuleConfig[];
|
|
254
|
+
/** Explicit deny rules. Deny rules take precedence. */
|
|
255
|
+
deny?: NetworkRuleConfig[];
|
|
256
|
+
}
|
|
257
|
+
/** Inbound and host-loopback network policy. */
|
|
258
|
+
export interface NetworkIngressConfig {
|
|
259
|
+
/** Default action for LAN/private-network inbound traffic. */
|
|
260
|
+
default?: NetworkAction;
|
|
261
|
+
/** Bidirectional host-loopback connectivity action. */
|
|
262
|
+
hostLoopback?: NetworkAction;
|
|
263
|
+
}
|
|
264
|
+
/** Runtime values supplied separately from sandbox policy. */
|
|
265
|
+
export interface RuntimeConfig {
|
|
266
|
+
/** HTTP/S loopback proxy URL. */
|
|
267
|
+
networkProxy?: string;
|
|
184
268
|
}
|
|
185
269
|
/**
|
|
186
270
|
* WSLC SDK configuration for Linux containers from Windows
|
|
@@ -200,19 +284,42 @@ export interface WslcConfig {
|
|
|
200
284
|
gpu?: boolean;
|
|
201
285
|
/** Path to a local tar file to import as the container image */
|
|
202
286
|
imageTarPath?: string;
|
|
203
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* Host↔container port mappings.
|
|
289
|
+
*
|
|
290
|
+
* Only TCP is currently supported by the WSLC SDK runtime. UDP is declared
|
|
291
|
+
* in the SDK header but the shipped runtime returns `E_NOTIMPL` when UDP is
|
|
292
|
+
* actually requested, so the parser hard-rejects `"udp"` with a clear
|
|
293
|
+
* message at spawn time. The `protocol` field defaults to `"tcp"` when
|
|
294
|
+
* omitted.
|
|
295
|
+
*/
|
|
204
296
|
portMappings?: PortMapping[];
|
|
205
297
|
}
|
|
206
298
|
/**
|
|
207
|
-
* Port mapping for host↔container port forwarding
|
|
299
|
+
* Port mapping for host↔container port forwarding.
|
|
208
300
|
*/
|
|
209
301
|
export interface PortMapping {
|
|
210
302
|
/** Port on the Windows host */
|
|
211
303
|
windowsPort: number;
|
|
212
304
|
/** Port inside the Linux container */
|
|
213
305
|
containerPort: number;
|
|
214
|
-
/**
|
|
215
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Transport protocol. Only `"tcp"` is currently supported; `"udp"` is
|
|
308
|
+
* rejected by the parser because the WSLC SDK runtime returns `E_NOTIMPL`
|
|
309
|
+
* for UDP even though the header declares it. Defaults to `"tcp"` when
|
|
310
|
+
* omitted.
|
|
311
|
+
*/
|
|
312
|
+
protocol?: 'tcp';
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Telemetry configuration for experimental TraceLogging ETW support.
|
|
316
|
+
*/
|
|
317
|
+
export interface TelemetryConfig {
|
|
318
|
+
/**
|
|
319
|
+
* Explicit telemetry override. `true` = force on, `false` = force off,
|
|
320
|
+
* `undefined` = off (default).
|
|
321
|
+
*/
|
|
322
|
+
enabled?: boolean;
|
|
216
323
|
}
|
|
217
324
|
/**
|
|
218
325
|
* Main WXC configuration
|
|
@@ -246,10 +353,14 @@ export interface ContainerConfig {
|
|
|
246
353
|
filesystem?: FilesystemConfig;
|
|
247
354
|
/** Network access configuration */
|
|
248
355
|
network?: NetworkConfig;
|
|
356
|
+
/** Runtime values supplied separately from sandbox policy. */
|
|
357
|
+
runtimeConfig?: RuntimeConfig;
|
|
249
358
|
/** Experimental features (only applied when --experimental flag is set) */
|
|
250
359
|
experimental?: {
|
|
251
360
|
/** WSLC SDK configuration for Linux containers from Windows */
|
|
252
361
|
wslc?: WslcConfig;
|
|
362
|
+
/** Telemetry configuration for experimental TraceLogging ETW support */
|
|
363
|
+
telemetry?: TelemetryConfig;
|
|
253
364
|
};
|
|
254
365
|
/** macOS Seatbelt sandbox configuration (macOS only) */
|
|
255
366
|
seatbelt?: SeatbeltConfig;
|
|
@@ -279,17 +390,25 @@ export type SandboxPolicy = {
|
|
|
279
390
|
};
|
|
280
391
|
/** Network access restrictions. All flags default to false (no network access). */
|
|
281
392
|
network?: {
|
|
282
|
-
/** Whether to allow outbound connections to the Internet. (default: false) */
|
|
393
|
+
/** Whether to allow outbound connections to the Internet. (default: false) Legacy network field. */
|
|
283
394
|
allowOutbound?: boolean;
|
|
284
|
-
/** Whether to allow connections to local networks. (default: false) */
|
|
395
|
+
/** Whether to allow connections to local networks. (default: false) Legacy network field. */
|
|
285
396
|
allowLocalNetwork?: boolean;
|
|
286
|
-
/** When set, ONLY these outbound hosts are reachable. Requires allowOutbound. */
|
|
397
|
+
/** When set, ONLY these outbound hosts are reachable. Requires allowOutbound. Legacy network field. */
|
|
287
398
|
allowedHosts?: string[];
|
|
288
|
-
/** Hosts to block even when outbound is allowed. Requires allowOutbound. */
|
|
399
|
+
/** Hosts to block even when outbound is allowed. Requires allowOutbound. Legacy network field. */
|
|
289
400
|
blockedHosts?: string[];
|
|
290
401
|
/**
|
|
291
|
-
* Proxy configuration. Routes
|
|
292
|
-
*
|
|
402
|
+
* Proxy configuration. Routes cooperating HTTP traffic through this proxy.
|
|
403
|
+
* Supported on Windows ProcessContainer, Linux Bubblewrap, and macOS
|
|
404
|
+
* Seatbelt. On Bubblewrap/Seatbelt it is a cooperative env-var proxy
|
|
405
|
+
* (HTTP_PROXY/HTTPS_PROXY) — raw-socket clients can bypass it. Native
|
|
406
|
+
* validation enforces backend-specific combination rules.
|
|
407
|
+
* `builtinTestServer` selects a bundled, testing-only proxy; the SDK
|
|
408
|
+
* rejects it unless `allowTestingFeatures: true` is set in
|
|
409
|
+
* SandboxSpawnOptions (which maps to the native
|
|
410
|
+
* `--allow-testing-features` flag).
|
|
411
|
+
* Legacy network field.
|
|
293
412
|
*/
|
|
294
413
|
proxy?: {
|
|
295
414
|
builtinTestServer: true;
|
|
@@ -298,6 +417,20 @@ export type SandboxPolicy = {
|
|
|
298
417
|
} | {
|
|
299
418
|
url: string;
|
|
300
419
|
};
|
|
420
|
+
/** Schema 0.8 outbound network policy. Cannot be combined with legacy network fields. */
|
|
421
|
+
egress?: NetworkEgressConfig;
|
|
422
|
+
/** Schema 0.8 inbound and host-loopback policy. Cannot be combined with legacy network fields. */
|
|
423
|
+
ingress?: NetworkIngressConfig;
|
|
424
|
+
};
|
|
425
|
+
/** Schema 0.8 runtime values supplied separately from sandbox policy. */
|
|
426
|
+
runtimeConfig?: RuntimeConfig;
|
|
427
|
+
/** Schema 0.8 ProcessContainer-specific policy. */
|
|
428
|
+
processContainer?: {
|
|
429
|
+
/** ProcessContainer-specific networking settings. */
|
|
430
|
+
network?: {
|
|
431
|
+
/** Package family name or AppContainer profile authorized as the loopback proxy peer. */
|
|
432
|
+
allowedProxyPeer?: string;
|
|
433
|
+
};
|
|
301
434
|
};
|
|
302
435
|
/** UI access restrictions. All flags default to denied. */
|
|
303
436
|
ui?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA;;;GAGG;AAGH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,eAAe,EAAiC,CAAC;AAEzF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAG1F,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B,kBAAkB,GAClB,iBAAiB,GACjB,MAAM,GACN,KAAK,GACL,SAAS,GACT,YAAY,GACZ,UAAU,GACV,mBAAmB,GACnB,YAAY,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,eAAe,GAAG,kBAAkB,CAAC,EAA8E,CAAC;AAEjK;;GAEG;A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C;IAChC,iEAAiE;IACjE,sBAAsB,EAAE,OAAO,CAAC;IAChC,6DAA6D;IAC7D,0BAA0B,EAAE,OAAO,CAAC;IACpC,uEAAuE;IACvE,yBAAyB,EAAE,OAAO,CAAC;IACnC,iEAAiE;IACjE,yBAAyB,EAAE,OAAO,CAAC;IACnC,oDAAoD;IACpD,wBAAwB,EAAE,OAAO,CAAC;IAClC,8DAA8D;IAC9D,wBAAwB,EAAE,OAAO,CAAC;IAClC,2DAA2D;IAC3D,8BAA8B,EAAE,OAAO,CAAC;IACxC,2DAA2D;IAC3D,8BAA8B,EAAE,OAAO,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,WAAW,EAAE,OAAO,CAAC;IACrB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;;OAGG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC"}
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/lib/windowsConoutConnection.js
CHANGED
|
@@ -50,25 +50,15 @@ var eventEmitter2_1 = require("./eventEmitter2");
|
|
|
50
50
|
* the timer has started.
|
|
51
51
|
*/
|
|
52
52
|
var FLUSH_DATA_INTERVAL = 1000;
|
|
53
|
-
/**
|
|
54
|
-
* Connects to and manages the lifecycle of the conout socket. This socket must be drained on
|
|
55
|
-
* another thread in order to avoid deadlocks where Conpty waits for the out socket to drain
|
|
56
|
-
* when `ClosePseudoConsole` is called. This happens when data is being written to the terminal when
|
|
57
|
-
* the pty is closed.
|
|
58
|
-
*
|
|
59
|
-
* See also:
|
|
60
|
-
* - https://github.com/microsoft/node-pty/issues/375
|
|
61
|
-
* - https://github.com/microsoft/vscode/issues/76548
|
|
62
|
-
* - https://github.com/microsoft/terminal/issues/1810
|
|
63
|
-
* - https://docs.microsoft.com/en-us/windows/console/closepseudoconsole
|
|
64
|
-
*/
|
|
65
53
|
var ConoutConnection = /** @class */ (function () {
|
|
66
54
|
function ConoutConnection(_conoutPipeName, _useConptyDll) {
|
|
67
55
|
var _this = this;
|
|
68
56
|
this._conoutPipeName = _conoutPipeName;
|
|
69
57
|
this._useConptyDll = _useConptyDll;
|
|
70
58
|
this._isDisposed = false;
|
|
59
|
+
this._isReady = false;
|
|
71
60
|
this._onReady = new eventEmitter2_1.EventEmitter2();
|
|
61
|
+
this._onError = new eventEmitter2_1.EventEmitter2();
|
|
72
62
|
var workerData = {
|
|
73
63
|
conoutPipeName: _conoutPipeName
|
|
74
64
|
};
|
|
@@ -77,18 +67,34 @@ var ConoutConnection = /** @class */ (function () {
|
|
|
77
67
|
this._worker.on('message', function (message) {
|
|
78
68
|
switch (message) {
|
|
79
69
|
case 1 /* ConoutWorkerMessage.READY */:
|
|
70
|
+
_this._isReady = true;
|
|
80
71
|
_this._onReady.fire();
|
|
81
72
|
return;
|
|
82
73
|
default:
|
|
83
74
|
console.warn('Unexpected ConoutWorkerMessage', message);
|
|
84
75
|
}
|
|
85
76
|
});
|
|
77
|
+
this._worker.on('error', function (error) {
|
|
78
|
+
if (!_this._isDisposed && !_this._isReady) {
|
|
79
|
+
_this._onError.fire(error);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
this._worker.on('exit', function (code) {
|
|
83
|
+
if (!_this._isDisposed && !_this._isReady) {
|
|
84
|
+
_this._onError.fire(new Error("Conout worker exited before connecting (code ".concat(code, ")")));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
86
87
|
}
|
|
87
88
|
Object.defineProperty(ConoutConnection.prototype, "onReady", {
|
|
88
89
|
get: function () { return this._onReady.event; },
|
|
89
90
|
enumerable: false,
|
|
90
91
|
configurable: true
|
|
91
92
|
});
|
|
93
|
+
Object.defineProperty(ConoutConnection.prototype, "onError", {
|
|
94
|
+
get: function () { return this._onError.event; },
|
|
95
|
+
enumerable: false,
|
|
96
|
+
configurable: true
|
|
97
|
+
});
|
|
92
98
|
ConoutConnection.prototype.dispose = function () {
|
|
93
99
|
if (!this._useConptyDll && this._isDisposed) {
|
|
94
100
|
return;
|
|
@@ -21,13 +21,19 @@ var conptyNative;
|
|
|
21
21
|
* has started.
|
|
22
22
|
*/
|
|
23
23
|
var FLUSH_DATA_INTERVAL = 1000;
|
|
24
|
+
var CONNECTION_TIMEOUT = 5000;
|
|
25
|
+
var defaultWindowsPtyAgentOptions = {
|
|
26
|
+
connectionTimeout: CONNECTION_TIMEOUT,
|
|
27
|
+
conoutConnectionFactory: function (conoutPipeName, useConptyDll) { return new windowsConoutConnection_1.ConoutConnection(conoutPipeName, useConptyDll); }
|
|
28
|
+
};
|
|
24
29
|
/**
|
|
25
30
|
* This agent sits between the WindowsTerminal class and provides an interface for conpty.
|
|
26
31
|
*/
|
|
27
32
|
var WindowsPtyAgent = /** @class */ (function () {
|
|
28
|
-
function WindowsPtyAgent(file, args, env, cwd, cols, rows, debug, _useConptyDll, conptyInheritCursor) {
|
|
33
|
+
function WindowsPtyAgent(file, args, env, cwd, cols, rows, debug, _useConptyDll, conptyInheritCursor, options) {
|
|
29
34
|
if (_useConptyDll === void 0) { _useConptyDll = false; }
|
|
30
35
|
if (conptyInheritCursor === void 0) { conptyInheritCursor = false; }
|
|
36
|
+
if (options === void 0) { options = defaultWindowsPtyAgentOptions; }
|
|
31
37
|
var _this = this;
|
|
32
38
|
this._useConptyDll = _useConptyDll;
|
|
33
39
|
this._innerPid = 0;
|
|
@@ -54,24 +60,26 @@ var WindowsPtyAgent = /** @class */ (function () {
|
|
|
54
60
|
// We must wait for the worker to connect before calling conptyNative.connect()
|
|
55
61
|
// to avoid blocking the Node.js event loop in ConnectNamedPipe.
|
|
56
62
|
// See https://github.com/microsoft/node-pty/issues/763
|
|
57
|
-
this._conoutSocketWorker =
|
|
63
|
+
this._conoutSocketWorker = options.conoutConnectionFactory(term.conout, this._useConptyDll);
|
|
58
64
|
// Store pending connection info - we'll complete the connection when worker is ready
|
|
59
65
|
this._pendingPtyInfo = { pty: this._pty, commandLine: commandLine, cwd: cwd, env: env };
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
}, 5000);
|
|
66
|
+
// Never call connect() before the worker is ready, as ConnectNamedPipe
|
|
67
|
+
// would block the Node.js event loop while waiting for the output client.
|
|
68
|
+
this._connectionTimeout = setTimeout(function () {
|
|
69
|
+
_this._failPtyConnection(new Error('Timed out waiting for ConPTY output worker'));
|
|
70
|
+
}, options.connectionTimeout);
|
|
67
71
|
this._conoutSocketWorker.onReady(function () {
|
|
68
|
-
|
|
72
|
+
if (!_this._pendingPtyInfo) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
_this._clearConnectionTimeout();
|
|
69
76
|
_this._conoutSocketWorker.connectSocket(_this._outSocket);
|
|
70
77
|
// Now that the worker has connected to the output pipe, we can safely call
|
|
71
78
|
// conptyNative.connect() which calls ConnectNamedPipe - it won't block because
|
|
72
79
|
// the client (worker) is already connected
|
|
73
80
|
_this._completePtyConnection();
|
|
74
81
|
});
|
|
82
|
+
this._conoutSocketWorker.onError(function (error) { return _this._failPtyConnection(error); });
|
|
75
83
|
this._outSocket.on('connect', function () {
|
|
76
84
|
_this._outSocket.emit('ready_datapipe');
|
|
77
85
|
});
|
|
@@ -119,6 +127,7 @@ var WindowsPtyAgent = /** @class */ (function () {
|
|
|
119
127
|
if (!this._pendingPtyInfo) {
|
|
120
128
|
return;
|
|
121
129
|
}
|
|
130
|
+
this._clearConnectionTimeout();
|
|
122
131
|
var _b = this._pendingPtyInfo, pty = _b.pty, commandLine = _b.commandLine, cwd = _b.cwd, env = _b.env;
|
|
123
132
|
this._pendingPtyInfo = undefined;
|
|
124
133
|
try {
|
|
@@ -126,8 +135,8 @@ var WindowsPtyAgent = /** @class */ (function () {
|
|
|
126
135
|
this._innerPid = connect.pid;
|
|
127
136
|
}
|
|
128
137
|
catch (err) {
|
|
129
|
-
// connect() runs from the conout worker's onReady callback
|
|
130
|
-
//
|
|
138
|
+
// connect() runs from the conout worker's onReady callback, so a throw
|
|
139
|
+
// here would otherwise surface as an
|
|
131
140
|
// uncaughtException with no way for the consumer to observe it.
|
|
132
141
|
var code = (_a = /error code: (\d+)/.exec(err.message)) === null || _a === void 0 ? void 0 : _a[1];
|
|
133
142
|
this._exitCode = code ? parseInt(code, 10) : -1;
|
|
@@ -141,6 +150,28 @@ var WindowsPtyAgent = /** @class */ (function () {
|
|
|
141
150
|
this._onError.fire(err);
|
|
142
151
|
}
|
|
143
152
|
};
|
|
153
|
+
WindowsPtyAgent.prototype._failPtyConnection = function (error) {
|
|
154
|
+
if (!this._pendingPtyInfo) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this._clearConnectionTimeout();
|
|
158
|
+
this._pendingPtyInfo = undefined;
|
|
159
|
+
this._exitCode = -1;
|
|
160
|
+
try {
|
|
161
|
+
this._ptyNative.kill(this._pty, this._useConptyDll);
|
|
162
|
+
}
|
|
163
|
+
catch ( /* already gone */_a) { /* already gone */ }
|
|
164
|
+
this._conoutSocketWorker.dispose();
|
|
165
|
+
this._inSocket.destroy();
|
|
166
|
+
this._outSocket.destroy();
|
|
167
|
+
this._onError.fire(error);
|
|
168
|
+
};
|
|
169
|
+
WindowsPtyAgent.prototype._clearConnectionTimeout = function () {
|
|
170
|
+
if (this._connectionTimeout) {
|
|
171
|
+
clearTimeout(this._connectionTimeout);
|
|
172
|
+
this._connectionTimeout = undefined;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
144
175
|
WindowsPtyAgent.prototype.resize = function (cols, rows) {
|
|
145
176
|
if (this._exitCode !== undefined) {
|
|
146
177
|
throw new Error('Cannot resize a pty that has already exited');
|
|
@@ -153,6 +184,7 @@ var WindowsPtyAgent = /** @class */ (function () {
|
|
|
153
184
|
WindowsPtyAgent.prototype.kill = function () {
|
|
154
185
|
var _this = this;
|
|
155
186
|
// Prevent deferred connection from completing after kill
|
|
187
|
+
this._clearConnectionTimeout();
|
|
156
188
|
this._pendingPtyInfo = undefined;
|
|
157
189
|
// Tell the agent to kill the pty, this releases handles to the process
|
|
158
190
|
if (!this._useConptyDll) {
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/darwin-arm64/pty.node
CHANGED
|
Binary file
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper
CHANGED
|
Binary file
|
|
Binary file
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper
CHANGED
|
Binary file
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-arm64/conpty.node
CHANGED
|
Binary file
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-x64/conpty.node
CHANGED
|
Binary file
|
package/node_modules/@microsoft/mxc-sdk/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/mxc-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "TypeScript SDK for MXC (Microsoft eXecution Containers)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"watch": "tsc --watch",
|
|
24
24
|
"clean": "rimraf dist",
|
|
25
25
|
"test": "npm run test:unit",
|
|
26
|
-
"test:unit": "npm run build:test-unit && node --test dist-tests/tests/unit/sandbox.test.js dist-tests/tests/unit/policy.test.js dist-tests/tests/unit/logger.test.js dist-tests/tests/unit/errors.test.js dist-tests/tests/unit/state-aware-types.test.js dist-tests/tests/unit/state-aware.test.js dist-tests/tests/unit/platform.test.js",
|
|
26
|
+
"test:unit": "npm run build:test-unit && node --test dist-tests/tests/unit/sandbox.test.js dist-tests/tests/unit/policy.test.js dist-tests/tests/unit/logger.test.js dist-tests/tests/unit/errors.test.js dist-tests/tests/unit/state-aware-types.test.js dist-tests/tests/unit/state-aware.test.js dist-tests/tests/unit/platform.test.js dist-tests/tests/unit/wire-conformance.test.js dist-tests/tests/unit/wire-conformance-state-aware.test.js",
|
|
27
27
|
"test:integration": "cd tests/integration && npm install && npm run build && npm test",
|
|
28
28
|
"prepublishOnly": "npm run build"
|
|
29
29
|
},
|
|
@@ -113,6 +113,33 @@ await schema.parseAsync("hello");
|
|
|
113
113
|
// => "hello"
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
### AOT compilation
|
|
117
|
+
|
|
118
|
+
For hot validation paths, `z.compile(schema)` returns a schema clone with an ahead-of-time compiled fast path. Valid inputs take the compiled path; invalid inputs fall back to the regular parser so error reporting stays identical.
|
|
119
|
+
|
|
120
|
+
Across a 55-schema benchmark the median speedup is **2.4x**, and it scales with how much work the schema does per parse: a large array of objects is ~9x, a 20-key object ~9x, a nested object ~4.5x, while a bare `z.string()` gains nothing — compilation removes per-node dispatch and allocation, and a single `typeof` has none to remove.
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
const CompiledPlayer = z.compile(Player);
|
|
124
|
+
|
|
125
|
+
CompiledPlayer.parse({ username: "billie", xp: 100 });
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
To enable compilation globally for schemas constructed after import:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
import "zod/compile"; // place before modules that define schemas
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Things to know:
|
|
135
|
+
|
|
136
|
+
- Compilation uses `new Function`. Global mode is automatically disabled when `z.config({ jitless: true })` is set (e.g. CSP environments); calling `z.compile()` directly is an explicit opt-in.
|
|
137
|
+
- Schemas with async refinements or transforms can't be compiled, and neither can a few other constructs. That is not an error: `z.compile()` hands the schema back unchanged and it keeps using the regular parser, exactly as global mode leaves it. Pass `{ strict: true }` to throw `ZodCompileAsyncError` / `ZodCompileUnsupportedError` instead.
|
|
138
|
+
- On invalid input, refinements and transforms may run twice (fast path, then fallback).
|
|
139
|
+
- Deriving a new schema from a compiled one (`.refine()`, `.extend()`, etc.) returns an uncompiled schema — compile the final schema.
|
|
140
|
+
|
|
141
|
+
See [`compile` docs](https://zod.dev/compile) for details.
|
|
142
|
+
|
|
116
143
|
### Handling errors
|
|
117
144
|
|
|
118
145
|
When validation fails, the `.parse()` method will throw a `ZodError` instance with granular information about the validation issues.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Side-effect-only: installs the post-processor on `globalConfig`. Listed in `package.json`'s `sideEffects`, and nothing else references it, so apps that never import it drop the compiler.
|
|
3
|
+
//
|
|
4
|
+
// Usage:
|
|
5
|
+
//
|
|
6
|
+
// import "zod/compile";
|
|
7
|
+
// import * as z from "zod";
|
|
8
|
+
// // every schema constructed below this is compiled on first parse
|
|
9
|
+
//
|
|
10
|
+
// Module evaluation order matters: schemas constructed in modules that evaluate before this import will not be compiled. Place this import in the app entry point, before any module that constructs schemas at top level.
|
|
11
|
+
//
|
|
12
|
+
// Failure handling: if the compiler refuses a schema (async refinement, unsupported feature, etc.) the shim permanently restores the runtime `_zod.run` for that schema. The schema continues to work via the regular runtime parser — no observable difference to the caller.
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const compile_js_1 = require("./v4/core/compile.cjs");
|
|
38
|
+
const core = __importStar(require("./v4/core/index.cjs"));
|
|
39
|
+
let compiling = false;
|
|
40
|
+
core.globalConfig.postProcessor = (inst) => {
|
|
41
|
+
if (compiling)
|
|
42
|
+
return;
|
|
43
|
+
const originalRun = inst._zod?.run;
|
|
44
|
+
if (typeof originalRun !== "function")
|
|
45
|
+
return;
|
|
46
|
+
const shim = (payload, ctx) => {
|
|
47
|
+
// Bypass the fast path for any non-forward / non-sync / check-skipping call. The runtime owns those contracts.
|
|
48
|
+
if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks) {
|
|
49
|
+
return originalRun(payload, ctx);
|
|
50
|
+
}
|
|
51
|
+
compiling = true;
|
|
52
|
+
try {
|
|
53
|
+
// Respect the jitless config: it exists precisely so CSP/no-eval environments never reach `new Function`. Global mode must not bypass it (explicit z.compile calls remain an explicit opt-in).
|
|
54
|
+
if (core.globalConfig.jitless) {
|
|
55
|
+
inst._zod.run = originalRun;
|
|
56
|
+
return originalRun(payload, ctx);
|
|
57
|
+
}
|
|
58
|
+
// Strict: the shim owns its own fallback below, and a non-strict compile would hand back `inst` — whose run is this shim — and reinstall it on itself.
|
|
59
|
+
const compiled = (0, compile_js_1.compile)(inst, { strict: true });
|
|
60
|
+
// Only the run wrapper. Copying the compiled parse/safeParse closures would make their fallback re-enter this instance and run user callbacks a third time.
|
|
61
|
+
inst._zod.run = compiled._zod.run;
|
|
62
|
+
inst._zod.bag.fallbackRun = compiled._zod.bag.fallbackRun;
|
|
63
|
+
inst._zod.bag.validator = compiled._zod.bag.validator;
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// Permanent fallback for unsupported schemas.
|
|
67
|
+
inst._zod.run = originalRun;
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
compiling = false;
|
|
71
|
+
}
|
|
72
|
+
return inst._zod.run(payload, ctx);
|
|
73
|
+
};
|
|
74
|
+
// Expose the pre-shim runtime so `compile()` invoked elsewhere can unwrap past the shim and capture the source-of-truth runtime. Without this, a user calling `z.compile(s)` after global mode is enabled would capture the shim itself, which would feed the wrapper into itself on fallback.
|
|
75
|
+
shim.__originalRun = originalRun;
|
|
76
|
+
inst._zod.run = shim;
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|