@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.
Files changed (749) hide show
  1. package/bun.lock +1 -1
  2. package/node_modules/@vellumai/local-mode/bun.lock +3 -0
  3. package/node_modules/@vellumai/local-mode/package.json +2 -1
  4. package/node_modules/@vellumai/local-mode/src/__tests__/loopback-auth.test.ts +26 -0
  5. package/node_modules/@vellumai/local-mode/src/__tests__/package-boundary.test.ts +6 -6
  6. package/node_modules/@vellumai/local-mode/src/index.ts +2 -0
  7. package/node_modules/@vellumai/local-mode/src/lockfile-contract.test.ts +148 -12
  8. package/node_modules/@vellumai/local-mode/src/lockfile-contract.ts +136 -80
  9. package/node_modules/@vellumai/local-mode/src/lockfile.test.ts +3 -1
  10. package/node_modules/@vellumai/local-mode/src/lockfile.ts +9 -2
  11. package/node_modules/@vellumai/local-mode/src/status.ts +1 -0
  12. package/node_modules/@vellumai/local-mode/src/upgrade.ts +105 -0
  13. package/node_modules/@vellumai/local-mode/src/util.ts +4 -8
  14. package/node_modules/zod/LICENSE +21 -0
  15. package/node_modules/zod/README.md +191 -0
  16. package/node_modules/zod/index.cjs +33 -0
  17. package/node_modules/zod/index.d.cts +4 -0
  18. package/node_modules/zod/index.d.ts +4 -0
  19. package/node_modules/zod/index.js +4 -0
  20. package/node_modules/zod/locales/index.cjs +17 -0
  21. package/node_modules/zod/locales/index.d.cts +1 -0
  22. package/node_modules/zod/locales/index.d.ts +1 -0
  23. package/node_modules/zod/locales/index.js +1 -0
  24. package/node_modules/zod/locales/package.json +7 -0
  25. package/node_modules/zod/mini/index.cjs +32 -0
  26. package/node_modules/zod/mini/index.d.cts +3 -0
  27. package/node_modules/zod/mini/index.d.ts +3 -0
  28. package/node_modules/zod/mini/index.js +3 -0
  29. package/node_modules/zod/mini/package.json +7 -0
  30. package/node_modules/zod/package.json +135 -0
  31. package/node_modules/zod/src/index.ts +4 -0
  32. package/node_modules/zod/src/locales/index.ts +1 -0
  33. package/node_modules/zod/src/mini/index.ts +3 -0
  34. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  35. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  36. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  37. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  38. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  39. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  40. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  41. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  42. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  43. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  44. package/node_modules/zod/src/v3/errors.ts +13 -0
  45. package/node_modules/zod/src/v3/external.ts +6 -0
  46. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  47. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  48. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  49. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  50. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  51. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  52. package/node_modules/zod/src/v3/index.ts +4 -0
  53. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  54. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  55. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  56. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  57. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  58. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  59. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  60. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  61. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  62. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  63. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  64. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  65. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  66. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  67. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  68. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  69. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  70. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  71. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  72. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  73. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  74. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  75. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  76. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  77. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  78. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  79. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  80. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  81. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  82. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  83. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  84. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  85. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  86. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  87. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  88. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  89. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  90. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  91. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  92. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  93. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  94. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  95. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  96. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  97. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  98. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  99. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  100. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  101. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  102. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  103. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  104. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  105. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  106. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  107. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  108. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  109. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  110. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  111. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  112. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  113. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  114. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  115. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  116. package/node_modules/zod/src/v3/types.ts +5138 -0
  117. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  118. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  119. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  120. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  121. package/node_modules/zod/src/v4/classic/external.ts +52 -0
  122. package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  123. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  124. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  125. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  126. package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  127. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  128. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  129. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  130. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  131. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  132. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  133. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  134. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  135. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  136. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  137. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  138. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  139. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  140. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  141. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  142. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  143. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  144. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  145. package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  146. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  147. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  148. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  149. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  150. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  151. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  152. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  153. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  154. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  155. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  156. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  157. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  158. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  159. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  160. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  161. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  162. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  163. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  164. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  165. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  166. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  167. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  168. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  169. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  170. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  171. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  172. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  173. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  174. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  175. package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  176. package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  177. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  178. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  179. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  180. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  181. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  182. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  183. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  184. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  185. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  186. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  187. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  188. package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  189. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  190. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  191. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  192. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  193. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  194. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  195. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  196. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  197. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  198. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  199. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  200. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  201. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  202. package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  203. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  204. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  205. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  206. package/node_modules/zod/src/v4/core/api.ts +1823 -0
  207. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  208. package/node_modules/zod/src/v4/core/config.ts +15 -0
  209. package/node_modules/zod/src/v4/core/core.ts +153 -0
  210. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  211. package/node_modules/zod/src/v4/core/errors.ts +455 -0
  212. package/node_modules/zod/src/v4/core/index.ts +16 -0
  213. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  214. package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  215. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  216. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  217. package/node_modules/zod/src/v4/core/regexes.ts +190 -0
  218. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  219. package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  220. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  221. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  222. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  223. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  224. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  225. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  226. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  227. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  228. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  229. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  230. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  231. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  232. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  233. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  234. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  235. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  236. package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  237. package/node_modules/zod/src/v4/core/util.ts +983 -0
  238. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  239. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  240. package/node_modules/zod/src/v4/index.ts +4 -0
  241. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  242. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  243. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  244. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  245. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  246. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  247. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  248. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  249. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  250. package/node_modules/zod/src/v4/locales/en.ts +123 -0
  251. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  252. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  253. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  254. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  255. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  256. package/node_modules/zod/src/v4/locales/fr.ts +132 -0
  257. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  258. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  259. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  260. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  261. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  262. package/node_modules/zod/src/v4/locales/index.ts +52 -0
  263. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  264. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  265. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  266. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  267. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  268. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  269. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  270. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  271. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  272. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  273. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  274. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  275. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  276. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  277. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  278. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  279. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  280. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  281. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  282. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  283. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  284. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  285. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  286. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  287. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  288. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  289. package/node_modules/zod/src/v4/locales/uz.ts +117 -0
  290. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  291. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  292. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  293. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  294. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  295. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  296. package/node_modules/zod/src/v4/mini/external.ts +41 -0
  297. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  298. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  299. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  300. package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  301. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  302. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  303. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  304. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  305. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  306. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  307. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  308. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  309. package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  310. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  311. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  312. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  313. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  314. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  315. package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  316. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  317. package/node_modules/zod/v3/ZodError.cjs +138 -0
  318. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  319. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  320. package/node_modules/zod/v3/ZodError.js +133 -0
  321. package/node_modules/zod/v3/errors.cjs +17 -0
  322. package/node_modules/zod/v3/errors.d.cts +5 -0
  323. package/node_modules/zod/v3/errors.d.ts +5 -0
  324. package/node_modules/zod/v3/errors.js +9 -0
  325. package/node_modules/zod/v3/external.cjs +22 -0
  326. package/node_modules/zod/v3/external.d.cts +6 -0
  327. package/node_modules/zod/v3/external.d.ts +6 -0
  328. package/node_modules/zod/v3/external.js +6 -0
  329. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  330. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  331. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  332. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  333. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  334. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  335. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  336. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  337. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  338. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  339. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  340. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  341. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  342. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  343. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  344. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  345. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  346. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  347. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  348. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  349. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  350. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  351. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  352. package/node_modules/zod/v3/helpers/util.js +133 -0
  353. package/node_modules/zod/v3/index.cjs +33 -0
  354. package/node_modules/zod/v3/index.d.cts +4 -0
  355. package/node_modules/zod/v3/index.d.ts +4 -0
  356. package/node_modules/zod/v3/index.js +4 -0
  357. package/node_modules/zod/v3/locales/en.cjs +112 -0
  358. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  359. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  360. package/node_modules/zod/v3/locales/en.js +109 -0
  361. package/node_modules/zod/v3/package.json +7 -0
  362. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  363. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  364. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  365. package/node_modules/zod/v3/standard-schema.js +1 -0
  366. package/node_modules/zod/v3/types.cjs +3777 -0
  367. package/node_modules/zod/v3/types.d.cts +1034 -0
  368. package/node_modules/zod/v3/types.d.ts +1034 -0
  369. package/node_modules/zod/v3/types.js +3695 -0
  370. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  371. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  372. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  373. package/node_modules/zod/v4/classic/checks.js +1 -0
  374. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  375. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  376. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  377. package/node_modules/zod/v4/classic/coerce.js +17 -0
  378. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  379. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  380. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  381. package/node_modules/zod/v4/classic/compat.js +31 -0
  382. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  383. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  384. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  385. package/node_modules/zod/v4/classic/errors.js +48 -0
  386. package/node_modules/zod/v4/classic/external.cjs +73 -0
  387. package/node_modules/zod/v4/classic/external.d.cts +16 -0
  388. package/node_modules/zod/v4/classic/external.d.ts +16 -0
  389. package/node_modules/zod/v4/classic/external.js +20 -0
  390. package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  391. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  392. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  393. package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  394. package/node_modules/zod/v4/classic/index.cjs +33 -0
  395. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  396. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  397. package/node_modules/zod/v4/classic/index.js +4 -0
  398. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  399. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  400. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  401. package/node_modules/zod/v4/classic/iso.js +30 -0
  402. package/node_modules/zod/v4/classic/package.json +7 -0
  403. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  404. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  405. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  406. package/node_modules/zod/v4/classic/parse.js +15 -0
  407. package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  408. package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  409. package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  410. package/node_modules/zod/v4/classic/schemas.js +1395 -0
  411. package/node_modules/zod/v4/core/api.cjs +1227 -0
  412. package/node_modules/zod/v4/core/api.d.cts +325 -0
  413. package/node_modules/zod/v4/core/api.d.ts +325 -0
  414. package/node_modules/zod/v4/core/api.js +1087 -0
  415. package/node_modules/zod/v4/core/checks.cjs +601 -0
  416. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  417. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  418. package/node_modules/zod/v4/core/checks.js +575 -0
  419. package/node_modules/zod/v4/core/core.cjs +85 -0
  420. package/node_modules/zod/v4/core/core.d.cts +70 -0
  421. package/node_modules/zod/v4/core/core.d.ts +70 -0
  422. package/node_modules/zod/v4/core/core.js +78 -0
  423. package/node_modules/zod/v4/core/doc.cjs +39 -0
  424. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  425. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  426. package/node_modules/zod/v4/core/doc.js +35 -0
  427. package/node_modules/zod/v4/core/errors.cjs +216 -0
  428. package/node_modules/zod/v4/core/errors.d.cts +221 -0
  429. package/node_modules/zod/v4/core/errors.d.ts +221 -0
  430. package/node_modules/zod/v4/core/errors.js +185 -0
  431. package/node_modules/zod/v4/core/index.cjs +47 -0
  432. package/node_modules/zod/v4/core/index.d.cts +16 -0
  433. package/node_modules/zod/v4/core/index.d.ts +16 -0
  434. package/node_modules/zod/v4/core/index.js +16 -0
  435. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  436. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  437. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  438. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  439. package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  440. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  441. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  442. package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  443. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  444. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  445. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  446. package/node_modules/zod/v4/core/json-schema.js +1 -0
  447. package/node_modules/zod/v4/core/package.json +7 -0
  448. package/node_modules/zod/v4/core/parse.cjs +131 -0
  449. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  450. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  451. package/node_modules/zod/v4/core/parse.js +93 -0
  452. package/node_modules/zod/v4/core/regexes.cjs +172 -0
  453. package/node_modules/zod/v4/core/regexes.d.cts +85 -0
  454. package/node_modules/zod/v4/core/regexes.d.ts +85 -0
  455. package/node_modules/zod/v4/core/regexes.js +139 -0
  456. package/node_modules/zod/v4/core/registries.cjs +56 -0
  457. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  458. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  459. package/node_modules/zod/v4/core/registries.js +51 -0
  460. package/node_modules/zod/v4/core/schemas.cjs +2270 -0
  461. package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  462. package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  463. package/node_modules/zod/v4/core/schemas.js +2239 -0
  464. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  465. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  466. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  467. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  468. package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  469. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  470. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  471. package/node_modules/zod/v4/core/to-json-schema.js +448 -0
  472. package/node_modules/zod/v4/core/util.cjs +734 -0
  473. package/node_modules/zod/v4/core/util.d.cts +200 -0
  474. package/node_modules/zod/v4/core/util.d.ts +200 -0
  475. package/node_modules/zod/v4/core/util.js +674 -0
  476. package/node_modules/zod/v4/core/versions.cjs +8 -0
  477. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  478. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  479. package/node_modules/zod/v4/core/versions.js +5 -0
  480. package/node_modules/zod/v4/index.cjs +22 -0
  481. package/node_modules/zod/v4/index.d.cts +3 -0
  482. package/node_modules/zod/v4/index.d.ts +3 -0
  483. package/node_modules/zod/v4/index.js +3 -0
  484. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  485. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  486. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  487. package/node_modules/zod/v4/locales/ar.js +106 -0
  488. package/node_modules/zod/v4/locales/az.cjs +132 -0
  489. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  490. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  491. package/node_modules/zod/v4/locales/az.js +105 -0
  492. package/node_modules/zod/v4/locales/be.cjs +183 -0
  493. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  494. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  495. package/node_modules/zod/v4/locales/be.js +156 -0
  496. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  497. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  498. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  499. package/node_modules/zod/v4/locales/bg.js +120 -0
  500. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  501. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  502. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  503. package/node_modules/zod/v4/locales/ca.js +107 -0
  504. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  505. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  506. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  507. package/node_modules/zod/v4/locales/cs.js +111 -0
  508. package/node_modules/zod/v4/locales/da.cjs +142 -0
  509. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  510. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  511. package/node_modules/zod/v4/locales/da.js +115 -0
  512. package/node_modules/zod/v4/locales/de.cjs +135 -0
  513. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  514. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  515. package/node_modules/zod/v4/locales/de.js +108 -0
  516. package/node_modules/zod/v4/locales/el.cjs +136 -0
  517. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  518. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  519. package/node_modules/zod/v4/locales/el.js +109 -0
  520. package/node_modules/zod/v4/locales/en.cjs +140 -0
  521. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  522. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  523. package/node_modules/zod/v4/locales/en.js +113 -0
  524. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  525. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  526. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  527. package/node_modules/zod/v4/locales/eo.js +109 -0
  528. package/node_modules/zod/v4/locales/es.cjs +159 -0
  529. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  530. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  531. package/node_modules/zod/v4/locales/es.js +132 -0
  532. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  533. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  534. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  535. package/node_modules/zod/v4/locales/fa.js +114 -0
  536. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  537. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  538. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  539. package/node_modules/zod/v4/locales/fi.js +112 -0
  540. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  541. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  542. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  543. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  544. package/node_modules/zod/v4/locales/fr.cjs +152 -0
  545. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  546. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  547. package/node_modules/zod/v4/locales/fr.js +125 -0
  548. package/node_modules/zod/v4/locales/he.cjs +241 -0
  549. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  550. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  551. package/node_modules/zod/v4/locales/he.js +214 -0
  552. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  553. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  554. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  555. package/node_modules/zod/v4/locales/hr.js +122 -0
  556. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  557. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  558. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  559. package/node_modules/zod/v4/locales/hu.js +108 -0
  560. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  561. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  562. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  563. package/node_modules/zod/v4/locales/hy.js +147 -0
  564. package/node_modules/zod/v4/locales/id.cjs +133 -0
  565. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  566. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  567. package/node_modules/zod/v4/locales/id.js +106 -0
  568. package/node_modules/zod/v4/locales/index.cjs +111 -0
  569. package/node_modules/zod/v4/locales/index.d.cts +52 -0
  570. package/node_modules/zod/v4/locales/index.d.ts +52 -0
  571. package/node_modules/zod/v4/locales/index.js +52 -0
  572. package/node_modules/zod/v4/locales/is.cjs +136 -0
  573. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  574. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  575. package/node_modules/zod/v4/locales/is.js +109 -0
  576. package/node_modules/zod/v4/locales/it.cjs +135 -0
  577. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  578. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  579. package/node_modules/zod/v4/locales/it.js +108 -0
  580. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  581. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  582. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  583. package/node_modules/zod/v4/locales/ja.js +107 -0
  584. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  585. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  586. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  587. package/node_modules/zod/v4/locales/ka.js +112 -0
  588. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  589. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  590. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  591. package/node_modules/zod/v4/locales/kh.js +5 -0
  592. package/node_modules/zod/v4/locales/km.cjs +137 -0
  593. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  594. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  595. package/node_modules/zod/v4/locales/km.js +110 -0
  596. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  597. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  598. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  599. package/node_modules/zod/v4/locales/ko.js +111 -0
  600. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  601. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  602. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  603. package/node_modules/zod/v4/locales/lt.js +203 -0
  604. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  605. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  606. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  607. package/node_modules/zod/v4/locales/mk.js +109 -0
  608. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  609. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  610. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  611. package/node_modules/zod/v4/locales/ms.js +107 -0
  612. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  613. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  614. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  615. package/node_modules/zod/v4/locales/nl.js +110 -0
  616. package/node_modules/zod/v4/locales/no.cjs +135 -0
  617. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  618. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  619. package/node_modules/zod/v4/locales/no.js +108 -0
  620. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  621. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  622. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  623. package/node_modules/zod/v4/locales/ota.js +109 -0
  624. package/node_modules/zod/v4/locales/package.json +7 -0
  625. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  626. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  627. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  628. package/node_modules/zod/v4/locales/pl.js +109 -0
  629. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  630. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  631. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  632. package/node_modules/zod/v4/locales/ps.js +114 -0
  633. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  634. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  635. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  636. package/node_modules/zod/v4/locales/pt.js +108 -0
  637. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  638. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  639. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  640. package/node_modules/zod/v4/locales/ro.js +119 -0
  641. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  642. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  643. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  644. package/node_modules/zod/v4/locales/ru.js +156 -0
  645. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  646. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  647. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  648. package/node_modules/zod/v4/locales/sl.js +109 -0
  649. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  650. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  651. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  652. package/node_modules/zod/v4/locales/sv.js +110 -0
  653. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  654. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  655. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  656. package/node_modules/zod/v4/locales/ta.js +110 -0
  657. package/node_modules/zod/v4/locales/th.cjs +137 -0
  658. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  659. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  660. package/node_modules/zod/v4/locales/th.js +110 -0
  661. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  662. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  663. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  664. package/node_modules/zod/v4/locales/tr.js +105 -0
  665. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  666. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  667. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  668. package/node_modules/zod/v4/locales/ua.js +5 -0
  669. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  670. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  671. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  672. package/node_modules/zod/v4/locales/uk.js +108 -0
  673. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  674. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  675. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  676. package/node_modules/zod/v4/locales/ur.js +110 -0
  677. package/node_modules/zod/v4/locales/uz.cjs +137 -0
  678. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  679. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  680. package/node_modules/zod/v4/locales/uz.js +110 -0
  681. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  682. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  683. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  684. package/node_modules/zod/v4/locales/vi.js +108 -0
  685. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  686. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  687. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  688. package/node_modules/zod/v4/locales/yo.js +107 -0
  689. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  690. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  691. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  692. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  693. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  694. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  695. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  696. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  697. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  698. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  699. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  700. package/node_modules/zod/v4/mini/checks.js +1 -0
  701. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  702. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  703. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  704. package/node_modules/zod/v4/mini/coerce.js +22 -0
  705. package/node_modules/zod/v4/mini/external.cjs +63 -0
  706. package/node_modules/zod/v4/mini/external.d.cts +13 -0
  707. package/node_modules/zod/v4/mini/external.d.ts +13 -0
  708. package/node_modules/zod/v4/mini/external.js +14 -0
  709. package/node_modules/zod/v4/mini/index.cjs +32 -0
  710. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  711. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  712. package/node_modules/zod/v4/mini/index.js +3 -0
  713. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  714. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  715. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  716. package/node_modules/zod/v4/mini/iso.js +34 -0
  717. package/node_modules/zod/v4/mini/package.json +7 -0
  718. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  719. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  720. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  721. package/node_modules/zod/v4/mini/parse.js +1 -0
  722. package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  723. package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  724. package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  725. package/node_modules/zod/v4/mini/schemas.js +961 -0
  726. package/node_modules/zod/v4/package.json +7 -0
  727. package/node_modules/zod/v4-mini/index.cjs +32 -0
  728. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  729. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  730. package/node_modules/zod/v4-mini/index.js +3 -0
  731. package/node_modules/zod/v4-mini/package.json +7 -0
  732. package/package.json +1 -1
  733. package/src/__tests__/upgrade-local.test.ts +443 -0
  734. package/src/commands/client.ts +266 -102
  735. package/src/commands/exec.ts +2 -2
  736. package/src/commands/flags.ts +1 -1
  737. package/src/commands/logs.ts +1 -2
  738. package/src/commands/ps.ts +1 -2
  739. package/src/commands/retire.ts +1 -2
  740. package/src/commands/roadmap.ts +8 -10
  741. package/src/commands/rollback.ts +1 -2
  742. package/src/commands/ssh.ts +1 -2
  743. package/src/commands/teleport.ts +6 -7
  744. package/src/commands/upgrade.ts +351 -25
  745. package/src/lib/assistant-config.ts +56 -48
  746. package/src/lib/local.ts +204 -24
  747. package/src/lib/terminal-session.ts +2 -2
  748. package/src/lib/upgrade-lifecycle.ts +29 -16
  749. package/src/shared/provider-env-vars.ts +1 -0
@@ -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 = process.env.VELLUM_DISABLE_PLATFORM?.trim().toLowerCase();
105
- let disablePlatform = disablePlatformAmbient === "true" || disablePlatformAmbient === "1";
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 server = Bun.serve({
703
- port: 3000,
704
- hostname: "127.0.0.1",
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
- if (pathname === "/" || pathname === "/assistant") {
710
- return Response.redirect(SPA_BASE, 302);
711
- }
864
+ if (pathname === "/" || pathname === "/assistant") {
865
+ return Response.redirect(SPA_BASE, 302);
866
+ }
712
867
 
713
- // Loopback auth: the platform redirects here after login with
714
- // ?state=...&session_token=... — forward into the SPA.
715
- if (pathname === "/callback") {
716
- return Response.redirect(
717
- `/account/platform-callback${url.search}`,
718
- 302,
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
- // Expose environment config to the SPA.
723
- if (pathname === "/assistant/__config" || pathname === "/__config") {
724
- return new Response(configJson, {
725
- headers: { "Content-Type": "application/json" },
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
- // __local endpoints for local-mode (lockfile, hatch, retire, guardian-token, gateway-proxy).
730
- const localResponse = await handleLocalEndpoints(req, url, server);
731
- if (localResponse) return localResponse;
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
- try {
762
- const hasBody = req.method !== "GET" && req.method !== "HEAD";
763
- const body = hasBody ? await req.arrayBuffer() : undefined;
764
- const proxyRes = await loopbackSafeFetch(target.toString(), {
765
- method: req.method,
766
- headers,
767
- body,
768
- redirect: "manual",
769
- });
770
- const resHeaders = new Headers(proxyRes.headers);
771
- resHeaders.delete("transfer-encoding");
772
- return new Response(proxyRes.body, {
773
- status: proxyRes.status,
774
- statusText: proxyRes.statusText,
775
- headers: resHeaders,
776
- });
777
- } catch (err) {
778
- return new Response(
779
- JSON.stringify({ error: `Platform proxy error: ${err}` }),
780
- { status: 502, headers: { "Content-Type": "application/json" } },
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
- if (pathname.startsWith(SPA_BASE)) {
786
- const relPath = pathname.slice(SPA_BASE.length);
787
- if (relPath) {
788
- const filePath = path.join(distDir, relPath);
789
- const file = Bun.file(filePath);
790
- if (await file.exists()) {
791
- return new Response(file);
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
- // SPA fallback for /account/* routes (login, callback, etc.)
800
- if (pathname.startsWith("/account/")) {
801
- return new Response(indexHtml, {
802
- headers: { "Content-Type": "text/html; charset=utf-8" },
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
- return new Response("Not Found", { status: 404 });
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
- console.log(
811
- `Vellum web interface: http://${server.hostname}:${server.port}${SPA_BASE}`,
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: "3000",
1013
+ PORT: String(port),
850
1014
  },
851
1015
  });
852
1016
 
@@ -1,6 +1,6 @@
1
1
  import { spawn } from "child_process";
2
2
 
3
- import { resolveAssistant, resolveCloud } from "../lib/assistant-config";
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 = resolveCloud(entry);
156
+ const cloud = entry.cloud;
157
157
 
158
158
  if (cloud === "local") {
159
159
  const child = spawn(command[0], command.slice(1), { stdio: "inherit" });
@@ -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 query-complexity-routing # inspect one flag",
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",
@@ -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 = resolveCloud(entry);
591
+ const cloud = entry.cloud;
593
592
 
594
593
  switch (cloud) {
595
594
  case "local":
@@ -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 = resolveCloud(entry);
383
+ const cloud = entry.cloud;
385
384
 
386
385
  console.log(`Processes for ${formatAssistantReference(entry)} (${cloud}):\n`);
387
386
 
@@ -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 = resolveCloud(entry);
251
+ const cloud = entry.cloud;
253
252
 
254
253
  if (cloud === "paired") {
255
254
  // A remote assistant paired from another machine. Retiring tears the
@@ -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
- ' $ vellum roadmap update my-feature --status planned --tag integrations',
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
- // eslint-disable-next-line no-control-regex
63
- const ANSI_RE = /[\x00-\x08\x0b-\x1f\x7f]|\x1b(?:\[[0-9;]*[A-Za-z]|\].*?(?:\x07|\x1b\\))/g;
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 = item.tags.length > 0
173
- ? ` [${item.tags.map((t) => sanitize(t.slug)).join(", ")}]`
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
  );
@@ -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 = resolveCloud(entry);
210
+ const cloud = entry.cloud;
212
211
 
213
212
  if (cloud === "apple-container") {
214
213
  console.error(
@@ -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 = resolveCloud(entry);
49
+ const cloud = entry.cloud;
51
50
 
52
51
  if (cloud === "local") {
53
52
  console.error(
@@ -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 = resolveCloud(existing);
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 = resolveCloud(fromEntry);
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 = resolveCloud(existingTarget);
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 = resolveCloud(existingTarget);
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 = resolveCloud(toEntry);
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 = resolveCloud(toEntry);
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