@vellumai/vellum-gateway 0.8.8 → 0.8.9-dev.202606091926.ebb2d62
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/node_modules/@vellumai/assistant-client/bun.lock +24 -0
- package/node_modules/@vellumai/assistant-client/package.json +18 -0
- package/node_modules/@vellumai/assistant-client/src/__tests__/assistant-client.test.ts +399 -0
- package/node_modules/@vellumai/assistant-client/src/__tests__/package-boundary.test.ts +137 -0
- package/node_modules/@vellumai/assistant-client/src/http-client.ts +149 -0
- package/node_modules/@vellumai/assistant-client/src/index.ts +31 -0
- package/node_modules/@vellumai/assistant-client/src/proxy-forward.ts +155 -0
- package/node_modules/@vellumai/assistant-client/src/websocket-upstream.ts +80 -0
- package/node_modules/@vellumai/assistant-client/tsconfig.json +20 -0
- package/node_modules/@vellumai/ces-client/bun.lock +33 -0
- package/node_modules/@vellumai/ces-client/package.json +25 -0
- package/node_modules/@vellumai/ces-client/src/__tests__/ces-client.test.ts +631 -0
- package/node_modules/@vellumai/ces-client/src/__tests__/package-boundary.test.ts +138 -0
- package/node_modules/@vellumai/ces-client/src/credential-rpc.ts +13 -0
- package/node_modules/@vellumai/ces-client/src/http-credentials.ts +296 -0
- package/node_modules/@vellumai/ces-client/src/http-log-export.ts +111 -0
- package/node_modules/@vellumai/ces-client/src/index.ts +43 -0
- package/node_modules/@vellumai/ces-client/src/rpc-client.ts +445 -0
- package/node_modules/@vellumai/ces-client/tsconfig.json +20 -0
- package/node_modules/@vellumai/ipc-server-utils/bun.lock +24 -0
- package/node_modules/@vellumai/ipc-server-utils/package.json +18 -0
- package/node_modules/@vellumai/ipc-server-utils/src/index.ts +6 -0
- package/node_modules/@vellumai/ipc-server-utils/src/socket-watchdog.test.ts +430 -0
- package/node_modules/@vellumai/ipc-server-utils/src/socket-watchdog.ts +221 -0
- package/node_modules/@vellumai/ipc-server-utils/tsconfig.json +20 -0
- package/node_modules/@vellumai/service-contracts/bun.lock +31 -0
- package/node_modules/@vellumai/service-contracts/package.json +30 -0
- package/node_modules/@vellumai/service-contracts/src/__tests__/contracts.test.ts +301 -0
- package/node_modules/@vellumai/service-contracts/src/__tests__/grants.test.ts +686 -0
- package/node_modules/@vellumai/service-contracts/src/__tests__/ingress.test.ts +107 -0
- package/node_modules/@vellumai/service-contracts/src/__tests__/package-boundary.test.ts +155 -0
- package/node_modules/@vellumai/service-contracts/src/credential-rpc.ts +23 -0
- package/node_modules/@vellumai/service-contracts/src/error.ts +26 -0
- package/node_modules/@vellumai/service-contracts/src/grants.ts +184 -0
- package/node_modules/@vellumai/service-contracts/src/handles.ts +212 -0
- package/node_modules/@vellumai/service-contracts/src/index.ts +29 -0
- package/node_modules/@vellumai/service-contracts/src/ingress.ts +24 -0
- package/node_modules/@vellumai/service-contracts/src/rendering.ts +135 -0
- package/node_modules/@vellumai/service-contracts/src/rpc.ts +677 -0
- package/node_modules/@vellumai/service-contracts/src/transport.ts +133 -0
- package/node_modules/@vellumai/service-contracts/src/trust-rules.ts +116 -0
- package/node_modules/@vellumai/service-contracts/src/twilio-ingress.ts +84 -0
- package/node_modules/@vellumai/service-contracts/tsconfig.json +20 -0
- package/node_modules/@vellumai/slack-text/bun.lock +24 -0
- package/node_modules/@vellumai/slack-text/package.json +18 -0
- package/node_modules/@vellumai/slack-text/src/index.test.ts +236 -0
- package/node_modules/@vellumai/slack-text/src/index.ts +253 -0
- package/node_modules/@vellumai/slack-text/tsconfig.json +20 -0
- package/node_modules/@vellumai/twilio-client/bun.lock +24 -0
- package/node_modules/@vellumai/twilio-client/package.json +18 -0
- package/node_modules/@vellumai/twilio-client/src/__tests__/twilio-client.test.ts +128 -0
- package/node_modules/@vellumai/twilio-client/src/index.ts +179 -0
- package/node_modules/@vellumai/twilio-client/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 +10 -1
- package/src/__tests__/actor-token-revocation.test.ts +44 -1
- package/src/__tests__/auth-token-trust-proxy.test.ts +104 -0
- package/src/__tests__/edge-auth.test.ts +69 -2
- package/src/__tests__/feature-flag-resolver.test.ts +26 -0
- package/src/__tests__/feature-flags-route.test.ts +34 -0
- package/src/__tests__/ipc-feature-flag-routes.test.ts +20 -0
- package/src/__tests__/remote-feature-flag-sync.test.ts +77 -7
- package/src/__tests__/text-verification-helpers.test.ts +55 -1
- package/src/auth/actor-token-revocation.ts +12 -1
- package/src/auth/guardian-bootstrap.ts +2 -2
- package/src/auth/guardian-refresh.ts +22 -4
- package/src/config.ts +7 -3
- package/src/feature-flag-env-overrides.test.ts +166 -0
- package/src/feature-flag-env-overrides.ts +58 -0
- package/src/feature-flag-registry.json +10 -56
- package/src/feature-flag-resolver.ts +5 -1
- package/src/handlers/handle-inbound.ts +3 -0
- package/src/http/middleware/auth.ts +8 -1
- package/src/http/router.ts +10 -1
- package/src/http/routes/auth-token.ts +82 -3
- package/src/http/routes/email-webhook.ts +14 -0
- package/src/http/routes/feature-flags.ts +10 -6
- package/src/http/routes/mailgun-webhook.ts +62 -0
- package/src/http/routes/resend-webhook.ts +56 -0
- package/src/index.ts +2 -1
- package/src/ipc/feature-flag-handlers.ts +7 -0
- package/src/remote-feature-flag-sync.ts +33 -15
- package/src/risk/command-registry/commands/assistant.ts +15 -0
- package/src/util/is-loopback-address.ts +16 -5
- package/src/verification/code-parsing.ts +25 -0
- package/src/verification/identity.ts +9 -1
- package/src/verification/text-verification.ts +28 -12
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfileVersion": 1,
|
|
3
|
+
"configVersion": 1,
|
|
4
|
+
"workspaces": {
|
|
5
|
+
"": {
|
|
6
|
+
"name": "@vellumai/assistant-client",
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@types/bun": "1.3.10",
|
|
9
|
+
"typescript": "5.9.3",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
"packages": {
|
|
14
|
+
"@types/bun": ["@types/bun@1.3.10", "", { "dependencies": { "bun-types": "1.3.10" } }, "sha512-0+rlrUrOrTSskibryHbvQkDOWRJwJZqZlxrUs1u4oOoTln8+WIXBPmAuCF35SWB2z4Zl3E84Nl/D0P7803nigQ=="],
|
|
15
|
+
|
|
16
|
+
"@types/node": ["@types/node@25.6.0", "", { "dependencies": { "undici-types": "~7.19.0" } }, "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ=="],
|
|
17
|
+
|
|
18
|
+
"bun-types": ["bun-types@1.3.10", "", { "dependencies": { "@types/node": "*" } }, "sha512-tcpfCCl6XWo6nCVnpcVrxQ+9AYN1iqMIzgrSKYMB/fjLtV2eyAVEg7AxQJuCq/26R6HpKWykQXuSOq/21RYcbg=="],
|
|
19
|
+
|
|
20
|
+
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
21
|
+
|
|
22
|
+
"undici-types": ["undici-types@7.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="],
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vellumai/assistant-client",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.ts"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"typecheck": "bunx tsc --noEmit",
|
|
12
|
+
"test": "bun test src/"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/bun": "1.3.10",
|
|
16
|
+
"typescript": "5.9.3"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
buildUpstreamUrl,
|
|
5
|
+
stripHopByHop,
|
|
6
|
+
prepareUpstreamHeaders,
|
|
7
|
+
createTimeoutController,
|
|
8
|
+
isTimeoutError,
|
|
9
|
+
isConnectionError,
|
|
10
|
+
} from "../http-client.js";
|
|
11
|
+
|
|
12
|
+
import { proxyForward } from "../proxy-forward.js";
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
httpToWs,
|
|
16
|
+
buildWsUpstreamUrl,
|
|
17
|
+
} from "../websocket-upstream.js";
|
|
18
|
+
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// http-client: URL normalization
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
describe("buildUpstreamUrl", () => {
|
|
24
|
+
test("joins base URL and path", () => {
|
|
25
|
+
expect(buildUpstreamUrl("http://localhost:7821", "/v1/health")).toBe(
|
|
26
|
+
"http://localhost:7821/v1/health",
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test("strips trailing slashes from base", () => {
|
|
31
|
+
expect(buildUpstreamUrl("http://localhost:7821/", "/v1/health")).toBe(
|
|
32
|
+
"http://localhost:7821/v1/health",
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("strips multiple trailing slashes from base", () => {
|
|
37
|
+
expect(buildUpstreamUrl("http://localhost:7821///", "/v1/health")).toBe(
|
|
38
|
+
"http://localhost:7821/v1/health",
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test("adds leading slash to path if missing", () => {
|
|
43
|
+
expect(buildUpstreamUrl("http://localhost:7821", "v1/health")).toBe(
|
|
44
|
+
"http://localhost:7821/v1/health",
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test("appends search string", () => {
|
|
49
|
+
expect(
|
|
50
|
+
buildUpstreamUrl("http://localhost:7821", "/v1/channels", "?foo=bar"),
|
|
51
|
+
).toBe("http://localhost:7821/v1/channels?foo=bar");
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test("omits search when undefined", () => {
|
|
55
|
+
expect(buildUpstreamUrl("http://localhost:7821", "/v1/health")).toBe(
|
|
56
|
+
"http://localhost:7821/v1/health",
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
// http-client: hop-by-hop header stripping
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
describe("stripHopByHop", () => {
|
|
66
|
+
test("removes standard hop-by-hop headers", () => {
|
|
67
|
+
const headers = new Headers({
|
|
68
|
+
connection: "keep-alive",
|
|
69
|
+
"keep-alive": "timeout=5",
|
|
70
|
+
"transfer-encoding": "chunked",
|
|
71
|
+
"content-type": "application/json",
|
|
72
|
+
});
|
|
73
|
+
const cleaned = stripHopByHop(headers);
|
|
74
|
+
expect(cleaned.has("connection")).toBe(false);
|
|
75
|
+
expect(cleaned.has("keep-alive")).toBe(false);
|
|
76
|
+
expect(cleaned.has("transfer-encoding")).toBe(false);
|
|
77
|
+
expect(cleaned.get("content-type")).toBe("application/json");
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test("removes headers listed in Connection value", () => {
|
|
81
|
+
const headers = new Headers({
|
|
82
|
+
connection: "x-custom-hop",
|
|
83
|
+
"x-custom-hop": "value",
|
|
84
|
+
"x-keep": "preserved",
|
|
85
|
+
});
|
|
86
|
+
const cleaned = stripHopByHop(headers);
|
|
87
|
+
expect(cleaned.has("x-custom-hop")).toBe(false);
|
|
88
|
+
expect(cleaned.get("x-keep")).toBe("preserved");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("does not mutate the original headers", () => {
|
|
92
|
+
const original = new Headers({ connection: "keep-alive" });
|
|
93
|
+
stripHopByHop(original);
|
|
94
|
+
expect(original.has("connection")).toBe(true);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test("handles empty headers gracefully", () => {
|
|
98
|
+
const cleaned = stripHopByHop(new Headers());
|
|
99
|
+
expect([...cleaned.entries()]).toHaveLength(0);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
// http-client: auth header injection
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
|
|
107
|
+
describe("prepareUpstreamHeaders", () => {
|
|
108
|
+
test("injects service token as Bearer authorization", () => {
|
|
109
|
+
const source = new Headers({ "content-type": "application/json" });
|
|
110
|
+
const prepared = prepareUpstreamHeaders(source, "test-token-123");
|
|
111
|
+
expect(prepared.get("authorization")).toBe("Bearer test-token-123");
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
test("removes incoming host header", () => {
|
|
115
|
+
const source = new Headers({ host: "gateway.example.com" });
|
|
116
|
+
const prepared = prepareUpstreamHeaders(source, "token");
|
|
117
|
+
expect(prepared.has("host")).toBe(false);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test("replaces incoming authorization header", () => {
|
|
121
|
+
const source = new Headers({ authorization: "Bearer old-edge-token" });
|
|
122
|
+
const prepared = prepareUpstreamHeaders(source, "new-service-token");
|
|
123
|
+
expect(prepared.get("authorization")).toBe("Bearer new-service-token");
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test("strips hop-by-hop headers from source", () => {
|
|
127
|
+
const source = new Headers({
|
|
128
|
+
connection: "keep-alive",
|
|
129
|
+
"keep-alive": "timeout=5",
|
|
130
|
+
"x-custom": "preserved",
|
|
131
|
+
});
|
|
132
|
+
const prepared = prepareUpstreamHeaders(source, "token");
|
|
133
|
+
expect(prepared.has("connection")).toBe(false);
|
|
134
|
+
expect(prepared.has("keep-alive")).toBe(false);
|
|
135
|
+
expect(prepared.get("x-custom")).toBe("preserved");
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// ---------------------------------------------------------------------------
|
|
140
|
+
// http-client: timeout helpers
|
|
141
|
+
// ---------------------------------------------------------------------------
|
|
142
|
+
|
|
143
|
+
describe("createTimeoutController", () => {
|
|
144
|
+
test("returns a controller and clear function", () => {
|
|
145
|
+
const { controller, clear } = createTimeoutController(5000);
|
|
146
|
+
expect(controller).toBeInstanceOf(AbortController);
|
|
147
|
+
expect(typeof clear).toBe("function");
|
|
148
|
+
// Clean up timer to avoid leaks
|
|
149
|
+
clear();
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
test("abort signal fires with TimeoutError after timeout", async () => {
|
|
153
|
+
const { controller } = createTimeoutController(10);
|
|
154
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
155
|
+
expect(controller.signal.aborted).toBe(true);
|
|
156
|
+
expect(isTimeoutError(controller.signal.reason)).toBe(true);
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
test("clear prevents abort", async () => {
|
|
160
|
+
const { controller, clear } = createTimeoutController(10);
|
|
161
|
+
clear();
|
|
162
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
163
|
+
expect(controller.signal.aborted).toBe(false);
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
describe("isTimeoutError", () => {
|
|
168
|
+
test("returns true for TimeoutError DOMException", () => {
|
|
169
|
+
const err = new DOMException("timeout", "TimeoutError");
|
|
170
|
+
expect(isTimeoutError(err)).toBe(true);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
test("returns false for regular Error", () => {
|
|
174
|
+
expect(isTimeoutError(new Error("connection refused"))).toBe(false);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test("returns false for non-error values", () => {
|
|
178
|
+
expect(isTimeoutError("timeout")).toBe(false);
|
|
179
|
+
expect(isTimeoutError(null)).toBe(false);
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
describe("isConnectionError", () => {
|
|
184
|
+
test("returns true for regular Error", () => {
|
|
185
|
+
expect(isConnectionError(new Error("ECONNREFUSED"))).toBe(true);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
test("returns false for TimeoutError", () => {
|
|
189
|
+
const err = new DOMException("timeout", "TimeoutError");
|
|
190
|
+
expect(isConnectionError(err)).toBe(false);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
test("returns false for non-Error values", () => {
|
|
194
|
+
expect(isConnectionError("error string")).toBe(false);
|
|
195
|
+
expect(isConnectionError(null)).toBe(false);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// ---------------------------------------------------------------------------
|
|
200
|
+
// proxy-forward: timeout-to-504 and connection-failure-to-502 mapping
|
|
201
|
+
// ---------------------------------------------------------------------------
|
|
202
|
+
|
|
203
|
+
describe("proxyForward", () => {
|
|
204
|
+
test("maps timeout to 504 Gateway Timeout", async () => {
|
|
205
|
+
const req = new Request("http://gateway/v1/health", { method: "GET" });
|
|
206
|
+
const result = await proxyForward(req, {
|
|
207
|
+
baseUrl: "http://localhost:7821",
|
|
208
|
+
path: "/v1/health",
|
|
209
|
+
serviceToken: "tok",
|
|
210
|
+
timeoutMs: 5000,
|
|
211
|
+
fetchImpl: () => {
|
|
212
|
+
throw new DOMException("timeout", "TimeoutError");
|
|
213
|
+
},
|
|
214
|
+
});
|
|
215
|
+
expect(result.status).toBe(504);
|
|
216
|
+
expect(result.gatewayError).toBe(true);
|
|
217
|
+
expect(result.body).toContain("Gateway Timeout");
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
test("maps connection failure to 502 Bad Gateway", async () => {
|
|
221
|
+
const req = new Request("http://gateway/v1/health", { method: "GET" });
|
|
222
|
+
const result = await proxyForward(req, {
|
|
223
|
+
baseUrl: "http://localhost:7821",
|
|
224
|
+
path: "/v1/health",
|
|
225
|
+
serviceToken: "tok",
|
|
226
|
+
timeoutMs: 5000,
|
|
227
|
+
fetchImpl: () => {
|
|
228
|
+
throw new Error("ECONNREFUSED");
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
expect(result.status).toBe(502);
|
|
232
|
+
expect(result.gatewayError).toBe(true);
|
|
233
|
+
expect(result.body).toContain("Bad Gateway");
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test("forwards successful response with stripped hop-by-hop headers", async () => {
|
|
237
|
+
const req = new Request("http://gateway/v1/data", { method: "GET" });
|
|
238
|
+
const result = await proxyForward(req, {
|
|
239
|
+
baseUrl: "http://localhost:7821",
|
|
240
|
+
path: "/v1/data",
|
|
241
|
+
serviceToken: "tok",
|
|
242
|
+
timeoutMs: 5000,
|
|
243
|
+
fetchImpl: async () =>
|
|
244
|
+
new Response('{"ok":true}', {
|
|
245
|
+
status: 200,
|
|
246
|
+
headers: {
|
|
247
|
+
"content-type": "application/json",
|
|
248
|
+
connection: "keep-alive",
|
|
249
|
+
},
|
|
250
|
+
}),
|
|
251
|
+
});
|
|
252
|
+
expect(result.status).toBe(200);
|
|
253
|
+
expect(result.gatewayError).toBe(false);
|
|
254
|
+
expect(result.headers.has("connection")).toBe(false);
|
|
255
|
+
expect(result.headers.get("content-type")).toBe("application/json");
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
test("returns upstream error body for 4xx/5xx responses", async () => {
|
|
259
|
+
const req = new Request("http://gateway/v1/missing", { method: "GET" });
|
|
260
|
+
const result = await proxyForward(req, {
|
|
261
|
+
baseUrl: "http://localhost:7821",
|
|
262
|
+
path: "/v1/missing",
|
|
263
|
+
serviceToken: "tok",
|
|
264
|
+
timeoutMs: 5000,
|
|
265
|
+
fetchImpl: async () =>
|
|
266
|
+
new Response("Not Found", { status: 404 }),
|
|
267
|
+
});
|
|
268
|
+
expect(result.status).toBe(404);
|
|
269
|
+
expect(result.gatewayError).toBe(false);
|
|
270
|
+
expect(result.body).toBe("Not Found");
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
test("buffers POST body and sets content-length", async () => {
|
|
274
|
+
let capturedHeaders: Headers | undefined;
|
|
275
|
+
let capturedBody: ArrayBuffer | null = null;
|
|
276
|
+
|
|
277
|
+
const req = new Request("http://gateway/v1/inbound", {
|
|
278
|
+
method: "POST",
|
|
279
|
+
body: JSON.stringify({ message: "hello" }),
|
|
280
|
+
headers: { "content-type": "application/json" },
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
await proxyForward(req, {
|
|
284
|
+
baseUrl: "http://localhost:7821",
|
|
285
|
+
path: "/v1/inbound",
|
|
286
|
+
serviceToken: "tok",
|
|
287
|
+
timeoutMs: 5000,
|
|
288
|
+
fetchImpl: async (_url, init) => {
|
|
289
|
+
capturedHeaders = new Headers(init?.headers as HeadersInit);
|
|
290
|
+
if (init?.body instanceof ArrayBuffer) {
|
|
291
|
+
capturedBody = init.body;
|
|
292
|
+
}
|
|
293
|
+
return new Response("ok", { status: 200 });
|
|
294
|
+
},
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
expect(capturedHeaders?.get("content-length")).toBe(
|
|
298
|
+
String(JSON.stringify({ message: "hello" }).length),
|
|
299
|
+
);
|
|
300
|
+
expect(capturedHeaders?.get("authorization")).toBe("Bearer tok");
|
|
301
|
+
expect(capturedBody).not.toBeNull();
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
// ---------------------------------------------------------------------------
|
|
306
|
+
// websocket-upstream: protocol conversion
|
|
307
|
+
// ---------------------------------------------------------------------------
|
|
308
|
+
|
|
309
|
+
describe("httpToWs", () => {
|
|
310
|
+
test("converts http to ws", () => {
|
|
311
|
+
expect(httpToWs("http://localhost:7821")).toBe("ws://localhost:7821");
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
test("converts https to wss", () => {
|
|
315
|
+
expect(httpToWs("https://runtime.example.com")).toBe(
|
|
316
|
+
"wss://runtime.example.com",
|
|
317
|
+
);
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
test("preserves path and port", () => {
|
|
321
|
+
expect(httpToWs("http://localhost:7821/prefix")).toBe(
|
|
322
|
+
"ws://localhost:7821/prefix",
|
|
323
|
+
);
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
// ---------------------------------------------------------------------------
|
|
328
|
+
// websocket-upstream: URL construction
|
|
329
|
+
// ---------------------------------------------------------------------------
|
|
330
|
+
|
|
331
|
+
describe("buildWsUpstreamUrl", () => {
|
|
332
|
+
test("builds URL with token query parameter", () => {
|
|
333
|
+
const result = buildWsUpstreamUrl({
|
|
334
|
+
baseUrl: "http://localhost:7821",
|
|
335
|
+
path: "/v1/browser-relay",
|
|
336
|
+
serviceToken: "service-jwt-123",
|
|
337
|
+
});
|
|
338
|
+
expect(result.url).toContain("ws://localhost:7821/v1/browser-relay?");
|
|
339
|
+
expect(result.url).toContain("token=service-jwt-123");
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
test("includes extra params in URL", () => {
|
|
343
|
+
const result = buildWsUpstreamUrl({
|
|
344
|
+
baseUrl: "http://localhost:7821",
|
|
345
|
+
path: "/v1/browser-relay",
|
|
346
|
+
serviceToken: "tok",
|
|
347
|
+
extraParams: {
|
|
348
|
+
guardianId: "guardian-abc",
|
|
349
|
+
clientInstanceId: "inst-xyz",
|
|
350
|
+
},
|
|
351
|
+
});
|
|
352
|
+
expect(result.url).toContain("guardianId=guardian-abc");
|
|
353
|
+
expect(result.url).toContain("clientInstanceId=inst-xyz");
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
test("produces log-safe URL with redacted token", () => {
|
|
357
|
+
const result = buildWsUpstreamUrl({
|
|
358
|
+
baseUrl: "http://localhost:7821",
|
|
359
|
+
path: "/v1/calls/relay",
|
|
360
|
+
serviceToken: "secret-jwt-value",
|
|
361
|
+
extraParams: { callSessionId: "sess-1" },
|
|
362
|
+
});
|
|
363
|
+
expect(result.logSafeUrl).toContain("token=%3Credacted%3E");
|
|
364
|
+
expect(result.logSafeUrl).not.toContain("secret-jwt-value");
|
|
365
|
+
expect(result.logSafeUrl).toContain("callSessionId=sess-1");
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
test("ignores token key in extraParams", () => {
|
|
369
|
+
const result = buildWsUpstreamUrl({
|
|
370
|
+
baseUrl: "http://localhost:7821",
|
|
371
|
+
path: "/v1/stt/stream",
|
|
372
|
+
serviceToken: "real-token",
|
|
373
|
+
extraParams: { token: "should-be-ignored", mimeType: "audio/webm" },
|
|
374
|
+
});
|
|
375
|
+
// The token should be the service token, not the extra param
|
|
376
|
+
const url = new URL(result.url);
|
|
377
|
+
expect(url.searchParams.get("token")).toBe("real-token");
|
|
378
|
+
expect(url.searchParams.get("mimeType")).toBe("audio/webm");
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
test("strips trailing slashes from base URL", () => {
|
|
382
|
+
const result = buildWsUpstreamUrl({
|
|
383
|
+
baseUrl: "http://localhost:7821/",
|
|
384
|
+
path: "/v1/browser-relay",
|
|
385
|
+
serviceToken: "tok",
|
|
386
|
+
});
|
|
387
|
+
expect(result.url).toContain("ws://localhost:7821/v1/browser-relay?");
|
|
388
|
+
expect(result.url).not.toContain("//v1");
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
test("converts https to wss", () => {
|
|
392
|
+
const result = buildWsUpstreamUrl({
|
|
393
|
+
baseUrl: "https://runtime.example.com",
|
|
394
|
+
path: "/v1/calls/media-stream",
|
|
395
|
+
serviceToken: "tok",
|
|
396
|
+
});
|
|
397
|
+
expect(result.url).toStartWith("wss://runtime.example.com/v1/calls/media-stream?");
|
|
398
|
+
});
|
|
399
|
+
});
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package boundary tests for @vellumai/assistant-client.
|
|
3
|
+
*
|
|
4
|
+
* Ensures the package:
|
|
5
|
+
* 1. Does NOT import from assistant, gateway, or credential-executor service
|
|
6
|
+
* runtime modules.
|
|
7
|
+
* 2. Does NOT import from runtime shared packages (@vellumai/credential-storage,
|
|
8
|
+
* @vellumai/egress-proxy).
|
|
9
|
+
* 3. Remains a lightweight client package with no runtime service dependencies.
|
|
10
|
+
*
|
|
11
|
+
* @vellumai/assistant-client is a typed HTTP client for gateway-to-assistant
|
|
12
|
+
* calls. It must not pull in assistant runtime internals or CES infrastructure.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { describe, expect, test } from "bun:test";
|
|
16
|
+
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
17
|
+
import { join, resolve } from "node:path";
|
|
18
|
+
|
|
19
|
+
const PACKAGE_ROOT = resolve(import.meta.dirname, "../..");
|
|
20
|
+
const SRC_DIR = join(PACKAGE_ROOT, "src");
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Recursively collect all .ts source files, excluding test and declaration files.
|
|
24
|
+
*/
|
|
25
|
+
function collectSourceFiles(dir: string): string[] {
|
|
26
|
+
const files: string[] = [];
|
|
27
|
+
for (const entry of readdirSync(dir)) {
|
|
28
|
+
const full = join(dir, entry);
|
|
29
|
+
const stat = statSync(full);
|
|
30
|
+
if (stat.isDirectory()) {
|
|
31
|
+
if (entry === "node_modules" || entry === "__tests__") continue;
|
|
32
|
+
files.push(...collectSourceFiles(full));
|
|
33
|
+
} else if (
|
|
34
|
+
entry.endsWith(".ts") &&
|
|
35
|
+
!entry.endsWith(".test.ts") &&
|
|
36
|
+
!entry.endsWith(".d.ts")
|
|
37
|
+
) {
|
|
38
|
+
files.push(full);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return files;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Patterns that must NOT appear in any import/require statement within
|
|
46
|
+
* source files.
|
|
47
|
+
*/
|
|
48
|
+
const FORBIDDEN_IMPORT_PATTERNS = [
|
|
49
|
+
// Assistant runtime internals
|
|
50
|
+
/from\s+["'](?:\.\.\/)+assistant\/src/,
|
|
51
|
+
/require\s*\(\s*["'](?:\.\.\/)+assistant\/src/,
|
|
52
|
+
/from\s+["']@vellumai\/assistant(?:\/|["'])/,
|
|
53
|
+
/require\s*\(\s*["']@vellumai\/assistant(?:\/|["'])/,
|
|
54
|
+
|
|
55
|
+
// Gateway runtime internals
|
|
56
|
+
/from\s+["'](?:\.\.\/)+gateway\/src/,
|
|
57
|
+
/require\s*\(\s*["'](?:\.\.\/)+gateway\/src/,
|
|
58
|
+
/from\s+["']@vellumai\/(?:vellum-)?gateway(?:\/|["'])/,
|
|
59
|
+
/require\s*\(\s*["']@vellumai\/(?:vellum-)?gateway(?:\/|["'])/,
|
|
60
|
+
|
|
61
|
+
// Credential executor runtime internals
|
|
62
|
+
/from\s+["'](?:\.\.\/)+credential-executor\/src/,
|
|
63
|
+
/require\s*\(\s*["'](?:\.\.\/)+credential-executor\/src/,
|
|
64
|
+
/from\s+["']@vellumai\/credential-executor(?:\/|["'])/,
|
|
65
|
+
/require\s*\(\s*["']@vellumai\/credential-executor(?:\/|["'])/,
|
|
66
|
+
|
|
67
|
+
// Runtime shared packages
|
|
68
|
+
/from\s+["']@vellumai\/credential-storage(?:\/|["'])/,
|
|
69
|
+
/require\s*\(\s*["']@vellumai\/credential-storage(?:\/|["'])/,
|
|
70
|
+
/from\s+["']@vellumai\/egress-proxy(?:\/|["'])/,
|
|
71
|
+
/require\s*\(\s*["']@vellumai\/egress-proxy(?:\/|["'])/,
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
describe("package boundary", () => {
|
|
75
|
+
const sourceFiles = collectSourceFiles(SRC_DIR);
|
|
76
|
+
|
|
77
|
+
test("has source files to validate", () => {
|
|
78
|
+
expect(sourceFiles.length).toBeGreaterThan(0);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test("does not import from service runtime modules or runtime shared packages", () => {
|
|
82
|
+
const violations: string[] = [];
|
|
83
|
+
|
|
84
|
+
for (const file of sourceFiles) {
|
|
85
|
+
const content = readFileSync(file, "utf-8");
|
|
86
|
+
const lines = content.split("\n");
|
|
87
|
+
|
|
88
|
+
for (let i = 0; i < lines.length; i++) {
|
|
89
|
+
const line = lines[i];
|
|
90
|
+
for (const pattern of FORBIDDEN_IMPORT_PATTERNS) {
|
|
91
|
+
if (pattern.test(line)) {
|
|
92
|
+
const relative = file.replace(PACKAGE_ROOT + "/", "");
|
|
93
|
+
violations.push(`${relative}:${i + 1}: ${line.trim()}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (violations.length > 0) {
|
|
100
|
+
throw new Error(
|
|
101
|
+
`Found ${violations.length} forbidden import(s) in assistant-client package:\n` +
|
|
102
|
+
violations.map((v) => ` - ${v}`).join("\n") +
|
|
103
|
+
"\n\n" +
|
|
104
|
+
"@vellumai/assistant-client must not import from service runtime modules\n" +
|
|
105
|
+
"or runtime shared packages (credential-storage, egress-proxy).",
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test("package.json declares it as private", () => {
|
|
111
|
+
const pkg = JSON.parse(
|
|
112
|
+
readFileSync(join(PACKAGE_ROOT, "package.json"), "utf-8"),
|
|
113
|
+
);
|
|
114
|
+
expect(pkg.private).toBe(true);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test("package.json does not depend on service runtime or runtime shared packages", () => {
|
|
118
|
+
const pkg = JSON.parse(
|
|
119
|
+
readFileSync(join(PACKAGE_ROOT, "package.json"), "utf-8"),
|
|
120
|
+
);
|
|
121
|
+
const allDeps = {
|
|
122
|
+
...pkg.dependencies,
|
|
123
|
+
...pkg.devDependencies,
|
|
124
|
+
...pkg.peerDependencies,
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const forbidden = Object.keys(allDeps).filter((dep) =>
|
|
128
|
+
[
|
|
129
|
+
"@vellumai/assistant",
|
|
130
|
+
"@vellumai/credential-storage",
|
|
131
|
+
"@vellumai/egress-proxy",
|
|
132
|
+
].includes(dep),
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
expect(forbidden).toEqual([]);
|
|
136
|
+
});
|
|
137
|
+
});
|