@vellumai/cli 0.10.0 → 0.10.1-staging.1
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/bun.lock +1 -1
- package/node_modules/@vellumai/local-mode/bun.lock +3 -0
- package/node_modules/@vellumai/local-mode/package.json +2 -1
- package/node_modules/@vellumai/local-mode/src/__tests__/loopback-auth.test.ts +26 -0
- package/node_modules/@vellumai/local-mode/src/__tests__/package-boundary.test.ts +6 -6
- package/node_modules/@vellumai/local-mode/src/index.ts +2 -0
- package/node_modules/@vellumai/local-mode/src/lockfile-contract.test.ts +148 -12
- package/node_modules/@vellumai/local-mode/src/lockfile-contract.ts +136 -80
- package/node_modules/@vellumai/local-mode/src/lockfile.test.ts +3 -1
- package/node_modules/@vellumai/local-mode/src/lockfile.ts +9 -2
- package/node_modules/@vellumai/local-mode/src/status.ts +1 -0
- package/node_modules/@vellumai/local-mode/src/upgrade.ts +105 -0
- package/node_modules/@vellumai/local-mode/src/util.ts +4 -8
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +191 -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 +7 -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 +7 -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 +52 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -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 +2672 -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 +216 -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 +326 -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 +703 -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 +409 -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/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -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 +807 -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 +895 -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/global-config.test.ts +39 -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/jitless-allows-eval.test.ts +46 -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/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -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 +325 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -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-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -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 +717 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -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 +1224 -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 +3125 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -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 +1823 -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 +153 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +455 -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 +666 -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 +190 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4730 -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/el.test.ts +215 -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/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -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 +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -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 +622 -0
- package/node_modules/zod/src/v4/core/util.ts +983 -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/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +123 -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 +132 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hr.ts +131 -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 +52 -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/ro.ts +129 -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 +117 -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 +41 -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 +1947 -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 +548 -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 +993 -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 +325 -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 +352 -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 +7 -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 +16 -0
- package/node_modules/zod/v4/classic/external.d.ts +16 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -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 +599 -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 +7 -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 +1511 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
- package/node_modules/zod/v4/classic/schemas.js +1395 -0
- package/node_modules/zod/v4/core/api.cjs +1227 -0
- package/node_modules/zod/v4/core/api.d.cts +325 -0
- package/node_modules/zod/v4/core/api.d.ts +325 -0
- package/node_modules/zod/v4/core/api.js +1087 -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 +85 -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 +78 -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 +216 -0
- package/node_modules/zod/v4/core/errors.d.cts +221 -0
- package/node_modules/zod/v4/core/errors.d.ts +221 -0
- package/node_modules/zod/v4/core/errors.js +185 -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 +644 -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 +601 -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 +7 -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 +172 -0
- package/node_modules/zod/v4/core/regexes.d.cts +85 -0
- package/node_modules/zod/v4/core/regexes.d.ts +85 -0
- package/node_modules/zod/v4/core/regexes.js +139 -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 +2270 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
- package/node_modules/zod/v4/core/schemas.js +2239 -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 +457 -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 +448 -0
- package/node_modules/zod/v4/core/util.cjs +734 -0
- package/node_modules/zod/v4/core/util.d.cts +200 -0
- package/node_modules/zod/v4/core/util.d.ts +200 -0
- package/node_modules/zod/v4/core/util.js +674 -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/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +140 -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 +113 -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 +152 -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 +125 -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/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -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 +111 -0
- package/node_modules/zod/v4/locales/index.d.cts +52 -0
- package/node_modules/zod/v4/locales/index.d.ts +52 -0
- package/node_modules/zod/v4/locales/index.js +52 -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 +7 -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/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -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 +137 -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 +110 -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 +13 -0
- package/node_modules/zod/v4/mini/external.d.ts +13 -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 +7 -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 +1083 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
- package/node_modules/zod/v4/mini/schemas.js +961 -0
- package/node_modules/zod/v4/package.json +7 -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 +7 -0
- package/package.json +1 -1
- package/src/__tests__/upgrade-local.test.ts +443 -0
- package/src/commands/client.ts +266 -102
- package/src/commands/exec.ts +2 -2
- package/src/commands/flags.ts +1 -1
- package/src/commands/logs.ts +1 -2
- package/src/commands/ps.ts +1 -2
- package/src/commands/retire.ts +1 -2
- package/src/commands/roadmap.ts +8 -10
- package/src/commands/rollback.ts +1 -2
- package/src/commands/ssh.ts +1 -2
- package/src/commands/teleport.ts +6 -7
- package/src/commands/upgrade.ts +351 -25
- package/src/lib/assistant-config.ts +56 -48
- package/src/lib/local.ts +204 -24
- package/src/lib/terminal-session.ts +2 -2
- package/src/lib/upgrade-lifecycle.ts +29 -16
- package/src/shared/provider-env-vars.ts +1 -0
package/src/commands/client.ts
CHANGED
|
@@ -54,9 +54,12 @@ import {
|
|
|
54
54
|
getPlatformUrl,
|
|
55
55
|
getWebUrl,
|
|
56
56
|
readPlatformToken,
|
|
57
|
+
savePlatformToken,
|
|
58
|
+
clearPlatformToken,
|
|
57
59
|
} from "../lib/platform-client";
|
|
58
60
|
import { tuiLog } from "../lib/tui-log";
|
|
59
61
|
import { loopbackSafeFetch } from "../lib/loopback-fetch.js";
|
|
62
|
+
import { probePort } from "../lib/port-probe.js";
|
|
60
63
|
|
|
61
64
|
const SUPPORTED_INTERFACES = ["cli", "web"] as const;
|
|
62
65
|
type SupportedInterface = (typeof SUPPORTED_INTERFACES)[number];
|
|
@@ -101,8 +104,10 @@ export function parseArgs(): ParsedArgs {
|
|
|
101
104
|
const { envVars: cliFlagVars, remaining: argsWithoutFlags } =
|
|
102
105
|
parseFeatureFlagArgs(process.argv.slice(3));
|
|
103
106
|
const flagEnvVars = { ...readAmbientFlagEnvVars(), ...cliFlagVars };
|
|
104
|
-
const disablePlatformAmbient =
|
|
105
|
-
|
|
107
|
+
const disablePlatformAmbient =
|
|
108
|
+
process.env.VELLUM_DISABLE_PLATFORM?.trim().toLowerCase();
|
|
109
|
+
let disablePlatform =
|
|
110
|
+
disablePlatformAmbient === "true" || disablePlatformAmbient === "1";
|
|
106
111
|
const args = argsWithoutFlags;
|
|
107
112
|
|
|
108
113
|
// Build parsedFlagOverrides from the extracted env vars:
|
|
@@ -389,6 +394,31 @@ const HATCH_PATTERN = /^(?:\/assistant)?\/__local\/hatch$/;
|
|
|
389
394
|
const RETIRE_PATTERN = /^(?:\/assistant)?\/__local\/retire$/;
|
|
390
395
|
const GUARDIAN_TOKEN_PATTERN =
|
|
391
396
|
/^(?:\/assistant)?\/__local\/guardian-token\/([^/]+)$/;
|
|
397
|
+
const PLATFORM_SESSION_PATTERN =
|
|
398
|
+
/^(?:\/assistant)?\/__local\/platform-session$/;
|
|
399
|
+
|
|
400
|
+
// The loopback platform session token. Persisted via the same store the CLI
|
|
401
|
+
// uses (so `vellum client` restarts and CLI logins stay in sync), cached here
|
|
402
|
+
// to keep it off the per-request proxy path. Set only after the SPA validates
|
|
403
|
+
// the loopback `state`, so an unsolicited /callback can't fixate a session.
|
|
404
|
+
let platformSessionToken: string | null | undefined;
|
|
405
|
+
function currentPlatformToken(): string | null {
|
|
406
|
+
if (platformSessionToken === undefined) {
|
|
407
|
+
platformSessionToken = readPlatformToken();
|
|
408
|
+
}
|
|
409
|
+
return platformSessionToken;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// Whether to attach the platform credential to a proxied request. Only
|
|
413
|
+
// same-origin (SPA) traffic qualifies — a cross-site page must not be able to
|
|
414
|
+
// use the local proxy as a confused deputy for authenticated platform calls.
|
|
415
|
+
// Cross-origin fetches always send an Origin; `Sec-Fetch-Site` is a belt-and-
|
|
416
|
+
// braces check for browsers that send it.
|
|
417
|
+
function isSameOriginRequest(req: Request): boolean {
|
|
418
|
+
if (!originIsAllowed(req.headers.get("origin") ?? undefined)) return false;
|
|
419
|
+
const site = req.headers.get("sec-fetch-site");
|
|
420
|
+
return !site || site === "same-origin" || site === "none";
|
|
421
|
+
}
|
|
392
422
|
|
|
393
423
|
function getEnvRecord(): Record<string, string> {
|
|
394
424
|
const result: Record<string, string> = {};
|
|
@@ -418,6 +448,7 @@ async function handleLocalEndpoints(
|
|
|
418
448
|
HATCH_PATTERN.test(pathname) ||
|
|
419
449
|
RETIRE_PATTERN.test(pathname) ||
|
|
420
450
|
GUARDIAN_TOKEN_PATTERN.test(pathname) ||
|
|
451
|
+
PLATFORM_SESSION_PATTERN.test(pathname) ||
|
|
421
452
|
parseGatewayUrl(pathname).match;
|
|
422
453
|
|
|
423
454
|
if (!isLocalRoute) return null;
|
|
@@ -435,6 +466,33 @@ async function handleLocalEndpoints(
|
|
|
435
466
|
return Response.json({ error: "Forbidden" }, { status: 403 });
|
|
436
467
|
}
|
|
437
468
|
|
|
469
|
+
// Platform session: the SPA hands over the loopback token here (after it has
|
|
470
|
+
// validated the `state` nonce) so the proxy below can authenticate to the
|
|
471
|
+
// platform. The browser never holds a session cookie.
|
|
472
|
+
if (PLATFORM_SESSION_PATTERN.test(pathname)) {
|
|
473
|
+
if (req.method === "DELETE") {
|
|
474
|
+
clearPlatformToken();
|
|
475
|
+
platformSessionToken = null;
|
|
476
|
+
return Response.json({ ok: true });
|
|
477
|
+
}
|
|
478
|
+
if (req.method === "POST") {
|
|
479
|
+
const body = (await req.json().catch(() => null)) as {
|
|
480
|
+
token?: unknown;
|
|
481
|
+
} | null;
|
|
482
|
+
const token = body?.token;
|
|
483
|
+
if (typeof token !== "string" || !/^[A-Za-z0-9]+$/.test(token)) {
|
|
484
|
+
return Response.json(
|
|
485
|
+
{ ok: false, error: "Invalid token" },
|
|
486
|
+
{ status: 400 },
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
savePlatformToken(token);
|
|
490
|
+
platformSessionToken = token;
|
|
491
|
+
return Response.json({ ok: true });
|
|
492
|
+
}
|
|
493
|
+
return new Response(null, { status: 405 });
|
|
494
|
+
}
|
|
495
|
+
|
|
438
496
|
// Lockfile
|
|
439
497
|
if (LOCKFILE_PATTERN.test(pathname)) {
|
|
440
498
|
if (req.method === "GET") {
|
|
@@ -658,6 +716,106 @@ function getBaseDir(): string {
|
|
|
658
716
|
return path.resolve(import.meta.dir, "..", "..", "..");
|
|
659
717
|
}
|
|
660
718
|
|
|
719
|
+
// Just the slice of a Bun server `fetchHandler` needs — matches the structural
|
|
720
|
+
// arg `handleLocalEndpoints` accepts, so Bun's `Server` is assignable to it.
|
|
721
|
+
type RequestPeerServer = {
|
|
722
|
+
requestIP(req: Request): { address: string } | null;
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
const WEB_PORT_SCAN_LIMIT = 50;
|
|
726
|
+
|
|
727
|
+
type WebFetchHandler = (
|
|
728
|
+
req: Request,
|
|
729
|
+
server: RequestPeerServer,
|
|
730
|
+
) => Promise<Response>;
|
|
731
|
+
|
|
732
|
+
function isAddrInUse(err: unknown): boolean {
|
|
733
|
+
const e = err as { code?: string; message?: string } | undefined;
|
|
734
|
+
return (
|
|
735
|
+
e?.code === "EADDRINUSE" ||
|
|
736
|
+
/EADDRINUSE|address already in use/i.test(e?.message ?? "")
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
// Bind one loopback family; returns the server, or null when the port is in
|
|
741
|
+
// use. Server type is inferred from `Bun.serve` (avoids a generic mismatch).
|
|
742
|
+
function tryBindLoopback(
|
|
743
|
+
port: number,
|
|
744
|
+
hostname: string,
|
|
745
|
+
fetchHandler: WebFetchHandler,
|
|
746
|
+
) {
|
|
747
|
+
try {
|
|
748
|
+
return Bun.serve({ port, hostname, fetch: fetchHandler });
|
|
749
|
+
} catch (err) {
|
|
750
|
+
if (isAddrInUse(err)) return null;
|
|
751
|
+
throw err;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Bind the local web server on BOTH loopback families (`127.0.0.1` and `::1`)
|
|
757
|
+
* so the app can be reached at `http://localhost:<port>` regardless of whether
|
|
758
|
+
* the browser resolves `localhost` to IPv4 or IPv6 — matching the host the
|
|
759
|
+
* platform hardcodes in its loopback login callback.
|
|
760
|
+
*
|
|
761
|
+
* IPv4 is mandatory. IPv6 is best-effort: if `::1` is already taken (e.g. the
|
|
762
|
+
* local platform's `vel up` edge-proxy owns `[::]:<port>`), the port is
|
|
763
|
+
* contested and we advance — otherwise `localhost` would resolve to that other
|
|
764
|
+
* server. If IPv6 is simply unavailable on the host, we proceed IPv4-only.
|
|
765
|
+
*
|
|
766
|
+
* Never binds wildcard interfaces (`0.0.0.0`/`::`): the server exposes
|
|
767
|
+
* `/__local/*` control endpoints, so it must stay loopback-only.
|
|
768
|
+
*/
|
|
769
|
+
function serveLoopback(preferredPort: number, fetchHandler: WebFetchHandler) {
|
|
770
|
+
for (
|
|
771
|
+
let port = preferredPort;
|
|
772
|
+
port < preferredPort + WEB_PORT_SCAN_LIMIT;
|
|
773
|
+
port++
|
|
774
|
+
) {
|
|
775
|
+
const primary = tryBindLoopback(port, "127.0.0.1", fetchHandler);
|
|
776
|
+
if (!primary) continue;
|
|
777
|
+
|
|
778
|
+
try {
|
|
779
|
+
const secondary = Bun.serve({
|
|
780
|
+
port,
|
|
781
|
+
hostname: "::1",
|
|
782
|
+
fetch: fetchHandler,
|
|
783
|
+
});
|
|
784
|
+
return { port, servers: [primary, secondary] };
|
|
785
|
+
} catch (err) {
|
|
786
|
+
if (isAddrInUse(err)) {
|
|
787
|
+
// `::1` is contested (e.g. `vel up`) — move ports so `localhost`
|
|
788
|
+
// doesn't resolve to that other server.
|
|
789
|
+
primary.stop(true);
|
|
790
|
+
continue;
|
|
791
|
+
}
|
|
792
|
+
// IPv6 unavailable (e.g. EADDRNOTAVAIL) — IPv4-only is acceptable since
|
|
793
|
+
// `localhost` then resolves to 127.0.0.1 anyway.
|
|
794
|
+
return { port, servers: [primary] };
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
throw new Error(
|
|
798
|
+
`Could not bind a free loopback port in [${preferredPort}, ${preferredPort + WEB_PORT_SCAN_LIMIT - 1}]`,
|
|
799
|
+
);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Find the first port at/above `preferred` with nothing listening on either
|
|
804
|
+
* loopback family. Used for the Vite dev server, which binds the port itself
|
|
805
|
+
* (via the `PORT` env). Connect-probe based, so there's a small TOCTOU window
|
|
806
|
+
* before Vite binds — acceptable for dev.
|
|
807
|
+
*/
|
|
808
|
+
async function findFreeDualLoopbackPort(preferred: number): Promise<number> {
|
|
809
|
+
for (let port = preferred; port < preferred + WEB_PORT_SCAN_LIMIT; port++) {
|
|
810
|
+
const [busyV4, busyV6] = await Promise.all([
|
|
811
|
+
probePort(port, "127.0.0.1"),
|
|
812
|
+
probePort(port, "::1"),
|
|
813
|
+
]);
|
|
814
|
+
if (!busyV4 && !busyV6) return port;
|
|
815
|
+
}
|
|
816
|
+
return preferred;
|
|
817
|
+
}
|
|
818
|
+
|
|
661
819
|
async function runWebInterface(
|
|
662
820
|
flagEnvVars: Record<string, string>,
|
|
663
821
|
parsedFlagOverrides: Record<string, boolean | string>,
|
|
@@ -699,120 +857,118 @@ async function runWebInterface(
|
|
|
699
857
|
`<script>window.__VELLUM_CONFIG__=${configJson}${flagOverridesSnippet}</script></head>`,
|
|
700
858
|
);
|
|
701
859
|
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
fetch: async (req) => {
|
|
706
|
-
const url = new URL(req.url);
|
|
707
|
-
const { pathname } = url;
|
|
860
|
+
const fetchHandler: WebFetchHandler = async (req, server) => {
|
|
861
|
+
const url = new URL(req.url);
|
|
862
|
+
const { pathname } = url;
|
|
708
863
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
864
|
+
if (pathname === "/" || pathname === "/assistant") {
|
|
865
|
+
return Response.redirect(SPA_BASE, 302);
|
|
866
|
+
}
|
|
712
867
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
);
|
|
720
|
-
}
|
|
868
|
+
// Loopback auth: the platform redirects here after login with
|
|
869
|
+
// ?state=...&session_token=... — forward into the SPA, which validates the
|
|
870
|
+
// `state` nonce before registering the token via /__local/platform-session.
|
|
871
|
+
if (pathname === "/callback") {
|
|
872
|
+
return Response.redirect(`/account/platform-callback${url.search}`, 302);
|
|
873
|
+
}
|
|
721
874
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
875
|
+
// Expose environment config to the SPA.
|
|
876
|
+
if (pathname === "/assistant/__config" || pathname === "/__config") {
|
|
877
|
+
return new Response(configJson, {
|
|
878
|
+
headers: { "Content-Type": "application/json" },
|
|
879
|
+
});
|
|
880
|
+
}
|
|
728
881
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
// Reverse-proxy platform API requests.
|
|
734
|
-
if (
|
|
735
|
-
pathname.startsWith("/v1/") ||
|
|
736
|
-
pathname.startsWith("/_allauth/") ||
|
|
737
|
-
pathname.startsWith("/accounts/")
|
|
738
|
-
) {
|
|
739
|
-
const target = new URL(pathname + url.search, platformUrl);
|
|
740
|
-
const headers = new Headers(req.headers);
|
|
741
|
-
headers.set("Host", new URL(platformUrl).host);
|
|
742
|
-
headers.delete("Origin");
|
|
743
|
-
headers.delete("Referer");
|
|
744
|
-
|
|
745
|
-
// Forward the session token — the loopback flow stores it in
|
|
746
|
-
// the browser cookie jar for localhost, but the platform backend
|
|
747
|
-
// expects it on its own domain. Set both the Cookie (for Django
|
|
748
|
-
// session middleware / allauth) and X-Session-Token (for DRF
|
|
749
|
-
// views that accept header-based auth).
|
|
750
|
-
const sessionToken = /sessionid=([^;]+)/.exec(
|
|
751
|
-
req.headers.get("Cookie") ?? "",
|
|
752
|
-
)?.[1];
|
|
753
|
-
if (sessionToken) {
|
|
754
|
-
headers.set(
|
|
755
|
-
"Cookie",
|
|
756
|
-
`sessionid=${sessionToken}; __Secure-sessionid=${sessionToken}`,
|
|
757
|
-
);
|
|
758
|
-
headers.set("X-Session-Token", sessionToken);
|
|
759
|
-
}
|
|
882
|
+
// __local endpoints for local-mode (lockfile, hatch, retire, guardian-token, gateway-proxy).
|
|
883
|
+
const localResponse = await handleLocalEndpoints(req, url, server);
|
|
884
|
+
if (localResponse) return localResponse;
|
|
760
885
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
886
|
+
// Reverse-proxy platform API requests.
|
|
887
|
+
if (
|
|
888
|
+
pathname.startsWith("/v1/") ||
|
|
889
|
+
pathname.startsWith("/_allauth/") ||
|
|
890
|
+
pathname.startsWith("/accounts/")
|
|
891
|
+
) {
|
|
892
|
+
const target = new URL(pathname + url.search, platformUrl);
|
|
893
|
+
const headers = new Headers(req.headers);
|
|
894
|
+
headers.set("Host", new URL(platformUrl).host);
|
|
895
|
+
headers.delete("Origin");
|
|
896
|
+
headers.delete("Referer");
|
|
897
|
+
|
|
898
|
+
// Authenticate with the loopback session token the SPA registered. The
|
|
899
|
+
// platform expects it both as the Django session cookie and as
|
|
900
|
+
// X-Session-Token (for DRF views that accept header-based auth). Only
|
|
901
|
+
// same-origin SPA traffic gets the credential — never a cross-site caller.
|
|
902
|
+
const sessionToken = isSameOriginRequest(req)
|
|
903
|
+
? currentPlatformToken()
|
|
904
|
+
: null;
|
|
905
|
+
if (sessionToken) {
|
|
906
|
+
headers.set(
|
|
907
|
+
"Cookie",
|
|
908
|
+
`sessionid=${sessionToken}; __Secure-sessionid=${sessionToken}`,
|
|
909
|
+
);
|
|
910
|
+
headers.set("X-Session-Token", sessionToken);
|
|
783
911
|
}
|
|
784
912
|
|
|
785
|
-
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}
|
|
794
|
-
return new Response(indexHtml, {
|
|
795
|
-
headers: { "Content-Type": "text/html; charset=utf-8" },
|
|
913
|
+
try {
|
|
914
|
+
const hasBody = req.method !== "GET" && req.method !== "HEAD";
|
|
915
|
+
const body = hasBody ? await req.arrayBuffer() : undefined;
|
|
916
|
+
const proxyRes = await loopbackSafeFetch(target.toString(), {
|
|
917
|
+
method: req.method,
|
|
918
|
+
headers,
|
|
919
|
+
body,
|
|
920
|
+
redirect: "manual",
|
|
796
921
|
});
|
|
922
|
+
const resHeaders = new Headers(proxyRes.headers);
|
|
923
|
+
resHeaders.delete("transfer-encoding");
|
|
924
|
+
return new Response(proxyRes.body, {
|
|
925
|
+
status: proxyRes.status,
|
|
926
|
+
statusText: proxyRes.statusText,
|
|
927
|
+
headers: resHeaders,
|
|
928
|
+
});
|
|
929
|
+
} catch (err) {
|
|
930
|
+
return new Response(
|
|
931
|
+
JSON.stringify({ error: `Platform proxy error: ${err}` }),
|
|
932
|
+
{ status: 502, headers: { "Content-Type": "application/json" } },
|
|
933
|
+
);
|
|
797
934
|
}
|
|
935
|
+
}
|
|
798
936
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
937
|
+
if (pathname.startsWith(SPA_BASE)) {
|
|
938
|
+
const relPath = pathname.slice(SPA_BASE.length);
|
|
939
|
+
if (relPath) {
|
|
940
|
+
const filePath = path.join(distDir, relPath);
|
|
941
|
+
const file = Bun.file(filePath);
|
|
942
|
+
if (await file.exists()) {
|
|
943
|
+
return new Response(file);
|
|
944
|
+
}
|
|
804
945
|
}
|
|
946
|
+
return new Response(indexHtml, {
|
|
947
|
+
headers: { "Content-Type": "text/html; charset=utf-8" },
|
|
948
|
+
});
|
|
949
|
+
}
|
|
805
950
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
951
|
+
// SPA fallback for /account/* routes (login, callback, etc.)
|
|
952
|
+
if (pathname.startsWith("/account/")) {
|
|
953
|
+
return new Response(indexHtml, {
|
|
954
|
+
headers: { "Content-Type": "text/html; charset=utf-8" },
|
|
955
|
+
});
|
|
956
|
+
}
|
|
809
957
|
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
958
|
+
return new Response("Not Found", { status: 404 });
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
const { port, servers } = serveLoopback(3000, fetchHandler);
|
|
962
|
+
if (port !== 3000) {
|
|
963
|
+
console.log(`Port 3000 in use; using ${port}.`);
|
|
964
|
+
}
|
|
965
|
+
// Advertise `localhost` (not `127.0.0.1`) so the app origin matches the host
|
|
966
|
+
// the platform hardcodes in its loopback callback. We bind both loopback
|
|
967
|
+
// families above so `localhost` reaches us whichever one it resolves to.
|
|
968
|
+
console.log(`Vellum web interface: http://localhost:${port}${SPA_BASE}`);
|
|
813
969
|
|
|
814
970
|
const shutdown = (): void => {
|
|
815
|
-
server.stop();
|
|
971
|
+
for (const server of servers) server.stop();
|
|
816
972
|
process.exit(0);
|
|
817
973
|
};
|
|
818
974
|
process.on("SIGINT", shutdown);
|
|
@@ -834,6 +990,14 @@ async function runViteDevServer(
|
|
|
834
990
|
viteFlagVars[`VITE_${envName}`] = value;
|
|
835
991
|
}
|
|
836
992
|
|
|
993
|
+
// Auto-pick a free port (Vite uses strictPort) so a running `vel up` stack
|
|
994
|
+
// on :3000 doesn't wedge dev. The loopback callback port follows
|
|
995
|
+
// window.location.port, so a non-3000 port propagates automatically.
|
|
996
|
+
const port = await findFreeDualLoopbackPort(3000);
|
|
997
|
+
if (port !== 3000) {
|
|
998
|
+
console.log(`Port 3000 in use; using ${port}.`);
|
|
999
|
+
}
|
|
1000
|
+
|
|
837
1001
|
const child = spawn("bun", ["run", "dev"], {
|
|
838
1002
|
cwd: webSourceDir,
|
|
839
1003
|
stdio: "inherit",
|
|
@@ -846,7 +1010,7 @@ async function runViteDevServer(
|
|
|
846
1010
|
API_PROXY_TARGET: platformUrl,
|
|
847
1011
|
VELLUM_WEB_URL: getWebUrl(),
|
|
848
1012
|
VELLUM_PLATFORM_URL: platformUrl,
|
|
849
|
-
PORT:
|
|
1013
|
+
PORT: String(port),
|
|
850
1014
|
},
|
|
851
1015
|
});
|
|
852
1016
|
|
package/src/commands/exec.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from "child_process";
|
|
2
2
|
|
|
3
|
-
import { resolveAssistant
|
|
3
|
+
import { resolveAssistant } from "../lib/assistant-config";
|
|
4
4
|
import { dockerResourceNames } from "../lib/docker";
|
|
5
5
|
import type { ServiceName } from "../lib/docker";
|
|
6
6
|
import { execAppleContainer } from "../lib/exec-apple-container";
|
|
@@ -153,7 +153,7 @@ export async function exec(): Promise<void> {
|
|
|
153
153
|
process.exit(1);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
const cloud =
|
|
156
|
+
const cloud = entry.cloud;
|
|
157
157
|
|
|
158
158
|
if (cloud === "local") {
|
|
159
159
|
const child = spawn(command[0], command.slice(1), { stdio: "inherit" });
|
package/src/commands/flags.ts
CHANGED
|
@@ -92,7 +92,7 @@ function printHelp(): void {
|
|
|
92
92
|
" $ vellum flags # list flags for active assistant",
|
|
93
93
|
);
|
|
94
94
|
console.log(
|
|
95
|
-
" $ vellum flags get
|
|
95
|
+
" $ vellum flags get voice-mode # inspect one flag",
|
|
96
96
|
);
|
|
97
97
|
console.log(
|
|
98
98
|
" $ vellum flags set voice-mode true # enable a flag",
|
package/src/commands/logs.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { join } from "path";
|
|
|
7
7
|
import {
|
|
8
8
|
extractHostFromUrl,
|
|
9
9
|
resolveAssistant,
|
|
10
|
-
resolveCloud,
|
|
11
10
|
type AssistantEntry,
|
|
12
11
|
} from "../lib/assistant-config";
|
|
13
12
|
import { dockerResourceNames } from "../lib/docker";
|
|
@@ -589,7 +588,7 @@ export async function logs(): Promise<void> {
|
|
|
589
588
|
process.exit(1);
|
|
590
589
|
}
|
|
591
590
|
|
|
592
|
-
const cloud =
|
|
591
|
+
const cloud = entry.cloud;
|
|
593
592
|
|
|
594
593
|
switch (cloud) {
|
|
595
594
|
case "local":
|
package/src/commands/ps.ts
CHANGED
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
getDaemonPidPath,
|
|
11
11
|
loadAllAssistants,
|
|
12
12
|
lookupAssistantByIdentifier,
|
|
13
|
-
resolveCloud,
|
|
14
13
|
type AssistantEntry,
|
|
15
14
|
} from "../lib/assistant-config";
|
|
16
15
|
import { parseAssistantTargetArg } from "../lib/assistant-target-args.js";
|
|
@@ -381,7 +380,7 @@ async function getDockerProcesses(entry: AssistantEntry): Promise<TableRow[]> {
|
|
|
381
380
|
}
|
|
382
381
|
|
|
383
382
|
async function showAssistantProcesses(entry: AssistantEntry): Promise<void> {
|
|
384
|
-
const cloud =
|
|
383
|
+
const cloud = entry.cloud;
|
|
385
384
|
|
|
386
385
|
console.log(`Processes for ${formatAssistantReference(entry)} (${cloud}):\n`);
|
|
387
386
|
|
package/src/commands/retire.ts
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
loadAllAssistants,
|
|
10
10
|
lookupAssistantByIdentifier,
|
|
11
11
|
removeAssistantEntry,
|
|
12
|
-
resolveCloud,
|
|
13
12
|
type AssistantEntry,
|
|
14
13
|
} from "../lib/assistant-config.js";
|
|
15
14
|
import { parseAssistantTargetArg } from "../lib/assistant-target-args.js";
|
|
@@ -249,7 +248,7 @@ async function retireInner(): Promise<void> {
|
|
|
249
248
|
const entry = lookup.entry;
|
|
250
249
|
const assistantId = entry.assistantId;
|
|
251
250
|
const source = parsed.source;
|
|
252
|
-
const cloud =
|
|
251
|
+
const cloud = entry.cloud;
|
|
253
252
|
|
|
254
253
|
if (cloud === "paired") {
|
|
255
254
|
// A remote assistant paired from another machine. Retiring tears the
|
package/src/commands/roadmap.ts
CHANGED
|
@@ -27,7 +27,7 @@ function printUsage(): void {
|
|
|
27
27
|
console.log(" $ vellum roadmap get my-feature-slug");
|
|
28
28
|
console.log(' $ vellum roadmap create --title "Add dark mode"');
|
|
29
29
|
console.log(
|
|
30
|
-
|
|
30
|
+
" $ vellum roadmap update my-feature --status planned --tag integrations",
|
|
31
31
|
);
|
|
32
32
|
console.log(" $ vellum roadmap upvote my-feature-slug");
|
|
33
33
|
}
|
|
@@ -59,8 +59,8 @@ function requireSlug(args: string[], command: string): string {
|
|
|
59
59
|
return slug;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
const ANSI_RE =
|
|
63
|
+
/[\x00-\x08\x0b-\x1f\x7f]|\x1b(?:\[[0-9;]*[A-Za-z]|\].*?(?:\x07|\x1b\\))/g;
|
|
64
64
|
function sanitize(text: string): string {
|
|
65
65
|
return text.replace(ANSI_RE, "");
|
|
66
66
|
}
|
|
@@ -96,10 +96,7 @@ async function apiFetch(
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
async function handleError(
|
|
100
|
-
response: Response,
|
|
101
|
-
action: string,
|
|
102
|
-
): Promise<never> {
|
|
99
|
+
async function handleError(response: Response, action: string): Promise<never> {
|
|
103
100
|
const text = await response.text().catch(() => "");
|
|
104
101
|
console.error(`Failed to ${action} (${response.status}): ${text}`);
|
|
105
102
|
process.exit(1);
|
|
@@ -169,9 +166,10 @@ async function roadmapList(args: string[]): Promise<void> {
|
|
|
169
166
|
|
|
170
167
|
for (const item of data.items) {
|
|
171
168
|
const upvoted = item.viewer_upvoted ? " (upvoted)" : "";
|
|
172
|
-
const tags =
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
const tags =
|
|
170
|
+
item.tags.length > 0
|
|
171
|
+
? ` [${item.tags.map((t) => sanitize(t.slug)).join(", ")}]`
|
|
172
|
+
: "";
|
|
175
173
|
console.log(
|
|
176
174
|
` ${sanitize(item.title)} ▲${item.upvote_count}${upvoted} 💬${item.comment_count} ${item.status}${tags}`,
|
|
177
175
|
);
|
package/src/commands/rollback.ts
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
findAssistantByName,
|
|
3
3
|
getActiveAssistant,
|
|
4
4
|
loadAllAssistants,
|
|
5
|
-
resolveCloud,
|
|
6
5
|
saveAssistantEntry,
|
|
7
6
|
type AssistantEntry,
|
|
8
7
|
} from "../lib/assistant-config";
|
|
@@ -208,7 +207,7 @@ async function rollbackPlatformViaEndpoint(
|
|
|
208
207
|
export async function rollback(): Promise<void> {
|
|
209
208
|
const { name, version } = parseArgs();
|
|
210
209
|
const entry = resolveTargetAssistant(name);
|
|
211
|
-
const cloud =
|
|
210
|
+
const cloud = entry.cloud;
|
|
212
211
|
|
|
213
212
|
if (cloud === "apple-container") {
|
|
214
213
|
console.error(
|
package/src/commands/ssh.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { spawn } from "child_process";
|
|
|
3
3
|
import {
|
|
4
4
|
extractHostFromUrl,
|
|
5
5
|
resolveAssistant,
|
|
6
|
-
resolveCloud,
|
|
7
6
|
} from "../lib/assistant-config";
|
|
8
7
|
import { dockerResourceNames } from "../lib/docker";
|
|
9
8
|
import { getPlatformUrl, readPlatformToken } from "../lib/platform-client";
|
|
@@ -47,7 +46,7 @@ export async function ssh(): Promise<void> {
|
|
|
47
46
|
process.exit(1);
|
|
48
47
|
}
|
|
49
48
|
|
|
50
|
-
const cloud =
|
|
49
|
+
const cloud = entry.cloud;
|
|
51
50
|
|
|
52
51
|
if (cloud === "local") {
|
|
53
52
|
console.error(
|
package/src/commands/teleport.ts
CHANGED
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
loadAllAssistants,
|
|
4
4
|
getDaemonPidPath,
|
|
5
5
|
removeAssistantEntry,
|
|
6
|
-
resolveCloud,
|
|
7
6
|
saveAssistantEntry,
|
|
8
7
|
setActiveAssistant,
|
|
9
8
|
type AssistantEntry,
|
|
@@ -841,7 +840,7 @@ export async function resolveOrHatchTarget(
|
|
|
841
840
|
const existing = findAssistantByName(targetName);
|
|
842
841
|
if (existing) {
|
|
843
842
|
// Validate the existing assistant's cloud matches the requested env
|
|
844
|
-
const existingCloud =
|
|
843
|
+
const existingCloud = existing.cloud;
|
|
845
844
|
const normalizedExisting =
|
|
846
845
|
existingCloud === "vellum" ? "platform" : existingCloud;
|
|
847
846
|
if (normalizedExisting !== targetEnv) {
|
|
@@ -1190,7 +1189,7 @@ export async function teleport(): Promise<void> {
|
|
|
1190
1189
|
process.exit(1);
|
|
1191
1190
|
}
|
|
1192
1191
|
|
|
1193
|
-
const fromCloud =
|
|
1192
|
+
const fromCloud = fromEntry.cloud;
|
|
1194
1193
|
|
|
1195
1194
|
if (fromCloud === "apple-container") {
|
|
1196
1195
|
console.error(
|
|
@@ -1216,7 +1215,7 @@ export async function teleport(): Promise<void> {
|
|
|
1216
1215
|
|
|
1217
1216
|
if (existingTarget) {
|
|
1218
1217
|
// Target exists — validate cloud matches the flag, then run preflight
|
|
1219
|
-
const toCloud =
|
|
1218
|
+
const toCloud = existingTarget.cloud;
|
|
1220
1219
|
const normalizedTargetEnv = toCloud === "vellum" ? "platform" : toCloud;
|
|
1221
1220
|
if (normalizedTargetEnv !== targetEnv) {
|
|
1222
1221
|
console.error(
|
|
@@ -1320,7 +1319,7 @@ export async function teleport(): Promise<void> {
|
|
|
1320
1319
|
// exporting — so we don't waste work on an invalid command.
|
|
1321
1320
|
const existingTarget = targetName ? findAssistantByName(targetName) : null;
|
|
1322
1321
|
if (existingTarget) {
|
|
1323
|
-
const existingCloud =
|
|
1322
|
+
const existingCloud = existingTarget.cloud;
|
|
1324
1323
|
if (existingCloud !== "vellum") {
|
|
1325
1324
|
console.error(
|
|
1326
1325
|
`Error: Assistant '${targetName}' is a ${existingCloud} assistant, not platform. ` +
|
|
@@ -1376,7 +1375,7 @@ export async function teleport(): Promise<void> {
|
|
|
1376
1375
|
|
|
1377
1376
|
// Hatch (export succeeded — safe to create the target)
|
|
1378
1377
|
const toEntry = await resolveOrHatchTarget(targetEnv, targetName);
|
|
1379
|
-
const toCloud =
|
|
1378
|
+
const toCloud = toEntry.cloud;
|
|
1380
1379
|
|
|
1381
1380
|
// Import from GCS
|
|
1382
1381
|
console.log(`Importing to ${toEntry.assistantId} (${toCloud})...`);
|
|
@@ -1463,7 +1462,7 @@ export async function teleport(): Promise<void> {
|
|
|
1463
1462
|
|
|
1464
1463
|
// Resolve or hatch target (after source is stopped to avoid port conflicts)
|
|
1465
1464
|
const toEntry = await resolveOrHatchTarget(targetEnv, targetName);
|
|
1466
|
-
const toCloud =
|
|
1465
|
+
const toCloud = toEntry.cloud;
|
|
1467
1466
|
|
|
1468
1467
|
// Post-hatch same-environment safety net — uses resolved clouds in case
|
|
1469
1468
|
// the resolved target cloud differs from the CLI flag (e.g., --docker
|