@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/bun.lock
CHANGED
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
|
|
399
399
|
"@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="],
|
|
400
400
|
|
|
401
|
-
"@vellumai/local-mode/@vellumai/environments": ["@vellumai/environments@file:../packages/environments", {}],
|
|
401
|
+
"@vellumai/local-mode/@vellumai/environments": ["@vellumai/environments@file:../packages/environments", { "devDependencies": { "@types/bun": "1.3.11", "typescript": "5.9.3" } }],
|
|
402
402
|
|
|
403
403
|
"fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
|
|
404
404
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"name": "@vellumai/local-mode",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@vellumai/environments": "file:../environments",
|
|
9
|
+
"zod": "4.3.6",
|
|
9
10
|
},
|
|
10
11
|
"devDependencies": {
|
|
11
12
|
"@types/bun": "1.3.11",
|
|
@@ -25,5 +26,7 @@
|
|
|
25
26
|
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
26
27
|
|
|
27
28
|
"undici-types": ["undici-types@7.24.6", "", {}, "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg=="],
|
|
29
|
+
|
|
30
|
+
"zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
|
|
28
31
|
}
|
|
29
32
|
}
|
|
@@ -69,6 +69,32 @@ describe("isActiveAssistant", () => {
|
|
|
69
69
|
expect(isActiveAssistant([lockfilePath], "active")).toBe(true);
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
+
test("returns true for the sole assistant when activeAssistant is empty", () => {
|
|
73
|
+
const dir = makeTempDir();
|
|
74
|
+
const lockfilePath = path.join(dir, "lockfile.json");
|
|
75
|
+
fs.writeFileSync(
|
|
76
|
+
lockfilePath,
|
|
77
|
+
JSON.stringify({
|
|
78
|
+
assistants: [{ assistantId: "only" }],
|
|
79
|
+
activeAssistant: null,
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
expect(isActiveAssistant([lockfilePath], "only")).toBe(true);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test("returns true for the sole assistant when activeAssistant is stale", () => {
|
|
86
|
+
const dir = makeTempDir();
|
|
87
|
+
const lockfilePath = path.join(dir, "lockfile.json");
|
|
88
|
+
fs.writeFileSync(
|
|
89
|
+
lockfilePath,
|
|
90
|
+
JSON.stringify({
|
|
91
|
+
assistants: [{ assistantId: "only" }],
|
|
92
|
+
activeAssistant: "missing",
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
95
|
+
expect(isActiveAssistant([lockfilePath], "only")).toBe(true);
|
|
96
|
+
});
|
|
97
|
+
|
|
72
98
|
test("returns false for a non-active assistant", () => {
|
|
73
99
|
const dir = makeTempDir();
|
|
74
100
|
const lockfilePath = path.join(dir, "lockfile.json");
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
* uses node builtins for filesystem, child-process, and network work.
|
|
7
7
|
*
|
|
8
8
|
* Enforces that the package:
|
|
9
|
-
* 1. Imports only node builtins, its own relative modules,
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* 2. Declares exactly one runtime dependency: `@vellumai/environments`.
|
|
9
|
+
* 1. Imports only node builtins, its own relative modules, `@vellumai/environments`,
|
|
10
|
+
* and `zod` (the lockfile contract's schema library) — nothing else.
|
|
11
|
+
* 2. Declares exactly those two runtime dependencies.
|
|
13
12
|
* 3. Is marked `private`.
|
|
14
13
|
*/
|
|
15
14
|
|
|
@@ -20,7 +19,7 @@ import { join, resolve } from "node:path";
|
|
|
20
19
|
const PACKAGE_ROOT = resolve(import.meta.dirname, "../..");
|
|
21
20
|
const SRC_DIR = join(PACKAGE_ROOT, "src");
|
|
22
21
|
|
|
23
|
-
const ALLOWED_PACKAGES = new Set(["@vellumai/environments"]);
|
|
22
|
+
const ALLOWED_PACKAGES = new Set(["@vellumai/environments", "zod"]);
|
|
24
23
|
|
|
25
24
|
function collectSourceFiles(dir: string): string[] {
|
|
26
25
|
const files: string[] = [];
|
|
@@ -92,13 +91,14 @@ describe("package boundary", () => {
|
|
|
92
91
|
}
|
|
93
92
|
});
|
|
94
93
|
|
|
95
|
-
test("package.json declares it as private with only
|
|
94
|
+
test("package.json declares it as private with only its environments and zod dependencies", () => {
|
|
96
95
|
const pkg = JSON.parse(
|
|
97
96
|
readFileSync(join(PACKAGE_ROOT, "package.json"), "utf-8"),
|
|
98
97
|
);
|
|
99
98
|
expect(pkg.private).toBe(true);
|
|
100
99
|
expect(pkg.dependencies ?? {}).toEqual({
|
|
101
100
|
"@vellumai/environments": "file:../environments",
|
|
101
|
+
zod: "4.3.6",
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
});
|
|
@@ -39,6 +39,8 @@ export { runSleep } from "./sleep";
|
|
|
39
39
|
export type { SleepResult } from "./sleep";
|
|
40
40
|
export { runWake } from "./wake";
|
|
41
41
|
export type { WakeOptions, WakeResult } from "./wake";
|
|
42
|
+
export { runUpgrade } from "./upgrade";
|
|
43
|
+
export type { UpgradeOptions, UpgradeResult } from "./upgrade";
|
|
42
44
|
export { getLocalAssistantStatus } from "./status";
|
|
43
45
|
export type {
|
|
44
46
|
LocalAssistantRuntimeState,
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
KNOWN_CLOUDS,
|
|
5
|
+
parseLockfile,
|
|
6
|
+
resolveCloud,
|
|
7
|
+
SENSITIVE_KEYS,
|
|
8
|
+
type Lockfile,
|
|
9
|
+
} from "./lockfile-contract";
|
|
4
10
|
|
|
5
11
|
describe("parseLockfile", () => {
|
|
6
12
|
test("passes through a fully-populated lockfile", () => {
|
|
@@ -42,24 +48,30 @@ describe("parseLockfile", () => {
|
|
|
42
48
|
|
|
43
49
|
test("salvages a legacy entry that has only an assistantId", () => {
|
|
44
50
|
// The oldest persisted entries carry just the identity; the CLI fills the
|
|
45
|
-
// rest in lazily. assistantId is the only required field, so the entry
|
|
46
|
-
//
|
|
51
|
+
// rest in lazily. assistantId is the only required field, so the entry must
|
|
52
|
+
// survive — normalized to the default `local` cloud.
|
|
47
53
|
const parsed = parseLockfile({
|
|
48
54
|
activeAssistant: "asst_1",
|
|
49
55
|
assistants: [{ assistantId: "asst_1" }],
|
|
50
56
|
});
|
|
51
|
-
expect(parsed.assistants).toEqual([
|
|
57
|
+
expect(parsed.assistants).toEqual([
|
|
58
|
+
{ assistantId: "asst_1", cloud: "local" },
|
|
59
|
+
]);
|
|
52
60
|
});
|
|
53
61
|
|
|
54
62
|
test("salvages an entry whose cloud and runtimeUrl are absent", () => {
|
|
55
63
|
// Older CLI builds predate the `cloud` field and persisted the runtime URL
|
|
56
64
|
// under a different key (`localUrl`), so a real on-disk entry can lack both
|
|
57
|
-
// modeled fields. It must still be returned
|
|
65
|
+
// modeled fields. It must still be returned, normalized to `local`.
|
|
58
66
|
const parsed = parseLockfile({
|
|
59
67
|
activeAssistant: null,
|
|
60
|
-
assistants: [
|
|
68
|
+
assistants: [
|
|
69
|
+
{ assistantId: "asst_1", localUrl: "http://127.0.0.1:7777" },
|
|
70
|
+
],
|
|
61
71
|
});
|
|
62
|
-
expect(parsed.assistants).toEqual([
|
|
72
|
+
expect(parsed.assistants).toEqual([
|
|
73
|
+
{ assistantId: "asst_1", cloud: "local" },
|
|
74
|
+
]);
|
|
63
75
|
});
|
|
64
76
|
|
|
65
77
|
test("drops malformed entries but salvages valid siblings", () => {
|
|
@@ -111,7 +123,9 @@ describe("parseLockfile", () => {
|
|
|
111
123
|
});
|
|
112
124
|
|
|
113
125
|
test("coerces a non-string activeAssistant to null", () => {
|
|
114
|
-
expect(
|
|
126
|
+
expect(
|
|
127
|
+
parseLockfile({ assistants: [], activeAssistant: 7 }).activeAssistant,
|
|
128
|
+
).toBeNull();
|
|
115
129
|
expect(parseLockfile({ assistants: [] }).activeAssistant).toBeNull();
|
|
116
130
|
});
|
|
117
131
|
|
|
@@ -124,9 +138,9 @@ describe("parseLockfile", () => {
|
|
|
124
138
|
});
|
|
125
139
|
|
|
126
140
|
test("drops a mistyped optional field but keeps the entry", () => {
|
|
127
|
-
// assistantId is the only required field. A mistyped optional field
|
|
128
|
-
//
|
|
129
|
-
//
|
|
141
|
+
// assistantId is the only required field. A mistyped optional field is
|
|
142
|
+
// dropped from the result, but the entry survives on the strength of its
|
|
143
|
+
// identity. (A mistyped `cloud` is dropped, then re-normalized to `local`.)
|
|
130
144
|
const raw = {
|
|
131
145
|
assistants: [
|
|
132
146
|
{ assistantId: "asst_1", cloud: 7, runtimeUrl: "http://a" }, // cloud not a string
|
|
@@ -135,7 +149,7 @@ describe("parseLockfile", () => {
|
|
|
135
149
|
activeAssistant: null,
|
|
136
150
|
};
|
|
137
151
|
expect(parseLockfile(raw).assistants).toEqual([
|
|
138
|
-
{ assistantId: "asst_1", runtimeUrl: "http://a" },
|
|
152
|
+
{ assistantId: "asst_1", cloud: "local", runtimeUrl: "http://a" },
|
|
139
153
|
{ assistantId: "asst_2", cloud: "local" },
|
|
140
154
|
]);
|
|
141
155
|
});
|
|
@@ -189,4 +203,126 @@ describe("parseLockfile", () => {
|
|
|
189
203
|
});
|
|
190
204
|
expect(assistant?.resources).toBeUndefined();
|
|
191
205
|
});
|
|
206
|
+
|
|
207
|
+
test("keeps local runtime resource fields when well-typed", () => {
|
|
208
|
+
const raw = {
|
|
209
|
+
assistants: [
|
|
210
|
+
{
|
|
211
|
+
assistantId: "asst_1",
|
|
212
|
+
cloud: "local",
|
|
213
|
+
runtimeUrl: "http://a",
|
|
214
|
+
resources: {
|
|
215
|
+
gatewayPort: 7777,
|
|
216
|
+
daemonPort: 7778,
|
|
217
|
+
runtimeVersion: "v0.8.13",
|
|
218
|
+
runtimeInstallDir: "/tmp/vellum/runtime/0.8.13",
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
activeAssistant: null,
|
|
223
|
+
};
|
|
224
|
+
expect(parseLockfile(raw).assistants[0]?.resources).toEqual({
|
|
225
|
+
gatewayPort: 7777,
|
|
226
|
+
daemonPort: 7778,
|
|
227
|
+
runtimeVersion: "v0.8.13",
|
|
228
|
+
runtimeInstallDir: "/tmp/vellum/runtime/0.8.13",
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test("strips sensitive and host-only fields from resources", () => {
|
|
233
|
+
const raw = {
|
|
234
|
+
assistants: [
|
|
235
|
+
{
|
|
236
|
+
assistantId: "asst_1",
|
|
237
|
+
cloud: "local",
|
|
238
|
+
resources: {
|
|
239
|
+
instanceDir: "/data",
|
|
240
|
+
gatewayPort: 7777,
|
|
241
|
+
daemonPort: 7778,
|
|
242
|
+
runtimeVersion: "v0.8.13",
|
|
243
|
+
runtimeInstallDir: "/tmp/vellum/runtime/0.8.13",
|
|
244
|
+
qdrantPort: 7779,
|
|
245
|
+
cesPort: 7780,
|
|
246
|
+
signingKey: "hunter2",
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
activeAssistant: null,
|
|
251
|
+
};
|
|
252
|
+
expect(parseLockfile(raw).assistants[0]?.resources).toEqual({
|
|
253
|
+
instanceDir: "/data",
|
|
254
|
+
gatewayPort: 7777,
|
|
255
|
+
daemonPort: 7778,
|
|
256
|
+
runtimeVersion: "v0.8.13",
|
|
257
|
+
runtimeInstallDir: "/tmp/vellum/runtime/0.8.13",
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
test("resolves cloud from legacy remote markers when the field is absent", () => {
|
|
262
|
+
// Pre-`cloud` remote entries encode topology in `project` (gcp) / `sshUser`
|
|
263
|
+
// (custom). The parser resolves these so a cloudless remote entry is never
|
|
264
|
+
// mistaken for a local one; a cloudless entry with no markers normalizes to
|
|
265
|
+
// `local`. The raw markers are not carried through.
|
|
266
|
+
const raw = {
|
|
267
|
+
assistants: [
|
|
268
|
+
{ assistantId: "gcp_1", project: "my-proj", runtimeUrl: "https://a" },
|
|
269
|
+
{ assistantId: "ssh_1", sshUser: "deploy", runtimeUrl: "https://b" },
|
|
270
|
+
{ assistantId: "local_1", runtimeUrl: "http://localhost:7830" },
|
|
271
|
+
],
|
|
272
|
+
activeAssistant: null,
|
|
273
|
+
};
|
|
274
|
+
expect(parseLockfile(raw).assistants).toEqual([
|
|
275
|
+
{ assistantId: "gcp_1", cloud: "gcp", runtimeUrl: "https://a" },
|
|
276
|
+
{ assistantId: "ssh_1", cloud: "custom", runtimeUrl: "https://b" },
|
|
277
|
+
{ assistantId: "local_1", cloud: "local", runtimeUrl: "http://localhost:7830" },
|
|
278
|
+
]);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
test("prefers an explicit cloud over legacy remote markers", () => {
|
|
282
|
+
const raw = {
|
|
283
|
+
assistants: [{ assistantId: "a", cloud: "vellum", project: "stale-proj" }],
|
|
284
|
+
activeAssistant: null,
|
|
285
|
+
};
|
|
286
|
+
expect(parseLockfile(raw).assistants).toEqual([
|
|
287
|
+
{ assistantId: "a", cloud: "vellum" },
|
|
288
|
+
]);
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
describe("resolveCloud", () => {
|
|
293
|
+
test("prefers an explicit cloud", () => {
|
|
294
|
+
expect(resolveCloud({ cloud: "vellum", project: "p", sshUser: "u" })).toBe(
|
|
295
|
+
"vellum",
|
|
296
|
+
);
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
test("falls back to legacy markers, then local", () => {
|
|
300
|
+
expect(resolveCloud({ project: "p" })).toBe("gcp");
|
|
301
|
+
expect(resolveCloud({ sshUser: "u" })).toBe("custom");
|
|
302
|
+
expect(resolveCloud({})).toBe("local");
|
|
303
|
+
expect(resolveCloud({ cloud: "" })).toBe("local");
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
describe("taxonomy", () => {
|
|
308
|
+
test("KNOWN_CLOUDS covers the documented topologies", () => {
|
|
309
|
+
expect(KNOWN_CLOUDS).toEqual([
|
|
310
|
+
"local",
|
|
311
|
+
"docker",
|
|
312
|
+
"apple-container",
|
|
313
|
+
"vellum",
|
|
314
|
+
"gcp",
|
|
315
|
+
"aws",
|
|
316
|
+
"custom",
|
|
317
|
+
"paired",
|
|
318
|
+
]);
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
test("SENSITIVE_KEYS lists the redacted secrets", () => {
|
|
322
|
+
expect(SENSITIVE_KEYS).toEqual([
|
|
323
|
+
"signingKey",
|
|
324
|
+
"bearerToken",
|
|
325
|
+
"guardianBootstrapSecret",
|
|
326
|
+
]);
|
|
327
|
+
});
|
|
192
328
|
});
|
|
@@ -1,52 +1,127 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The lockfile wire contract —
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* package). The renderer relies on that separation: it imports these types
|
|
6
|
-
* type-only and must not transitively reference Node built-ins.
|
|
2
|
+
* The lockfile wire contract — one Zod schema that is the single source of truth
|
|
3
|
+
* for an assistant entry's shape, its validation, the `cloud` taxonomy, the
|
|
4
|
+
* normalization, and the redaction policy.
|
|
7
5
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* Kept in its own module, exported from the package as `./contract`, so
|
|
7
|
+
* consumers import the contract without pulling in the host I/O graph
|
|
8
|
+
* (`node:fs`, the CLI resolver). The CLI, the host I/O layer, the Electron and
|
|
9
|
+
* dev-server bridges, and the renderer all depend on this one definition. It
|
|
10
|
+
* references no node built-ins — the renderer bundles it directly — and `zod`
|
|
11
|
+
* is its only third-party import.
|
|
13
12
|
*
|
|
14
13
|
* The lockfile is written by the Vellum CLI and read across the macOS↔CLI
|
|
15
|
-
* boundary, which do not release in lockstep
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
14
|
+
* boundary, which do not release in lockstep, so the parser is permissive: it
|
|
15
|
+
* validates the modeled fields, salvages an entry on the strength of its
|
|
16
|
+
* `assistantId` alone (dropping individual malformed optional fields rather
|
|
17
|
+
* than the whole entry), and ignores unknown fields so a newer writer never
|
|
18
|
+
* breaks an older reader. Unknown fields are preserved on disk by the write
|
|
19
|
+
* path (see `lockfile.ts`); the validated value carries only the modeled,
|
|
20
|
+
* renderer-safe shape.
|
|
21
|
+
*/
|
|
22
|
+
import { z } from "zod";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Known deployment topologies. `cloud` is stored as a free string on disk for
|
|
26
|
+
* forward-compatibility — an older reader must tolerate a newer writer's value
|
|
27
|
+
* — but the known set is enumerated here so callers switch on it exhaustively
|
|
28
|
+
* instead of matching string literals scattered across the codebase:
|
|
29
|
+
* - `local` — on-machine daemon
|
|
30
|
+
* - `docker` — local container
|
|
31
|
+
* - `apple-container` — macOS-app-managed container
|
|
32
|
+
* - `vellum` — platform-managed (uses the X-Session-Token auth path)
|
|
33
|
+
* - `gcp` / `aws` / `custom` — remote, SSH-managed
|
|
34
|
+
* - `paired` — a remote assistant paired from another machine
|
|
31
35
|
*/
|
|
36
|
+
export const KNOWN_CLOUDS = [
|
|
37
|
+
"local",
|
|
38
|
+
"docker",
|
|
39
|
+
"apple-container",
|
|
40
|
+
"vellum",
|
|
41
|
+
"gcp",
|
|
42
|
+
"aws",
|
|
43
|
+
"custom",
|
|
44
|
+
"paired",
|
|
45
|
+
] as const;
|
|
46
|
+
export type KnownCloud = (typeof KNOWN_CLOUDS)[number];
|
|
47
|
+
export type Cloud = KnownCloud | (string & {});
|
|
32
48
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Keys that must never cross the host→renderer boundary. Stripped from raw
|
|
51
|
+
* lockfile JSON before it leaves a host (see `stripSensitiveFields`) and absent
|
|
52
|
+
* from the renderer-facing schema below; the CLI's extended type is the only
|
|
53
|
+
* place they are modeled.
|
|
54
|
+
*/
|
|
55
|
+
export const SENSITIVE_KEYS = [
|
|
56
|
+
"signingKey",
|
|
57
|
+
"bearerToken",
|
|
58
|
+
"guardianBootstrapSecret",
|
|
59
|
+
] as const;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Resolve an entry's deployment topology from its raw on-disk fields. Prefers
|
|
63
|
+
* an explicit `cloud`, then the legacy markers that predate the field
|
|
64
|
+
* (`project` ⇒ gcp, `sshUser` ⇒ custom), and defaults to "local". This is the
|
|
65
|
+
* one definition every reader shares, so a cloudless entry is classified
|
|
66
|
+
* identically by the CLI, the host I/O layer, and the renderer.
|
|
67
|
+
*/
|
|
68
|
+
export function resolveCloud(raw: {
|
|
69
|
+
cloud?: unknown;
|
|
70
|
+
project?: unknown;
|
|
71
|
+
sshUser?: unknown;
|
|
72
|
+
}): Cloud {
|
|
73
|
+
if (typeof raw.cloud === "string" && raw.cloud) return raw.cloud;
|
|
74
|
+
if (typeof raw.project === "string" && raw.project) return "gcp";
|
|
75
|
+
if (typeof raw.sshUser === "string" && raw.sshUser) return "custom";
|
|
76
|
+
return "local";
|
|
37
77
|
}
|
|
38
78
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Per-instance resources for a local assistant: the renderer-facing subset of
|
|
81
|
+
* ports, the instance directory, and the local runtime install metadata.
|
|
82
|
+
* Richer host-only fields (other ports, the signing key) live on the CLI's
|
|
83
|
+
* type and are stripped from this shape.
|
|
84
|
+
*/
|
|
85
|
+
export const LocalAssistantResourcesSchema = z.object({
|
|
86
|
+
instanceDir: z.string().optional(),
|
|
87
|
+
gatewayPort: z.number(),
|
|
88
|
+
daemonPort: z.number(),
|
|
89
|
+
runtimeVersion: z.string().optional(),
|
|
90
|
+
runtimeInstallDir: z.string().optional(),
|
|
91
|
+
});
|
|
92
|
+
export type LocalAssistantResources = z.infer<
|
|
93
|
+
typeof LocalAssistantResourcesSchema
|
|
94
|
+
>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The renderer-safe shape of one assistant entry. `assistantId` is the only
|
|
98
|
+
* required field — the identity every reader looks entries up by — and every
|
|
99
|
+
* other field is salvaged by {@link parseLockfile}. The CLI extends this with
|
|
100
|
+
* its host-only and sensitive fields; this base carries only what is safe to
|
|
101
|
+
* surface in the renderer.
|
|
102
|
+
*/
|
|
103
|
+
export const LockfileAssistantSchema = z.object({
|
|
104
|
+
assistantId: z.string(),
|
|
105
|
+
name: z.string().optional(),
|
|
106
|
+
cloud: z.string().optional(),
|
|
107
|
+
runtimeUrl: z.string().optional(),
|
|
108
|
+
species: z.string().optional(),
|
|
109
|
+
hatchedAt: z.string().optional(),
|
|
46
110
|
/** Owning org for platform assistants; absent for local ones. */
|
|
47
|
-
organizationId
|
|
48
|
-
resources
|
|
49
|
-
}
|
|
111
|
+
organizationId: z.string().optional(),
|
|
112
|
+
resources: LocalAssistantResourcesSchema.optional(),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* A validated, normalized assistant entry. Identical to the schema's inferred
|
|
117
|
+
* shape except `cloud` is always present — {@link parseLockfile} resolves it for
|
|
118
|
+
* every entry (defaulting to "local"), so readers never special-case its
|
|
119
|
+
* absence.
|
|
120
|
+
*/
|
|
121
|
+
export type LockfileAssistant = Omit<
|
|
122
|
+
z.infer<typeof LockfileAssistantSchema>,
|
|
123
|
+
"cloud"
|
|
124
|
+
> & { cloud: Cloud };
|
|
50
125
|
|
|
51
126
|
export interface Lockfile {
|
|
52
127
|
assistants: LockfileAssistant[];
|
|
@@ -55,8 +130,8 @@ export interface Lockfile {
|
|
|
55
130
|
|
|
56
131
|
/**
|
|
57
132
|
* Renderer-facing result of a lockfile write, returned across the host bridge.
|
|
58
|
-
* Carries no HTTP-style
|
|
59
|
-
*
|
|
133
|
+
* Carries no HTTP-style status — hosts map that away because the renderer
|
|
134
|
+
* surfaces failures by message alone.
|
|
60
135
|
*/
|
|
61
136
|
export type LockfileWriteResult =
|
|
62
137
|
| { ok: true; lockfile: Lockfile }
|
|
@@ -66,49 +141,30 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
66
141
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
67
142
|
}
|
|
68
143
|
|
|
69
|
-
function parseResources(value: unknown): LocalAssistantResources | undefined {
|
|
70
|
-
if (!isRecord(value)) return undefined;
|
|
71
|
-
if (typeof value.gatewayPort !== "number") return undefined;
|
|
72
|
-
if (typeof value.daemonPort !== "number") return undefined;
|
|
73
|
-
return {
|
|
74
|
-
...(typeof value.instanceDir === "string"
|
|
75
|
-
? { instanceDir: value.instanceDir }
|
|
76
|
-
: {}),
|
|
77
|
-
gatewayPort: value.gatewayPort,
|
|
78
|
-
daemonPort: value.daemonPort,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
144
|
/**
|
|
83
|
-
* Validate a single
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
145
|
+
* Validate and normalize a single entry. Returns null only when `assistantId`
|
|
146
|
+
* is missing or not a string; any other entry is salvaged — each modeled field
|
|
147
|
+
* is copied only when present and well-typed (a malformed optional field is
|
|
148
|
+
* dropped without discarding the entry), unknown fields are ignored, and
|
|
149
|
+
* `cloud` is resolved from the raw markers so a cloudless remote entry is never
|
|
150
|
+
* mistaken for a local one and a markerless entry defaults to "local".
|
|
88
151
|
*/
|
|
89
|
-
function parseAssistant(
|
|
90
|
-
if (!isRecord(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (typeof value.hatchedAt === "string") assistant.hatchedAt = value.hatchedAt;
|
|
99
|
-
if (typeof value.organizationId === "string") assistant.organizationId = value.organizationId;
|
|
100
|
-
const resources = parseResources(value.resources);
|
|
101
|
-
if (resources) assistant.resources = resources;
|
|
102
|
-
return assistant;
|
|
152
|
+
function parseAssistant(raw: unknown): LockfileAssistant | null {
|
|
153
|
+
if (!isRecord(raw) || typeof raw.assistantId !== "string") return null;
|
|
154
|
+
const out: Record<string, unknown> = {};
|
|
155
|
+
for (const [key, field] of Object.entries(LockfileAssistantSchema.shape)) {
|
|
156
|
+
const result = (field as z.ZodType).safeParse(raw[key]);
|
|
157
|
+
if (result.success && result.data !== undefined) out[key] = result.data;
|
|
158
|
+
}
|
|
159
|
+
out.cloud = resolveCloud(raw);
|
|
160
|
+
return out as LockfileAssistant;
|
|
103
161
|
}
|
|
104
162
|
|
|
105
163
|
/**
|
|
106
|
-
* Coerce parsed JSON into a validated
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* `
|
|
110
|
-
* `null`. Callers pass the result through unchanged; the only failure modes a
|
|
111
|
-
* host surfaces are I/O and JSON-parse errors, handled by `getLockfileData`.
|
|
164
|
+
* Coerce parsed JSON into a validated {@link Lockfile}. Total and non-throwing:
|
|
165
|
+
* entries that fail validation are dropped (one malformed entry can't discard
|
|
166
|
+
* the file), a missing or non-array `assistants` becomes `[]`, and a non-string
|
|
167
|
+
* `activeAssistant` becomes null.
|
|
112
168
|
*/
|
|
113
169
|
export function parseLockfile(raw: unknown): Lockfile {
|
|
114
170
|
const root = isRecord(raw) ? raw : {};
|
|
@@ -74,7 +74,9 @@ describe("getLockfileData", () => {
|
|
|
74
74
|
const result = getLockfileData([lockfilePath]);
|
|
75
75
|
expect(result.ok).toBe(true);
|
|
76
76
|
if (result.ok) {
|
|
77
|
-
expect(result.data.assistants).toEqual([
|
|
77
|
+
expect(result.data.assistants).toEqual([
|
|
78
|
+
{ assistantId: "asst_legacy", cloud: "local" },
|
|
79
|
+
]);
|
|
78
80
|
expect(result.data.activeAssistant).toBe("asst_legacy");
|
|
79
81
|
}
|
|
80
82
|
});
|
|
@@ -94,8 +94,15 @@ export function isActiveAssistant(
|
|
|
94
94
|
): boolean {
|
|
95
95
|
for (const candidate of lockfilePaths) {
|
|
96
96
|
try {
|
|
97
|
-
const data = JSON.parse(fs.readFileSync(candidate, "utf-8")) as Record<
|
|
98
|
-
|
|
97
|
+
const data = JSON.parse(fs.readFileSync(candidate, "utf-8")) as Record<
|
|
98
|
+
string,
|
|
99
|
+
unknown
|
|
100
|
+
>;
|
|
101
|
+
if (data.activeAssistant === assistantId) return true;
|
|
102
|
+
const assistants = data.assistants;
|
|
103
|
+
if (!Array.isArray(assistants) || assistants.length !== 1) return false;
|
|
104
|
+
const [onlyAssistant] = assistants as Array<Record<string, unknown>>;
|
|
105
|
+
return onlyAssistant?.assistantId === assistantId;
|
|
99
106
|
} catch {
|
|
100
107
|
continue;
|
|
101
108
|
}
|