@vellumai/credential-executor 0.4.55 → 0.4.56
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/Dockerfile +6 -2
- package/node_modules/@vellumai/ces-contracts/bun.lock +29 -0
- package/node_modules/@vellumai/ces-contracts/package.json +24 -0
- package/node_modules/@vellumai/ces-contracts/src/__tests__/contracts.test.ts +293 -0
- package/node_modules/@vellumai/ces-contracts/src/__tests__/grants.test.ts +686 -0
- package/node_modules/@vellumai/ces-contracts/src/error.ts +25 -0
- package/node_modules/@vellumai/ces-contracts/src/grants.ts +184 -0
- package/node_modules/@vellumai/ces-contracts/src/handles.ts +213 -0
- package/node_modules/@vellumai/ces-contracts/src/index.ts +147 -0
- package/node_modules/@vellumai/ces-contracts/src/rendering.ts +135 -0
- package/node_modules/@vellumai/ces-contracts/src/rpc.ts +511 -0
- package/node_modules/@vellumai/ces-contracts/tsconfig.json +20 -0
- package/node_modules/@vellumai/credential-storage/bun.lock +24 -0
- package/node_modules/@vellumai/credential-storage/package.json +17 -0
- package/node_modules/@vellumai/credential-storage/src/__tests__/package-boundary.test.ts +151 -0
- package/node_modules/@vellumai/credential-storage/src/index.ts +213 -0
- package/node_modules/@vellumai/credential-storage/src/oauth-runtime.ts +340 -0
- package/node_modules/@vellumai/credential-storage/src/static-credentials.ts +365 -0
- package/node_modules/@vellumai/credential-storage/tsconfig.json +20 -0
- package/node_modules/@vellumai/egress-proxy/bun.lock +24 -0
- package/node_modules/@vellumai/egress-proxy/package.json +17 -0
- package/node_modules/@vellumai/egress-proxy/src/__tests__/package-boundary.test.ts +131 -0
- package/node_modules/@vellumai/egress-proxy/src/index.ts +54 -0
- package/node_modules/@vellumai/egress-proxy/src/session-core.ts +466 -0
- package/node_modules/@vellumai/egress-proxy/src/types.ts +227 -0
- package/node_modules/@vellumai/egress-proxy/tsconfig.json +20 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +6 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +6 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +51 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +632 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2990 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1798 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +138 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +448 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +183 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4538 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
- package/node_modules/zod/src/v4/core/util.ts +966 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/en.ts +119 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +116 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +49 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +116 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +6 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +15 -0
- package/node_modules/zod/v4/classic/external.d.ts +15 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +6 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1272 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +739 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +739 -0
- package/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/node_modules/zod/v4/core/api.cjs +1222 -0
- package/node_modules/zod/v4/core/api.d.cts +304 -0
- package/node_modules/zod/v4/core/api.d.ts +304 -0
- package/node_modules/zod/v4/core/api.js +1082 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +83 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +76 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +213 -0
- package/node_modules/zod/v4/core/errors.d.cts +220 -0
- package/node_modules/zod/v4/core/errors.d.ts +220 -0
- package/node_modules/zod/v4/core/errors.js +182 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +6 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +166 -0
- package/node_modules/zod/v4/core/regexes.d.cts +79 -0
- package/node_modules/zod/v4/core/regexes.d.ts +79 -0
- package/node_modules/zod/v4/core/regexes.js +133 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2124 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1146 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1146 -0
- package/node_modules/zod/v4/core/schemas.js +2093 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/node_modules/zod/v4/core/util.cjs +710 -0
- package/node_modules/zod/v4/core/util.d.cts +199 -0
- package/node_modules/zod/v4/core/util.d.ts +199 -0
- package/node_modules/zod/v4/core/util.js +651 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/en.cjs +136 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +109 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +135 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +108 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +104 -0
- package/node_modules/zod/v4/locales/index.d.cts +49 -0
- package/node_modules/zod/v4/locales/index.d.ts +49 -0
- package/node_modules/zod/v4/locales/index.js +49 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +6 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +136 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +109 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +12 -0
- package/node_modules/zod/v4/mini/external.d.ts +12 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +6 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1046 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +427 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +427 -0
- package/node_modules/zod/v4/mini/schemas.js +925 -0
- package/node_modules/zod/v4/package.json +6 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +6 -0
- package/package.json +3 -2
- package/src/__tests__/command-executor.test.ts +575 -60
- package/src/__tests__/command-validator.test.ts +697 -0
- package/src/__tests__/command-workspace.test.ts +30 -0
- package/src/__tests__/grant-store.test.ts +151 -33
- package/src/__tests__/http-executor.test.ts +106 -16
- package/src/__tests__/http-policy.test.ts +121 -22
- package/src/__tests__/local-materializers.test.ts +34 -0
- package/src/__tests__/managed-integration.test.ts +633 -0
- package/src/__tests__/managed-lazy-getters.test.ts +245 -0
- package/src/__tests__/managed-materializers.test.ts +107 -38
- package/src/__tests__/managed-rejection.test.ts +43 -0
- package/src/__tests__/toolstore.test.ts +207 -18
- package/src/__tests__/transport.test.ts +26 -6
- package/src/commands/auth-adapters.ts +2 -2
- package/src/commands/egress-hooks.ts +203 -0
- package/src/commands/executor.ts +403 -87
- package/src/commands/profiles.ts +4 -0
- package/src/commands/validator.ts +267 -3
- package/src/commands/workspace.ts +59 -21
- package/src/grants/index.ts +1 -1
- package/src/grants/persistent-store.ts +79 -17
- package/src/grants/rpc-handlers.ts +67 -43
- package/src/grants/temporary-store.ts +26 -19
- package/src/http/executor.ts +170 -25
- package/src/http/path-template.ts +75 -9
- package/src/http/policy.ts +9 -27
- package/src/index.ts +3 -0
- package/src/main.ts +102 -43
- package/src/managed-errors.ts +9 -0
- package/src/managed-lazy-getters.ts +70 -0
- package/src/managed-main.ts +191 -65
- package/src/materializers/local-oauth-lookup.ts +97 -0
- package/src/materializers/local-secure-key-backend.ts +254 -0
- package/src/materializers/local-token-refresh.ts +263 -0
- package/src/materializers/local.ts +21 -5
- package/src/materializers/managed-platform.ts +50 -25
- package/src/paths.ts +28 -10
- package/src/server.ts +147 -11
- package/src/subjects/managed.ts +33 -12
- package/src/subjects/policy.ts +79 -0
- package/src/toolstore/publish.ts +236 -7
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { describe, expect, test, beforeEach, afterEach } from "bun:test";
|
|
2
|
-
import { mkdirSync, rmSync, existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { mkdirSync, rmSync, existsSync, readFileSync, writeFileSync, symlinkSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
|
+
import { randomUUID } from "node:crypto";
|
|
5
6
|
|
|
6
7
|
import {
|
|
7
8
|
type SecureCommandManifest,
|
|
@@ -26,20 +27,73 @@ import {
|
|
|
26
27
|
// Test fixtures
|
|
27
28
|
// ---------------------------------------------------------------------------
|
|
28
29
|
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Create a tar.gz archive containing a shell script at the given entrypoint path.
|
|
32
|
+
* Returns the archive bytes.
|
|
33
|
+
*/
|
|
34
|
+
function createTestArchive(
|
|
35
|
+
entrypoint: string,
|
|
36
|
+
scriptContent = "#!/usr/bin/env bash\necho hello\n",
|
|
37
|
+
): Buffer {
|
|
38
|
+
const stagingDir = join(tmpdir(), `ces-test-archive-${randomUUID()}`);
|
|
39
|
+
try {
|
|
40
|
+
const entrypointPath = join(stagingDir, entrypoint);
|
|
41
|
+
mkdirSync(join(stagingDir, entrypoint, ".."), { recursive: true });
|
|
42
|
+
writeFileSync(entrypointPath, scriptContent, { mode: 0o755 });
|
|
43
|
+
|
|
44
|
+
const archivePath = join(stagingDir, "bundle.tar.gz");
|
|
45
|
+
const proc = Bun.spawnSync(
|
|
46
|
+
["tar", "czf", archivePath, "-C", stagingDir, entrypoint],
|
|
47
|
+
{ stdout: "pipe", stderr: "pipe" },
|
|
48
|
+
);
|
|
49
|
+
if (proc.exitCode !== 0) {
|
|
50
|
+
throw new Error(`Failed to create test archive: ${new TextDecoder().decode(proc.stderr).trim()}`);
|
|
51
|
+
}
|
|
52
|
+
return Buffer.from(readFileSync(archivePath));
|
|
53
|
+
} finally {
|
|
54
|
+
try { rmSync(stagingDir, { recursive: true, force: true }); } catch { /* best effort */ }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Create a tar.gz archive containing a symlink entrypoint that points to an external path.
|
|
60
|
+
* This simulates a malicious bundle that attempts symlink escape.
|
|
61
|
+
*/
|
|
62
|
+
function createSymlinkArchive(
|
|
63
|
+
entrypoint: string,
|
|
64
|
+
symlinkTarget: string,
|
|
65
|
+
): Buffer {
|
|
66
|
+
const stagingDir = join(tmpdir(), `ces-test-symlink-archive-${randomUUID()}`);
|
|
67
|
+
try {
|
|
68
|
+
const entrypointPath = join(stagingDir, entrypoint);
|
|
69
|
+
mkdirSync(join(stagingDir, entrypoint, ".."), { recursive: true });
|
|
70
|
+
// Create a symlink at the entrypoint path pointing to the external target
|
|
71
|
+
symlinkSync(symlinkTarget, entrypointPath);
|
|
72
|
+
|
|
73
|
+
const archivePath = join(stagingDir, "bundle.tar.gz");
|
|
74
|
+
// Use -h flag to follow symlinks during archive creation would defeat the
|
|
75
|
+
// purpose; instead we archive the symlink itself using default tar behavior
|
|
76
|
+
const proc = Bun.spawnSync(
|
|
77
|
+
["tar", "czf", archivePath, "-C", stagingDir, entrypoint],
|
|
78
|
+
{ stdout: "pipe", stderr: "pipe" },
|
|
79
|
+
);
|
|
80
|
+
if (proc.exitCode !== 0) {
|
|
81
|
+
throw new Error(`Failed to create symlink test archive: ${new TextDecoder().decode(proc.stderr).trim()}`);
|
|
82
|
+
}
|
|
83
|
+
return Buffer.from(readFileSync(archivePath));
|
|
84
|
+
} finally {
|
|
85
|
+
try { rmSync(stagingDir, { recursive: true, force: true }); } catch { /* best effort */ }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Sample bundle bytes as a valid tar.gz archive containing bin/test-cli. */
|
|
90
|
+
const SAMPLE_BUNDLE_BYTES = createTestArchive("bin/test-cli");
|
|
34
91
|
|
|
35
92
|
/** The correct SHA-256 digest of SAMPLE_BUNDLE_BYTES. */
|
|
36
93
|
const SAMPLE_BUNDLE_DIGEST = computeDigest(SAMPLE_BUNDLE_BYTES);
|
|
37
94
|
|
|
38
|
-
/** A different
|
|
39
|
-
const TAMPERED_BUNDLE_BYTES =
|
|
40
|
-
"#!/usr/bin/env bash\nrm -rf /\n",
|
|
41
|
-
"utf-8",
|
|
42
|
-
);
|
|
95
|
+
/** A different archive to test digest mismatches. */
|
|
96
|
+
const TAMPERED_BUNDLE_BYTES = createTestArchive("bin/test-cli", "#!/usr/bin/env bash\nrm -rf /\n");
|
|
43
97
|
|
|
44
98
|
/**
|
|
45
99
|
* Build a minimal valid SecureCommandManifest for testing.
|
|
@@ -299,7 +353,6 @@ describe("publishBundle — digest mismatch rejection", () => {
|
|
|
299
353
|
});
|
|
300
354
|
|
|
301
355
|
test("no files are written when digest mismatches", () => {
|
|
302
|
-
const wrongDigest = computeDigest(TAMPERED_BUNDLE_BYTES);
|
|
303
356
|
publishBundle(
|
|
304
357
|
buildPublishRequest({
|
|
305
358
|
bundleBytes: TAMPERED_BUNDLE_BYTES,
|
|
@@ -351,15 +404,20 @@ describe("publishBundle — immutable and deduplicated by digest", () => {
|
|
|
351
404
|
expect(second.bundlePath).toBe(first.bundlePath);
|
|
352
405
|
});
|
|
353
406
|
|
|
354
|
-
test("published bundle
|
|
407
|
+
test("published bundle contains extracted entrypoint (not raw archive)", () => {
|
|
355
408
|
const result = publishBundle(buildPublishRequest());
|
|
356
409
|
expect(result.success).toBe(true);
|
|
357
410
|
|
|
411
|
+
// After extraction, bundle.bin is removed and replaced by extracted contents
|
|
358
412
|
const bundleContentPath = join(result.bundlePath, "bundle.bin");
|
|
359
|
-
expect(existsSync(bundleContentPath)).toBe(
|
|
413
|
+
expect(existsSync(bundleContentPath)).toBe(false);
|
|
414
|
+
|
|
415
|
+
// The entrypoint should exist and be executable
|
|
416
|
+
const entrypointPath = join(result.bundlePath, "bin", "test-cli");
|
|
417
|
+
expect(existsSync(entrypointPath)).toBe(true);
|
|
360
418
|
|
|
361
|
-
const
|
|
362
|
-
expect(
|
|
419
|
+
const content = readFileSync(entrypointPath, "utf-8");
|
|
420
|
+
expect(content).toContain("echo hello");
|
|
363
421
|
});
|
|
364
422
|
|
|
365
423
|
test("published manifest is readable and has correct fields", () => {
|
|
@@ -391,8 +449,8 @@ describe("publishBundle — immutable and deduplicated by digest", () => {
|
|
|
391
449
|
const firstResult = publishBundle(buildPublishRequest());
|
|
392
450
|
expect(firstResult.success).toBe(true);
|
|
393
451
|
|
|
394
|
-
// Publish a second, different bundle
|
|
395
|
-
const otherBytes =
|
|
452
|
+
// Publish a second, different bundle (real tar.gz archive)
|
|
453
|
+
const otherBytes = createTestArchive("bin/test-cli", "#!/usr/bin/env bash\necho other\n");
|
|
396
454
|
const otherDigest = computeDigest(otherBytes);
|
|
397
455
|
const otherManifest = buildSecureManifest({
|
|
398
456
|
bundleDigest: otherDigest,
|
|
@@ -537,3 +595,134 @@ describe("publishBundle — manifest validation", () => {
|
|
|
537
595
|
expect(result.error).toContain("Invalid secure command manifest");
|
|
538
596
|
});
|
|
539
597
|
});
|
|
598
|
+
|
|
599
|
+
// ---------------------------------------------------------------------------
|
|
600
|
+
// Publisher: symlink escape prevention
|
|
601
|
+
// ---------------------------------------------------------------------------
|
|
602
|
+
|
|
603
|
+
describe("publishBundle — symlink escape prevention", () => {
|
|
604
|
+
test("rejects bundle with symlink entrypoint pointing outside bundle", () => {
|
|
605
|
+
// Create a tar.gz with a symlink entrypoint: bin/test-cli -> /usr/bin/curl
|
|
606
|
+
const symlinkBytes = createSymlinkArchive("bin/test-cli", "/usr/bin/curl");
|
|
607
|
+
const symlinkDigest = computeDigest(symlinkBytes);
|
|
608
|
+
|
|
609
|
+
const manifest = buildSecureManifest({
|
|
610
|
+
bundleDigest: symlinkDigest,
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
const result = publishBundle({
|
|
614
|
+
bundleBytes: symlinkBytes,
|
|
615
|
+
expectedDigest: symlinkDigest,
|
|
616
|
+
bundleId: "test-cli",
|
|
617
|
+
version: "1.0.0",
|
|
618
|
+
sourceUrl: "https://releases.example.com/test-cli/v1.0.0/bundle.tar.gz",
|
|
619
|
+
secureCommandManifest: manifest,
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
expect(result.success).toBe(false);
|
|
623
|
+
expect(result.error).toContain("symlink");
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
test("rejects bundle with non-entrypoint symlink pointing outside bundle", () => {
|
|
627
|
+
// Create an archive where a non-entrypoint file is a symlink to an external path.
|
|
628
|
+
// The entrypoint itself is a real file, but the bundle contains a sneaky symlink.
|
|
629
|
+
const stagingDir = join(tmpdir(), `ces-test-mixed-symlink-${randomUUID()}`);
|
|
630
|
+
try {
|
|
631
|
+
// Create a real entrypoint
|
|
632
|
+
const entrypointPath = join(stagingDir, "bin/test-cli");
|
|
633
|
+
mkdirSync(join(stagingDir, "bin"), { recursive: true });
|
|
634
|
+
writeFileSync(entrypointPath, "#!/usr/bin/env bash\necho hello\n", { mode: 0o755 });
|
|
635
|
+
|
|
636
|
+
// Create a symlink that escapes
|
|
637
|
+
symlinkSync("/etc/passwd", join(stagingDir, "bin/evil-link"));
|
|
638
|
+
|
|
639
|
+
const archivePath = join(stagingDir, "bundle.tar.gz");
|
|
640
|
+
const proc = Bun.spawnSync(
|
|
641
|
+
["tar", "czf", archivePath, "-C", stagingDir, "bin"],
|
|
642
|
+
{ stdout: "pipe", stderr: "pipe" },
|
|
643
|
+
);
|
|
644
|
+
expect(proc.exitCode).toBe(0);
|
|
645
|
+
|
|
646
|
+
const bundleBytes = Buffer.from(readFileSync(archivePath));
|
|
647
|
+
const digest = computeDigest(bundleBytes);
|
|
648
|
+
|
|
649
|
+
const manifest = buildSecureManifest({
|
|
650
|
+
bundleDigest: digest,
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
const result = publishBundle({
|
|
654
|
+
bundleBytes,
|
|
655
|
+
expectedDigest: digest,
|
|
656
|
+
bundleId: "test-cli",
|
|
657
|
+
version: "1.0.0",
|
|
658
|
+
sourceUrl: "https://releases.example.com/test-cli/v1.0.0/bundle.tar.gz",
|
|
659
|
+
secureCommandManifest: manifest,
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
expect(result.success).toBe(false);
|
|
663
|
+
expect(result.error).toContain("symlink");
|
|
664
|
+
expect(result.error).toContain("outside the bundle directory");
|
|
665
|
+
} finally {
|
|
666
|
+
try { rmSync(stagingDir, { recursive: true, force: true }); } catch { /* best effort */ }
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
test("accepts bundle with internal symlinks (not escaping)", () => {
|
|
671
|
+
// Create an archive with a symlink that points within the bundle
|
|
672
|
+
const stagingDir = join(tmpdir(), `ces-test-internal-symlink-${randomUUID()}`);
|
|
673
|
+
try {
|
|
674
|
+
mkdirSync(join(stagingDir, "bin"), { recursive: true });
|
|
675
|
+
writeFileSync(join(stagingDir, "bin/test-cli"), "#!/usr/bin/env bash\necho hello\n", { mode: 0o755 });
|
|
676
|
+
// Create a symlink within the bundle: bin/alias -> test-cli (relative)
|
|
677
|
+
symlinkSync("test-cli", join(stagingDir, "bin/alias"));
|
|
678
|
+
|
|
679
|
+
const archivePath = join(stagingDir, "bundle.tar.gz");
|
|
680
|
+
const proc = Bun.spawnSync(
|
|
681
|
+
["tar", "czf", archivePath, "-C", stagingDir, "bin"],
|
|
682
|
+
{ stdout: "pipe", stderr: "pipe" },
|
|
683
|
+
);
|
|
684
|
+
expect(proc.exitCode).toBe(0);
|
|
685
|
+
|
|
686
|
+
const bundleBytes = Buffer.from(readFileSync(archivePath));
|
|
687
|
+
const digest = computeDigest(bundleBytes);
|
|
688
|
+
|
|
689
|
+
const manifest = buildSecureManifest({
|
|
690
|
+
bundleDigest: digest,
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
const result = publishBundle({
|
|
694
|
+
bundleBytes,
|
|
695
|
+
expectedDigest: digest,
|
|
696
|
+
bundleId: "test-cli",
|
|
697
|
+
version: "1.0.0",
|
|
698
|
+
sourceUrl: "https://releases.example.com/test-cli/v1.0.0/bundle.tar.gz",
|
|
699
|
+
secureCommandManifest: manifest,
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
expect(result.success).toBe(true);
|
|
703
|
+
} finally {
|
|
704
|
+
try { rmSync(stagingDir, { recursive: true, force: true }); } catch { /* best effort */ }
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
test("no files are left in toolstore when symlink escape is detected", () => {
|
|
709
|
+
const symlinkBytes = createSymlinkArchive("bin/test-cli", "/usr/bin/curl");
|
|
710
|
+
const symlinkDigest = computeDigest(symlinkBytes);
|
|
711
|
+
|
|
712
|
+
const manifest = buildSecureManifest({
|
|
713
|
+
bundleDigest: symlinkDigest,
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
publishBundle({
|
|
717
|
+
bundleBytes: symlinkBytes,
|
|
718
|
+
expectedDigest: symlinkDigest,
|
|
719
|
+
bundleId: "test-cli",
|
|
720
|
+
version: "1.0.0",
|
|
721
|
+
sourceUrl: "https://releases.example.com/test-cli/v1.0.0/bundle.tar.gz",
|
|
722
|
+
secureCommandManifest: manifest,
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
// The bundle should not be published
|
|
726
|
+
expect(isBundlePublished(symlinkDigest)).toBe(false);
|
|
727
|
+
});
|
|
728
|
+
});
|
|
@@ -163,12 +163,12 @@ describe("health probes", () => {
|
|
|
163
163
|
expect(src).toMatch(/startHealthServer\(healthPort/);
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
test("getHealthPort defaults to
|
|
166
|
+
test("getHealthPort defaults to 8090", () => {
|
|
167
167
|
// Save and clear env
|
|
168
168
|
const saved = process.env["CES_HEALTH_PORT"];
|
|
169
169
|
delete process.env["CES_HEALTH_PORT"];
|
|
170
170
|
try {
|
|
171
|
-
expect(getHealthPort()).toBe(
|
|
171
|
+
expect(getHealthPort()).toBe(8090);
|
|
172
172
|
} finally {
|
|
173
173
|
if (saved !== undefined) process.env["CES_HEALTH_PORT"] = saved;
|
|
174
174
|
}
|
|
@@ -351,8 +351,28 @@ describe("CES data paths", () => {
|
|
|
351
351
|
expect(root).toMatch(/protected[/\\]credential-executor$/);
|
|
352
352
|
});
|
|
353
353
|
|
|
354
|
-
test("managed mode data root
|
|
355
|
-
|
|
354
|
+
test("managed mode data root defaults to /ces-data", () => {
|
|
355
|
+
const savedDir = process.env["CES_DATA_DIR"];
|
|
356
|
+
delete process.env["CES_DATA_DIR"];
|
|
357
|
+
try {
|
|
358
|
+
expect(getCesDataRoot("managed")).toBe("/ces-data");
|
|
359
|
+
} finally {
|
|
360
|
+
if (savedDir !== undefined) process.env["CES_DATA_DIR"] = savedDir;
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
test("managed mode data root respects CES_DATA_DIR env var", () => {
|
|
365
|
+
const savedDir = process.env["CES_DATA_DIR"];
|
|
366
|
+
process.env["CES_DATA_DIR"] = "/custom/ces-data";
|
|
367
|
+
try {
|
|
368
|
+
expect(getCesDataRoot("managed")).toBe("/custom/ces-data");
|
|
369
|
+
} finally {
|
|
370
|
+
if (savedDir !== undefined) {
|
|
371
|
+
process.env["CES_DATA_DIR"] = savedDir;
|
|
372
|
+
} else {
|
|
373
|
+
delete process.env["CES_DATA_DIR"];
|
|
374
|
+
}
|
|
375
|
+
}
|
|
356
376
|
});
|
|
357
377
|
|
|
358
378
|
test("local data root is under the Vellum root, not the workspace", () => {
|
|
@@ -362,11 +382,11 @@ describe("CES data paths", () => {
|
|
|
362
382
|
expect(root).not.toMatch(/workspace/);
|
|
363
383
|
});
|
|
364
384
|
|
|
365
|
-
test("getBootstrapSocketPath defaults to /run/ces/ces.sock", () => {
|
|
385
|
+
test("getBootstrapSocketPath defaults to /run/ces-bootstrap/ces.sock", () => {
|
|
366
386
|
const saved = process.env["CES_BOOTSTRAP_SOCKET"];
|
|
367
387
|
delete process.env["CES_BOOTSTRAP_SOCKET"];
|
|
368
388
|
try {
|
|
369
|
-
expect(getBootstrapSocketPath()).toBe("/run/ces/ces.sock");
|
|
389
|
+
expect(getBootstrapSocketPath()).toBe("/run/ces-bootstrap/ces.sock");
|
|
370
390
|
} finally {
|
|
371
391
|
if (saved !== undefined) process.env["CES_BOOTSTRAP_SOCKET"] = saved;
|
|
372
392
|
}
|
|
@@ -143,10 +143,10 @@ export function validateAuthAdapterConfig(
|
|
|
143
143
|
case AuthAdapterType.TempFile:
|
|
144
144
|
if (
|
|
145
145
|
config.fileMode !== undefined &&
|
|
146
|
-
config.fileMode > 0o600
|
|
146
|
+
(config.fileMode > 0o600 || (config.fileMode & 0o077) !== 0)
|
|
147
147
|
) {
|
|
148
148
|
errors.push(
|
|
149
|
-
`temp_file adapter fileMode must be <= 0600 (owner-only), got ${config.fileMode.toString(8)}`,
|
|
149
|
+
`temp_file adapter fileMode must be <= 0600 (owner-only) with no group/other bits, got ${config.fileMode.toString(8)}`,
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
break;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CES egress proxy hooks.
|
|
3
|
+
*
|
|
4
|
+
* Provides a lightweight `SessionStartHooks` implementation for the
|
|
5
|
+
* credential execution service. Unlike the assistant's session-manager
|
|
6
|
+
* (which wires credential resolution, MITM interception, and policy
|
|
7
|
+
* decisions), CES only needs to enforce the manifest's
|
|
8
|
+
* `allowedNetworkTargets` allowlist. No credential injection or CA
|
|
9
|
+
* setup happens at the proxy layer — CES injects credentials through
|
|
10
|
+
* auth adapters in the command environment.
|
|
11
|
+
*
|
|
12
|
+
* The proxy server is a plain HTTP CONNECT proxy that:
|
|
13
|
+
* - Allows connections matching the session's `allowedTargets` (host, port, protocol)
|
|
14
|
+
* - Blocks all other outbound connections
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { request as httpRequest, createServer, type IncomingMessage, type ServerResponse } from "node:http";
|
|
18
|
+
import { request as httpsRequest } from "node:https";
|
|
19
|
+
import { connect, type Socket } from "node:net";
|
|
20
|
+
|
|
21
|
+
import type { AllowedTarget, ManagedSession, SessionStartHooks } from "@vellumai/egress-proxy";
|
|
22
|
+
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Host-pattern matching
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Match a hostname against a glob pattern.
|
|
29
|
+
*
|
|
30
|
+
* Supported patterns:
|
|
31
|
+
* - Exact match: `"api.github.com"` matches `"api.github.com"`
|
|
32
|
+
* - Wildcard subdomain: `"*.github.com"` matches `"api.github.com"`,
|
|
33
|
+
* `"foo.bar.github.com"`, and also `"github.com"` (apex)
|
|
34
|
+
*
|
|
35
|
+
* Note: `"*"` (match-everything) is intentionally NOT supported. The
|
|
36
|
+
* manifest validator rejects overbroad patterns at registration time.
|
|
37
|
+
*/
|
|
38
|
+
function matchesHostPattern(hostname: string, pattern: string): boolean {
|
|
39
|
+
if (pattern === hostname) return true;
|
|
40
|
+
if (pattern.startsWith("*.")) {
|
|
41
|
+
const suffix = pattern.slice(1); // e.g. ".github.com"
|
|
42
|
+
const apex = pattern.slice(2); // e.g. "github.com"
|
|
43
|
+
return hostname.endsWith(suffix) || hostname === apex;
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a request target is allowed by any of the provided allowed targets.
|
|
50
|
+
*
|
|
51
|
+
* Validates host, port, and protocol against each allowed target entry.
|
|
52
|
+
* - Host must match the glob pattern.
|
|
53
|
+
* - If the target specifies `ports`, the request port must be in the list.
|
|
54
|
+
* - If the target specifies `protocols`, the request protocol must be in the list.
|
|
55
|
+
*/
|
|
56
|
+
function isTargetAllowed(
|
|
57
|
+
hostname: string,
|
|
58
|
+
port: number,
|
|
59
|
+
protocol: "http" | "https",
|
|
60
|
+
allowedTargets: AllowedTarget[],
|
|
61
|
+
): boolean {
|
|
62
|
+
for (const target of allowedTargets) {
|
|
63
|
+
if (!matchesHostPattern(hostname, target.host)) continue;
|
|
64
|
+
if (target.ports && target.ports.length > 0 && !target.ports.includes(port)) continue;
|
|
65
|
+
if (target.protocols && target.protocols.length > 0 && !target.protocols.includes(protocol)) continue;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
// CONNECT tunnel handler
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Parse a CONNECT target of the form `host:port`.
|
|
77
|
+
*/
|
|
78
|
+
function parseConnectTarget(
|
|
79
|
+
url: string | undefined,
|
|
80
|
+
): { host: string; port: number } | null {
|
|
81
|
+
if (!url) return null;
|
|
82
|
+
const colonIdx = url.lastIndexOf(":");
|
|
83
|
+
if (colonIdx <= 0) return null;
|
|
84
|
+
let host = url.slice(0, colonIdx);
|
|
85
|
+
const portStr = url.slice(colonIdx + 1);
|
|
86
|
+
if (!host || !portStr) return null;
|
|
87
|
+
const port = Number(portStr);
|
|
88
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) return null;
|
|
89
|
+
if (host.startsWith("[") && host.endsWith("]")) {
|
|
90
|
+
host = host.slice(1, -1);
|
|
91
|
+
if (!host) return null;
|
|
92
|
+
}
|
|
93
|
+
return { host, port };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
// Hooks factory
|
|
98
|
+
// ---------------------------------------------------------------------------
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Build `SessionStartHooks` for CES egress enforcement.
|
|
102
|
+
*
|
|
103
|
+
* The created proxy server enforces the `allowedTargets` from the
|
|
104
|
+
* session's config. If no `allowedTargets` are configured, all
|
|
105
|
+
* connections are blocked (fail-closed).
|
|
106
|
+
*/
|
|
107
|
+
export function buildCesEgressHooks(): SessionStartHooks {
|
|
108
|
+
return {
|
|
109
|
+
// No CA setup needed — CES does not do MITM interception
|
|
110
|
+
createServer: async (managed: ManagedSession) => {
|
|
111
|
+
const allowedTargets = managed.config.allowedTargets ?? [];
|
|
112
|
+
|
|
113
|
+
const server = createServer((req: IncomingMessage, res: ServerResponse) => {
|
|
114
|
+
// Plain HTTP proxy requests — parse the absolute URL and check host/port/protocol
|
|
115
|
+
if (req.url && req.method) {
|
|
116
|
+
try {
|
|
117
|
+
const target = new URL(req.url);
|
|
118
|
+
const protocol = target.protocol === "https:" ? "https" : "http" as const;
|
|
119
|
+
const port = target.port
|
|
120
|
+
? Number(target.port)
|
|
121
|
+
: protocol === "https" ? 443 : 80;
|
|
122
|
+
if (!isTargetAllowed(target.hostname, port, protocol, allowedTargets)) {
|
|
123
|
+
res.writeHead(403, { "Content-Type": "text/plain" });
|
|
124
|
+
res.end(`Blocked by CES egress policy: ${target.hostname}:${port} (${protocol}) is not in the allowed targets list`);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Forward the request using the appropriate protocol
|
|
129
|
+
const doRequest = target.protocol === "https:" ? httpsRequest : httpRequest;
|
|
130
|
+
const proxyReq = doRequest(
|
|
131
|
+
req.url,
|
|
132
|
+
{
|
|
133
|
+
method: req.method,
|
|
134
|
+
headers: { ...req.headers, host: target.host },
|
|
135
|
+
},
|
|
136
|
+
(proxyRes) => {
|
|
137
|
+
res.writeHead(proxyRes.statusCode ?? 502, proxyRes.headers);
|
|
138
|
+
proxyRes.pipe(res);
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
proxyReq.on("error", () => {
|
|
143
|
+
if (!res.headersSent) {
|
|
144
|
+
res.writeHead(502, { "Content-Type": "text/plain" });
|
|
145
|
+
}
|
|
146
|
+
res.end("Proxy connection error");
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
req.pipe(proxyReq);
|
|
150
|
+
} catch {
|
|
151
|
+
res.writeHead(400, { "Content-Type": "text/plain" });
|
|
152
|
+
res.end("Bad request");
|
|
153
|
+
}
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
res.writeHead(400, { "Content-Type": "text/plain" });
|
|
158
|
+
res.end("Bad request");
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// Handle CONNECT for HTTPS tunnelling
|
|
162
|
+
server.on("connect", (req: IncomingMessage, clientSocket: Socket, head: Buffer) => {
|
|
163
|
+
const target = parseConnectTarget(req.url);
|
|
164
|
+
if (!target) {
|
|
165
|
+
clientSocket.write("HTTP/1.1 400 Bad Request\r\n\r\n");
|
|
166
|
+
clientSocket.destroy();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// CONNECT is used for HTTPS tunnelling — assume "https" protocol
|
|
171
|
+
if (!isTargetAllowed(target.host, target.port, "https", allowedTargets)) {
|
|
172
|
+
clientSocket.write(
|
|
173
|
+
"HTTP/1.1 403 Forbidden\r\n" +
|
|
174
|
+
"Content-Type: text/plain\r\n\r\n" +
|
|
175
|
+
`Blocked by CES egress policy: ${target.host}:${target.port} (https) is not in the allowed targets list`,
|
|
176
|
+
);
|
|
177
|
+
clientSocket.destroy();
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Tunnel to the allowed target
|
|
182
|
+
const upstream = connect(target.port, target.host, () => {
|
|
183
|
+
clientSocket.write("HTTP/1.1 200 Connection Established\r\n\r\n");
|
|
184
|
+
if (head.length > 0) {
|
|
185
|
+
upstream.write(head);
|
|
186
|
+
}
|
|
187
|
+
upstream.pipe(clientSocket);
|
|
188
|
+
clientSocket.pipe(upstream);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
upstream.on("error", () => {
|
|
192
|
+
clientSocket.destroy();
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
clientSocket.on("error", () => {
|
|
196
|
+
upstream.destroy();
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
return server;
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
}
|