veryfront 0.1.1237 → 0.1.1239

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 (493) hide show
  1. package/esm/cli/auth/login.d.ts +24 -2
  2. package/esm/cli/auth/login.d.ts.map +1 -1
  3. package/esm/cli/auth/login.js +444 -35
  4. package/esm/cli/commands/build/error-handler.d.ts.map +1 -1
  5. package/esm/cli/commands/build/error-handler.js +41 -3
  6. package/esm/cli/commands/build/handler.d.ts.map +1 -1
  7. package/esm/cli/commands/build/handler.js +1 -1
  8. package/esm/cli/commands/dev/command.d.ts.map +1 -1
  9. package/esm/cli/commands/dev/command.js +14 -1
  10. package/esm/cli/commands/dev/inference-status.d.ts +6 -0
  11. package/esm/cli/commands/dev/inference-status.d.ts.map +1 -1
  12. package/esm/cli/commands/dev/inference-status.js +14 -2
  13. package/esm/cli/commands/generate/command.d.ts.map +1 -1
  14. package/esm/cli/commands/generate/command.js +61 -0
  15. package/esm/cli/commands/init/init-command.d.ts.map +1 -1
  16. package/esm/cli/commands/init/init-command.js +23 -31
  17. package/esm/cli/commands/install/registry.d.ts.map +1 -1
  18. package/esm/cli/commands/install/registry.js +6 -9
  19. package/esm/cli/commands/login/command-help.d.ts.map +1 -1
  20. package/esm/cli/commands/login/command-help.js +3 -1
  21. package/esm/cli/commands/pull/command.d.ts +1 -0
  22. package/esm/cli/commands/pull/command.d.ts.map +1 -1
  23. package/esm/cli/commands/pull/command.js +49 -6
  24. package/esm/cli/commands/push/command-help.d.ts.map +1 -1
  25. package/esm/cli/commands/push/command-help.js +7 -0
  26. package/esm/cli/commands/push/command.d.ts +23 -12
  27. package/esm/cli/commands/push/command.d.ts.map +1 -1
  28. package/esm/cli/commands/push/command.js +461 -44
  29. package/esm/cli/commands/push/plan.d.ts +35 -0
  30. package/esm/cli/commands/push/plan.d.ts.map +1 -0
  31. package/esm/cli/commands/push/plan.js +96 -0
  32. package/esm/cli/commands/schedule/handler.d.ts +21 -2
  33. package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
  34. package/esm/cli/commands/schedule/handler.js +74 -27
  35. package/esm/cli/commands/schema/command-help.js +1 -1
  36. package/esm/cli/commands/up/command.js +1 -1
  37. package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
  38. package/esm/cli/commands/webhook/handler.js +3 -1
  39. package/esm/cli/router.d.ts.map +1 -1
  40. package/esm/cli/router.js +27 -5
  41. package/esm/cli/shared/args.d.ts +15 -1
  42. package/esm/cli/shared/args.d.ts.map +1 -1
  43. package/esm/cli/shared/args.js +56 -3
  44. package/esm/cli/shared/config.d.ts +11 -2
  45. package/esm/cli/shared/config.d.ts.map +1 -1
  46. package/esm/cli/shared/config.js +72 -27
  47. package/esm/cli/shared/project-creation.js +1 -1
  48. package/esm/cli/sync/state.d.ts +20 -0
  49. package/esm/cli/sync/state.d.ts.map +1 -0
  50. package/esm/cli/sync/state.js +193 -0
  51. package/esm/deno.js +2 -2
  52. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
  53. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +852 -21
  54. package/esm/extensions/ext-observability-sentry/src/policy.d.ts +2 -0
  55. package/esm/extensions/ext-observability-sentry/src/policy.d.ts.map +1 -1
  56. package/esm/extensions/ext-observability-sentry/src/policy.js +214 -3
  57. package/esm/src/agent/conversation/delegation-policy.d.ts +2 -0
  58. package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
  59. package/esm/src/agent/conversation/delegation-policy.js +13 -3
  60. package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
  61. package/esm/src/agent/conversation/hosted-terminal.js +6 -2
  62. package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
  63. package/esm/src/agent/conversation/run-chunk-mirror.js +14 -2
  64. package/esm/src/agent/factory.d.ts.map +1 -1
  65. package/esm/src/agent/factory.js +22 -11
  66. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +2 -0
  67. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
  68. package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +6 -1
  69. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +2 -1
  70. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
  71. package/esm/src/agent/hosted/child-fork-execution-runner.js +6 -3
  72. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +12 -3
  73. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
  74. package/esm/src/agent/hosted/child-fork-step-message-preparation.js +16 -3
  75. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts +1 -1
  76. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
  77. package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
  78. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +11 -0
  79. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
  80. package/esm/src/agent/hosted/cloud-agent-child-tools.js +2 -3
  81. package/esm/src/agent/hosted/cloud-agent-config.d.ts +1 -0
  82. package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
  83. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +16 -1
  84. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
  85. package/esm/src/agent/hosted/cloud-runtime-system-messages.js +13 -3
  86. package/esm/src/agent/hosted/default-chat-runtime.d.ts +2 -1
  87. package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
  88. package/esm/src/agent/hosted/default-chat-runtime.js +18 -7
  89. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +2 -1
  90. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
  91. package/esm/src/agent/hosted/default-invoke-agent-tool.js +11 -3
  92. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +2 -1
  93. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
  94. package/esm/src/agent/hosted/default-project-steering-refresh.js +4 -1
  95. package/esm/src/agent/hosted/runtime-state-resolver.d.ts +6 -4
  96. package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
  97. package/esm/src/agent/hosted/runtime-state-resolver.js +8 -11
  98. package/esm/src/agent/index.d.ts +3 -3
  99. package/esm/src/agent/index.d.ts.map +1 -1
  100. package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
  101. package/esm/src/agent/project/agent-runtime.js +6 -3
  102. package/esm/src/agent/runtime/agent-definition.d.ts +68 -66
  103. package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
  104. package/esm/src/agent/runtime/agent-definition.js +15 -2
  105. package/esm/src/agent/runtime/agent-invocation-contract.d.ts +2 -0
  106. package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
  107. package/esm/src/agent/runtime/agent-markdown-adapter.js +1 -1
  108. package/esm/src/agent/runtime/agent-runtime-step.d.ts +11 -5
  109. package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
  110. package/esm/src/agent/runtime/agent-runtime-step.js +23 -6
  111. package/esm/src/agent/runtime/call-context.d.ts +42 -11
  112. package/esm/src/agent/runtime/call-context.d.ts.map +1 -1
  113. package/esm/src/agent/runtime/call-context.js +480 -42
  114. package/esm/src/agent/runtime/chat-stream-handler.d.ts +18 -0
  115. package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
  116. package/esm/src/agent/runtime/chat-stream-handler.js +38 -18
  117. package/esm/src/agent/runtime/effective-agent-system.d.ts +13 -4
  118. package/esm/src/agent/runtime/effective-agent-system.d.ts.map +1 -1
  119. package/esm/src/agent/runtime/effective-agent-system.js +29 -0
  120. package/esm/src/agent/runtime/index.d.ts +1 -0
  121. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  122. package/esm/src/agent/runtime/index.js +638 -53
  123. package/esm/src/agent/runtime/load-skill-tool.d.ts +33 -3
  124. package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
  125. package/esm/src/agent/runtime/load-skill-tool.js +152 -21
  126. package/esm/src/agent/runtime/model-resolution.d.ts +3 -0
  127. package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
  128. package/esm/src/agent/runtime/model-resolution.js +14 -0
  129. package/esm/src/agent/runtime/model-transport.d.ts +1 -0
  130. package/esm/src/agent/runtime/model-transport.d.ts.map +1 -1
  131. package/esm/src/agent/runtime/model-transport.js +5 -2
  132. package/esm/src/agent/runtime/run-runtime-context.d.ts +4 -0
  133. package/esm/src/agent/runtime/run-runtime-context.d.ts.map +1 -1
  134. package/esm/src/agent/runtime/run-runtime-context.js +9 -3
  135. package/esm/src/agent/runtime/runtime-tool-config.d.ts +1 -0
  136. package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
  137. package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
  138. package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
  139. package/esm/src/agent/runtime/skill-prompt.js +113 -25
  140. package/esm/src/agent/runtime/streamed-assistant-message.d.ts +22 -2
  141. package/esm/src/agent/runtime/streamed-assistant-message.d.ts.map +1 -1
  142. package/esm/src/agent/runtime/streamed-assistant-message.js +26 -5
  143. package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
  144. package/esm/src/agent/runtime/tool-inventory.js +13 -9
  145. package/esm/src/agent/runtime/tool-result-continuation.d.ts +4 -2
  146. package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -1
  147. package/esm/src/agent/runtime/tool-result-continuation.js +24 -20
  148. package/esm/src/agent/schemas/agent.schema.d.ts +2 -2
  149. package/esm/src/agent/service/runtime.js +1 -1
  150. package/esm/src/agent/streaming/fork-runtime-stream.d.ts +5 -4
  151. package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
  152. package/esm/src/agent/types.d.ts +14 -1
  153. package/esm/src/agent/types.d.ts.map +1 -1
  154. package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
  155. package/esm/src/chat/chat-ui-message-helpers.js +75 -16
  156. package/esm/src/config/loader.d.ts.map +1 -1
  157. package/esm/src/config/loader.js +37 -1
  158. package/esm/src/errors/catalog/build-errors.d.ts.map +1 -1
  159. package/esm/src/errors/catalog/build-errors.js +14 -0
  160. package/esm/src/errors/error-registry/build.d.ts +2 -0
  161. package/esm/src/errors/error-registry/build.d.ts.map +1 -1
  162. package/esm/src/errors/error-registry/build.js +8 -0
  163. package/esm/src/errors/error-registry/deploy.d.ts +4 -0
  164. package/esm/src/errors/error-registry/deploy.d.ts.map +1 -1
  165. package/esm/src/errors/error-registry/deploy.js +16 -0
  166. package/esm/src/errors/error-registry.d.ts +3 -0
  167. package/esm/src/errors/error-registry.d.ts.map +1 -1
  168. package/esm/src/errors/index.d.ts +2 -1
  169. package/esm/src/errors/index.d.ts.map +1 -1
  170. package/esm/src/errors/index.js +4 -3
  171. package/esm/src/errors/tenant-classification.d.ts +25 -0
  172. package/esm/src/errors/tenant-classification.d.ts.map +1 -0
  173. package/esm/src/errors/tenant-classification.js +61 -0
  174. package/esm/src/extensions/builtin-extensions.d.ts +10 -15
  175. package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
  176. package/esm/src/extensions/builtin-extensions.js +32 -26
  177. package/esm/src/extensions/deferred-extension.d.ts +4 -4
  178. package/esm/src/extensions/deferred-extension.js +4 -4
  179. package/esm/src/extensions/index.d.ts +1 -0
  180. package/esm/src/extensions/index.d.ts.map +1 -1
  181. package/esm/src/extensions/index.js +1 -0
  182. package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
  183. package/esm/src/integrations/_data.d.ts.map +1 -1
  184. package/esm/src/integrations/_data.js +6 -0
  185. package/esm/src/integrations/schema.d.ts +8 -0
  186. package/esm/src/integrations/schema.d.ts.map +1 -1
  187. package/esm/src/integrations/schema.js +3 -0
  188. package/esm/src/integrations/types.d.ts +2 -0
  189. package/esm/src/integrations/types.d.ts.map +1 -1
  190. package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
  191. package/esm/src/internal-agents/run-stream.js +35 -20
  192. package/esm/src/internal-agents/run-system-prompt.d.ts +7 -2
  193. package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
  194. package/esm/src/internal-agents/run-system-prompt.js +19 -13
  195. package/esm/src/internal-agents/schema.d.ts +2 -0
  196. package/esm/src/internal-agents/schema.d.ts.map +1 -1
  197. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  198. package/esm/src/modules/react-loader/ssr-module-loader/loader.js +2 -18
  199. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts +11 -0
  200. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts.map +1 -1
  201. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.js +53 -6
  202. package/esm/src/observability/application-error-contract.d.ts +4 -0
  203. package/esm/src/observability/application-error-contract.d.ts.map +1 -1
  204. package/esm/src/observability/application-errors.d.ts.map +1 -1
  205. package/esm/src/observability/application-errors.js +64 -3
  206. package/esm/src/platform/adapters/runtime/deno/http-server.d.ts.map +1 -1
  207. package/esm/src/platform/adapters/runtime/deno/http-server.js +2 -10
  208. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts +14 -0
  209. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts.map +1 -1
  210. package/esm/src/platform/adapters/runtime/shared/request-peer.js +82 -0
  211. package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
  212. package/esm/src/provider/runtime-loader/provider-http.d.ts +5 -1
  213. package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
  214. package/esm/src/provider/runtime-loader/provider-http.js +55 -17
  215. package/esm/src/provider/shared/index.d.ts +1 -0
  216. package/esm/src/provider/shared/index.d.ts.map +1 -1
  217. package/esm/src/provider/shared/index.js +2 -0
  218. package/esm/src/provider/types.d.ts +1 -0
  219. package/esm/src/provider/types.d.ts.map +1 -1
  220. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts +3 -0
  221. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts.map +1 -0
  222. package/esm/src/react/components/ui/adapter/builtin/combobox.js +204 -0
  223. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts +3 -0
  224. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts.map +1 -0
  225. package/esm/src/react/components/ui/adapter/builtin/dialog.js +20 -0
  226. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts +3 -0
  227. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts.map +1 -0
  228. package/esm/src/react/components/ui/adapter/builtin/drawer.js +21 -0
  229. package/esm/src/react/components/ui/adapter/builtin/index.d.ts.map +1 -1
  230. package/esm/src/react/components/ui/adapter/builtin/index.js +10 -0
  231. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts +3 -0
  232. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts.map +1 -0
  233. package/esm/src/react/components/ui/adapter/builtin/popover.js +28 -0
  234. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts +3 -0
  235. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts.map +1 -0
  236. package/esm/src/react/components/ui/adapter/builtin/tabs.js +73 -0
  237. package/esm/src/react/components/ui/adapter/context.d.ts.map +1 -1
  238. package/esm/src/react/components/ui/adapter/context.js +10 -0
  239. package/esm/src/react/components/ui/adapter/contract.d.ts +212 -0
  240. package/esm/src/react/components/ui/adapter/contract.d.ts.map +1 -1
  241. package/esm/src/react/components/ui/adapter/token-scope.d.ts +24 -0
  242. package/esm/src/react/components/ui/adapter/token-scope.d.ts.map +1 -0
  243. package/esm/src/react/components/ui/adapter/token-scope.js +26 -0
  244. package/esm/src/react/components/ui/alert-dialog.d.ts +101 -0
  245. package/esm/src/react/components/ui/alert-dialog.d.ts.map +1 -0
  246. package/esm/src/react/components/ui/alert-dialog.js +181 -0
  247. package/esm/src/react/components/ui/aspect-ratio.d.ts +18 -0
  248. package/esm/src/react/components/ui/aspect-ratio.d.ts.map +1 -0
  249. package/esm/src/react/components/ui/aspect-ratio.js +13 -0
  250. package/esm/src/react/components/ui/autocomplete.d.ts +67 -0
  251. package/esm/src/react/components/ui/autocomplete.d.ts.map +1 -0
  252. package/esm/src/react/components/ui/autocomplete.js +59 -0
  253. package/esm/src/react/components/ui/breadcrumb.d.ts +86 -0
  254. package/esm/src/react/components/ui/breadcrumb.d.ts.map +1 -0
  255. package/esm/src/react/components/ui/breadcrumb.js +67 -0
  256. package/esm/src/react/components/ui/calendar.d.ts +40 -0
  257. package/esm/src/react/components/ui/calendar.d.ts.map +1 -0
  258. package/esm/src/react/components/ui/calendar.js +170 -0
  259. package/esm/src/react/components/ui/combobox.d.ts +74 -0
  260. package/esm/src/react/components/ui/combobox.d.ts.map +1 -0
  261. package/esm/src/react/components/ui/combobox.js +100 -0
  262. package/esm/src/react/components/ui/context-menu.d.ts +116 -0
  263. package/esm/src/react/components/ui/context-menu.d.ts.map +1 -0
  264. package/esm/src/react/components/ui/context-menu.js +168 -0
  265. package/esm/src/react/components/ui/date-picker.d.ts +69 -0
  266. package/esm/src/react/components/ui/date-picker.d.ts.map +1 -0
  267. package/esm/src/react/components/ui/date-picker.js +96 -0
  268. package/esm/src/react/components/ui/dialog.d.ts +41 -11
  269. package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
  270. package/esm/src/react/components/ui/dialog.js +47 -28
  271. package/esm/src/react/components/ui/drawer.d.ts +31 -8
  272. package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
  273. package/esm/src/react/components/ui/drawer.js +33 -22
  274. package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
  275. package/esm/src/react/components/ui/dropdown-menu.js +7 -75
  276. package/esm/src/react/components/ui/field.d.ts +70 -0
  277. package/esm/src/react/components/ui/field.d.ts.map +1 -0
  278. package/esm/src/react/components/ui/field.js +161 -0
  279. package/esm/src/react/components/ui/file-type.d.ts +9 -8
  280. package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
  281. package/esm/src/react/components/ui/file-type.js +8 -8
  282. package/esm/src/react/components/ui/hover-card.d.ts +82 -0
  283. package/esm/src/react/components/ui/hover-card.d.ts.map +1 -0
  284. package/esm/src/react/components/ui/hover-card.js +140 -0
  285. package/esm/src/react/components/ui/index.d.ts +23 -2
  286. package/esm/src/react/components/ui/index.d.ts.map +1 -1
  287. package/esm/src/react/components/ui/index.js +21 -0
  288. package/esm/src/react/components/ui/input-otp.d.ts +37 -0
  289. package/esm/src/react/components/ui/input-otp.d.ts.map +1 -0
  290. package/esm/src/react/components/ui/input-otp.js +42 -0
  291. package/esm/src/react/components/ui/menu-keyboard.d.ts +8 -0
  292. package/esm/src/react/components/ui/menu-keyboard.d.ts.map +1 -0
  293. package/esm/src/react/components/ui/menu-keyboard.js +76 -0
  294. package/esm/src/react/components/ui/menubar.d.ts +98 -0
  295. package/esm/src/react/components/ui/menubar.d.ts.map +1 -0
  296. package/esm/src/react/components/ui/menubar.js +173 -0
  297. package/esm/src/react/components/ui/meter.d.ts +45 -0
  298. package/esm/src/react/components/ui/meter.d.ts.map +1 -0
  299. package/esm/src/react/components/ui/meter.js +59 -0
  300. package/esm/src/react/components/ui/modal-surface.d.ts +7 -1
  301. package/esm/src/react/components/ui/modal-surface.d.ts.map +1 -1
  302. package/esm/src/react/components/ui/modal-surface.js +23 -6
  303. package/esm/src/react/components/ui/navigation-menu.d.ts +101 -0
  304. package/esm/src/react/components/ui/navigation-menu.d.ts.map +1 -0
  305. package/esm/src/react/components/ui/navigation-menu.js +195 -0
  306. package/esm/src/react/components/ui/number-field.d.ts +46 -0
  307. package/esm/src/react/components/ui/number-field.d.ts.map +1 -0
  308. package/esm/src/react/components/ui/number-field.js +121 -0
  309. package/esm/src/react/components/ui/pagination.d.ts +77 -0
  310. package/esm/src/react/components/ui/pagination.d.ts.map +1 -0
  311. package/esm/src/react/components/ui/pagination.js +62 -0
  312. package/esm/src/react/components/ui/popover.d.ts +42 -13
  313. package/esm/src/react/components/ui/popover.d.ts.map +1 -1
  314. package/esm/src/react/components/ui/popover.js +25 -12
  315. package/esm/src/react/components/ui/scroll-area.d.ts +38 -0
  316. package/esm/src/react/components/ui/scroll-area.d.ts.map +1 -0
  317. package/esm/src/react/components/ui/scroll-area.js +35 -0
  318. package/esm/src/react/components/ui/separator.d.ts +20 -0
  319. package/esm/src/react/components/ui/separator.d.ts.map +1 -0
  320. package/esm/src/react/components/ui/separator.js +13 -0
  321. package/esm/src/react/components/ui/slider.d.ts +44 -0
  322. package/esm/src/react/components/ui/slider.d.ts.map +1 -0
  323. package/esm/src/react/components/ui/slider.js +46 -0
  324. package/esm/src/react/components/ui/status.d.ts +6 -5
  325. package/esm/src/react/components/ui/status.d.ts.map +1 -1
  326. package/esm/src/react/components/ui/status.js +4 -4
  327. package/esm/src/react/components/ui/tabs.d.ts +32 -9
  328. package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
  329. package/esm/src/react/components/ui/tabs.js +46 -22
  330. package/esm/src/react/components/ui/toggle.d.ts +26 -0
  331. package/esm/src/react/components/ui/toggle.d.ts.map +1 -0
  332. package/esm/src/react/components/ui/toggle.js +29 -0
  333. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts +2 -1
  334. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts.map +1 -1
  335. package/esm/src/react/components/ui/use-isomorphic-layout-effect.js +6 -3
  336. package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -1
  337. package/esm/src/rendering/chunk-optimizer/source-imports.js +4 -114
  338. package/esm/src/rendering/orchestrator/css-candidate-manifest.d.ts.map +1 -1
  339. package/esm/src/rendering/orchestrator/css-candidate-manifest.js +30 -1
  340. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts +10 -0
  341. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts.map +1 -1
  342. package/esm/src/rendering/orchestrator/module-loader/build-failure.js +50 -3
  343. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts +2 -0
  344. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
  345. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +21 -6
  346. package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -1
  347. package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
  348. package/esm/src/rendering/orchestrator/module-loader/index.js +190 -7
  349. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +4 -0
  350. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
  351. package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +374 -7
  352. package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
  353. package/esm/src/rendering/orchestrator/pipeline.js +12 -1
  354. package/esm/src/runs/runs-client.d.ts +2 -4
  355. package/esm/src/runs/runs-client.d.ts.map +1 -1
  356. package/esm/src/runs/schemas.d.ts +18 -8
  357. package/esm/src/runs/schemas.d.ts.map +1 -1
  358. package/esm/src/runs/schemas.js +26 -0
  359. package/esm/src/runtime/model-call-context.d.ts +6 -1
  360. package/esm/src/runtime/model-call-context.d.ts.map +1 -1
  361. package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
  362. package/esm/src/runtime/runtime-bridge.js +133 -15
  363. package/esm/src/schedule/factory.d.ts +8 -2
  364. package/esm/src/schedule/factory.d.ts.map +1 -1
  365. package/esm/src/schedule/factory.js +0 -8
  366. package/esm/src/schedule/index.d.ts +10 -1
  367. package/esm/src/schedule/index.d.ts.map +1 -1
  368. package/esm/src/schedule/index.js +9 -0
  369. package/esm/src/schedule/types.d.ts +30 -11
  370. package/esm/src/schedule/types.d.ts.map +1 -1
  371. package/esm/src/schedule/validation.d.ts +17 -0
  372. package/esm/src/schedule/validation.d.ts.map +1 -1
  373. package/esm/src/schedule/validation.js +93 -5
  374. package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
  375. package/esm/src/security/sandbox/worker-pool.js +6 -1
  376. package/esm/src/server/bootstrap.d.ts.map +1 -1
  377. package/esm/src/server/bootstrap.js +6 -0
  378. package/esm/src/server/dev-server/index.d.ts +1 -1
  379. package/esm/src/server/dev-server/index.d.ts.map +1 -1
  380. package/esm/src/server/dev-server/server.d.ts +7 -3
  381. package/esm/src/server/dev-server/server.d.ts.map +1 -1
  382. package/esm/src/server/dev-server/server.js +12 -3
  383. package/esm/src/server/dev-server/types.d.ts +7 -1
  384. package/esm/src/server/dev-server/types.d.ts.map +1 -1
  385. package/esm/src/server/dev-server.d.ts +1 -1
  386. package/esm/src/server/dev-server.d.ts.map +1 -1
  387. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  388. package/esm/src/server/handlers/dev/framework-candidates.generated.js +2509 -34
  389. package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
  390. package/esm/src/server/handlers/dev/projects/index.js +3 -0
  391. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  392. package/esm/src/server/handlers/request/agent-stream.handler.js +29 -24
  393. package/esm/src/server/index.d.ts +3 -3
  394. package/esm/src/server/index.d.ts.map +1 -1
  395. package/esm/src/server/index.js +10 -5
  396. package/esm/src/server/node-handler.d.ts.map +1 -1
  397. package/esm/src/server/node-handler.js +4 -1
  398. package/esm/src/server/production-server.d.ts.map +1 -1
  399. package/esm/src/server/production-server.js +2 -1
  400. package/esm/src/server/project-env/cache.d.ts +17 -0
  401. package/esm/src/server/project-env/cache.d.ts.map +1 -1
  402. package/esm/src/server/project-env/cache.js +78 -2
  403. package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
  404. package/esm/src/server/project-env/fetcher.js +24 -14
  405. package/esm/src/server/project-env/index.d.ts +1 -1
  406. package/esm/src/server/project-env/index.d.ts.map +1 -1
  407. package/esm/src/server/project-env/index.js +1 -1
  408. package/esm/src/server/project-env/internal-authorization.d.ts +7 -0
  409. package/esm/src/server/project-env/internal-authorization.d.ts.map +1 -0
  410. package/esm/src/server/project-env/internal-authorization.js +32 -0
  411. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  412. package/esm/src/server/runtime-handler/index.js +1 -1
  413. package/esm/src/server/runtime-handler/projects-handler.d.ts +1 -1
  414. package/esm/src/server/runtime-handler/projects-handler.d.ts.map +1 -1
  415. package/esm/src/server/runtime-handler/projects-handler.js +4 -2
  416. package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
  417. package/esm/src/transforms/esm/http-bundler.js +6 -5
  418. package/esm/src/transforms/esm/http-cache-helpers.d.ts +11 -0
  419. package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
  420. package/esm/src/transforms/esm/http-cache-helpers.js +35 -0
  421. package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
  422. package/esm/src/transforms/esm/http-cache.js +16 -10
  423. package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
  424. package/esm/src/transforms/esm/specifier-resolver.js +87 -7
  425. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts +2 -0
  426. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts.map +1 -1
  427. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.js +11 -6
  428. package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
  429. package/esm/src/transforms/md/compiler/md-compiler.js +12 -5
  430. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +2 -0
  431. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -1
  432. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +33 -1
  433. package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
  434. package/esm/src/transforms/mdx/compiler/mdx-compiler.js +46 -7
  435. package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
  436. package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +8 -2
  437. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +1 -0
  438. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
  439. package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +3 -0
  440. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts +4 -0
  441. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
  442. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +44 -8
  443. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts +2 -0
  444. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts.map +1 -1
  445. package/esm/src/transforms/mdx/esm-module-loader/missing-module.js +4 -0
  446. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
  447. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +5 -1
  448. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +2 -0
  449. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
  450. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +50 -11
  451. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts +24 -12
  452. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts.map +1 -1
  453. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.js +201 -18
  454. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +5 -0
  455. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
  456. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts +22 -2
  457. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts.map +1 -1
  458. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.js +2080 -129
  459. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts +11 -1
  460. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
  461. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +32 -15
  462. package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
  463. package/esm/src/transforms/pipeline/stages/compile.js +44 -0
  464. package/esm/src/transforms/shared/specifier-suffix.d.ts +25 -0
  465. package/esm/src/transforms/shared/specifier-suffix.d.ts.map +1 -0
  466. package/esm/src/transforms/shared/specifier-suffix.js +43 -0
  467. package/esm/src/trigger/index.d.ts +2 -2
  468. package/esm/src/trigger/index.d.ts.map +1 -1
  469. package/esm/src/trigger/index.js +1 -1
  470. package/esm/src/trigger/local-runner.d.ts +2 -2
  471. package/esm/src/trigger/local-runner.d.ts.map +1 -1
  472. package/esm/src/trigger/local-runner.js +11 -4
  473. package/esm/src/trigger/target.d.ts +97 -5
  474. package/esm/src/trigger/target.d.ts.map +1 -1
  475. package/esm/src/trigger/target.js +175 -5
  476. package/esm/src/utils/version-constant.d.ts +1 -1
  477. package/esm/src/utils/version-constant.js +1 -1
  478. package/esm/src/webhook/types.d.ts +21 -6
  479. package/esm/src/webhook/types.d.ts.map +1 -1
  480. package/esm/src/webhook/validation.d.ts.map +1 -1
  481. package/esm/src/webhook/validation.js +27 -39
  482. package/esm/templates/index.d.ts +1 -1
  483. package/esm/templates/index.d.ts.map +1 -1
  484. package/esm/templates/loader.d.ts +6 -6
  485. package/esm/templates/loader.d.ts.map +1 -1
  486. package/esm/templates/loader.js +34 -18
  487. package/esm/templates/manifest.generated.d.ts +3 -0
  488. package/esm/templates/manifest.generated.d.ts.map +1 -0
  489. package/esm/templates/manifest.generated.js +2 -0
  490. package/package.json +8 -8
  491. package/esm/templates/manifest.d.ts +0 -664
  492. package/esm/templates/manifest.d.ts.map +0 -1
  493. package/esm/templates/manifest.js +0 -662
@@ -1,14 +1,52 @@
1
1
  import { brand, dim } from "../../ui/index.js";
2
2
  import { cliLogger, isVerbose, logError } from "../../utils/index.js";
3
+ import { sanitizeTerminalDiagnosticText } from "../../../src/errors/index.js";
3
4
  import { exit, getStdout } from "../../../src/platform/index.js";
5
+ const STACK_FRAME_WITH_PARENS = /^(\s*at\s+.*\()(file:\/\/\/[^)\r\n]+|\/[^)\r\n]+|[A-Za-z]:[\\/][^)\r\n]+)(:\d+:\d+\).*)$/;
6
+ const STACK_FRAME_DIRECT = /^(\s*at\s+(?:async\s+)?)(file:\/\/\/[^\r\n]+|\/[^\r\n]+|[A-Za-z]:[\\/][^\r\n]+)(:\d+:\d+.*)$/;
7
+ function sanitizeStackFrame(line) {
8
+ const sanitized = sanitizeTerminalDiagnosticText(line);
9
+ const match = STACK_FRAME_WITH_PARENS.exec(sanitized) ??
10
+ STACK_FRAME_DIRECT.exec(sanitized);
11
+ if (!match)
12
+ return sanitized;
13
+ const sourceName = match[2]
14
+ .replace(/^file:\/\/\//, "")
15
+ .replaceAll("\\", "/")
16
+ .split("/")
17
+ .at(-1) || "source";
18
+ return `${match[1]}<REDACTED>/${sourceName}${match[3]}`;
19
+ }
20
+ function deepestErrorCause(error) {
21
+ const seen = new Set();
22
+ let current = error;
23
+ for (let depth = 0; depth < 8; depth++) {
24
+ if (seen.has(current))
25
+ break;
26
+ seen.add(current);
27
+ const cause = Object.getOwnPropertyDescriptor(current, "cause");
28
+ if (!cause || !("value" in cause) || !(cause.value instanceof Error))
29
+ break;
30
+ current = cause.value;
31
+ }
32
+ return current;
33
+ }
4
34
  export function handleBuildError(error) {
5
35
  getStdout()?.write?.(`\r${" ".repeat(80)}\r`);
6
36
  const message = error instanceof Error ? error.message : String(error);
7
37
  console.log();
8
38
  logError(message);
9
- if (isVerbose() && error instanceof Error && error.stack) {
10
- cliLogger.error(`\n${dim("Stack trace:")}`);
11
- cliLogger.error(dim(error.stack.split("\n").slice(1, 5).join("\n")));
39
+ const diagnosticError = error instanceof Error ? deepestErrorCause(error) : undefined;
40
+ if (isVerbose() && diagnosticError?.stack) {
41
+ const isUnderlyingCause = diagnosticError !== error;
42
+ cliLogger.error(`\n${dim(isUnderlyingCause ? "Underlying stack trace:" : "Stack trace:")}`);
43
+ const firstLine = isUnderlyingCause ? 0 : 1;
44
+ const stack = diagnosticError.stack.split("\n").slice(firstLine, 5)
45
+ .map(sanitizeStackFrame).join("\n");
46
+ cliLogger.error(dim(stack));
47
+ }
48
+ else if (diagnosticError && diagnosticError !== error) {
49
+ cliLogger.error(` Run ${brand("veryfront build --verbose")} to show the underlying stack trace.`);
12
50
  }
13
51
  cliLogger.error(` Run ${brand("veryfront build --help")} for usage.`);
14
52
  cliLogger.error("");
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAQ3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;GAe9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;GAAiC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;GAazB,CAAC;AAEH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BxE"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAQ3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;GAe9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;GAAiC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;GAaA,CAAC;AAE5B,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BxE"}
@@ -41,7 +41,7 @@ export const parseBuildArgs = createArgParser(BuildArgsSchema, {
41
41
  include: { keys: ["include"], type: "array" },
42
42
  exclude: { keys: ["exclude"], type: "array" },
43
43
  dryRun: CommonArgs.dryRun,
44
- });
44
+ }, { rejectUnknown: true });
45
45
  export async function handleBuildCommand(args) {
46
46
  showHeader();
47
47
  const opts = parseArgsOrThrow(parseBuildArgs, "build", args);
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,OAAO,EAAE,KAAK,YAAY,EAA2B,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAwC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM1F,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;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AuB,EAChD,KAAK,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAmB,GAC1D,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA6TzE"}
@@ -25,7 +25,7 @@ import { createStagedPushOptions, pushCommand } from "../push/index.js";
25
25
  import { createProjectSelector } from "./project-selector.js";
26
26
  import { createDevLogController } from "./log-controller.js";
27
27
  import { findAvailablePort, isPortAvailable, isPortInUseError } from "./port-fallback.js";
28
- import { listInferenceOptions } from "./inference-status.js";
28
+ import { advertisesCloudGateway, listInferenceOptions } from "./inference-status.js";
29
29
  function authStatus(identity) {
30
30
  return isApiKeyIdentity(identity)
31
31
  ? "Authenticated with an API key"
@@ -272,6 +272,19 @@ export function devCommand(options) {
272
272
  if (inferenceOptions.length > 0) {
273
273
  console.log(` ${dim("Inference")} ${brand(inferenceOptions.join(", "))}`);
274
274
  }
275
+ // The banner reports configured paths, and it must not block Ready on a
276
+ // network round-trip (see `void authReady` above). But an expired stored
277
+ // session still has a nonempty token, so the gateway would be advertised
278
+ // and then fail on first request. The validation is already in flight —
279
+ // let it correct the record rather than delay the banner.
280
+ if (advertisesCloudGateway(inferenceOptions)) {
281
+ void authReady.then(() => {
282
+ if (identity)
283
+ return;
284
+ console.log(` ${warning("!")} Veryfront Cloud session is not valid; gateway inference will fail. ` +
285
+ `Run ${brand("veryfront login")} to renew it.`);
286
+ });
287
+ }
275
288
  if (mcpServer && isVerbose()) {
276
289
  console.log(` ${dim("MCP")} ${brand(`http://localhost:${mcpPort}/mcp`)}`);
277
290
  }
@@ -7,6 +7,12 @@ export interface InferenceEnvironment {
7
7
  googleApiKey?: string;
8
8
  mistralApiKey?: string;
9
9
  }
10
+ /**
11
+ * Whether a rendered option list claims the Cloud gateway. Callers use this to
12
+ * decide if a stored session still needs validating — the gateway is the only
13
+ * option whose credential the CLI can check itself.
14
+ */
15
+ export declare function advertisesCloudGateway(options: readonly string[]): boolean;
10
16
  /** Return the inference paths the current dev process can use without exposing credentials. */
11
17
  export declare function listInferenceOptions(environment: InferenceEnvironment): string[];
12
18
  //# sourceMappingURL=inference-status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inference-status.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/inference-status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAgBhF"}
1
+ {"version":3,"file":"inference-status.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/dev/inference-status.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAQD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE1E;AAED,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAmBhF"}
@@ -1,11 +1,23 @@
1
+ const CLOUD_GATEWAY_LABEL = "Veryfront Cloud AI Gateway";
1
2
  function isSet(value) {
2
3
  return Boolean(value?.trim());
3
4
  }
5
+ /**
6
+ * Whether a rendered option list claims the Cloud gateway. Callers use this to
7
+ * decide if a stored session still needs validating — the gateway is the only
8
+ * option whose credential the CLI can check itself.
9
+ */
10
+ export function advertisesCloudGateway(options) {
11
+ return options.includes(CLOUD_GATEWAY_LABEL);
12
+ }
4
13
  /** Return the inference paths the current dev process can use without exposing credentials. */
5
14
  export function listInferenceOptions(environment) {
6
15
  const options = [];
7
- if (isSet(environment.apiToken) && isSet(environment.projectSlug)) {
8
- options.push("Veryfront Cloud AI Gateway");
16
+ // The gateway authenticates on the token alone. A freshly scaffolded project
17
+ // has no linked slug yet and its chat route still answers, so gating this on
18
+ // `projectSlug` hid the one inference path `veryfront login` sets up.
19
+ if (isSet(environment.apiToken)) {
20
+ options.push(CLOUD_GATEWAY_LABEL);
9
21
  }
10
22
  if (isSet(environment.openaiApiKey)) {
11
23
  options.push(isSet(environment.openaiBaseUrl) ? "OpenAI-compatible service" : "OpenAI direct");
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/generate/command.ts"],"names":[],"mappings":"AAsBA,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAkCf"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/generate/command.ts"],"names":[],"mappings":"AA4FA,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAoCf"}
@@ -1,8 +1,68 @@
1
1
  import { getConfig } from "../../../src/config/index.js";
2
2
  import { cliLogger } from "../../utils/index.js";
3
3
  import { createError, toError } from "../../../src/errors/index.js";
4
+ import { parseExtensionManifest } from "../../../src/extensions/index.js";
5
+ import { exists, join, readTextFile } from "../../../src/fs/index.js";
4
6
  import { generateIntegration } from "./integration-generator.js";
5
7
  import { isScaffoldType, scaffoldProjectFile } from "../../scaffold/engine.js";
8
+ const PROJECT_MARKERS = [
9
+ "veryfront.config.ts",
10
+ "veryfront.config.js",
11
+ "veryfront.config.mjs",
12
+ // Legacy, but still read and merged by the CLI config loader, so a project
13
+ // identified only by this file is a real project. `veryfront.config.json` is
14
+ // deliberately absent — the loader does not recognise that name.
15
+ "veryfront.json",
16
+ ];
17
+ // Deno accepts JSONC grammar for `deno.json` as well as `deno.jsonc`, matching
18
+ // `src/extensions/discovery.ts`. Parsing those with strict JSON makes a
19
+ // commented manifest look like no evidence at all and fires a false warning.
20
+ const PROJECT_MANIFESTS = [
21
+ { name: "package.json", syntax: "json" },
22
+ { name: "deno.json", syntax: "jsonc" },
23
+ { name: "deno.jsonc", syntax: "jsonc" },
24
+ ];
25
+ /**
26
+ * `generate` writes into whatever directory it is invoked from, so running it
27
+ * one level above the project (or in the wrong terminal tab) silently produces
28
+ * a stray `app/` tree. `dev` already warns in this situation; match it rather
29
+ * than failing, so scaffolding into a not-yet-configured directory still works.
30
+ */
31
+ async function looksLikeVeryfrontProject(projectDir) {
32
+ for (const marker of PROJECT_MARKERS) {
33
+ if (await exists(join(projectDir, marker)))
34
+ return true;
35
+ }
36
+ for (const manifest of PROJECT_MANIFESTS) {
37
+ const path = join(projectDir, manifest.name);
38
+ if (!(await exists(path)))
39
+ continue;
40
+ try {
41
+ const parsed = parseExtensionManifest(await readTextFile(path), manifest.syntax, manifest.name);
42
+ const specifiers = [
43
+ ...Object.keys(parsed.dependencies ?? {}),
44
+ ...Object.keys(parsed.devDependencies ?? {}),
45
+ ...Object.keys(parsed.imports ?? {}),
46
+ ];
47
+ if (specifiers.some((s) => s === "veryfront" || s.startsWith("veryfront/"))) {
48
+ return true;
49
+ }
50
+ }
51
+ catch {
52
+ // An unparseable manifest is not evidence either way; keep looking.
53
+ }
54
+ }
55
+ return false;
56
+ }
57
+ async function warnIfOutsideProject(projectDir) {
58
+ if (await looksLikeVeryfrontProject(projectDir))
59
+ return;
60
+ // Deliberately no path: `projectDir` is an absolute machine path, which
61
+ // AGENTS.md forbids in user-facing output. The directory is where the user
62
+ // already is, so naming it adds nothing they cannot see.
63
+ cliLogger.warn(`The current directory does not look like a Veryfront project; scaffolding here anyway. ` +
64
+ `Run this from your project root, or create one with "npm create veryfront".`);
65
+ }
6
66
  async function getPreferredRouter(projectDir) {
7
67
  try {
8
68
  const { runtime } = await import("../../../src/platform/index.js");
@@ -20,6 +80,7 @@ async function getPreferredRouter(projectDir) {
20
80
  return "app-router";
21
81
  }
22
82
  export async function generateCommand(projectDir, type, name) {
83
+ await warnIfOutsideProject(projectDir);
23
84
  const preferred = await getPreferredRouter(projectDir);
24
85
  if (type === "integration") {
25
86
  await generateIntegration(projectDir, { name: name || undefined });
@@ -1 +1 @@
1
- {"version":3,"file":"init-command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/init-command.ts"],"names":[],"mappings":"AAAA;;;iCAGiC;AAOjC,OAAO,KAAK,EAAE,WAAW,EAA6B,MAAM,YAAY,CAAC;AAezE,UAAU,uBAAuB;IAC/B,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACzD;AAyFD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,YAAY,GAAE,uBAA4B,GACzC,OAAO,CAAC,IAAI,CAAC,CAoPf"}
1
+ {"version":3,"file":"init-command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/init-command.ts"],"names":[],"mappings":"AAAA;;;iCAGiC;AAOjC,OAAO,KAAK,EAAE,WAAW,EAA6B,MAAM,YAAY,CAAC;AAezE,UAAU,uBAAuB;IAC/B,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACzD;AAyFD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,YAAY,GAAE,uBAA4B,GACzC,OAAO,CAAC,IAAI,CAAC,CA8Of"}
@@ -212,47 +212,39 @@ export async function initCommand(options, dependencies = {}) {
212
212
  }
213
213
  else {
214
214
  const { chdir } = await import("../../../src/platform/index.js");
215
- const { ensureAuthenticated, readToken } = await import("../../auth/index.js");
215
+ const { ensureAuthenticated } = await import("../../auth/index.js");
216
216
  const { deployCommand } = await import("../deploy/index.js");
217
- const authResult = await ensureAuthenticated();
217
+ const authResult = await ensureAuthenticated(undefined, createdProjectDir);
218
218
  if (!authResult) {
219
219
  if (!quiet)
220
220
  console.log();
221
221
  log(` Authentication required for --deploy. ${manualDeployHint}`);
222
222
  }
223
223
  else {
224
- const token = await readToken();
225
- if (!token) {
226
- if (!quiet)
227
- console.log();
228
- log(` Could not read auth token. ${manualDeployHint}`);
224
+ if (!quiet)
225
+ console.log();
226
+ log(` Deploying project...`);
227
+ try {
228
+ chdir(createdProjectDir);
229
+ const deployment = await deployCommand({
230
+ projectDir: createdProjectDir,
231
+ branch: "main",
232
+ env: "production",
233
+ force: true,
234
+ dryRun: false,
235
+ quiet: true,
236
+ });
237
+ if (!deployment) {
238
+ throw new Error("Deploy completed without a verified result.");
239
+ }
240
+ deployedUrl = deployment.url;
229
241
  }
230
- else {
242
+ catch (error) {
243
+ const message = error instanceof Error ? error.message : String(error);
231
244
  if (!quiet)
232
245
  console.log();
233
- log(` Deploying project...`);
234
- try {
235
- chdir(createdProjectDir);
236
- const deployment = await deployCommand({
237
- projectDir: createdProjectDir,
238
- branch: "main",
239
- env: "production",
240
- force: true,
241
- dryRun: false,
242
- quiet: true,
243
- });
244
- if (!deployment) {
245
- throw new Error("Deploy completed without a verified result.");
246
- }
247
- deployedUrl = deployment.url;
248
- }
249
- catch (error) {
250
- const message = error instanceof Error ? error.message : String(error);
251
- if (!quiet)
252
- console.log();
253
- log(` Deploy failed: ${message}`);
254
- log(` Your project was created locally. ${manualDeployHint}`);
255
- }
246
+ log(` Deploy failed: ${message}`);
247
+ log(` Your project was created locally. ${manualDeployHint}`);
256
248
  }
257
249
  }
258
250
  }
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/install/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAgC,MAAM,YAAY,CAAC;AA+CtF,eAAO,MAAM,QAAQ,EAAE,MAAM,EAAyD,CAAC;AAEvF,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CAE1C;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,QAAQ,CAExD;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAWlE"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/install/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAgC,MAAM,YAAY,CAAC;AA+CtF,eAAO,MAAM,QAAQ,EAAE,MAAM,EAAyD,CAAC;AAEvF,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CAE1C;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,QAAQ,CAExD;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlE"}
@@ -1,4 +1,3 @@
1
- import manifest from "../../../templates/manifest.js";
2
1
  import { AIToolIdSchema, AIToolSchema } from "./types.js";
3
2
  const AI_TOOLS_RAW = [
4
3
  {
@@ -60,12 +59,10 @@ export function isValidToolId(id) {
60
59
  }
61
60
  export function getTemplateContent(toolId) {
62
61
  const { template } = getToolById(toolId);
63
- const entry = manifest.templates;
64
- const aiRule = entry[`ai-rules:${template}`];
65
- if (!aiRule)
66
- throw new Error(`Template not found in manifest: ${template}`);
67
- const content = aiRule.files[template];
68
- if (!content)
69
- throw new Error(`Template file not found in manifest: ${template}`);
70
- return Promise.resolve(content);
62
+ return import("../../../templates/loader.js").then(async ({ loadAiRuleTemplate }) => {
63
+ const content = await loadAiRuleTemplate(template);
64
+ if (!content)
65
+ throw new Error(`Template file not found in manifest: ${template}`);
66
+ return content;
67
+ });
71
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/login/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,SAAS,EAAE,WAoCvB,CAAC"}
1
+ {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/login/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,SAAS,EAAE,WAsCvB,CAAC"}
@@ -29,7 +29,9 @@ export const loginHelp = {
29
29
  "veryfront login --token",
30
30
  ],
31
31
  notes: [
32
- "Without options, prompts for authentication method",
32
+ "Without options, a valid session returns immediately. Use an explicit method to sign in again. If veryfront.json contains apiToken, remove or replace it before using another method to switch accounts",
33
+ "If VERYFRONT_API_TOKEN is set in your shell, unset or replace it before using another method to switch accounts.",
34
+ "Explicit methods (--google, --github, --microsoft, --token) are not supported with --json. Combining them with --json returns a usage error.",
33
35
  "OAuth methods open browser for authentication",
34
36
  "Token is stored in ~/.config/veryfront/token",
35
37
  "Exits 1 when no credential was obtained, so scripts can gate on it",
@@ -103,6 +103,7 @@ interface ProjectFile {
103
103
  type: string;
104
104
  created_at: string;
105
105
  updated_at: string;
106
+ version_id?: string;
106
107
  }
107
108
  /** Validate a remote file path as a canonical relative POSIX path. */
108
109
  export declare function validateRemoteFilePath(filePath: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/pull/command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAM3E,OAAO,EACL,eAAe,EAIhB,MAAM,wBAAwB,CAAC;AAwBhC;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;GAa7B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;GAAgC,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;GAWxB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OA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AAO,CAAC,IAAI,CAAC,CA2LpE"}
@@ -23,6 +23,7 @@ import { CommonArgs, createArgParser } from "../../shared/args.js";
23
23
  import { createIgnoreChecker, loadIgnorePatterns } from "../../sync/ignore.js";
24
24
  import { getProjectTarget } from "../../shared/deployment-provenance.js";
25
25
  import { ensurePulledProjectBootstrap, isPulledProjectBootstrapPath, planPulledProjectBootstrap, preflightPulledProjectBootstrap, } from "./project-bootstrap.js";
26
+ import { computeContentDigest, preflightSyncState, SYNC_STATE_RELATIVE_PATH, writeSyncTarget, } from "../../sync/state.js";
26
27
  /**
27
28
  * Schema factory for pull command arguments
28
29
  */
@@ -317,12 +318,11 @@ async function findGitRoot(projectDir) {
317
318
  return null;
318
319
  }
319
320
  }
320
- function isUntrackedPushReceipt(statusLine) {
321
- if (!statusLine.startsWith("?? "))
321
+ function isLocalMetadataStatus(statusLine) {
322
+ if (statusLine.length < 4)
322
323
  return false;
323
324
  const path = statusLine.slice(3).replace(/\\/g, "/");
324
- return path === ".veryfront/push-receipt.json" ||
325
- path.endsWith("/.veryfront/push-receipt.json");
325
+ return [".veryfront/push-receipt.json", SYNC_STATE_RELATIVE_PATH].some((relativePath) => path === relativePath || path.endsWith(`/${relativePath}`));
326
326
  }
327
327
  async function assertCleanGitWorktrees(projectDirs) {
328
328
  const gitRoots = new Set();
@@ -349,7 +349,7 @@ async function assertCleanGitWorktrees(projectDirs) {
349
349
  detail: "Veryfront could not verify that the Git worktree is clean before pruning files.",
350
350
  });
351
351
  }
352
- const dirty = (status.stdout ?? "").split("\n").some((line) => line !== "" && !isUntrackedPushReceipt(line));
352
+ const dirty = (status.stdout ?? "").split("\n").some((line) => line !== "" && !isLocalMetadataStatus(line));
353
353
  if (dirty) {
354
354
  throw INVALID_ARGUMENT.create({
355
355
  detail: `Pull with --prune requires a clean Git worktree at ${gitRoot}. Commit or stash local changes, then run the command again.`,
@@ -416,6 +416,36 @@ async function confirmPullWrite(projectDir, writeCount, deleteCount, bootstrapWr
416
416
  const action = actions.join(" and ");
417
417
  return await confirmPrompt(`This will ${action} in ${projectDir}. Continue?`, false);
418
418
  }
419
+ function syncBranchForPullSource(source) {
420
+ switch (source.type) {
421
+ case "main":
422
+ return "main";
423
+ case "branch":
424
+ return source.name;
425
+ case "environment":
426
+ case "release":
427
+ return null;
428
+ }
429
+ }
430
+ async function recordPullSyncTarget(projectDir, config, project, source, writeOps) {
431
+ const branch = syncBranchForPullSource(source);
432
+ if (!branch)
433
+ return;
434
+ const files = {};
435
+ for (const op of writeOps) {
436
+ files[op.relativePath] = {
437
+ digest: await computeContentDigest(op.content),
438
+ ...(op.versionId ? { versionId: op.versionId } : {}),
439
+ };
440
+ }
441
+ await writeSyncTarget(projectDir, {
442
+ controlPlane: config.apiUrl,
443
+ projectId: project.id,
444
+ projectSlug: project.slug,
445
+ branch,
446
+ files,
447
+ });
448
+ }
419
449
  async function pullSingleProject(projectSlug, projectDir, source, force, dryRun, prune, config, quiet = false) {
420
450
  const sourceLabel = formatPullSource(source);
421
451
  let spinner = quiet
@@ -459,7 +489,11 @@ async function pullSingleProject(projectSlug, projectDir, source, force, dryRun,
459
489
  detail: `Veryfront returned invalid content for file "${file.path}". No local files were changed.`,
460
490
  });
461
491
  }
462
- writeOps.push({ ...op, content: file.content });
492
+ writeOps.push({
493
+ ...op,
494
+ content: file.content,
495
+ ...(file.version_id ? { versionId: file.version_id } : {}),
496
+ });
463
497
  }
464
498
  let deleteOps = [];
465
499
  if (prune) {
@@ -499,6 +533,9 @@ async function pullSingleProject(projectSlug, projectDir, source, force, dryRun,
499
533
  return { written: 0, deleted: 0, cancelled: true };
500
534
  }
501
535
  }
536
+ if (!dryRun && syncBranchForPullSource(source)) {
537
+ await preflightSyncState(projectDir);
538
+ }
502
539
  if (!hasFileOperations) {
503
540
  await ensurePulledProjectBootstrap({
504
541
  projectDir,
@@ -510,6 +547,9 @@ async function pullSingleProject(projectSlug, projectDir, source, force, dryRun,
510
547
  quiet,
511
548
  plan: bootstrapPlan,
512
549
  });
550
+ if (!dryRun) {
551
+ await recordPullSyncTarget(projectDir, config, project, source, writeOps);
552
+ }
513
553
  return { written: 0, deleted: 0, cancelled: false };
514
554
  }
515
555
  spinner = quiet ? createNoopSpinner() : createSpinner(`Writing files to ${projectDir}...`);
@@ -533,6 +573,9 @@ async function pullSingleProject(projectSlug, projectDir, source, force, dryRun,
533
573
  quiet,
534
574
  plan: bootstrapPlan,
535
575
  });
576
+ if (!dryRun) {
577
+ await recordPullSyncTarget(projectDir, config, project, source, writeOps);
578
+ }
536
579
  if (!quiet) {
537
580
  if (dryRun) {
538
581
  logInfo(`Dry run complete for ${projectSlug}. Would write ${writeResult.written} and delete ${deleteResult.deleted} files.`);
@@ -1 +1 @@
1
- {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/push/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,WAgDtB,CAAC"}
1
+ {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/push/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,WAuDtB,CAAC"}
@@ -24,6 +24,10 @@ export const pushHelp = {
24
24
  flag: "--prune",
25
25
  description: "Delete managed remote files that are missing locally",
26
26
  },
27
+ {
28
+ flag: "-f, --force",
29
+ description: "Intentionally overwrite remote changes and bypass concurrency guards",
30
+ },
27
31
  {
28
32
  flag: "-q, --quiet",
29
33
  description: "Suppress progress and summary output",
@@ -40,6 +44,9 @@ export const pushHelp = {
40
44
  "Use --branch to create or update an isolated branch preview",
41
45
  "Preview branch names use lowercase letters, numbers, and hyphens",
42
46
  "By default, push uploads local files and preserves remote-only files",
47
+ "Push rejects files changed remotely since the last pull or push",
48
+ "Run pull and reconcile changes with Git before retrying a rejected push",
49
+ "Use --force only when you intend to overwrite remote changes",
43
50
  "Use --prune to remove managed remote files that are missing locally",
44
51
  "Run veryfront deploy when the preview is ready for an environment",
45
52
  ".vfignore excludes matching local files and preserves matching remote files",
@@ -3,6 +3,7 @@ import { type ApiClient, type ResolvedConfig } from "../../shared/config.js";
3
3
  import { type IgnoreChecker } from "../../sync/ignore.js";
4
4
  import { type PullSource } from "../pull/index.js";
5
5
  import { type GitSource } from "../../shared/deployment-provenance.js";
6
+ import { type PlannedDelete, type PlannedUpload } from "./plan.js";
6
7
  /**
7
8
  * Schema factory for push command arguments
8
9
  */
@@ -10,7 +11,7 @@ export declare const getPushArgsSchema: () => import("../../../src/internal-agen
10
11
  projectSlug: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
11
12
  projectDir: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
12
13
  branch: import("../../../src/internal-agents/schema.js").Schema<string>;
13
- /** Deprecated compatibility flag; invoking push already authorizes the operation. */
14
+ /** Intentionally overwrite remote changes and bypass concurrency guards. */
14
15
  force: import("../../../src/internal-agents/schema.js").Schema<boolean>;
15
16
  prune: import("../../../src/internal-agents/schema.js").Schema<boolean>;
16
17
  dryRun: import("../../../src/internal-agents/schema.js").Schema<boolean>;
@@ -20,7 +21,7 @@ export declare const PushArgsSchema: import("../../../src/internal-agents/schema
20
21
  projectSlug: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
21
22
  projectDir: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
22
23
  branch: import("../../../src/internal-agents/schema.js").Schema<string>;
23
- /** Deprecated compatibility flag; invoking push already authorizes the operation. */
24
+ /** Intentionally overwrite remote changes and bypass concurrency guards. */
24
25
  force: import("../../../src/internal-agents/schema.js").Schema<boolean>;
25
26
  prune: import("../../../src/internal-agents/schema.js").Schema<boolean>;
26
27
  dryRun: import("../../../src/internal-agents/schema.js").Schema<boolean>;
@@ -34,7 +35,7 @@ declare const parseKnownPushArgs: (args: import("../../shared/types.js").ParsedA
34
35
  projectSlug: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
35
36
  projectDir: import("../../../src/internal-agents/schema.js").Schema<string | undefined>;
36
37
  branch: import("../../../src/internal-agents/schema.js").Schema<string>;
37
- /** Deprecated compatibility flag; invoking push already authorizes the operation. */
38
+ /** Intentionally overwrite remote changes and bypass concurrency guards. */
38
39
  force: import("../../../src/internal-agents/schema.js").Schema<boolean>;
39
40
  prune: import("../../../src/internal-agents/schema.js").Schema<boolean>;
40
41
  dryRun: import("../../../src/internal-agents/schema.js").Schema<boolean>;
@@ -51,7 +52,7 @@ export interface PushOptions {
51
52
  projectDir?: string;
52
53
  /** Branch name to update (defaults to main) */
53
54
  branch?: string;
54
- /** Deprecated compatibility flag; invoking push already authorizes the operation. */
55
+ /** Intentionally overwrite remote changes and bypass concurrency guards. */
55
56
  force?: boolean;
56
57
  /** Prune remote files that are missing locally. */
57
58
  prune?: boolean;
@@ -63,7 +64,7 @@ export interface PushOptions {
63
64
  /**
64
65
  * File upload operation
65
66
  */
66
- export interface UploadOp {
67
+ export interface UploadOp extends PlannedUpload {
67
68
  /** Relative path from project root (sent to API) */
68
69
  path: string;
69
70
  content: string;
@@ -85,9 +86,19 @@ interface BranchListItem {
85
86
  id: string;
86
87
  name: string;
87
88
  }
89
+ interface EnsuredBranch extends BranchListItem {
90
+ created: boolean;
91
+ }
92
+ interface PushRemoteTarget {
93
+ branchId: string | null;
94
+ remoteFiles: RemoteFile[];
95
+ source: PullSource;
96
+ branchExists: boolean;
97
+ }
88
98
  interface RemoteFile {
89
99
  path: string;
90
100
  content?: string;
101
+ version_id?: string;
91
102
  }
92
103
  export declare function scanLocalFiles(projectDir: string, ignoreChecker: IgnoreChecker): Promise<UploadOp[]>;
93
104
  export declare function capturePushSourceSnapshot(projectDir: string, ignoreChecker: IgnoreChecker): Promise<PushSourceSnapshot>;
@@ -113,19 +124,19 @@ export declare function buildPushUrls(projectSlug: string, branchName: string):
113
124
  preview: string;
114
125
  };
115
126
  export declare function createBranch(client: ApiClient, projectSlug: string, branchName: string): Promise<BranchResponse>;
116
- export declare function ensureBranch(client: ApiClient, projectSlug: string, branchName: string): Promise<BranchListItem>;
117
- export declare function resolvePushRemoteFiles(client: ApiClient, projectSlug: string, branchName: string, mainFiles: RemoteFile[]): Promise<{
118
- branchId: string | null;
119
- remoteFiles: RemoteFile[];
120
- source: PullSource;
121
- }>;
127
+ export declare function ensureBranch(client: ApiClient, projectSlug: string, branchName: string): Promise<EnsuredBranch>;
128
+ export declare function resolvePushRemoteFiles(client: ApiClient, projectSlug: string, branchName: string, mainFiles: RemoteFile[]): Promise<PushRemoteTarget>;
122
129
  export declare function uploadFiles(client: ApiClient, projectSlug: string, branchId: string | null, ops: UploadOp[], dryRun: boolean): Promise<{
123
130
  uploaded: number;
124
131
  failed: number;
132
+ conflicts: string[];
133
+ applied: string[];
125
134
  }>;
126
- export declare function deleteFiles(client: ApiClient, projectSlug: string, branchId: string | null, paths: string[], dryRun: boolean): Promise<{
135
+ export declare function deleteFiles(client: ApiClient, projectSlug: string, branchId: string | null, ops: PlannedDelete[], dryRun: boolean): Promise<{
127
136
  deleted: number;
128
137
  failed: number;
138
+ conflicts: string[];
139
+ applied: string[];
129
140
  }>;
130
141
  export declare function recordPushReceipt(client: ApiClient, config: ResolvedConfig, projectDir: string, branch: string, snapshot: PushSourceSnapshot, ignoreChecker: IgnoreChecker, pushedSourceDigest?: string): Promise<void>;
131
142
  export declare function pushCommand(options?: PushOptions): Promise<void>;