@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
|
@@ -14,6 +14,23 @@
|
|
|
14
14
|
* - Trailing slashes are normalised away.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Helpers
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Safely decode a percent-encoded path segment. Returns `null` when it
|
|
23
|
+
* contains malformed escapes (e.g. bare `%` or `%zz`) so that callers
|
|
24
|
+
* can fail closed — malformed segments never match anything.
|
|
25
|
+
*/
|
|
26
|
+
function safeDecodeSegment(segment: string): string | null {
|
|
27
|
+
try {
|
|
28
|
+
return decodeURIComponent(segment);
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
17
34
|
// ---------------------------------------------------------------------------
|
|
18
35
|
// Segment classification patterns
|
|
19
36
|
// ---------------------------------------------------------------------------
|
|
@@ -37,6 +54,21 @@ const NUMERIC_RE = /^[0-9]+$/;
|
|
|
37
54
|
*/
|
|
38
55
|
const HEX_LONG_RE = /^[0-9a-f]{16,}$/i;
|
|
39
56
|
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
// Spoofed placeholder detection
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Literal strings that, if present in a decoded URL segment, indicate an
|
|
63
|
+
* attempt to inject a wildcard placeholder via percent-encoding.
|
|
64
|
+
*
|
|
65
|
+
* Legitimate URLs never contain these exact strings as path segments.
|
|
66
|
+
* Rejecting them prevents an attacker from crafting a URL like
|
|
67
|
+
* `https://api.example.com/%7B:num%7D/resource` that would be stored as
|
|
68
|
+
* a literal during grant approval but decoded to a wildcard during matching.
|
|
69
|
+
*/
|
|
70
|
+
const PLACEHOLDER_LITERALS = new Set(["{:num}", "{:uuid}", "{:hex}"]);
|
|
71
|
+
|
|
40
72
|
// ---------------------------------------------------------------------------
|
|
41
73
|
// Placeholder types
|
|
42
74
|
// ---------------------------------------------------------------------------
|
|
@@ -73,12 +105,40 @@ export function derivePathTemplate(rawUrl: string): string {
|
|
|
73
105
|
const scheme = parsed.protocol.replace(/:$/, "");
|
|
74
106
|
const host = parsed.hostname + (parsed.port ? `:${parsed.port}` : "");
|
|
75
107
|
|
|
76
|
-
// Split path into segments, dropping empty segments from leading/trailing slashes
|
|
77
|
-
const
|
|
108
|
+
// Split path into segments, dropping empty segments from leading/trailing slashes.
|
|
109
|
+
const rawSegments = parsed.pathname
|
|
78
110
|
.split("/")
|
|
79
111
|
.filter((s) => s.length > 0);
|
|
80
112
|
|
|
81
|
-
|
|
113
|
+
// Decode each segment for classification and placeholder detection, but
|
|
114
|
+
// preserve the raw (encoded) form for literal segments in the rebuilt
|
|
115
|
+
// template. This prevents encoded delimiters like %2F from being decoded
|
|
116
|
+
// into real path separators, which would change URL structure.
|
|
117
|
+
const decodedSegments = rawSegments.map((seg) => {
|
|
118
|
+
const decoded = safeDecodeSegment(seg);
|
|
119
|
+
// If decoding fails, keep the raw segment — it will be stored as a
|
|
120
|
+
// literal and can never match anything meaningful (fail closed).
|
|
121
|
+
return decoded ?? seg;
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Guard: reject URLs whose decoded segments match known placeholder
|
|
125
|
+
// patterns. Legitimate URLs never contain literal "{:num}" etc. as path
|
|
126
|
+
// segments; their presence indicates an attempt to inject wildcards via
|
|
127
|
+
// percent-encoding (e.g. %7B:num%7D).
|
|
128
|
+
for (const seg of decodedSegments) {
|
|
129
|
+
if (PLACEHOLDER_LITERALS.has(seg)) {
|
|
130
|
+
throw new Error(
|
|
131
|
+
`Refusing to derive path template: segment "${seg}" is a reserved placeholder literal`,
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const templatedSegments = decodedSegments.map((decoded, i) => {
|
|
137
|
+
const classified = classifySegment(decoded);
|
|
138
|
+
// If the segment was replaced with a placeholder, use the placeholder.
|
|
139
|
+
// Otherwise, use the raw (encoded) segment to preserve URL structure.
|
|
140
|
+
return classified !== decoded ? classified : rawSegments[i]!;
|
|
141
|
+
});
|
|
82
142
|
|
|
83
143
|
const path =
|
|
84
144
|
templatedSegments.length > 0
|
|
@@ -147,21 +207,27 @@ export function urlMatchesTemplate(
|
|
|
147
207
|
if (urlHost !== templateHost) return false;
|
|
148
208
|
|
|
149
209
|
// Split paths and compare segment-by-segment.
|
|
150
|
-
//
|
|
151
|
-
//
|
|
210
|
+
// safeDecodeSegment is applied to both sides so that percent-encoded bytes
|
|
211
|
+
// (e.g. %20, %7B) are compared consistently and so that the URL constructor's
|
|
212
|
+
// encoding of curly braces ({, }) in template placeholders is reversed.
|
|
213
|
+
// A null return means a malformed escape — fail closed immediately.
|
|
152
214
|
const urlSegments = parsedUrl.pathname
|
|
153
215
|
.split("/")
|
|
154
|
-
.filter((s) => s.length > 0)
|
|
216
|
+
.filter((s) => s.length > 0)
|
|
217
|
+
.map(safeDecodeSegment);
|
|
155
218
|
const templateSegments = parsedTemplate.pathname
|
|
156
219
|
.split("/")
|
|
157
220
|
.filter((s) => s.length > 0)
|
|
158
|
-
.map(
|
|
221
|
+
.map(safeDecodeSegment);
|
|
222
|
+
|
|
223
|
+
if (urlSegments.some((s) => s === null)) return false;
|
|
224
|
+
if (templateSegments.some((s) => s === null)) return false;
|
|
159
225
|
|
|
160
226
|
if (urlSegments.length !== templateSegments.length) return false;
|
|
161
227
|
|
|
162
228
|
for (let i = 0; i < templateSegments.length; i++) {
|
|
163
|
-
const tSeg = templateSegments[i]
|
|
164
|
-
const uSeg = urlSegments[i]
|
|
229
|
+
const tSeg = templateSegments[i]!;
|
|
230
|
+
const uSeg = urlSegments[i]!;
|
|
165
231
|
|
|
166
232
|
if (tSeg === "{:num}") {
|
|
167
233
|
if (!NUMERIC_RE.test(uSeg)) return false;
|
package/src/http/policy.ts
CHANGED
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
* credential.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
import type { HttpGrantProposal } from "@vellumai/ces-contracts";
|
|
21
|
+
import { hashProposal, type HttpGrantProposal } from "@vellumai/ces-contracts";
|
|
24
22
|
|
|
25
23
|
import type { PersistentGrant, PersistentGrantStore } from "../grants/persistent-store.js";
|
|
26
24
|
import type { TemporaryGrantStore } from "../grants/temporary-store.js";
|
|
@@ -93,7 +91,7 @@ export interface HttpPolicyRequest {
|
|
|
93
91
|
purpose: string;
|
|
94
92
|
/** Explicit grant ID the caller claims to hold. */
|
|
95
93
|
grantId?: string;
|
|
96
|
-
/** Conversation ID for
|
|
94
|
+
/** Conversation ID for conversation-scoped temporary grants. */
|
|
97
95
|
conversationId?: string;
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -129,10 +127,14 @@ export function evaluateHttpPolicy(
|
|
|
129
127
|
// 2. Check explicit grantId in persistent store
|
|
130
128
|
if (request.grantId) {
|
|
131
129
|
const grant = persistentStore.getById(request.grantId);
|
|
132
|
-
if (
|
|
130
|
+
if (
|
|
131
|
+
grant &&
|
|
132
|
+
grant.tool === "http" &&
|
|
133
|
+
grantCoversRequest(grant, request.credentialHandle, request.method, request.url, "")
|
|
134
|
+
) {
|
|
133
135
|
return { allowed: true, grantId: grant.id, grantSource: "persistent" };
|
|
134
136
|
}
|
|
135
|
-
// Explicit grant not found — fall through to pattern matching
|
|
137
|
+
// Explicit grant not found or does not cover this request — fall through to pattern matching
|
|
136
138
|
}
|
|
137
139
|
|
|
138
140
|
// 3. Check persistent grants for pattern match
|
|
@@ -150,7 +152,7 @@ export function evaluateHttpPolicy(
|
|
|
150
152
|
// 4. Check temporary grants
|
|
151
153
|
// Build a proposal hash key from the canonical request shape
|
|
152
154
|
const proposal = buildProposal(request, pathTemplate);
|
|
153
|
-
const proposalHash =
|
|
155
|
+
const proposalHash = hashProposal(proposal);
|
|
154
156
|
|
|
155
157
|
const tempKind = temporaryStore.checkAny(
|
|
156
158
|
proposalHash,
|
|
@@ -234,23 +236,3 @@ function buildProposal(
|
|
|
234
236
|
};
|
|
235
237
|
}
|
|
236
238
|
|
|
237
|
-
/**
|
|
238
|
-
* Compute a deterministic hash key for temporary grant lookup.
|
|
239
|
-
*
|
|
240
|
-
* Uses the same canonical JSON → SHA-256 approach as the contracts package
|
|
241
|
-
* `hashProposal`, but we use a simplified inline version here to avoid
|
|
242
|
-
* importing the full contracts rendering module into the policy hot path.
|
|
243
|
-
*/
|
|
244
|
-
function hashProposalForLookup(proposal: HttpGrantProposal): string {
|
|
245
|
-
// Build a canonical key from the proposal's stable fields:
|
|
246
|
-
// type + credentialHandle + method + allowedUrlPatterns (sorted)
|
|
247
|
-
const parts = [
|
|
248
|
-
proposal.type,
|
|
249
|
-
proposal.credentialHandle,
|
|
250
|
-
proposal.method.toUpperCase(),
|
|
251
|
-
...(proposal.allowedUrlPatterns ?? []).slice().sort(),
|
|
252
|
-
];
|
|
253
|
-
const canonical = JSON.stringify(parts);
|
|
254
|
-
|
|
255
|
-
return createHash("sha256").update(canonical, "utf8").digest("hex");
|
|
256
|
-
}
|
package/src/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ export type {
|
|
|
29
29
|
RpcHandlerRegistry,
|
|
30
30
|
RpcMethodHandler,
|
|
31
31
|
RunAuthenticatedCommandHandlerOptions,
|
|
32
|
+
SessionIdRef,
|
|
32
33
|
} from "./server.js";
|
|
33
34
|
|
|
34
35
|
export {
|
|
@@ -104,3 +105,5 @@ export type {
|
|
|
104
105
|
|
|
105
106
|
export { executeAuthenticatedHttpRequest } from "./http/executor.js";
|
|
106
107
|
export type { HttpExecutorDeps } from "./http/executor.js";
|
|
108
|
+
|
|
109
|
+
export { MANAGED_LOCAL_STATIC_REJECTION_ERROR } from "./managed-errors.js";
|
package/src/main.ts
CHANGED
|
@@ -36,6 +36,11 @@ import {
|
|
|
36
36
|
} from "./grants/rpc-handlers.js";
|
|
37
37
|
import { TemporaryGrantStore } from "./grants/temporary-store.js";
|
|
38
38
|
import { LocalMaterialiser } from "./materializers/local.js";
|
|
39
|
+
import { createLocalSecureKeyBackend } from "./materializers/local-secure-key-backend.js";
|
|
40
|
+
import { createLocalOAuthLookup } from "./materializers/local-oauth-lookup.js";
|
|
41
|
+
import { createLocalTokenRefreshFn } from "./materializers/local-token-refresh.js";
|
|
42
|
+
import { resolveLocalSubject } from "./subjects/local.js";
|
|
43
|
+
import { checkCredentialPolicy } from "./subjects/policy.js";
|
|
39
44
|
import {
|
|
40
45
|
getCesAuditDir,
|
|
41
46
|
getCesDataRoot,
|
|
@@ -48,9 +53,11 @@ import {
|
|
|
48
53
|
registerCommandExecutionHandler,
|
|
49
54
|
registerManageSecureCommandToolHandler,
|
|
50
55
|
type RpcHandlerRegistry,
|
|
56
|
+
type SessionIdRef,
|
|
51
57
|
} from "./server.js";
|
|
52
|
-
import { publishBundle } from "./toolstore/publish.js";
|
|
53
|
-
import
|
|
58
|
+
import { deleteBundleFromToolstore, publishBundle } from "./toolstore/publish.js";
|
|
59
|
+
import { validateSourceUrl } from "./toolstore/manifest.js";
|
|
60
|
+
import { buildCesEgressHooks } from "./commands/egress-hooks.js";
|
|
54
61
|
|
|
55
62
|
// ---------------------------------------------------------------------------
|
|
56
63
|
// Data directory bootstrap
|
|
@@ -81,7 +88,7 @@ function getVellumRootDir(): string {
|
|
|
81
88
|
// Build RPC handler registry
|
|
82
89
|
// ---------------------------------------------------------------------------
|
|
83
90
|
|
|
84
|
-
function buildHandlers(
|
|
91
|
+
function buildHandlers(sessionIdRef: SessionIdRef): RpcHandlerRegistry {
|
|
85
92
|
// -- Grant stores ----------------------------------------------------------
|
|
86
93
|
const persistentGrantStore = new PersistentGrantStore(
|
|
87
94
|
getCesGrantsDir("local"),
|
|
@@ -100,41 +107,26 @@ function buildHandlers(sessionId: string): RpcHandlerRegistry {
|
|
|
100
107
|
const vellumRoot = getVellumRootDir();
|
|
101
108
|
const credentialMetadataPath = join(
|
|
102
109
|
vellumRoot,
|
|
110
|
+
"workspace",
|
|
103
111
|
"data",
|
|
104
|
-
"
|
|
112
|
+
"credentials",
|
|
113
|
+
"metadata.json",
|
|
105
114
|
);
|
|
106
115
|
const metadataStore = new StaticCredentialMetadataStore(
|
|
107
116
|
credentialMetadataPath,
|
|
108
117
|
);
|
|
109
118
|
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
const oauthConnections: OAuthConnectionLookup = {
|
|
114
|
-
getById: () => undefined,
|
|
115
|
-
};
|
|
119
|
+
// Read-only OAuth connection lookup backed by the assistant's SQLite
|
|
120
|
+
// database. CES opens the database in read-only mode.
|
|
121
|
+
const oauthConnections = createLocalOAuthLookup(vellumRoot);
|
|
116
122
|
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
// will return a structured error until a CES-native backend is wired in.
|
|
121
|
-
const stubSecureKeyBackend = {
|
|
122
|
-
async get(_key: string) {
|
|
123
|
-
return undefined;
|
|
124
|
-
},
|
|
125
|
-
async set(_key: string, _value: string) {
|
|
126
|
-
return false;
|
|
127
|
-
},
|
|
128
|
-
async delete(_key: string) {
|
|
129
|
-
return "error" as const;
|
|
130
|
-
},
|
|
131
|
-
async list() {
|
|
132
|
-
return [];
|
|
133
|
-
},
|
|
134
|
-
};
|
|
123
|
+
// CES-native SecureKeyBackend that reads from the assistant's encrypted
|
|
124
|
+
// key store file. Read-only — CES never writes or deletes keys.
|
|
125
|
+
const secureKeyBackend = createLocalSecureKeyBackend(vellumRoot);
|
|
135
126
|
|
|
136
127
|
const localMaterialiser = new LocalMaterialiser({
|
|
137
|
-
secureKeyBackend
|
|
128
|
+
secureKeyBackend,
|
|
129
|
+
tokenRefreshFn: createLocalTokenRefreshFn(vellumRoot, secureKeyBackend),
|
|
138
130
|
});
|
|
139
131
|
|
|
140
132
|
// -- Build handler registry ------------------------------------------------
|
|
@@ -149,7 +141,8 @@ function buildHandlers(sessionId: string): RpcHandlerRegistry {
|
|
|
149
141
|
metadataStore,
|
|
150
142
|
oauthConnections,
|
|
151
143
|
},
|
|
152
|
-
|
|
144
|
+
auditStore,
|
|
145
|
+
sessionId: sessionIdRef,
|
|
153
146
|
},
|
|
154
147
|
);
|
|
155
148
|
|
|
@@ -158,13 +151,41 @@ function buildHandlers(sessionId: string): RpcHandlerRegistry {
|
|
|
158
151
|
executorDeps: {
|
|
159
152
|
persistentStore: persistentGrantStore,
|
|
160
153
|
temporaryStore: temporaryGrantStore,
|
|
161
|
-
materializeCredential: async (
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
154
|
+
materializeCredential: async (handle) => {
|
|
155
|
+
// Resolve the subject first, then materialise through the local backend
|
|
156
|
+
const subjectResult = resolveLocalSubject(handle, {
|
|
157
|
+
metadataStore,
|
|
158
|
+
oauthConnections,
|
|
159
|
+
});
|
|
160
|
+
if (!subjectResult.ok) {
|
|
161
|
+
return { ok: false as const, error: subjectResult.error };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Enforce credential-level policies for local static handles
|
|
165
|
+
if (subjectResult.subject.type === "local_static") {
|
|
166
|
+
const policyCheck = checkCredentialPolicy(
|
|
167
|
+
subjectResult.subject.metadata,
|
|
168
|
+
"run_authenticated_command",
|
|
169
|
+
);
|
|
170
|
+
if (!policyCheck.ok) {
|
|
171
|
+
return { ok: false as const, error: policyCheck.error! };
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const matResult = await localMaterialiser.materialise(subjectResult.subject);
|
|
176
|
+
if (!matResult.ok) {
|
|
177
|
+
return { ok: false as const, error: matResult.error };
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
ok: true as const,
|
|
181
|
+
value: matResult.credential.value,
|
|
182
|
+
handleType: matResult.credential.handleType,
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
auditStore,
|
|
186
|
+
sessionId: sessionIdRef,
|
|
167
187
|
cesMode: "local",
|
|
188
|
+
egressHooks: buildCesEgressHooks(),
|
|
168
189
|
},
|
|
169
190
|
defaultWorkspaceDir: join(vellumRoot, "workspace"),
|
|
170
191
|
});
|
|
@@ -174,15 +195,47 @@ function buildHandlers(sessionId: string): RpcHandlerRegistry {
|
|
|
174
195
|
|
|
175
196
|
registerManageSecureCommandToolHandler(handlers, {
|
|
176
197
|
downloadBundle: async (sourceUrl: string) => {
|
|
177
|
-
const
|
|
198
|
+
const urlError = validateSourceUrl(sourceUrl);
|
|
199
|
+
if (urlError) {
|
|
200
|
+
throw new Error(urlError);
|
|
201
|
+
}
|
|
202
|
+
const MAX_BUNDLE_SIZE = 100 * 1024 * 1024; // 100 MB
|
|
203
|
+
const resp = await fetch(sourceUrl, { signal: AbortSignal.timeout(60_000) });
|
|
178
204
|
if (!resp.ok) {
|
|
179
205
|
throw new Error(`HTTP ${resp.status}: ${resp.statusText}`);
|
|
180
206
|
}
|
|
181
|
-
|
|
207
|
+
const contentLength = resp.headers.get("content-length");
|
|
208
|
+
if (contentLength && parseInt(contentLength, 10) > MAX_BUNDLE_SIZE) {
|
|
209
|
+
throw new Error(`Bundle too large: ${contentLength} bytes (max ${MAX_BUNDLE_SIZE})`);
|
|
210
|
+
}
|
|
211
|
+
// Stream the body and enforce the size limit on actual bytes received,
|
|
212
|
+
// since Content-Length can be absent (chunked encoding) or lie.
|
|
213
|
+
const body = resp.body;
|
|
214
|
+
if (!body) {
|
|
215
|
+
throw new Error("Response body is null");
|
|
216
|
+
}
|
|
217
|
+
const chunks: Uint8Array[] = [];
|
|
218
|
+
let totalBytes = 0;
|
|
219
|
+
for await (const chunk of body) {
|
|
220
|
+
totalBytes += chunk.byteLength;
|
|
221
|
+
if (totalBytes > MAX_BUNDLE_SIZE) {
|
|
222
|
+
throw new Error(`Bundle too large: received >${MAX_BUNDLE_SIZE} bytes (max ${MAX_BUNDLE_SIZE})`);
|
|
223
|
+
}
|
|
224
|
+
chunks.push(chunk);
|
|
225
|
+
}
|
|
226
|
+
return Buffer.concat(chunks);
|
|
182
227
|
},
|
|
183
228
|
publishBundle: (request) => publishBundle({ ...request, cesMode: "local" }),
|
|
184
229
|
unregisterTool: (toolName: string) => {
|
|
185
|
-
|
|
230
|
+
const entry = toolRegistry.get(toolName);
|
|
231
|
+
const removed = toolRegistry.delete(toolName);
|
|
232
|
+
if (removed && entry?.bundleDigest) {
|
|
233
|
+
const stillInUse = Array.from(toolRegistry.values()).some(t => t.bundleDigest === entry.bundleDigest);
|
|
234
|
+
if (!stillInUse) {
|
|
235
|
+
deleteBundleFromToolstore(entry.bundleDigest, "local");
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return removed;
|
|
186
239
|
},
|
|
187
240
|
registerTool: (entry) => {
|
|
188
241
|
toolRegistry.set(entry.toolName, entry);
|
|
@@ -197,7 +250,6 @@ function buildHandlers(sessionId: string): RpcHandlerRegistry {
|
|
|
197
250
|
|
|
198
251
|
handlers[CesRpcMethod.ListGrants] = createListGrantsHandler({
|
|
199
252
|
persistentGrantStore,
|
|
200
|
-
sessionId,
|
|
201
253
|
}) as typeof handlers[string];
|
|
202
254
|
|
|
203
255
|
handlers[CesRpcMethod.RevokeGrant] = createRevokeGrantHandler({
|
|
@@ -234,9 +286,11 @@ async function main(): Promise<void> {
|
|
|
234
286
|
process.on("SIGTERM", shutdown);
|
|
235
287
|
process.on("SIGINT", shutdown);
|
|
236
288
|
|
|
237
|
-
// Build the handler registry with all available RPC implementations
|
|
238
|
-
|
|
239
|
-
|
|
289
|
+
// Build the handler registry with all available RPC implementations.
|
|
290
|
+
// Use a mutable ref so audit records capture the handshake session ID
|
|
291
|
+
// once it's negotiated (the handshake completes before any RPC call).
|
|
292
|
+
const sessionIdRef: SessionIdRef = { current: `ces-local-${Date.now()}` };
|
|
293
|
+
const handlers = buildHandlers(sessionIdRef);
|
|
240
294
|
|
|
241
295
|
const server = new CesRpcServer({
|
|
242
296
|
input: process.stdin,
|
|
@@ -251,6 +305,11 @@ async function main(): Promise<void> {
|
|
|
251
305
|
process.stderr.write(`[ces-local] ERROR: ${msg} ${args.map(String).join(" ")}\n`),
|
|
252
306
|
},
|
|
253
307
|
signal: controller.signal,
|
|
308
|
+
onHandshakeComplete: (hsSessionId) => {
|
|
309
|
+
sessionIdRef.current = hsSessionId;
|
|
310
|
+
},
|
|
311
|
+
// Local mode reads API keys from env/store directly — no-op handler.
|
|
312
|
+
onApiKeyUpdate: () => {},
|
|
254
313
|
});
|
|
255
314
|
|
|
256
315
|
await server.serve();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error message constants for managed-mode CES.
|
|
3
|
+
*
|
|
4
|
+
* Re-exported from @vellumai/ces-contracts so both the assistant and
|
|
5
|
+
* credential-executor can share the constant via the approved shared-code
|
|
6
|
+
* path without violating the hard process-boundary isolation.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { MANAGED_LOCAL_STATIC_REJECTION_ERROR } from "@vellumai/ces-contracts";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazy getter pattern for managed CES API key propagation.
|
|
3
|
+
*
|
|
4
|
+
* In managed mode the assistant API key may arrive after CES handlers are
|
|
5
|
+
* registered (via the handshake callback or a later RPC update). The
|
|
6
|
+
* `ApiKeyRef` + `buildLazyGetters` pattern allows handlers to resolve
|
|
7
|
+
* the key at call time rather than at registration time.
|
|
8
|
+
*
|
|
9
|
+
* Extracted from `managed-main.ts` so the behavioral contract can be
|
|
10
|
+
* tested directly without exercising the full managed bootstrap lifecycle.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { ManagedSubjectResolverOptions } from "./subjects/managed.js";
|
|
14
|
+
import type { ManagedMaterializerOptions } from "./materializers/managed-platform.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Mutable reference to the assistant API key. Allows the handshake callback
|
|
18
|
+
* to inject the key provisioned at runtime (which arrives after handlers are
|
|
19
|
+
* built). Handlers read `.current` at call time, not at registration time.
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiKeyRef {
|
|
22
|
+
current: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface LazyGetterOptions {
|
|
26
|
+
platformBaseUrl: string;
|
|
27
|
+
assistantId: string;
|
|
28
|
+
apiKeyRef: ApiKeyRef;
|
|
29
|
+
envApiKey?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface LazyGetters {
|
|
33
|
+
getAssistantApiKey: () => string;
|
|
34
|
+
getManagedSubjectOptions: () => ManagedSubjectResolverOptions | undefined;
|
|
35
|
+
getManagedMaterializerOptions: () => ManagedMaterializerOptions | undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Build lazy getter functions that resolve the API key at call time.
|
|
40
|
+
*
|
|
41
|
+
* Prefers the handshake-provided key (via `apiKeyRef.current`) over the
|
|
42
|
+
* env-var fallback, since in managed mode the env var may not be set
|
|
43
|
+
* (chicken-and-egg: key is provisioned after hatch).
|
|
44
|
+
*/
|
|
45
|
+
export function buildLazyGetters(opts: LazyGetterOptions): LazyGetters {
|
|
46
|
+
const { platformBaseUrl, assistantId, apiKeyRef, envApiKey } = opts;
|
|
47
|
+
|
|
48
|
+
const getAssistantApiKey = (): string =>
|
|
49
|
+
apiKeyRef.current || envApiKey || "";
|
|
50
|
+
|
|
51
|
+
const getManagedSubjectOptions = (): ManagedSubjectResolverOptions | undefined => {
|
|
52
|
+
const key = getAssistantApiKey();
|
|
53
|
+
return platformBaseUrl && key && assistantId
|
|
54
|
+
? { platformBaseUrl, assistantApiKey: key, assistantId }
|
|
55
|
+
: undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const getManagedMaterializerOptions = (): ManagedMaterializerOptions | undefined => {
|
|
59
|
+
const key = getAssistantApiKey();
|
|
60
|
+
return platformBaseUrl && key && assistantId
|
|
61
|
+
? { platformBaseUrl, assistantApiKey: key, assistantId }
|
|
62
|
+
: undefined;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
getAssistantApiKey,
|
|
67
|
+
getManagedSubjectOptions,
|
|
68
|
+
getManagedMaterializerOptions,
|
|
69
|
+
};
|
|
70
|
+
}
|