vite-hub 0.4.1 → 0.5.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 (502) hide show
  1. package/README.md +38 -14
  2. package/dist/_internal/runtime/browser-errors.d.ts +12 -4
  3. package/dist/_internal/runtime/browser-errors.js +69 -27
  4. package/dist/_internal/runtime/redirects.d.ts +1 -2
  5. package/dist/_internal/runtime/redirects.js +2 -3
  6. package/dist/_internal/runtime/request-policy.d.ts +11 -2
  7. package/dist/_internal/runtime/request-policy.js +25 -6
  8. package/dist/_internal/runtime/security.d.ts +1 -2
  9. package/dist/_internal/runtime/security.js +16 -3
  10. package/dist/{access-BDST818p.js → access-BBHk9b5P.js} +30 -20
  11. package/dist/{access-policy-DjBKLo3c.js → access-policy-BM48XstY.js} +5 -6
  12. package/dist/{access-policy-CGXhO3Ee.d.ts → access-policy-CUbJLvlR.d.ts} +4 -8
  13. package/dist/{account-BnOAU055.d.ts → account-CoAO1F8G.d.ts} +9 -7
  14. package/dist/agent/invocations/postgres.d.ts +1 -0
  15. package/dist/agent/invocations/postgres.js +2 -0
  16. package/dist/{agent-invocations.post-CcPvfA0n.js → agent-invocations.post-BAC1aHnG.js} +16 -18
  17. package/dist/agents-BClUWOj7.js +1 -0
  18. package/dist/{agents-BDeazoAW.js → agents-Cz_uhhov.js} +4 -5
  19. package/dist/{agents-C94A4N9u.d.ts → agents-Gyw4VKPt.d.ts} +0 -2
  20. package/dist/auth/server.js +1 -2
  21. package/dist/{auth-BZOy7obk.d.ts → auth-CeKxL2xp.d.ts} +4 -8
  22. package/dist/{auth-operations-GcQk0O0X.js → auth-operations-arLIY2_2.js} +1 -2
  23. package/dist/{auth-types-CyqhWvYF.d.ts → auth-types-B4mq4YhK.d.ts} +1 -4
  24. package/dist/bin.js +34 -23
  25. package/dist/blob/nuxt-image.js +1 -2
  26. package/dist/{blob-CFLwMsjH.d.ts → blob-_TtxDb-t.d.ts} +1 -3
  27. package/dist/{blob-CpvlM8jp.js → blob-eH6j0AQj.js} +5 -6
  28. package/dist/browser-error-limits-B0yS95zt.js +24 -0
  29. package/dist/cache/operations.d.ts +2 -4
  30. package/dist/cache/operations.js +3 -4
  31. package/dist/cache.d.ts +1 -3
  32. package/dist/cache.js +2 -3
  33. package/dist/choices/testing.d.ts +1 -0
  34. package/dist/choices/testing.js +2 -0
  35. package/dist/{cli-config-wxKjF2Y0.js → cli-config-BX8H4ZCo.js} +12 -5
  36. package/dist/cli-config-DgpmE_7z.js +1 -0
  37. package/dist/cloudflare-app-types.d.ts +18 -0
  38. package/dist/{cloudflare-env-lookup-DKXdr4P_.js → cloudflare-env-lookup-DcN7pGlv.js} +1 -2
  39. package/dist/cms.js +1 -2
  40. package/dist/console/auth-types.d.ts +1 -1
  41. package/dist/console/auth.d.ts +1 -3
  42. package/dist/console/auth.js +2 -3
  43. package/dist/console/runtime/auth-operations.d.ts +1 -3
  44. package/dist/console/runtime/auth-operations.js +1 -2
  45. package/dist/console/runtime/client/account-views.d.ts +1 -3
  46. package/dist/console/runtime/client/account-views.js +1 -2
  47. package/dist/console/runtime/client/account.d.ts +1 -1
  48. package/dist/console/runtime/client/account.js +36 -48
  49. package/dist/console/runtime/client/add-primitive.ts +2 -2
  50. package/dist/console/runtime/client/appearance.d.ts +1 -2
  51. package/dist/console/runtime/client/appearance.js +1 -2
  52. package/dist/console/runtime/client/blob-media.d.ts +2 -4
  53. package/dist/console/runtime/client/blob-media.js +5 -6
  54. package/dist/console/runtime/client/comment-thread.d.ts +1 -3
  55. package/dist/console/runtime/client/comment-thread.js +11 -5
  56. package/dist/console/runtime/client/content-heads.d.ts +1 -2
  57. package/dist/console/runtime/client/content-heads.js +2 -3
  58. package/dist/console/runtime/client/documents.d.ts +2 -2
  59. package/dist/console/runtime/client/documents.js +1 -2
  60. package/dist/console/runtime/client/editor.d.ts +3 -5
  61. package/dist/console/runtime/client/editor.js +1 -2
  62. package/dist/console/runtime/client/env-groups.d.ts +1 -3
  63. package/dist/console/runtime/client/env-groups.js +1 -2
  64. package/dist/console/runtime/client/env-status.d.ts +1 -3
  65. package/dist/console/runtime/client/env-status.js +1 -2
  66. package/dist/console/runtime/client/format.d.ts +1 -3
  67. package/dist/console/runtime/client/format.js +1 -2
  68. package/dist/console/runtime/client/invocation-deletion.d.ts +1 -2
  69. package/dist/console/runtime/client/invocation-deletion.js +1 -2
  70. package/dist/console/runtime/client/invocation.d.ts +1 -2
  71. package/dist/console/runtime/client/invocation.js +4 -5
  72. package/dist/console/runtime/client/live.d.ts +2 -4
  73. package/dist/console/runtime/client/live.js +1 -2
  74. package/dist/console/runtime/client/mcp-client.d.ts +6 -4
  75. package/dist/console/runtime/client/mcp-client.js +12 -5
  76. package/dist/console/runtime/client/media-library.d.ts +1 -1
  77. package/dist/console/runtime/client/media-library.js +1 -2
  78. package/dist/console/runtime/client/media-uploads.d.ts +2 -4
  79. package/dist/console/runtime/client/media-uploads.js +2 -3
  80. package/dist/console/runtime/client/media.d.ts +1 -1
  81. package/dist/console/runtime/client/media.js +1 -2
  82. package/dist/console/runtime/client/operation-view.d.ts +2 -4
  83. package/dist/console/runtime/client/operation-view.js +4 -5
  84. package/dist/console/runtime/client/presence.d.ts +2 -4
  85. package/dist/console/runtime/client/presence.js +1 -2
  86. package/dist/console/runtime/client/preview.d.ts +1 -3
  87. package/dist/console/runtime/client/preview.js +1 -2
  88. package/dist/console/runtime/client/problem.d.ts +2 -4
  89. package/dist/console/runtime/client/problem.js +3 -4
  90. package/dist/console/runtime/client/project-link.d.ts +2 -2
  91. package/dist/console/runtime/client/project-link.js +1 -2
  92. package/dist/console/runtime/client/project-session.d.ts +19 -10
  93. package/dist/console/runtime/client/project-session.js +1 -723
  94. package/dist/console/runtime/client/project.d.ts +1 -3
  95. package/dist/console/runtime/client/project.js +1 -2
  96. package/dist/console/runtime/client/projects.d.ts +1 -1
  97. package/dist/console/runtime/client/projects.js +1 -2
  98. package/dist/console/runtime/client/publish.d.ts +2 -4
  99. package/dist/console/runtime/client/publish.js +1 -2
  100. package/dist/console/runtime/client/rate-limit.d.ts +1 -3
  101. package/dist/console/runtime/client/rate-limit.js +3 -4
  102. package/dist/console/runtime/client/read-only.d.ts +2 -4
  103. package/dist/console/runtime/client/read-only.js +2 -3
  104. package/dist/console/runtime/client/request.d.ts +2 -70
  105. package/dist/console/runtime/client/request.js +1 -2
  106. package/dist/console/runtime/client/route-query.d.ts +4 -5
  107. package/dist/console/runtime/client/route-query.js +1 -2
  108. package/dist/console/runtime/client/schedule-run.d.ts +1 -3
  109. package/dist/console/runtime/client/schedule-run.js +3 -4
  110. package/dist/console/runtime/client/schema-form.d.ts +1 -1
  111. package/dist/console/runtime/client/schema-form.js +1 -2
  112. package/dist/console/runtime/client/sections.d.ts +1 -1
  113. package/dist/console/runtime/client/sections.js +1 -2
  114. package/dist/console/runtime/client/site-access.d.ts +41 -10
  115. package/dist/console/runtime/client/site-access.js +157 -28
  116. package/dist/console/runtime/client/stored.d.ts +1 -3
  117. package/dist/console/runtime/client/stored.js +1 -2
  118. package/dist/console/runtime/client/ticket.d.ts +1 -1
  119. package/dist/console/runtime/client/ticket.js +1 -2
  120. package/dist/console/runtime/client/toast.d.ts +1 -3
  121. package/dist/console/runtime/client/toast.js +1 -2
  122. package/dist/console/runtime/client/workflow.d.ts +1 -3
  123. package/dist/console/runtime/client/workflow.js +3 -4
  124. package/dist/console/runtime/components/console-account-api-keys.vue +4 -4
  125. package/dist/console/runtime/components/console-account-home.vue +230 -51
  126. package/dist/console/runtime/components/console-account-link.vue +8 -5
  127. package/dist/console/runtime/components/console-account-setup.vue +10 -7
  128. package/dist/console/runtime/components/console-account-shell.vue +13 -19
  129. package/dist/console/runtime/components/console-account-unlink.vue +2 -3
  130. package/dist/console/runtime/components/console-app-settings.vue +8 -2
  131. package/dist/console/runtime/components/console-app.vue +1 -10
  132. package/dist/console/runtime/components/console-auth-activity.vue +2 -2
  133. package/dist/console/runtime/components/console-auth-chart.vue +1 -1
  134. package/dist/console/runtime/components/console-auth-overview.vue +1 -1
  135. package/dist/console/runtime/components/console-auth.vue +4 -4
  136. package/dist/console/runtime/components/console-comment-thread.vue +1 -1
  137. package/dist/console/runtime/components/console-definitions.vue +4 -4
  138. package/dist/console/runtime/components/console-document-dashboard.vue +2 -2
  139. package/dist/console/runtime/components/console-document-list.vue +2 -2
  140. package/dist/console/runtime/components/console-document-settings.vue +1 -1
  141. package/dist/console/runtime/components/console-env.vue +3 -3
  142. package/dist/console/runtime/components/console-home.vue +220 -311
  143. package/dist/console/runtime/components/console-hosted-comments-embed.vue +106 -0
  144. package/dist/console/runtime/components/console-loading.vue +1 -1
  145. package/dist/console/runtime/components/console-mcp-callback.vue +6 -1
  146. package/dist/console/runtime/components/console-mcp-connection.vue +3 -3
  147. package/dist/console/runtime/components/console-mcp-items.vue +4 -17
  148. package/dist/console/runtime/components/console-media-browser.vue +20 -30
  149. package/dist/console/runtime/components/console-media-crops.vue +3 -2
  150. package/dist/console/runtime/components/console-media-uploads.vue +11 -7
  151. package/dist/console/runtime/components/console-page-toolbar.vue +5 -10
  152. package/dist/console/runtime/components/console-schema-list.vue +85 -31
  153. package/dist/console/runtime/components/console-search-palette.vue +14 -5
  154. package/dist/console/runtime/components/console-section.vue +2 -1
  155. package/dist/console/runtime/components/console-session-inspector.vue +5 -0
  156. package/dist/console/runtime/components/console-session.css +8 -2
  157. package/dist/console/runtime/components/console-settings-value.vue +4 -5
  158. package/dist/console/runtime/components/console-sidebar.vue +9 -8
  159. package/dist/console/runtime/components/console-site.vue +36 -15
  160. package/dist/console/runtime/components/console-stat-grid.vue +3 -2
  161. package/dist/console/runtime/components/console-toaster.vue +3 -2
  162. package/dist/console/runtime/components/console-usage-chart.vue +1 -1
  163. package/dist/console/runtime/components/console-usage.vue +36 -18
  164. package/dist/console/runtime/components/invocation/internal/brand-icons.ts +10 -0
  165. package/dist/console/runtime/components/invocation/internal/invocation-brand.ts +6 -2
  166. package/dist/console/runtime/components/invocation/invocation.css +4 -27
  167. package/dist/console/runtime/console-route.d.ts +1 -3
  168. package/dist/console/runtime/console-route.js +1 -2
  169. package/dist/console/runtime/definitions.d.ts +1 -1
  170. package/dist/console/runtime/definitions.js +1 -2
  171. package/dist/console/runtime/diagnostics.ts +8 -1
  172. package/dist/console/runtime/mcp-client.d.ts +1 -1
  173. package/dist/console/runtime/mcp-client.js +1 -2
  174. package/dist/console/runtime/page/loader.js +45 -52
  175. package/dist/console/runtime/page-tool/account.js +26 -0
  176. package/dist/console/runtime/page-tool/page-tool.js +2 -3
  177. package/dist/console/runtime/public/skills/index.json +1 -1
  178. package/dist/console/runtime/public/skills/vitehub/SKILL.md +50 -7
  179. package/dist/console/runtime/public/skills/vitehub/agents/openai.yaml +1 -1
  180. package/dist/console/runtime/public/skills/vitehub/references/primitives/channels.md +1 -1
  181. package/dist/console/runtime/public/skills/vitehub/references/primitives/email.md +1 -1
  182. package/dist/console/runtime/public/skills/vitehub/references/project-shapes.md +1 -1
  183. package/dist/console/runtime/rpc.d.ts +1 -1
  184. package/dist/console/runtime/rpc.js +1 -2
  185. package/dist/console/runtime/sections.d.ts +1 -1
  186. package/dist/console/runtime/sections.js +1 -2
  187. package/dist/console/runtime/server/access-policy.d.ts +1 -1
  188. package/dist/console/runtime/server/access-policy.js +1 -2
  189. package/dist/console/runtime/server/agents.get.d.ts +2 -3
  190. package/dist/console/runtime/server/agents.get.js +3 -4
  191. package/dist/console/runtime/server/auth.d.ts +1 -1
  192. package/dist/console/runtime/server/auth.js +4 -5
  193. package/dist/console/runtime/server/blob.d.ts +1 -1
  194. package/dist/console/runtime/server/blob.js +1 -2
  195. package/dist/console/runtime/server/channel-replay.d.ts +3 -5
  196. package/dist/console/runtime/server/channel-replay.js +7 -7
  197. package/dist/console/runtime/server/database.d.ts +1 -1
  198. package/dist/console/runtime/server/database.get.d.ts +2 -3
  199. package/dist/console/runtime/server/database.get.js +4 -5
  200. package/dist/console/runtime/server/database.js +1 -2
  201. package/dist/console/runtime/server/definitions.d.ts +1 -1
  202. package/dist/console/runtime/server/definitions.get.d.ts +4 -6
  203. package/dist/console/runtime/server/definitions.get.js +5 -6
  204. package/dist/console/runtime/server/definitions.js +1 -2
  205. package/dist/console/runtime/server/development.d.ts +1 -1
  206. package/dist/console/runtime/server/development.js +1 -2
  207. package/dist/console/runtime/server/documents.d.ts +1 -1
  208. package/dist/console/runtime/server/documents.js +2 -2
  209. package/dist/console/runtime/server/env.d.ts +1 -3
  210. package/dist/console/runtime/server/env.get.d.ts +2 -4
  211. package/dist/console/runtime/server/env.get.js +7 -8
  212. package/dist/console/runtime/server/env.js +1 -2
  213. package/dist/console/runtime/server/invocation-capabilities.get.d.ts +1 -3
  214. package/dist/console/runtime/server/invocation-capabilities.get.js +4 -5
  215. package/dist/console/runtime/server/invocation-workspace.get.d.ts +3 -5
  216. package/dist/console/runtime/server/invocation-workspace.get.js +6 -7
  217. package/dist/console/runtime/server/invocation.get.d.ts +3 -5
  218. package/dist/console/runtime/server/invocation.get.js +8 -9
  219. package/dist/console/runtime/server/invocations.get.d.ts +1 -2
  220. package/dist/console/runtime/server/invocations.get.js +5 -6
  221. package/dist/console/runtime/server/logs.get.d.ts +3 -5
  222. package/dist/console/runtime/server/logs.get.js +7 -8
  223. package/dist/console/runtime/server/mcp-client-operations.d.ts +2 -4
  224. package/dist/console/runtime/server/mcp-client-operations.js +5 -7
  225. package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
  226. package/dist/console/runtime/server/operation-contributions.js +1 -2
  227. package/dist/console/runtime/server/page-auth.d.ts +2 -4
  228. package/dist/console/runtime/server/page-auth.js +1 -2
  229. package/dist/console/runtime/server/page-tool.d.ts +1 -1
  230. package/dist/console/runtime/server/page-tool.js +12 -7
  231. package/dist/console/runtime/server/page-tools-route.d.ts +2 -0
  232. package/dist/console/runtime/server/page-tools-route.js +4 -0
  233. package/dist/console/runtime/server/rpc.d.ts +3 -5
  234. package/dist/console/runtime/server/rpc.js +12 -13
  235. package/dist/console/runtime/server/runtime.d.ts +1 -1
  236. package/dist/console/runtime/server/runtime.js +1 -2
  237. package/dist/console/runtime/server/search.get.d.ts +1 -3
  238. package/dist/console/runtime/server/search.get.js +3 -5
  239. package/dist/console/runtime/server/sections.d.ts +5 -5
  240. package/dist/console/runtime/server/sections.get.d.ts +1 -1
  241. package/dist/console/runtime/server/sections.get.js +8 -9
  242. package/dist/console/runtime/server/sections.js +6 -6
  243. package/dist/console/runtime/server/setup.d.ts +5 -5
  244. package/dist/console/runtime/server/setup.js +5 -5
  245. package/dist/console/runtime/server/site-entry.d.ts +1 -3
  246. package/dist/console/runtime/server/site-entry.js +15 -10
  247. package/dist/console/runtime/server/site-session.d.ts +12 -22
  248. package/dist/console/runtime/server/site-session.js +1 -2
  249. package/dist/console/runtime/server/status.get.d.ts +2 -4
  250. package/dist/console/runtime/server/status.get.js +6 -7
  251. package/dist/console/runtime/server/tickets.d.ts +1 -1
  252. package/dist/console/runtime/server/tickets.js +1 -2
  253. package/dist/console/runtime/server/usage.get.d.ts +2 -4
  254. package/dist/console/runtime/server/usage.get.js +8 -9
  255. package/dist/console/runtime/server/workspace-files.get.d.ts +3 -5
  256. package/dist/console/runtime/server/workspace-files.get.js +4 -5
  257. package/dist/console/runtime/site-access.d.ts +1 -1
  258. package/dist/console/runtime/site-access.js +1 -2
  259. package/dist/console/runtime/skills.d.ts +1 -3
  260. package/dist/console/runtime/skills.js +1 -2
  261. package/dist/console/server.d.ts +7 -11
  262. package/dist/console/server.js +8 -8
  263. package/dist/console/ui.d.ts +0 -10
  264. package/dist/console/ui.js +32 -28
  265. package/dist/console-lazy-views-VEjcbL4Q.js +1 -0
  266. package/dist/{console-route-CBuqZ4wO.js → console-route-DbdnLkkF.js} +3 -4
  267. package/dist/console.d.ts +1 -3
  268. package/dist/console.js +1 -2
  269. package/dist/{database-DyPVMjp_.d.ts → database-CPjZ3L0g.d.ts} +1 -3
  270. package/dist/{database-BdOBjPkS.js → database-CrgBUdIx.js} +3 -4
  271. package/dist/definition-catalog-1xPPtzOx.js +137 -0
  272. package/dist/definition-catalog-M5ua7JRS.js +1 -0
  273. package/dist/{definitions-BW6SvmMM.js → definitions-BFYqXchw.js} +1 -2
  274. package/dist/{definitions-DB4LbZ7T.d.ts → definitions-ChvMnA1L.d.ts} +0 -2
  275. package/dist/{definitions-Dbgxfz3I.d.ts → definitions-DRkgHKmk.d.ts} +1 -3
  276. package/dist/{definitions-CNq_Shkh.js → definitions-M7i2p8SR.js} +5 -6
  277. package/dist/deployment-CURATxjG.js +229 -0
  278. package/dist/deployment-l7RuKdEp.js +1 -0
  279. package/dist/{dev-peer-am78OsHH.js → dev-peer-DBq-isgi.js} +7 -6
  280. package/dist/{development-zLxOp-AO.js → development-DD567hhJ.js} +2 -3
  281. package/dist/{development-W5EwONyL.d.ts → development-I40mfD7B.d.ts} +1 -3
  282. package/dist/{diagnostics-9U_fYxMy.js → diagnostics-B2cqlCSz.js} +3 -3
  283. package/dist/{diagnostics-CjGiniKb.d.ts → diagnostics-BXxPggRw.d.ts} +1 -3
  284. package/dist/docs/nuxt.js +1 -2
  285. package/dist/doctor.d.ts +0 -6
  286. package/dist/doctor.js +15078 -2377
  287. package/dist/{documents-CjJTCrY8.js → documents-BOYwZ5g4.js} +7 -8
  288. package/dist/{documents-qrHHqlNU.js → documents-Ck_iub9w.js} +4 -5
  289. package/dist/{documents-BASIRZ91.d.ts → documents-DxK0tdjA.d.ts} +3 -5
  290. package/dist/{documents-CboVhYFz.d.ts → documents-LtkKCxtu.d.ts} +4 -8
  291. package/dist/durability/operations.d.ts +2 -4
  292. package/dist/durability/operations.js +3 -4
  293. package/dist/email/vue.d.ts +1 -0
  294. package/dist/email/vue.js +2 -0
  295. package/dist/{entries-Bj-jPs_J.js → entries-UFs9n1MB.js} +2 -3
  296. package/dist/{env-Dg1I_DWr.js → env-D-wtSupz.js} +2 -3
  297. package/dist/{error-diagnostics-Bm3JKYjz.js → error-diagnostics-CBtvqI30.js} +33 -22
  298. package/dist/{operation-definition-a5keEpCd.js → error-diagnostics-kKXseq8d.js} +11 -169
  299. package/dist/error-diagnostics.ts +33 -23
  300. package/dist/{optional-owners-BNA2OX6z.js → features-BXRKlmtN.js} +57 -345
  301. package/dist/features-CD5i5I8V.js +1 -0
  302. package/dist/{format-BOYlanIZ.js → format-Df-bS4Ly.js} +1 -2
  303. package/dist/gateways/testing.d.ts +1 -0
  304. package/dist/gateways/testing.js +2 -0
  305. package/dist/github-login-W-vaahWP.js +6 -0
  306. package/dist/{host-CkL0jjBq.js → host-DeNPYIeV.js} +1 -2
  307. package/dist/{http-error-Bs6e8_-8.js → http-error-BorAxJYM.js} +1 -2
  308. package/dist/index.d.ts +2 -8
  309. package/dist/index.js +5 -6
  310. package/dist/inspect-CWwAuL-B.js +47 -0
  311. package/dist/internal/agent-invocations-libsql.js +1 -2
  312. package/dist/internal/disabled-redis-driver.d.ts +1 -3
  313. package/dist/internal/disabled-redis-driver.js +2 -3
  314. package/dist/internal/disabled-upstash-driver.d.ts +1 -3
  315. package/dist/internal/disabled-upstash-driver.js +2 -3
  316. package/dist/internal/test-loader.d.ts +1 -3
  317. package/dist/internal/test-loader.js +2 -3
  318. package/dist/internal/test-server.js +2 -3
  319. package/dist/{internal-BreyUsQ6.js → internal-0C_CC601.js} +1 -2
  320. package/dist/{internal-CO4OqqaS.d.ts → internal-CKocv79I.d.ts} +3 -7
  321. package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
  322. package/dist/{invocation-page-undo-DIZ-s3xT.js → invocation-page-undo-BEi-rO0Q.js} +5 -6
  323. package/dist/{invocations-CK_-G540.js → invocations-8NThe8Bx.js} +5 -6
  324. package/dist/{limits-BUlwWYQE.js → limits-BLo31qDR.js} +1 -2
  325. package/dist/logs/client.d.ts +19 -0
  326. package/dist/logs/client.js +11 -0
  327. package/dist/logs/host.d.ts +2 -4
  328. package/dist/logs/host.js +1 -2
  329. package/dist/logs/memory.d.ts +1 -1
  330. package/dist/logs/memory.js +1 -2
  331. package/dist/logs/source.d.ts +1 -1
  332. package/dist/logs/source.js +1 -2
  333. package/dist/logs.d.ts +2 -2
  334. package/dist/logs.js +2 -2
  335. package/dist/{mcp-client-CTbTbn7d.js → mcp-client-Bkh-khvr.js} +1 -2
  336. package/dist/{mcp-client-By4zk0vU.js → mcp-client-DiObFpDS.js} +35 -22
  337. package/dist/{mcp-client-C_sEmyQw.d.ts → mcp-client-Q2XbUXuP.d.ts} +1 -4
  338. package/dist/{media-uKX4Wy-c.d.ts → media-C79RB1oH.d.ts} +0 -2
  339. package/dist/{media-BHpQ-4jw.js → media-CAKz9yrp.js} +8 -9
  340. package/dist/{media-library-NaOMBKWS.js → media-library-BDX89xXA.js} +5 -6
  341. package/dist/{media-library-D9ThbXqs.d.ts → media-library-DxGu6w9z.d.ts} +0 -2
  342. package/dist/{memory-DTmq-Z6x.js → memory-D3EJS_Bp.js} +21 -10
  343. package/dist/{memory-2bbl4hcV.d.ts → memory-GK5ZGWrp.d.ts} +1 -3
  344. package/dist/nuxt-server-auto-imports-4aT5BD4u.js +74 -0
  345. package/dist/{nuxt-server-imports-DH60Z7LA.js → nuxt-server-imports-BdJqiVhT.js} +10 -18
  346. package/dist/nuxt.d.ts +1 -3
  347. package/dist/nuxt.js +339 -189
  348. package/dist/{object-D8pRdprI.js → object-DRSmpe04.js} +1 -2
  349. package/dist/{operation-contributions-DpkO_iSU.d.ts → operation-contributions-BCcQVlGb.d.ts} +1 -3
  350. package/dist/{operation-contributions-BdS0z3tx.js → operation-contributions-D10pjkJF.js} +4 -5
  351. package/dist/operation-definition-DTpNvLd8.js +164 -0
  352. package/dist/{operation-registry-BogGwk_I.js → operation-registry-DfQbL7vE.js} +1 -2
  353. package/dist/{operation-rpc-DI9txNxK.js → operation-rpc-BMdfapja.js} +3 -4
  354. package/dist/{operations-EOdyctDc.js → operations-CD_mu_Ww.js} +86 -9
  355. package/dist/operations-D7ENc68Y.js +1 -0
  356. package/dist/{operations-B0689BG1.d.ts → operations-DgFhA1WE.d.ts} +8 -6
  357. package/dist/{operations-CWP9dF3i.js → operations-vRLiH7dh.js} +35 -46
  358. package/dist/optional-owners-DAfShdgV.js +353 -0
  359. package/dist/out-Cw5Tvr92.js +20989 -0
  360. package/dist/{owned-paths-BnjT0FhU.js → owned-paths-MjjDftBn.js} +1 -2
  361. package/dist/page/pill.iife.js +25 -27
  362. package/dist/{page-tool-CRCK1RHV.d.ts → page-tool-BUnUbuSy.d.ts} +6 -7
  363. package/dist/{page-tools-BkSSBFoi.js → page-tools-BQzwuAHD.js} +28 -12
  364. package/dist/{page-tools-sw4I-Nqx.d.ts → page-tools-UwsfvH-B.d.ts} +2 -4
  365. package/dist/{page-tools-shared-D3fFoEV2.js → page-tools-shared-hJcG_xk8.js} +8 -5
  366. package/dist/{inspect-CDw7e0vK.js → pathe.M-eThtNZ-D4EC7Wue.js} +2 -31
  367. package/dist/{plugins-BqAtIEX2.d.ts → plugins-BpiTVULl.d.ts} +252 -262
  368. package/dist/{plugins-B-DpgDPB.js → plugins-H6-MQrsn.js} +3483 -797
  369. package/dist/presets/workspace.js +1 -2
  370. package/dist/project-BxyyclTE.js +58 -0
  371. package/dist/{project-CufkVP1u.d.ts → project-DKBIHOf4.d.ts} +16 -4
  372. package/dist/{project-DlWTGB7h.js → project-DRC67Uiu.js} +1 -2
  373. package/dist/{project-link-D-6UefhA.js → project-link-CeS0T8Pr.js} +57 -9
  374. package/dist/{project-link-BuOzBH9f.d.ts → project-link-isfdRO3Q.d.ts} +42 -6
  375. package/dist/{project-root-v6ba4tn7.js → project-root-mAVQGZTX.js} +1 -2
  376. package/dist/project-session--GN7MduT.js +764 -0
  377. package/dist/{projects-CAcXztf4.js → projects-BRp0iseV.js} +1 -2
  378. package/dist/{projects-Ddvl9EJp.d.ts → projects-mgPxrKZr.d.ts} +0 -2
  379. package/dist/{registry-zw6aE2N9.js → registry-B8JE5NY-.js} +1 -2
  380. package/dist/{registry-CDKLACCZ.js → registry-CnPC-gNu.js} +1 -2
  381. package/dist/{request-D7h3SQ92.d.ts → request-BC_krbEr.d.ts} +2 -4
  382. package/dist/request-CJCPyu2B.d.ts +70 -0
  383. package/dist/{request-DbFfYmCu.js → request-CQ8TkHLh.js} +4 -5
  384. package/dist/{request-DE8w_cSM.js → request-Cl68STwT.js} +7 -8
  385. package/dist/request-origin-pzWr9UUu.js +37 -0
  386. package/dist/rolldown-runtime-DegdyBIC.js +25 -0
  387. package/dist/{route-query-CRVWXIrc.js → route-query-BWVl6ZO6.js} +4 -5
  388. package/dist/{rpc-DIUA61pv.js → rpc-D3tsx5lZ.js} +1 -2
  389. package/dist/{rpc-7nlHSv3y.d.ts → rpc-oijgKQtD.d.ts} +0 -2
  390. package/dist/{runtime-YLWfdrtO.js → runtime-CAbuQGMP.js} +3 -4
  391. package/dist/{runtime-DQuHg7OO.js → runtime-CRJsqVTa.js} +2 -3
  392. package/dist/{runtime-B_btezs1.d.ts → runtime-Cf8R1Ztr.d.ts} +0 -2
  393. package/dist/{runtime-DxfJOfCd.js → runtime-CyPZMiyK.js} +2 -3
  394. package/dist/{runtime-OsEDfbM9.js → runtime-F0CTqBFx.js} +5 -6
  395. package/dist/{runtime-feature-guard-B64MMW9I.js → runtime-feature-guard-DpUn4Oxc.js} +91 -10
  396. package/dist/scan-module-B1A24jqP.js +1 -0
  397. package/dist/{scan-module-Df58L_6T.js → scan-module-BfZvDBxb.js} +2 -4
  398. package/dist/{schema-form-C-fy3xaU.d.ts → schema-form-Bl79Bdm-.d.ts} +0 -2
  399. package/dist/{secret-Dy5uqvq9.js → secret-D2KL_o2h.js} +2 -3
  400. package/dist/{sections-Do7X4Nwt.d.ts → sections-0qrBvGbf.d.ts} +0 -4
  401. package/dist/{sections-C83x0slv.js → sections-BNTdIEJw.js} +2 -3
  402. package/dist/{sections-BogiCmtz.d.ts → sections-BTfWK14a.d.ts} +4 -6
  403. package/dist/{sections-DumoLKQN.js → sections-BiCOk9qP.js} +1 -2
  404. package/dist/sections-DAtgYMVz.d.ts +8 -0
  405. package/dist/{sections-et20h8w3.js → sections-HLxb9MrG.js} +14 -7
  406. package/dist/{sections.get-COiLcQ0P.d.ts → sections.get-CGmtYmfu.d.ts} +2 -4
  407. package/dist/seo/runtime.d.ts +2 -5
  408. package/dist/seo/runtime.js +3 -5
  409. package/dist/{seo-CtLywyRx.d.ts → seo-CgW5uI9L.d.ts} +0 -2
  410. package/dist/seo.d.ts +1 -1
  411. package/dist/seo.js +1 -2
  412. package/dist/{server-BRJE4t-W.js → server-DsOEa4_A.js} +5 -5
  413. package/dist/{setup-ZbA1by7W.d.ts → setup-Ca7jtBLS.d.ts} +8 -7
  414. package/dist/{setup-C-5nB7aY.js → setup-DQz_i-ee.js} +16 -5
  415. package/dist/{site-access-BmE8HGxs.js → site-access-1JIQjY11.js} +16 -16
  416. package/dist/{site-access-DxfdOel1.d.ts → site-access-CUXIbbbR.d.ts} +0 -2
  417. package/dist/{site-access-BycrwM2v.js → site-access-CmaZ-oaL.js} +1 -2
  418. package/dist/site-access-Cvmjb6aw.js +1 -0
  419. package/dist/{site-session-odJq1dYa.js → site-session-D36fr7Wf.js} +65 -40
  420. package/dist/skills/operations.d.ts +1 -5
  421. package/dist/skills/operations.js +4 -5
  422. package/dist/skills/vitehub/SKILL.md +142 -0
  423. package/dist/skills/vitehub/agents/openai.yaml +4 -0
  424. package/dist/skills/vitehub/references/agent-definitions.md +36 -0
  425. package/dist/skills/vitehub/references/bundle.md +57 -0
  426. package/dist/skills/vitehub/references/capabilities-authority.md +30 -0
  427. package/dist/skills/vitehub/references/channels-triggers.md +27 -0
  428. package/dist/skills/vitehub/references/framework-composition.md +29 -0
  429. package/dist/skills/vitehub/references/preview-contract.md +44 -0
  430. package/dist/skills/vitehub/references/primitives/auth.md +14 -0
  431. package/dist/skills/vitehub/references/primitives/blob.md +13 -0
  432. package/dist/skills/vitehub/references/primitives/browser.md +17 -0
  433. package/dist/skills/vitehub/references/primitives/cache.md +13 -0
  434. package/dist/skills/vitehub/references/primitives/channels.md +11 -0
  435. package/dist/skills/vitehub/references/primitives/connections.md +14 -0
  436. package/dist/skills/vitehub/references/primitives/content.md +13 -0
  437. package/dist/skills/vitehub/references/primitives/database.md +15 -0
  438. package/dist/skills/vitehub/references/primitives/email.md +11 -0
  439. package/dist/skills/vitehub/references/primitives/env.md +13 -0
  440. package/dist/skills/vitehub/references/primitives/kv.md +13 -0
  441. package/dist/skills/vitehub/references/primitives/markdown-template.md +13 -0
  442. package/dist/skills/vitehub/references/primitives/queue.md +14 -0
  443. package/dist/skills/vitehub/references/primitives/rate-limit.md +11 -0
  444. package/dist/skills/vitehub/references/primitives/realtime.md +19 -0
  445. package/dist/skills/vitehub/references/primitives/sandbox-task.md +11 -0
  446. package/dist/skills/vitehub/references/primitives/sandbox.md +13 -0
  447. package/dist/skills/vitehub/references/primitives/schedule.md +11 -0
  448. package/dist/skills/vitehub/references/primitives/shell.md +11 -0
  449. package/dist/skills/vitehub/references/primitives/source.md +11 -0
  450. package/dist/skills/vitehub/references/primitives/workflow.md +11 -0
  451. package/dist/skills/vitehub/references/primitives/workspace.md +11 -0
  452. package/dist/skills/vitehub/references/project-patterns.md +19 -0
  453. package/dist/skills/vitehub/references/project-shapes.md +81 -0
  454. package/dist/skills/vitehub/references/proof-recovery.md +31 -0
  455. package/dist/skills/vitehub/references/sandboxes-hosts.md +26 -0
  456. package/dist/skills/vitehub/references/schedules-workflows-invocations.md +28 -0
  457. package/dist/skills/vitehub/references/server-primitives.md +39 -0
  458. package/dist/skills/vitehub/references/workspaces-sources-access.md +26 -0
  459. package/dist/{skills-DdpSMiCI.js → skills-C1MaGEbO.js} +1 -2
  460. package/dist/skills.d.ts +1 -2
  461. package/dist/{skills.get-Bl8cBe8u.js → skills.get-DAooGWy5.js} +3 -4
  462. package/dist/skills.js +1 -2
  463. package/dist/{source-D4wWtoHh.js → source-DYFndd0W.js} +2 -3
  464. package/dist/{source-S-LChQvw.d.ts → source-DemBtwla.d.ts} +0 -2
  465. package/dist/{stored-Dhv2qsQv.js → stored-J3TetMKf.js} +1 -2
  466. package/dist/task/operations.d.ts +1 -5
  467. package/dist/task/operations.js +3 -4
  468. package/dist/test/register.js +2 -3
  469. package/dist/test.d.ts +0 -4
  470. package/dist/test.js +1 -2
  471. package/dist/{ticket-Pr_8ZtXW.d.ts → ticket-BFWwevWN.d.ts} +0 -2
  472. package/dist/{ticket-Cudn1dq3.js → ticket-BwsnryuU.js} +2 -3
  473. package/dist/{tickets-C_0Fhc00.js → tickets-Cj9_y3gw.js} +14 -16
  474. package/dist/ui/motion/core.d.ts +1 -0
  475. package/dist/ui/motion/core.js +2 -0
  476. package/dist/ui/motion.d.ts +1 -0
  477. package/dist/ui/motion.js +2 -0
  478. package/dist/ui/vite.js +1 -2
  479. package/dist/{usage-CoQXs5nW.d.ts → usage-BduF04ks.d.ts} +0 -2
  480. package/dist/{usage-B4taNt4a.js → usage-ZV3TBMzE.js} +6 -5
  481. package/dist/{usage-index-BsGAFzyq.js → usage-index-CR_xTrXO.js} +3 -4
  482. package/dist/{version-DNmSsk5r.js → version-CAhBr673.js} +59 -21
  483. package/dist/{vite-stage-mmtwQIMA.js → vite-stage-Dmo4RgnK.js} +32 -8
  484. package/dist/{vue-router-C68IU1jM.d.ts → vue-router-plZJLlpm.d.ts} +120 -182
  485. package/dist/workspace/blob-database/postgres.d.ts +1 -0
  486. package/dist/workspace/blob-database/postgres.js +2 -0
  487. package/dist/{workspace-history-CraoERnc.js → workspace-history-B52xib2J.js} +3 -4
  488. package/dist/{workspace-history-CeVwBB6Q.d.ts → workspace-history-WuxgLsi4.d.ts} +0 -2
  489. package/package.json +190 -149
  490. package/dist/agents-BoWau_ei.js +0 -2
  491. package/dist/cli-config-UAGTmuFa.js +0 -2
  492. package/dist/console/runtime/server/page-session.d.ts +0 -2
  493. package/dist/console/runtime/server/page-session.js +0 -5
  494. package/dist/console-lazy-views-DXnIkdyd.js +0 -2
  495. package/dist/operations-CAQmIxGK.js +0 -2
  496. package/dist/project-C4N_Zcjl.js +0 -30
  497. package/dist/request-origin-Bq7mDQG9.js +0 -23
  498. package/dist/scan-module-D_3X08mj.js +0 -2
  499. package/dist/sections-CyrXbbkG.d.ts +0 -10
  500. package/dist/site-access-BbJUe5QI.js +0 -2
  501. /package/dist/{agent/channels.d.ts → channels/adapters.d.ts} +0 -0
  502. /package/dist/{agent/channels.js → channels/adapters.js} +0 -0
@@ -1,10 +1,10 @@
1
- import { a as parseConsoleDocumentSetup } from "./definitions-BW6SvmMM.js";
2
- import { n as consoleState } from "./internal-BreyUsQ6.js";
3
- import { h as withConsoleAccess, p as readConsoleAccessUser } from "./access-BDST818p.js";
4
- import { a as consoleRequestJSON, i as consoleRequestError, o as consoleRequestURL, t as assertConsoleRequest } from "./request-DbFfYmCu.js";
5
- import { i as maximumConsoleDocumentRequestBytes, n as consoleDocumentActionNames } from "./limits-BUlwWYQE.js";
6
- import { r as getConsoleSections } from "./sections-C83x0slv.js";
7
- //#region src/console/runtime/server/documents.ts
1
+ import { n as consoleState } from "./internal-0C_CC601.js";
2
+ import { h as withConsoleAccess, p as readConsoleAccessUser } from "./access-BBHk9b5P.js";
3
+ import { a as consoleRequestJSON, i as consoleRequestError, o as consoleRequestURL, t as assertConsoleRequest } from "./request-CQ8TkHLh.js";
4
+ import { r as getConsoleSections } from "./sections-BNTdIEJw.js";
5
+ import { a as parseConsoleDocumentSetup } from "./definitions-BFYqXchw.js";
6
+ import { i as maximumConsoleDocumentRequestBytes, n as consoleDocumentActionNames } from "./limits-BLo31qDR.js";
7
+ // src/console/runtime/server/documents.ts
8
8
  const actionFailureKey = Symbol.for("vitehub.console.action-failure");
9
9
  const sectionModulesKey = Symbol.for("vitehub.console.section-modules");
10
10
  function readActionFailure(error) {
@@ -132,5 +132,4 @@ async function issueConsoleDocumentPreview(context, input) {
132
132
  section: input.section
133
133
  });
134
134
  }
135
- //#endregion
136
135
  export { issueConsoleDocumentPreview as a, runConsoleDocumentAction as c, installConsoleDocuments as i, consoleDocumentActionContext as n, loadConsoleDocumentActions as o, guardedHandler as r, readConsoleDocumentSection as s, consoleActionError as t };
@@ -1,7 +1,7 @@
1
- import { d as requestConsoleOperation, t as ConsoleRequestError, u as requestConsole } from "./request-DE8w_cSM.js";
2
- import { p as dayLabel } from "./format-BOYlanIZ.js";
3
- import { t as consoleQueryText } from "./route-query-CRVWXIrc.js";
4
- //#region src/console/runtime/client/documents.ts
1
+ import { d as requestConsoleOperation, t as ConsoleRequestError, u as requestConsole } from "./request-Cl68STwT.js";
2
+ import { t as consoleQueryText } from "./route-query-BWVl6ZO6.js";
3
+ import { p as dayLabel } from "./format-Df-bS4Ly.js";
4
+ // src/console/runtime/client/documents.ts
5
5
  const consoleDocumentStates = [
6
6
  "draft",
7
7
  "changed",
@@ -543,5 +543,4 @@ function consoleTruncate(value, length) {
543
543
  const space = cut.lastIndexOf(" ");
544
544
  return `${(space > length * .6 ? cut.slice(0, space) : value.slice(0, length)).trimEnd()}…`;
545
545
  }
546
- //#endregion
547
546
  export { consoleTranslationLabel as A, stableConsoleJSON as B, consolePublishMismatches as C, consoleSeoFallbacks as D, consoleRevisionTone as E, groupConsoleRevisions as F, isConsoleConflict as I, isConsoleDocumentId as L, consoleTruncate as M, createConsoleDocumentsClient as N, consoleSeoField as O, groupConsoleRevisionRuns as P, parseConsoleListQuery as R, consoleLocaleName as S, consoleRevisionLabel as T, consoleInvalidDocument as _, consoleDocumentScheduleTone as a, consoleListQueryFor as b, consoleDocumentStateLabel as c, consoleErrorMessage as d, consoleFieldIssues as f, consoleImageUrl as g, consoleHintText as h, consoleDocumentScheduleLabel as i, consoleTranslationsToDo as j, consoleSingularLabel as k, consoleDocumentStates as l, consoleHintParts as m, consoleDocumentHasBody as n, consoleDocumentSlug as o, consoleFixFieldsLabel as p, consoleDocumentScheduleHint as r, consoleDocumentStateColor as s, consoleDocumentFolders as t, consoleDocumentText as u, consoleLeaseHolder as v, consolePublishedConflicts as w, consoleLocalScheduleTime as x, consoleListQuery as y, rememberConsoleListQuery as z };
@@ -1,7 +1,6 @@
1
- import { a as ConsoleDocumentCollection, c as ConsoleDocumentSetup } from "./definitions-DB4LbZ7T.js";
2
- import { t as ConsoleFieldIssue } from "./schema-form-C-fy3xaU.js";
3
- import { t as ConsoleTicketLink } from "./ticket-Pr_8ZtXW.js";
4
- //#region src/console/runtime/client/documents.d.ts
1
+ import { a as ConsoleDocumentCollection, c as ConsoleDocumentSetup } from "./definitions-ChvMnA1L.js";
2
+ import { t as ConsoleFieldIssue } from "./schema-form-Bl79Bdm-.js";
3
+ import { t as ConsoleTicketLink } from "./ticket-BFWwevWN.js";
5
4
  type ConsoleDocumentState = "draft" | "published" | "changed" | "deleted";
6
5
  declare const consoleDocumentStates: readonly ConsoleDocumentState[];
7
6
  /** `overdue`: past its time without a run. `failed`: a draft changed after scheduling, so nothing was published. */
@@ -470,5 +469,4 @@ declare function consoleSeoFallbacks(data: Record<string, unknown>, titleField:
470
469
  declare function consoleImageUrl(image: unknown): string | undefined;
471
470
  /** Text cut to a length on a word boundary with an ellipsis, as search results show it. */
472
471
  declare function consoleTruncate(value: string, length: number): string;
473
- //#endregion
474
472
  export { consoleInvalidDocument as $, ConsoleListState as A, consoleDocumentScheduleLabel as B, ConsoleDocumentSessionAction as C, ConsoleDocumentSummary as D, ConsoleDocumentState as E, ConsoleSeoFallbacks as F, consoleDocumentStates as G, consoleDocumentSlug as H, ConsoleSeoHint as I, consoleFieldIssues as J, consoleDocumentText as K, consoleDocumentFolders as L, ConsolePublishMismatch as M, ConsoleRawDocument as N, ConsoleDocumentTranslationState as O, ConsoleRevisionRun as P, consoleImageUrl as Q, consoleDocumentHasBody as R, ConsoleDocumentSession as S, stableConsoleJSON as St, ConsoleDocumentSessions as T, consoleDocumentStateColor as U, consoleDocumentScheduleTone as V, consoleDocumentStateLabel as W, consoleHintParts as X, consoleFixFieldsLabel as Y, consoleHintText as Z, ConsoleDocumentSchedule as _, groupConsoleRevisions as _t, ConsoleDocumentFolder as a, consolePublishMismatches as at, ConsoleDocumentScheduledChange as b, parseConsoleListQuery as bt, ConsoleDocumentOverview as c, consoleRevisionTone as ct, ConsoleDocumentPendingChange as d, consoleSingularLabel as dt, consoleLeaseHolder as et, ConsoleDocumentPresence as f, consoleTranslationLabel as ft, ConsoleDocumentRevision as g, groupConsoleRevisionRuns as gt, ConsoleDocumentPublished as h, createConsoleDocumentsClient as ht, ConsoleDocumentConflict as i, consoleLocaleName as it, ConsoleListView as j, ConsoleDocumentsClient as k, ConsoleDocumentOverviewCollection as l, consoleSeoFallbacks as lt, ConsoleDocumentPublishExpectation as m, consoleTruncate as mt, ConsoleDocumentActivity as n, consoleListQueryFor as nt, ConsoleDocumentFormat as o, consolePublishedConflicts as ot, ConsoleDocumentPreview as p, consoleTranslationsToDo as pt, consoleErrorMessage as q, ConsoleDocumentChange as r, consoleLocalScheduleTime as rt, ConsoleDocumentListQuery as s, consoleRevisionLabel as st, ConsoleDocument as t, consoleListQuery as tt, ConsoleDocumentPage as u, consoleSeoField as ut, ConsoleDocumentScheduleStatus as v, isConsoleConflict as vt, ConsoleDocumentSessionUser as w, ConsoleDocumentSearchResult as x, rememberConsoleListQuery as xt, ConsoleDocumentScheduled as y, isConsoleDocumentId as yt, consoleDocumentScheduleHint as z };
@@ -1,14 +1,11 @@
1
- import { a as ConsoleDocumentCollection, c as ConsoleDocumentSetup } from "./definitions-DB4LbZ7T.js";
2
- import { t as ConsoleRequestEvent } from "./request-D7h3SQ92.js";
3
- import { o as ConsoleAccess, s as ConsoleAccessRoute } from "./access-policy-CGXhO3Ee.js";
4
- import { s as ConsoleTicket } from "./auth-BZOy7obk.js";
5
- //#region src/console/runtime/server/limits.d.ts
1
+ import { o as ConsoleAccess, s as ConsoleAccessRoute } from "./access-policy-CUbJLvlR.js";
2
+ import { a as ConsoleDocumentCollection, c as ConsoleDocumentSetup } from "./definitions-ChvMnA1L.js";
3
+ import { t as ConsoleRequestEvent } from "./request-BC_krbEr.js";
4
+ import { s as ConsoleTicket } from "./auth-CeKxL2xp.js";
6
5
  /** Bodies carry a whole Markdown document, so they may exceed the ordinary Console request limit. */
7
6
  declare const maximumConsoleDocumentRequestBytes: number;
8
7
  /** The document actions that one Console request may call. It mirrors `ViteHubConsoleDocumentActionName`. */
9
8
  declare const consoleDocumentActionNames: readonly ["get", "list", "overview", "preview", "publish", "raw", "references", "remove", "resolve", "restore", "revisions", "save", "schedule", "search", "session", "sessions", "unschedule"];
10
- //#endregion
11
- //#region src/console/runtime/server/documents.d.ts
12
9
  type ConsoleDocumentActionName = (typeof consoleDocumentActionNames)[number];
13
10
  interface ConsoleDocumentActionContext {
14
11
  user: Record<string, unknown> | null;
@@ -83,5 +80,4 @@ declare function issueConsoleDocumentPreview(context: {
83
80
  id: string;
84
81
  section: string;
85
82
  }): Promise<ConsoleTicket>;
86
- //#endregion
87
83
  export { ConsoleDocumentEditors as a, consoleDocumentActionContext as c, issueConsoleDocumentPreview as d, loadConsoleDocumentActions as f, maximumConsoleDocumentRequestBytes as g, consoleDocumentActionNames as h, ConsoleDocumentEditorInstall as i, guardedHandler as l, runConsoleDocumentAction as m, ConsoleDocumentActionName as n, ConsoleMediaAccess as o, readConsoleDocumentSection as p, ConsoleDocumentActions as r, consoleActionError as s, ConsoleDocumentActionContext as t, installConsoleDocuments as u };
@@ -1,5 +1,3 @@
1
- import { n as AnyOperation } from "../operations-B0689BG1.js";
2
- //#region src/durability/operations.d.ts
1
+ import { n as AnyOperation } from "../operations-DgFhA1WE.js";
3
2
  /** The `durability.*` operations. `vitehub durability list`, the Console, and agents run them. */
4
- export declare const durabilityOperations: readonly AnyOperation[];
5
- //#endregion
3
+ export declare const durabilityOperations: readonly AnyOperation[];
@@ -1,8 +1,8 @@
1
- import { t as viteHubErrorDiagnostics } from "../error-diagnostics-Bm3JKYjz.js";
2
- import { t as defineOperation } from "../operation-definition-a5keEpCd.js";
1
+ import { t as defineOperation } from "../operation-definition-DTpNvLd8.js";
2
+ import { t as viteHubErrorDiagnostics } from "../error-diagnostics-CBtvqI30.js";
3
3
  import * as v from "valibot";
4
4
  import { formatDurabilityTable, getDurabilityReport } from "@vite-hub/runtime/durability";
5
- //#region src/durability/operations.ts
5
+ // src/durability/operations.ts
6
6
  function format(report) {
7
7
  const lines = [`${report.instances} instance${report.instances === 1 ? "" : "s"} (${report.instancesSource})`];
8
8
  if (report.primitives.length) lines.push(formatDurabilityTable(report.primitives));
@@ -24,5 +24,4 @@ const durabilityOperations = [defineOperation({
24
24
  section: "durability",
25
25
  user: false
26
26
  })];
27
- //#endregion
28
27
  export { durabilityOperations };
@@ -0,0 +1 @@
1
+ export * from "@vite-hub/email/vue";
@@ -0,0 +1,2 @@
1
+ export * from "@vite-hub/email/vue";
2
+ export {};
@@ -1,5 +1,5 @@
1
- import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
2
- import { t as redactInspectionText } from "./inspect-CDw7e0vK.js";
1
+ import { n as redactInspectionText } from "./inspect-CWwAuL-B.js";
2
+ import { t as viteHubErrorDiagnostics } from "./error-diagnostics-CBtvqI30.js";
3
3
  /** Largest number of entries that one `cache.delete` with a prefix removes. Run it again to remove more. */
4
4
  const cacheMaximumDeleteCount = 1e3;
5
5
  /** `cache.get` cuts the value text at this size. */
@@ -138,5 +138,4 @@ async function deleteCacheEntries(storage, input) {
138
138
  prefix
139
139
  };
140
140
  }
141
- //#endregion
142
141
  export { getCacheEntry as n, listCacheEntries as r, deleteCacheEntries as t };
@@ -1,5 +1,5 @@
1
- import { n as consoleState } from "./internal-BreyUsQ6.js";
2
- //#region src/console/runtime/server/env.ts
1
+ import { n as consoleState } from "./internal-0C_CC601.js";
2
+ // src/console/runtime/server/env.ts
3
3
  /** Keeps the Server Env declarations for `env.get`. The `env.inspect` operation of Env reads their status. */
4
4
  function installConsoleEnv(projectRoot, description) {
5
5
  return consoleState().env = { ...description };
@@ -7,5 +7,4 @@ function installConsoleEnv(projectRoot, description) {
7
7
  function getConsoleEnv() {
8
8
  return { entries: consoleState().env?.entries ?? [] };
9
9
  }
10
- //#endregion
11
10
  export { installConsoleEnv as n, getConsoleEnv as t };
@@ -1,5 +1,5 @@
1
1
  import { defineDiagnostics } from "nostics";
2
- //#region src/error-diagnostics.ts
2
+ // src/error-diagnostics.ts
3
3
  const dynamicError = { why: ({ message }) => message === void 0 ? "" : String(message) };
4
4
  const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
5
5
  docsBase: "https://vitehub.dev/docs/development/diagnostics",
@@ -76,6 +76,14 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
76
76
  ...dynamicError,
77
77
  fix: "Pass non-empty strings to `tags` and `invalidateTag()`, for example `[\"posts\", \"post:1\"]`."
78
78
  },
79
+ VITE_HUB_CLOUDFLARE_EXPORT_CONFLICT: {
80
+ why: ({ file, names }) => `${file} exports ${names}, but the Worker entry already has an export of that name. The default export of the entry is the app.`,
81
+ fix: "Export each Durable Object, Workflow, or `WorkerEntrypoint` class from `server/cloudflare.ts` with a named export that no other export of the Worker uses, such as `export class Counter extends DurableObject {}`. Remove a default export."
82
+ },
83
+ VITE_HUB_CLOUDFLARE_RESOURCE_MISSING: {
84
+ why: ({ file, resources }) => `${file} lacks ${resources}. ViteHub generates these resources for this build, and the Worker fails when code first reads a missing one.`,
85
+ fix: "Check the project Wrangler config and any Nitro hook or module that edits `cloudflare.wrangler` for a step that drops or renames the entry, and remove that step. Run `vitehub inspect resources` to list the resources and their names."
86
+ },
79
87
  VITE_HUB_DEFINITION_PACKAGE_MISSING: {
80
88
  why: ({ definitions, packages }) => `${definitions}, but the app does not have ${packages}.`,
81
89
  fix: ({ install, off }) => `Run \`pnpm add ${install}\` in your app. To keep the feature off, set ${off} in the ViteHub options.`
@@ -96,6 +104,14 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
96
104
  why: ({ os, packages }) => `The build ran on ${os}, so these native packages in \`.output\` hold ${os} code: ${packages}. The Linux image of \`.output/Dockerfile\` cannot load them.`,
97
105
  fix: "Install dependencies and build the app in the Linux Node image for the target CPU. Use that same base for the generated Dockerfile with `docker build --build-arg VITEHUB_NODE_IMAGE=<image>`. Or set `docker: false` in `vitehub()` and use a Dockerfile with compatible build and runtime stages."
98
106
  },
107
+ VITE_HUB_HEALTH_CHECK_DISABLED: {
108
+ why: ({ check }) => `\`health.checks\` lists "${check}", but the app does not turn on \`${check}\` in \`vitehub()\`, so the health route has nothing to check.`,
109
+ fix: ({ check }) => `Remove "${check}" from \`health.checks\`, or turn on \`${check}\` in \`vitehub()\`.`
110
+ },
111
+ VITE_HUB_HEALTH_CHECK_INVALID: {
112
+ why: ({ check }) => `\`health.checks\` lists ${JSON.stringify(check)}, which is not a health check name.`,
113
+ fix: "Use only \"database\", \"kv\", and \"blob\" in `health.checks`."
114
+ },
99
115
  VITE_HUB_HOST_PROVIDER_CONFLICT: {
100
116
  why: ({ detected, host, variable }) => `\`vitehub({ host: "${host}" })\` builds ${host} output, but \`${variable}\` is set, so this build runs on the ${detected} host, which cannot run ${host} output.`,
101
117
  fix: ({ host }) => `Remove \`host\` from \`vitehub()\` to build for the host that the environment names. To build ${host} output on purpose, set \`VITEHUB_HOST=${host}\`.`
@@ -108,6 +124,10 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
108
124
  why: ({ installed }) => `${installed} ViteHub packages of another release do not work with this vite-hub. The app can build and then fail at runtime, or run the code of the other release.`,
109
125
  fix: ({ install }) => `Install the ViteHub packages of the same release as vite-hub: \`pnpm add ${install}\`. When pnpm \`overrides\`, \`resolutions\`, or the lockfile pin a @vite-hub package, change them to the same release too, then install again.`
110
126
  },
127
+ VITE_HUB_PEER_VERSION_UNSUPPORTED: {
128
+ why: ({ installed }) => `${installed} ViteHub imports modules that other versions do not have, so the build fails with a resolve error, such as \`drizzle-orm/libsql/codecs\` not exported.`,
129
+ fix: ({ install }) => `Install a supported version in your app: \`pnpm add ${install}\`. pnpm keeps a version that the lockfile or another dependency already has, even outside the peer range of vite-hub, and only warns. When pnpm \`overrides\` or \`resolutions\` pin the package, change them too, then install again.`
130
+ },
111
131
  VITE_HUB_PUBLIC_URL_INVALID: {
112
132
  why: ({ value }) => `\`publicUrl\` must be an http or https origin without a path, but it is ${value}.`,
113
133
  fix: "Set `vitehub({ publicUrl })` to an origin such as `https://shop.example.com`, with no path, query, or user name."
@@ -198,11 +218,11 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
198
218
  },
199
219
  VITE_HUB_R0113: {
200
220
  ...dynamicError,
201
- fix: "Pass an Agent name of at most 512 characters, as `vitehub agents list` shows it, to `--agent` of `vitehub agents status`."
221
+ fix: "Pass an Agent name of at most 512 characters with `vitehub agent get <name>`. Use `vitehub agent list` to find the name."
202
222
  },
203
223
  VITE_HUB_R0114: {
204
224
  ...dynamicError,
205
- fix: "Pass to `vitehub agents status --agent` the name of an Agent that `vitehub agents list` shows."
225
+ fix: "Pass to `vitehub agent get` the name of an Agent that `vitehub agent list` shows."
206
226
  },
207
227
  VITE_HUB_R0095: {
208
228
  ...dynamicError,
@@ -282,7 +302,7 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
282
302
  },
283
303
  VITE_HUB_R0046: {
284
304
  ...dynamicError,
285
- fix: "Change the `agents.invoke`, `invocations.cancel`, `invocations.delete`, or `invocations.undo` call as the message says, with an Agent from `vitehub agents list` and an Invocation id from `vitehub invocations list`. A 409 names what the app lacks for the action, such as Realtime for undo or an invocation store that can delete."
305
+ fix: "Change the `agents.invoke`, `invocations.cancel`, `invocations.delete`, or `invocations.undo` call as the message says, with an Agent from `vitehub agent list` and an Invocation id from `vitehub agent invocations list`. A 409 names what the app lacks for the action, such as Realtime for undo or an invocation store that can delete."
286
306
  },
287
307
  VITE_HUB_R0047: {
288
308
  ...dynamicError,
@@ -302,7 +322,7 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
302
322
  },
303
323
  VITE_HUB_C0001: {
304
324
  ...dynamicError,
305
- fix: "Pass a section that `vitehub project info` lists, or a Workspace, revision, and text file under 512 KiB that `vitehub workspaces files` lists. For a 502 or 503, read the app logs for the Workspace store, Env provider, or section reader that failed, then try again."
325
+ fix: "Pass a section that `vitehub project get` lists, or a Workspace, revision, and text file under 512 KiB that `vitehub workspaces files` lists. For a 502 or 503, read the app logs for the Workspace store, Env provider, or section reader that failed, then try again."
306
326
  },
307
327
  VITE_HUB_C0002: {
308
328
  ...dynamicError,
@@ -322,15 +342,15 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
322
342
  },
323
343
  VITE_HUB_R0053: {
324
344
  ...dynamicError,
325
- fix: "Pass an Agent name of at most 512 characters, as `vitehub agents list` shows it, to `--agent` of `vitehub invocations capabilities`."
345
+ fix: "Pass an Agent name of at most 512 characters, as `vitehub agent list` shows it, to `--agent` of `vitehub agent invocations capabilities`."
326
346
  },
327
347
  VITE_HUB_R0054: {
328
348
  ...dynamicError,
329
- fix: "Pass an Invocation id that `vitehub invocations list` shows. The journal removes old Invocations after its retention limit."
349
+ fix: "Pass an Invocation id that `vitehub agent invocations list` shows. The journal removes old Invocations after its retention limit."
330
350
  },
331
351
  VITE_HUB_R0058: {
332
352
  ...dynamicError,
333
- fix: "Pass the `cursor` of the last `vitehub invocations list` result without changes, or omit `cursor` to read the first page."
353
+ fix: "Pass the `cursor` from the previous `invocations.list` Console RPC result without changes, or omit `cursor` to read the first page."
334
354
  },
335
355
  VITE_HUB_R0059: {
336
356
  ...dynamicError,
@@ -338,15 +358,15 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
338
358
  },
339
359
  VITE_HUB_R0060: {
340
360
  ...dynamicError,
341
- fix: "Pass an Agent name of at most 512 characters, as `vitehub agents list` shows it, to `--agent` of `vitehub invocations list`."
361
+ fix: "Pass an Agent name of at most 512 characters, as `vitehub agent list` shows it, to `--agent` of `vitehub agent invocations list`."
342
362
  },
343
363
  VITE_HUB_R0061: {
344
364
  ...dynamicError,
345
- fix: "Pass `capability` and `triggeredBy` values of at most 512 characters to `invocations.list` (`vitehub invocations list`)."
365
+ fix: "Pass `capability` and `triggeredBy` values of at most 512 characters to `invocations.list` (`vitehub agent invocations list`)."
346
366
  },
347
367
  VITE_HUB_R0062: {
348
368
  ...dynamicError,
349
- fix: "Pass a whole number of 1 or more as `limit` to `invocations.list` (`vitehub invocations list --limit`)."
369
+ fix: "Pass a whole number of 1 or more as `limit` to `invocations.list` (`vitehub agent invocations list --limit`)."
350
370
  },
351
371
  VITE_HUB_R0063: {
352
372
  ...dynamicError,
@@ -354,7 +374,7 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
354
374
  },
355
375
  VITE_HUB_R0070: {
356
376
  ...dynamicError,
357
- fix: "Pass an Agent name of at most 512 characters, as `vitehub agents list` shows it, to `--agent` of `vitehub agent usage`."
377
+ fix: "Pass an Agent name of at most 512 characters, as `vitehub agent list` shows it, to `--agent` of `vitehub agent usage`."
358
378
  },
359
379
  VITE_HUB_R0071: {
360
380
  ...dynamicError,
@@ -440,10 +460,6 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
440
460
  ...dynamicError,
441
461
  fix: "Set `driver` for the production build, such as `email: { driver: \"resend\" }` in `vitehub()`. Use `driver: \"log\"` to send no email, or build for `host: \"cloudflare\"`."
442
462
  },
443
- VITE_HUB_B0008: {
444
- ...dynamicError,
445
- fix: "Remove one of the two auto-imports of this name from the Nuxt config or its modules, or rename one export."
446
- },
447
463
  VITE_HUB_B0009: {
448
464
  ...dynamicError,
449
465
  fix: "Remove `nitro.preset` or `vitehub.host` from nuxt.config.ts, or make them name the same host. Without `vitehub.host`, ViteHub takes the host from `nitro.preset`."
@@ -490,7 +506,7 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
490
506
  },
491
507
  VITE_HUB_B0023: {
492
508
  ...dynamicError,
493
- fix: "Upgrade to Nuxt 5, which supplies Nitro 3 and H3 2. Until Nuxt 5 is stable, run pnpm add nuxt@npm:nuxt-nightly@5x."
509
+ fix: "Follow the steps in the error message to run your Nuxt server with Nitro 3."
494
510
  },
495
511
  VITE_HUB_B0024: {
496
512
  ...dynamicError,
@@ -532,10 +548,6 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
532
548
  why: ({ subject }) => `${subject} is not valid JSON.`,
533
549
  fix: "Correct the JSON in the editor. Put strings and keys in double quotes, and remove a comma after the last item of an object or array."
534
550
  },
535
- VITE_HUB_CONSOLE_MCP_LIST_INCOMPLETE: {
536
- why: ({ reason }) => reason === "repeated-cursor" ? "The server returned a repeated pagination cursor. It could not finish the list." : "The server returned more than 1,000 pages. It could not finish the list.",
537
- fix: "Check the pagination of the MCP server: each page must return a new `nextCursor`, and a list must end within 1,000 pages."
538
- },
539
551
  VITE_HUB_CONSOLE_NUMBER_REQUIRED: {
540
552
  why: "Enter a number.",
541
553
  fix: "Enter a number in the field before you save it."
@@ -634,5 +646,4 @@ const viteHubErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
634
646
  }
635
647
  }
636
648
  });
637
- //#endregion
638
649
  export { viteHubErrorDiagnostics as t };
@@ -1,7 +1,5 @@
1
- import { r as isRecordOrFunction } from "./object-D8pRdprI.js";
2
1
  import { defineDiagnostics } from "nostics";
3
- import { toJsonSchema } from "@valibot/to-json-schema";
4
- //#region ../internal/src/error-diagnostics.ts
2
+ // ../internal/src/error-diagnostics.ts
5
3
  const dynamicError = { why: ({ message }) => message === void 0 ? "" : String(message) };
6
4
  const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
7
5
  docsBase: "https://vitehub.dev/docs/development/diagnostics",
@@ -27,7 +25,7 @@ const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
27
25
  why: ({ message }) => message === void 0 ? "" : String(message)
28
26
  },
29
27
  INTERNAL_R0022: {
30
- fix: "Send input that matches the schema of the operation. `vitehub <namespace> <command> --help` shows the fields.",
28
+ fix: "Send input that matches the schema of the operation. `vitehub <namespace> <command> --help` shows the fields, and the list_operations tool of the ViteHub MCP gives the input schema of each operation.",
31
29
  why: ({ message }) => message === void 0 ? "" : String(message)
32
30
  },
33
31
  INTERNAL_R0024: {
@@ -246,6 +244,10 @@ const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
246
244
  why: ({ owner }) => `[vitehub] ${owner} extends tuple requires [preset, options] with an options object.`,
247
245
  fix: "Set `extends` to a preset, or to a two-item tuple `[preset, { ...options }]` whose second item is a plain object."
248
246
  },
247
+ INTERNAL_RUNTIME_PACKAGE_VERSION_CONFLICT: {
248
+ why: ({ first, name, second }) => `[vitehub] One server function needs ${name} from two installations: ${first} and ${second}.`,
249
+ fix: "Install one version of the package that the message names, for example with `pnpm dedupe` or an `overrides` entry in `package.json`, then build again."
250
+ },
249
251
  INTERNAL_SECRET_PURPOSE_MISSING: {
250
252
  why: "[vitehub] A derived secret requires a purpose.",
251
253
  fix: "Pass a non-empty purpose to `deriveSecret()`, such as `deriveSecret(\"my-module:session\")`."
@@ -254,6 +256,10 @@ const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
254
256
  why: ({ minimum }) => `[vitehub] VITEHUB_SECRET must be at least ${minimum} characters. Generate one with \`openssl rand -base64 32\`.`,
255
257
  fix: "Set `VITEHUB_SECRET` to the output of `openssl rand -base64 32`, which has 44 characters."
256
258
  },
259
+ INTERNAL_SITE_TOKEN_TOO_LONG: {
260
+ why: ({ length, maximum }) => `The Site access token is ${length} characters, and an app accepts ${maximum}.`,
261
+ fix: "Open the app with a shorter path, or give the person and the project shorter names, so that the Site access token fits."
262
+ },
257
263
  INTERNAL_SQLITE_ARGUMENT_INVALID: {
258
264
  why: ({ value }) => value === "undefined" ? "undefined cannot be passed as argument to the database" : "Only finite numbers (not Infinity or NaN) can be passed as arguments",
259
265
  fix: "Pass query arguments as finite numbers, strings, booleans, bigints, dates, byte arrays, or null. Replace undefined with null, and check numbers with `Number.isFinite()` before the query."
@@ -268,168 +274,4 @@ const internalErrorDiagnostics = /*#__PURE__*/ defineDiagnostics({
268
274
  }
269
275
  }
270
276
  });
271
- //#endregion
272
- //#region ../internal/src/standard-schema.ts
273
- function readOwn(value, key) {
274
- if (value === null || Object(value) !== value) return;
275
- try {
276
- return Reflect.get(Object(value), key);
277
- } catch {
278
- return;
279
- }
280
- }
281
- /**
282
- * Read a Standard JSON Schema projection without throwing.
283
- *
284
- * Returns `undefined` when the schema has no `~standard.jsonSchema`, when the library cannot represent the type
285
- * (Zod throws for `Date`), or when the projection is not an object. Callers decide how to fall back.
286
- */
287
- function standardJsonSchema(schema, direction, target = "draft-2020-12", libraryOptions) {
288
- const jsonSchema = readOwn(readOwn(schema, "~standard"), "jsonSchema");
289
- const project = readOwn(jsonSchema, direction);
290
- if (typeof project !== "function") return;
291
- try {
292
- const result = project.call(jsonSchema, libraryOptions ? {
293
- target,
294
- libraryOptions
295
- } : { target });
296
- return isRecordOrFunction(result) ? result : void 0;
297
- } catch {
298
- return;
299
- }
300
- }
301
- //#endregion
302
- //#region ../internal/src/valibot.ts
303
- const valibotTargets = /* @__PURE__ */ new Set([
304
- "draft-07",
305
- "draft-2020-12",
306
- "openapi-3.0"
307
- ]);
308
- function isValibotTarget(value) {
309
- return valibotTargets.has(String(value));
310
- }
311
- /**
312
- * Add Standard JSON Schema conversion to a plain Valibot schema. Valibot schemas validate as Standard Schema but carry
313
- * no JSON Schema, so forms, tools, and model providers would get no shape for them. Other schemas, Valibot schemas that
314
- * already convert, and async Valibot schemas return unchanged. The copy keeps every Valibot property, so validation
315
- * does not change.
316
- *
317
- * `target` fixes the JSON Schema dialect. Without it, each conversion uses the dialect that the caller asks for.
318
- */
319
- function withValibotJsonSchema(schema, options = {}) {
320
- const standard = schema["~standard"];
321
- if (standard.vendor !== "valibot" || Reflect.get(schema, "async") === true) return schema;
322
- if (Object.hasOwn(standard, "jsonSchema") && standard.jsonSchema) return schema;
323
- const convert = (typeMode) => (request) => {
324
- const target = options.target ?? request.target;
325
- if (!isValibotTarget(target)) throw internalErrorDiagnostics.INTERNAL_VALIBOT_JSON_SCHEMA_TARGET_UNSUPPORTED({ target: String(target) });
326
- return toJsonSchema(schema, {
327
- target,
328
- typeMode,
329
- errorMode: "ignore"
330
- });
331
- };
332
- return {
333
- ...schema,
334
- "~standard": {
335
- ...standard,
336
- jsonSchema: {
337
- input: convert("input"),
338
- output: convert("output")
339
- }
340
- }
341
- };
342
- }
343
- //#endregion
344
- //#region ../internal/src/operation-definition.ts
345
- const nameFormat = /^[a-z][a-z0-9-]*\.[a-z][a-z0-9-]*$/;
346
- const kinds = /* @__PURE__ */ new Set([
347
- "read",
348
- "write",
349
- "destructive"
350
- ]);
351
- function invalidDefinition(name, reason) {
352
- return internalErrorDiagnostics.INTERNAL_R0020({ message: `[vitehub] Operation ${JSON.stringify(name)} is invalid: ${reason}` });
353
- }
354
- function checkDefinition(definition) {
355
- if (!isRecordOrFunction(definition)) throw invalidDefinition(void 0, "defineOperation() takes an object.");
356
- const { name } = definition;
357
- if (String(name) !== name || !nameFormat.test(name)) throw invalidDefinition(name, "the name must look like `section.verb`, in lower case.");
358
- if (String(definition.description) !== definition.description || !definition.description) throw invalidDefinition(name, "add a one sentence description.");
359
- const { section } = definition;
360
- if (section !== false && !(section instanceof Function) && !isSectionId(section)) throw invalidDefinition(name, "section must be a Console section id, a function, or false; section ids cannot contain ':'.");
361
- if (definition.scope !== void 0 && (!(definition.scope instanceof Function) || String(section) !== section)) throw invalidDefinition(name, "scope must be a function, and it needs a section id.");
362
- if (!kinds.has(String(definition.kind))) throw invalidDefinition(name, "kind must be \"read\", \"write\", or \"destructive\".");
363
- const input = definition.input;
364
- if (!isRecordOrFunction(input) || !isRecordOrFunction(input["~standard"]) || !(input["~standard"].validate instanceof Function)) throw invalidDefinition(name, "input must be a Standard Schema, such as a valibot object.");
365
- if (!(definition.run instanceof Function)) throw invalidDefinition(name, "run must be a function.");
366
- const { maxRequestBytes } = definition;
367
- if (maxRequestBytes !== void 0 && (!Number.isInteger(maxRequestBytes) || Number(maxRequestBytes) < 65536)) throw invalidDefinition(name, `maxRequestBytes can only raise the limit above ${defaultRequestBytes} bytes (64 KiB).`);
368
- if (definition.readOnlyWhen !== void 0 && !(definition.readOnlyWhen instanceof Function)) throw invalidDefinition(name, "readOnlyWhen must be a function.");
369
- const { mcp } = definition;
370
- if (mcp !== void 0 && mcp !== false && (!isRecordOrFunction(mcp) || mcp.title !== void 0 && (String(mcp.title) !== mcp.title || !mcp.title) || mcp.format !== void 0 && !(mcp.format instanceof Function))) throw invalidDefinition(name, "mcp must be false, or an object with a title string and a format function.");
371
- }
372
- /** The default limit of a call, in bytes. */
373
- const defaultRequestBytes = 65536;
374
- /** CLI namespaces owned by built-in commands. */
375
- const reservedOperationNamespaces = [
376
- "inspect",
377
- "provision",
378
- "seed",
379
- ...[
380
- "init",
381
- "add",
382
- "remove",
383
- "status",
384
- "catalog",
385
- "link",
386
- "unlink",
387
- "deploy",
388
- "deployments",
389
- "drain",
390
- "login",
391
- "logout",
392
- "update",
393
- "whoami"
394
- ]
395
- ];
396
- /** Input keys that the generated CLI commands read themselves. */
397
- const reservedOperationFlags = [
398
- "input",
399
- "json",
400
- "timeout",
401
- "url",
402
- "yes"
403
- ];
404
- /**
405
- * Define one operation. The Console, the CLI, MCP, and agent tools call the same definition. Contribute it with
406
- * `vitehub: { operations: [{ module, export }] }` on a Vite plugin.
407
- */
408
- function defineOperation(definition) {
409
- checkDefinition(definition);
410
- const defined = {
411
- ...definition,
412
- input: withValibotJsonSchema(definition.input)
413
- };
414
- const properties = operationInputJsonSchema(defined).properties;
415
- const clashes = isRecordOrFunction(properties) ? Object.keys(properties).filter((key) => reservedOperationFlags.includes(key)) : [];
416
- if (clashes.length) throw invalidDefinition(definition.name, `the input key ${clashes.map((key) => JSON.stringify(key)).join(", ")} is a CLI flag of every command (${reservedOperationFlags.join(", ")}). Rename it.`);
417
- return defined;
418
- }
419
- function isOperation(value) {
420
- try {
421
- checkDefinition(value);
422
- return true;
423
- } catch {
424
- return false;
425
- }
426
- }
427
- function isSectionId(section) {
428
- return typeof section === "string" && section !== "" && !section.includes(":");
429
- }
430
- /** JSON Schema of the input, for CLI flags and MCP tool schemas. Falls back to an open object. */
431
- function operationInputJsonSchema(operation) {
432
- return standardJsonSchema(operation.input, "input") ?? { type: "object" };
433
- }
434
- //#endregion
435
- export { reservedOperationNamespaces as a, isSectionId as i, invalidDefinition as n, internalErrorDiagnostics as o, isOperation as r, defineOperation as t };
277
+ export { internalErrorDiagnostics as t };