vite-hub 0.5.1 → 0.6.0

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 (346) hide show
  1. package/README.md +9 -8
  2. package/dist/{access-BBHk9b5P.js → access-CUFHPi8T.js} +9 -133
  3. package/dist/{access-policy-CUbJLvlR.d.ts → access-DkBck8Vu.d.ts} +16 -16
  4. package/dist/{account-CoAO1F8G.d.ts → account-DNr8fHcQ.d.ts} +1 -1
  5. package/dist/{console/runtime/server → agent/console}/agents.get.d.ts +1 -1
  6. package/dist/{console/runtime/server → agent/console}/agents.get.js +3 -3
  7. package/dist/{console/runtime/server → agent/console}/channel-replay.d.ts +2 -2
  8. package/dist/{console/runtime/server → agent/console}/channel-replay.js +6 -6
  9. package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.js +4 -4
  10. package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.d.ts +3 -3
  11. package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.js +6 -6
  12. package/dist/{console/runtime/server → agent/console}/invocation.get.d.ts +4 -4
  13. package/dist/{console/runtime/server → agent/console}/invocation.get.js +8 -8
  14. package/dist/{console/runtime/server → agent/console}/invocations.get.js +5 -5
  15. package/dist/{console/runtime/server/usage.get.d.ts → agent/console/invocations.usage.d.ts} +2 -4
  16. package/dist/agent/console/invocations.usage.js +51 -0
  17. package/dist/agent/console/operations.d.ts +6 -0
  18. package/dist/agent/console/operations.js +247 -0
  19. package/dist/{console/runtime/server → agent/console}/status.get.d.ts +2 -2
  20. package/dist/{console/runtime/server → agent/console}/status.get.js +6 -6
  21. package/dist/{server-DsOEa4_A.js → agent-console-CHsLxKk_.js} +3 -2
  22. package/dist/agent-console-FmaYpVv-.d.ts +14 -0
  23. package/dist/{agent-invocations.post-BAC1aHnG.js → agent-invocations.post-CF5anHY6.js} +8 -8
  24. package/dist/{agents-BClUWOj7.js → agents-DBm_PJie.js} +1 -1
  25. package/dist/{agents-Cz_uhhov.js → agents-DXLHsE7x.js} +2 -2
  26. package/dist/auth/console/auth.d.ts +25 -0
  27. package/dist/{console/runtime/server → auth/console}/auth.js +11 -12
  28. package/dist/auth/console/operations.d.ts +3 -0
  29. package/dist/auth/console/operations.js +135 -0
  30. package/dist/{auth-operations-arLIY2_2.js → auth-operations-BKqoX8Ua.js} +3 -3
  31. package/dist/{auth-types-B4mq4YhK.d.ts → auth-types-Cotn7406.d.ts} +4 -17
  32. package/dist/bin.js +3 -3
  33. package/dist/blob/console/operations.d.ts +3 -0
  34. package/dist/blob/console/operations.js +44 -0
  35. package/dist/{blob-eH6j0AQj.js → blob-iw8pWQ6o.js} +2 -2
  36. package/dist/{blob-_TtxDb-t.d.ts → blob-uNin0_TV.d.ts} +1 -1
  37. package/dist/cache/operations.js +1 -1
  38. package/dist/console/auth-types.d.ts +2 -2
  39. package/dist/console/auth.d.ts +2 -2
  40. package/dist/console/runtime/auth-operations.d.ts +3 -3
  41. package/dist/console/runtime/auth-operations.js +1 -1
  42. package/dist/console/runtime/client/account.d.ts +1 -1
  43. package/dist/console/runtime/client/account.js +2 -2
  44. package/dist/console/runtime/client/auth-management.ts +6 -6
  45. package/dist/console/runtime/client/blob-media.js +2 -2
  46. package/dist/console/runtime/client/comment-thread.js +1 -1
  47. package/dist/console/runtime/client/content-heads.js +1 -1
  48. package/dist/console/runtime/client/documents.d.ts +1 -1
  49. package/dist/console/runtime/client/documents.js +1 -1
  50. package/dist/console/runtime/client/invocation.js +1 -1
  51. package/dist/console/runtime/client/live.d.ts +1 -1
  52. package/dist/console/runtime/client/mcp-client.d.ts +4 -4
  53. package/dist/console/runtime/client/mcp-client.js +4 -6
  54. package/dist/console/runtime/client/media-library.js +1 -1
  55. package/dist/console/runtime/client/media-uploads.js +1 -1
  56. package/dist/console/runtime/client/operation-view.js +1 -1
  57. package/dist/console/runtime/client/presence.d.ts +1 -1
  58. package/dist/console/runtime/client/problem.d.ts +1 -1
  59. package/dist/console/runtime/client/problem.js +2 -2
  60. package/dist/console/runtime/client/project-link.d.ts +1 -1
  61. package/dist/console/runtime/client/project-link.js +1 -1
  62. package/dist/console/runtime/client/project-session.d.ts +2 -2
  63. package/dist/console/runtime/client/project-session.js +1 -1
  64. package/dist/console/runtime/client/publish.d.ts +1 -1
  65. package/dist/console/runtime/client/rate-limit.js +1 -1
  66. package/dist/console/runtime/client/read-only.d.ts +1 -1
  67. package/dist/console/runtime/client/read-only.js +1 -1
  68. package/dist/console/runtime/client/request.d.ts +2 -2
  69. package/dist/console/runtime/client/request.js +1 -1
  70. package/dist/console/runtime/client/schedule-run.js +1 -1
  71. package/dist/console/runtime/client/sections.d.ts +1 -1
  72. package/dist/console/runtime/client/sections.js +1 -1
  73. package/dist/console/runtime/client/site-access.d.ts +48 -9
  74. package/dist/console/runtime/client/site-access.js +18 -11
  75. package/dist/console/runtime/client/site-link.d.ts +2 -0
  76. package/dist/console/runtime/client/site-link.js +1 -0
  77. package/dist/console/runtime/client/workflow.js +1 -1
  78. package/dist/console/runtime/components/console-auth-detail.vue +1 -1
  79. package/dist/console/runtime/components/console-auth-event-list.vue +1 -0
  80. package/dist/console/runtime/components/console-document-editor.vue +3 -4
  81. package/dist/console/runtime/components/console-usage.vue +2 -2
  82. package/dist/console/runtime/diagnostics.ts +14 -56
  83. package/dist/console/runtime/mcp-client.d.ts +2 -2
  84. package/dist/console/runtime/mcp-client.js +1 -1
  85. package/dist/console/runtime/operation-loader.d.ts +1 -0
  86. package/dist/console/runtime/operation-loader.js +10 -0
  87. package/dist/console/runtime/page-tool/page-tool.js +2 -2
  88. package/dist/console/runtime/sections.d.ts +2 -2
  89. package/dist/console/runtime/sections.js +1 -1
  90. package/dist/console/runtime/server/access-policy.d.ts +1 -1
  91. package/dist/console/runtime/server/agent-console.d.ts +2 -0
  92. package/dist/console/runtime/server/agent-console.js +1 -0
  93. package/dist/console/runtime/server/blob.d.ts +1 -1
  94. package/dist/console/runtime/server/blob.js +1 -1
  95. package/dist/console/runtime/server/database.d.ts +1 -1
  96. package/dist/console/runtime/server/definitions.get.d.ts +2 -2
  97. package/dist/console/runtime/server/definitions.get.js +2 -2
  98. package/dist/console/runtime/server/definitions.js +1 -1
  99. package/dist/console/runtime/server/documents.d.ts +2 -2
  100. package/dist/console/runtime/server/documents.js +2 -2
  101. package/dist/console/runtime/server/entry-site-access.d.ts +3 -0
  102. package/dist/console/runtime/server/entry-site-access.js +4 -0
  103. package/dist/console/runtime/server/entry.d.ts +3 -0
  104. package/dist/console/runtime/server/entry.js +4 -0
  105. package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
  106. package/dist/console/runtime/server/operation-contributions.js +1 -1
  107. package/dist/console/runtime/server/pill.d.ts +45 -0
  108. package/dist/console/runtime/server/pill.js +62 -0
  109. package/dist/console/runtime/server/rpc.d.ts +5 -8
  110. package/dist/console/runtime/server/rpc.js +13 -20
  111. package/dist/console/runtime/server/runtime.d.ts +1 -1
  112. package/dist/console/runtime/server/runtime.js +1 -1
  113. package/dist/console/runtime/server/sections.d.ts +4 -4
  114. package/dist/console/runtime/server/sections.get.d.ts +1 -1
  115. package/dist/console/runtime/server/sections.get.js +4 -4
  116. package/dist/console/runtime/server/sections.js +3 -3
  117. package/dist/console/runtime/server/setup.d.ts +4 -4
  118. package/dist/console/runtime/server/setup.js +3 -3
  119. package/dist/console/runtime/server/site-access-operation.d.ts +7 -0
  120. package/dist/console/runtime/server/site-access-operation.js +36 -0
  121. package/dist/console/runtime/server/site-actions.d.ts +73 -0
  122. package/dist/console/runtime/server/site-actions.js +105 -0
  123. package/dist/console/runtime/server/site-entry.d.ts +16 -7
  124. package/dist/console/runtime/server/site-entry.js +59 -42
  125. package/dist/console/runtime/server/site-visitor.d.ts +17 -0
  126. package/dist/console/runtime/server/site-visitor.js +1 -0
  127. package/dist/console/runtime/server/site.d.ts +27 -0
  128. package/dist/console/runtime/server/site.js +1 -0
  129. package/dist/console/server.d.ts +7 -19
  130. package/dist/console/server.js +6 -6
  131. package/dist/console-signature--55DIKf2.js +237 -0
  132. package/dist/content/console/operations.d.ts +3 -0
  133. package/dist/content/console/operations.js +62 -0
  134. package/dist/{console/runtime/server → database/console}/database.get.d.ts +1 -1
  135. package/dist/{console/runtime/server → database/console}/database.get.js +4 -4
  136. package/dist/database/console/operations.d.ts +3 -0
  137. package/dist/database/console/operations.js +49 -0
  138. package/dist/{database-CPjZ3L0g.d.ts → database-yFezh5U1.d.ts} +1 -1
  139. package/dist/{definitions-M7i2p8SR.js → definitions-DGo2rNQ9.js} +1 -1
  140. package/dist/{dev-peer-DBq-isgi.js → dev-peer-CRYp01PE.js} +1 -219
  141. package/dist/dev-peer-CX5C9243.js +1 -0
  142. package/dist/{diagnostics-B2cqlCSz.js → diagnostics-DLHqjKGe.js} +2 -8
  143. package/dist/diagnostics-DgGKvWzF.d.ts +7 -0
  144. package/dist/doctor.js +2 -2
  145. package/dist/{documents-LtkKCxtu.d.ts → documents-A-7Ho0g0.d.ts} +11 -11
  146. package/dist/{documents-Ck_iub9w.js → documents-BduuZjm3.js} +3 -2
  147. package/dist/{documents-DxK0tdjA.d.ts → documents-CApMRd4o.d.ts} +2 -3
  148. package/dist/{documents-BOYwZ5g4.js → documents-D6ueeoUR.js} +12 -15
  149. package/dist/durability/operations.js +1 -1
  150. package/dist/{console/runtime/server → env/console}/env.get.d.ts +2 -2
  151. package/dist/{console/runtime/server → env/console}/env.get.js +7 -7
  152. package/dist/env/console/operations.d.ts +3 -0
  153. package/dist/env/console/operations.js +12 -0
  154. package/dist/env/vite.d.ts +1 -0
  155. package/dist/env/vite.js +2 -0
  156. package/dist/index.d.ts +1 -1
  157. package/dist/index.js +2 -2
  158. package/dist/{internal-CKocv79I.d.ts → internal-BRNf11h3.d.ts} +14 -4
  159. package/dist/{invocation-page-undo-BEi-rO0Q.js → invocation-page-undo-DHbXczWY.js} +6 -4
  160. package/dist/invocations-B60XWNES.js +45 -0
  161. package/dist/{console/runtime/server → logs/console}/logs.get.d.ts +3 -3
  162. package/dist/{console/runtime/server → logs/console}/logs.get.js +7 -7
  163. package/dist/logs/console/operations.d.ts +3 -0
  164. package/dist/logs/console/operations.js +23 -0
  165. package/dist/loopback-Bl9Cvj1k.js +139 -0
  166. package/dist/mcp/eval.d.ts +1 -0
  167. package/dist/mcp/eval.js +2 -0
  168. package/dist/{mcp-client-Q2XbUXuP.d.ts → mcp-client-uXVvS7RL.d.ts} +4 -6
  169. package/dist/{media-CAKz9yrp.js → media-CNwnh6CG.js} +5 -5
  170. package/dist/{media-library-BDX89xXA.js → media-library-DTC8TLsZ.js} +1 -1
  171. package/dist/nuxt.d.ts +1 -1
  172. package/dist/nuxt.js +108 -68
  173. package/dist/{operation-contributions-D10pjkJF.js → operation-contributions-BU10k2QS.js} +7 -6
  174. package/dist/{operation-contributions-BCcQVlGb.d.ts → operation-contributions-xwjDzj28.d.ts} +5 -4
  175. package/dist/{operation-definition-DTpNvLd8.js → operation-definition-D04Rdjbe.js} +2 -1
  176. package/dist/operation-modules-BUXlwjvd.js +1 -0
  177. package/dist/operation-modules-DHWkPcfS.js +139 -0
  178. package/dist/operations-D-7ljPqw.js +1 -0
  179. package/dist/{operations-CD_mu_Ww.js → operations-DksTrRMb.js} +1 -1
  180. package/dist/operations-byxiZ2R2.js +113 -0
  181. package/dist/{optional-owners-DAfShdgV.js → optional-owners-Cypch7V3.js} +0 -1
  182. package/dist/page-tools-BeZrtn4S.js +46 -0
  183. package/dist/page-tools-Chk8Gm9x.d.ts +23 -0
  184. package/dist/page-tools-shared-BLPidmCi.js +39 -0
  185. package/dist/{plugins-BpiTVULl.d.ts → plugins-BmkOoyIh.d.ts} +22 -9
  186. package/dist/{plugins-H6-MQrsn.js → plugins-DfXcUnzN.js} +248 -310
  187. package/dist/{project-DKBIHOf4.d.ts → project-B2qWt8on.d.ts} +2 -7
  188. package/dist/{project-BxyyclTE.js → project-_juMSuAS.js} +5 -7
  189. package/dist/{project-link-CeS0T8Pr.js → project-link-CJbCkOlC.js} +3 -3
  190. package/dist/{project-link-isfdRO3Q.d.ts → project-link-Ck3vuq9w.d.ts} +1 -1
  191. package/dist/{project-session--GN7MduT.js → project-session-8pN7pRo8.js} +4 -4
  192. package/dist/{request-CQ8TkHLh.js → request-D769eiBL.js} +2 -2
  193. package/dist/{request-BC_krbEr.d.ts → request-DYmjLTqP.d.ts} +1 -1
  194. package/dist/{request-CJCPyu2B.d.ts → request-DkoE0b2h.d.ts} +10 -2
  195. package/dist/{request-Cl68STwT.js → request-XFVx7CGC.js} +24 -2
  196. package/dist/routes-D02vxUSg.js +26 -0
  197. package/dist/{runtime-CyPZMiyK.js → runtime-DA7HJe10.js} +1 -1
  198. package/dist/{runtime-Cf8R1Ztr.d.ts → runtime-DGvimtvc.d.ts} +1 -1
  199. package/dist/{runtime-feature-guard-DpUn4Oxc.js → runtime-feature-guard-BKAMRZzM.js} +1 -1
  200. package/dist/search-jgMrZJXR.js +84 -0
  201. package/dist/{sections-BiCOk9qP.js → sections-AUGy9EkY.js} +1 -6
  202. package/dist/{sections-BTfWK14a.d.ts → sections-BMkFB3S-.d.ts} +1 -1
  203. package/dist/{sections-0qrBvGbf.d.ts → sections-DCoCa4nF.d.ts} +1 -4
  204. package/dist/{sections-DAtgYMVz.d.ts → sections-DjeAUX7o.d.ts} +4 -4
  205. package/dist/{sections-HLxb9MrG.js → sections-ZFAlI4JW.js} +2 -2
  206. package/dist/{sections.get-CGmtYmfu.d.ts → sections.get-BY5dClJY.d.ts} +1 -1
  207. package/dist/{setup-Ca7jtBLS.d.ts → setup-BBnZPziq.d.ts} +4 -7
  208. package/dist/{setup-DQz_i-ee.js → setup-yc3_WKNG.js} +1 -13
  209. package/dist/site-CZCIWsUQ.js +169 -0
  210. package/dist/site-link-Bvo2SxPo.js +58 -0
  211. package/dist/site-link-Dtw8MNVB.d.ts +18 -0
  212. package/dist/site-pages-B6J8U2Nq.js +66 -0
  213. package/dist/site-token-Wa7fhjwg.js +215 -0
  214. package/dist/site-visitor-BkhE2TA0.js +89 -0
  215. package/dist/skills/operations.js +2 -2
  216. package/dist/{skills.get-DAooGWy5.js → skills.get-CW8vc_Hf.js} +3 -3
  217. package/dist/task/operations.js +1 -1
  218. package/dist/usage-DBi7aOhx.js +33 -0
  219. package/dist/{version-CAhBr673.js → version-DUCd7Orc.js} +11 -5
  220. package/dist/workspace/console/operations.d.ts +3 -0
  221. package/dist/workspace/console/operations.js +22 -0
  222. package/dist/{console/runtime/server → workspace/console}/workspace-files.get.d.ts +3 -3
  223. package/dist/{console/runtime/server → workspace/console}/workspace-files.get.js +4 -4
  224. package/package.json +91 -82
  225. package/dist/auth-CeKxL2xp.d.ts +0 -116
  226. package/dist/cloudflare-env-lookup-DcN7pGlv.js +0 -15
  227. package/dist/console/runtime/client/ticket.d.ts +0 -2
  228. package/dist/console/runtime/client/ticket.js +0 -1
  229. package/dist/console/runtime/page/loader.js +0 -135
  230. package/dist/console/runtime/server/auth.d.ts +0 -2
  231. package/dist/console/runtime/server/mcp-client-operations.d.ts +0 -3
  232. package/dist/console/runtime/server/mcp-client-operations.js +0 -137
  233. package/dist/console/runtime/server/page-auth.d.ts +0 -16
  234. package/dist/console/runtime/server/page-auth.js +0 -43
  235. package/dist/console/runtime/server/page-tool.d.ts +0 -2
  236. package/dist/console/runtime/server/page-tool.js +0 -110
  237. package/dist/console/runtime/server/page-tools-route.d.ts +0 -2
  238. package/dist/console/runtime/server/page-tools-route.js +0 -4
  239. package/dist/console/runtime/server/search.get.d.ts +0 -2
  240. package/dist/console/runtime/server/search.get.js +0 -95
  241. package/dist/console/runtime/server/site-session.d.ts +0 -79
  242. package/dist/console/runtime/server/site-session.js +0 -1
  243. package/dist/console/runtime/server/tickets.d.ts +0 -2
  244. package/dist/console/runtime/server/tickets.js +0 -1
  245. package/dist/console/runtime/server/usage.get.js +0 -91
  246. package/dist/console/runtime/site-access.d.ts +0 -2
  247. package/dist/console/runtime/site-access.js +0 -1
  248. package/dist/diagnostics-BXxPggRw.d.ts +0 -9
  249. package/dist/invocations-8NThe8Bx.js +0 -85
  250. package/dist/mcp-client-Bkh-khvr.js +0 -9
  251. package/dist/mcp-client-DiObFpDS.js +0 -1037
  252. package/dist/operations-D7ENc68Y.js +0 -1
  253. package/dist/operations-vRLiH7dh.js +0 -852
  254. package/dist/page-tool-BUnUbuSy.d.ts +0 -67
  255. package/dist/page-tools-BQzwuAHD.js +0 -460
  256. package/dist/page-tools-UwsfvH-B.d.ts +0 -21
  257. package/dist/page-tools-shared-hJcG_xk8.js +0 -125
  258. package/dist/secret-D2KL_o2h.js +0 -43
  259. package/dist/site-access-1JIQjY11.js +0 -292
  260. package/dist/site-access-CUXIbbbR.d.ts +0 -53
  261. package/dist/site-access-CmaZ-oaL.js +0 -17
  262. package/dist/site-access-Cvmjb6aw.js +0 -1
  263. package/dist/site-session-D36fr7Wf.js +0 -297
  264. package/dist/skills/vitehub/SKILL.md +0 -142
  265. package/dist/skills/vitehub/agents/openai.yaml +0 -4
  266. package/dist/skills/vitehub/references/agent-definitions.md +0 -36
  267. package/dist/skills/vitehub/references/bundle.md +0 -57
  268. package/dist/skills/vitehub/references/capabilities-authority.md +0 -30
  269. package/dist/skills/vitehub/references/channels-triggers.md +0 -27
  270. package/dist/skills/vitehub/references/framework-composition.md +0 -29
  271. package/dist/skills/vitehub/references/preview-contract.md +0 -44
  272. package/dist/skills/vitehub/references/primitives/auth.md +0 -14
  273. package/dist/skills/vitehub/references/primitives/blob.md +0 -13
  274. package/dist/skills/vitehub/references/primitives/browser.md +0 -17
  275. package/dist/skills/vitehub/references/primitives/cache.md +0 -13
  276. package/dist/skills/vitehub/references/primitives/channels.md +0 -11
  277. package/dist/skills/vitehub/references/primitives/connections.md +0 -14
  278. package/dist/skills/vitehub/references/primitives/content.md +0 -13
  279. package/dist/skills/vitehub/references/primitives/database.md +0 -15
  280. package/dist/skills/vitehub/references/primitives/email.md +0 -11
  281. package/dist/skills/vitehub/references/primitives/env.md +0 -13
  282. package/dist/skills/vitehub/references/primitives/kv.md +0 -13
  283. package/dist/skills/vitehub/references/primitives/markdown-template.md +0 -13
  284. package/dist/skills/vitehub/references/primitives/queue.md +0 -14
  285. package/dist/skills/vitehub/references/primitives/rate-limit.md +0 -11
  286. package/dist/skills/vitehub/references/primitives/realtime.md +0 -19
  287. package/dist/skills/vitehub/references/primitives/sandbox-task.md +0 -11
  288. package/dist/skills/vitehub/references/primitives/sandbox.md +0 -13
  289. package/dist/skills/vitehub/references/primitives/schedule.md +0 -11
  290. package/dist/skills/vitehub/references/primitives/shell.md +0 -11
  291. package/dist/skills/vitehub/references/primitives/source.md +0 -11
  292. package/dist/skills/vitehub/references/primitives/workflow.md +0 -11
  293. package/dist/skills/vitehub/references/primitives/workspace.md +0 -11
  294. package/dist/skills/vitehub/references/project-patterns.md +0 -19
  295. package/dist/skills/vitehub/references/project-shapes.md +0 -81
  296. package/dist/skills/vitehub/references/proof-recovery.md +0 -31
  297. package/dist/skills/vitehub/references/sandboxes-hosts.md +0 -26
  298. package/dist/skills/vitehub/references/schedules-workflows-invocations.md +0 -28
  299. package/dist/skills/vitehub/references/server-primitives.md +0 -39
  300. package/dist/skills/vitehub/references/workspaces-sources-access.md +0 -26
  301. package/dist/ticket-BFWwevWN.d.ts +0 -12
  302. package/dist/ticket-BwsnryuU.js +0 -30
  303. package/dist/tickets-Cj9_y3gw.js +0 -356
  304. package/dist/usage-BduF04ks.d.ts +0 -20
  305. package/dist/usage-ZV3TBMzE.js +0 -570
  306. package/dist/usage-index-CR_xTrXO.js +0 -334
  307. /package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.d.ts +0 -0
  308. /package/dist/{console/runtime/server → agent/console}/invocations.get.d.ts +0 -0
  309. /package/dist/{console/runtime/public/skills → console-skills}/index.json +0 -0
  310. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/SKILL.md +0 -0
  311. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/agents/openai.yaml +0 -0
  312. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/agent-definitions.md +0 -0
  313. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/bundle.md +0 -0
  314. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/capabilities-authority.md +0 -0
  315. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/channels-triggers.md +0 -0
  316. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/framework-composition.md +0 -0
  317. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/preview-contract.md +0 -0
  318. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/auth.md +0 -0
  319. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/blob.md +0 -0
  320. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/browser.md +0 -0
  321. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/cache.md +0 -0
  322. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/channels.md +0 -0
  323. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/connections.md +0 -0
  324. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/content.md +0 -0
  325. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/database.md +0 -0
  326. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/email.md +0 -0
  327. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/env.md +0 -0
  328. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/kv.md +0 -0
  329. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/markdown-template.md +0 -0
  330. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/queue.md +0 -0
  331. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/rate-limit.md +0 -0
  332. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/realtime.md +0 -0
  333. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox-task.md +0 -0
  334. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox.md +0 -0
  335. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/schedule.md +0 -0
  336. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/shell.md +0 -0
  337. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/source.md +0 -0
  338. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workflow.md +0 -0
  339. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workspace.md +0 -0
  340. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-patterns.md +0 -0
  341. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-shapes.md +0 -0
  342. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/proof-recovery.md +0 -0
  343. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/sandboxes-hosts.md +0 -0
  344. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/schedules-workflows-invocations.md +0 -0
  345. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/server-primitives.md +0 -0
  346. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/workspaces-sources-access.md +0 -0
package/dist/nuxt.js CHANGED
@@ -1,15 +1,16 @@
1
- import { $ as startViteHubHints, A as cloudflareEmailDevShimSource, B as disabledUpstashDriver, C as consoleDocumentEditorSectionIds, D as staleChunkReloadPluginName, E as installStaleChunkReloadNuxt, F as defaultJournalNeedsLibsql, G as resolveDefinitionFeatures, H as hasUpstashStore, I as writeAgentInvocationsNitroPlugin, J as nitroCacheBypass, K as markCmsPresetFeaturesResolved, L as generatedModules, M as VITEHUB_AGENT_JOURNAL_STORE, N as assertAgentInvocationsRetention, O as drizzleBuildCheckPlugin, P as assertAgentInvocationsUrl, Q as reportViteHubHint, R as disabledKVConfigModule, S as consoleContributedSections, T as isConsoleContributedSectionId, U as redisDriverSpecifier, V as hasRedisStore, W as upstashDriverSpecifier, X as importRolldownExperimental, Y as describeDeploymentPlanOutput, Z as VITEHUB_NUXT_HINTS, _ as addConsoleRpcHandler, _t as VITEHUB_SERVER_DIRS, a as cloudflareExportConditions, at as isDefaultAgentJournal, b as resolveConsoleProjectName, bt as resolveViteHubProjectRoot, c as consoleInvocationRootPlugin, ct as isIncludedNitroPlugin, d as resolveConsoleAccessBuild, et as agentJournalStateUrl, f as resolveConsoleOptions, ft as VITEHUB_APP_BASE_URL, g as addConsoleAppRoutes, gt as VITEHUB_PROJECT_ROOT, h as consoleOperationFeatures, ht as VITEHUB_PREPARE, i as installBrowserErrorsNuxt, it as withDataDir, j as cloudflareWorkersDevShimSource, k as forgeBuildCheckPlugin, l as consoleOperationContributions, m as consoleDevAccessNotice, mt as VITEHUB_NITRO_CONFIG_CONTEXT, n as resolveSandboxTaskDriver, nt as withComments, o as assertConsoleAccess, ot as hasSyncDirectory, p as resolveGeneratedConsolePlugin, pt as VITEHUB_GENERATED_ROOT, q as resolveCmsPresetFeatures, r as viteHubPlugins, rt as withConnectionsDatabase, s as assertConsoleProductionAuth, st as ownerModules, t as applyCloudflareNodeCompatOptOut, tt as defaultDatabaseD1Binding, u as generatedConsolePluginRegistration, ut as withPrintedDiagnostics, v as serializeConsoleRefresh, vt as getResolvedFeatureOptions, w as discoverConsoleEntrySections, x as discoverConsoleBuildCatalog, y as writeConsoleNitroPlugin, yt as resolveNuxtServerDirs, z as disabledRedisDriver } from "./plugins-H6-MQrsn.js";
1
+ import { $ as VITEHUB_NUXT_HINTS, A as staleChunkReloadPluginName, B as disabledKVConfigModule, C as resolveConsoleProjectName, D as discoverConsoleEntrySections, E as consoleDocumentEditorSectionIds, F as VITEHUB_AGENT_JOURNAL_STORE, G as redisDriverSpecifier, H as disabledUpstashDriver, I as assertAgentInvocationsRetention, J as markCmsPresetFeaturesResolved, K as upstashDriverSpecifier, L as assertAgentInvocationsUrl, M as forgeBuildCheckPlugin, N as cloudflareEmailDevShimSource, O as isConsoleContributedSectionId, P as cloudflareWorkersDevShimSource, Q as importRolldownExperimental, R as defaultJournalNeedsLibsql, S as writeConsoleAppModule, St as resolveViteHubProjectRoot, T as consoleContributedSections, U as hasRedisStore, V as disabledRedisDriver, W as hasUpstashStore, X as nitroCacheBypass, Y as resolveCmsPresetFeatures, Z as describeDeploymentPlanOutput, _ as resolveConsoleSiteAccess, _t as VITEHUB_PREPARE, a as cloudflareExportConditions, at as withConnectionsDatabase, b as consoleAppModuleHasDocumentEditors, bt as getResolvedFeatureOptions, c as consoleAppModuleId, ct as hasSyncDirectory, d as resolveConsoleAccessBuild, et as reportViteHubHint, f as resolveConsoleOptions, ft as withPrintedDiagnostics, g as consoleOperationFeatures, gt as VITEHUB_NITRO_CONFIG_CONTEXT, h as consoleDevAccessNotice, ht as VITEHUB_GENERATED_ROOT, i as installBrowserErrorsNuxt, it as withComments, j as drizzleBuildCheckPlugin, k as installStaleChunkReloadNuxt, l as consoleInvocationRootPlugin, lt as ownerModules, m as resolveGeneratedConsoleApp, mt as VITEHUB_APP_BASE_URL, n as resolveSandboxTaskDriver, nt as agentJournalStateUrl, o as assertConsoleAccess, ot as withDataDir, p as resolveConsoleUrl, q as resolveDefinitionFeatures, r as viteHubPlugins, rt as defaultDatabaseD1Binding, s as assertConsoleProductionAuth, st as isDefaultAgentJournal, t as applyCloudflareNodeCompatOptOut, tt as startViteHubHints, u as consoleOperationContributions, ut as isIncludedNitroPlugin, v as addConsoleRpcHandler, vt as VITEHUB_PROJECT_ROOT, w as discoverConsoleBuildCatalog, x as resolveConsoleRuntimeCapabilityImports, xt as resolveNuxtServerDirs, y as serializeConsoleRefresh, yt as VITEHUB_SERVER_DIRS, z as writeAgentInvocationsNitroPlugin } from "./plugins-DfXcUnzN.js";
2
2
  import { t as invariant } from "./invariant-Dj2R1eMr.js";
3
3
  import { f as writeFileIfChanged } from "./definition-catalog-1xPPtzOx.js";
4
- import { n as addViteHubDevPeerUpgradeSigner, t as addViteHubDevPeerDevHandler } from "./dev-peer-DBq-isgi.js";
4
+ import { n as addViteHubDevPeerUpgradeSigner, t as addViteHubDevPeerDevHandler } from "./dev-peer-CRYp01PE.js";
5
5
  import { i as removeViteHubDevServerFile, o as writeViteHubDevServerFile } from "./vite-stage-Dmo4RgnK.js";
6
+ import { r as generatedModules } from "./operation-modules-DHWkPcfS.js";
6
7
  import { n as isRecord } from "./object-DRSmpe04.js";
7
8
  import { a as normalizeNitroPreset, c as resolveDeploymentPlan, i as hostFromNitroPreset, s as resolveBuildHost } from "./deployment-CURATxjG.js";
8
- import { i as importOptionalOwner, l as requireOptionalOwner, o as isPackageInstalled, u as startPackageChecks } from "./optional-owners-DAfShdgV.js";
9
- import { n as installConsoleProjectName, r as installConsoleSections } from "./setup-DQz_i-ee.js";
10
- import { D as resolveConsoleSectionIds, v as insertConsoleSection } from "./sections-BiCOk9qP.js";
9
+ import { i as importOptionalOwner, l as requireOptionalOwner, o as isPackageInstalled, u as startPackageChecks } from "./optional-owners-Cypch7V3.js";
10
+ import { n as installConsoleProjectName, r as installConsoleSections } from "./setup-yc3_WKNG.js";
11
+ import { E as resolveConsoleSectionIds, v as insertConsoleSection } from "./sections-AUGy9EkY.js";
11
12
  import { t as viteHubErrorDiagnostics } from "./error-diagnostics-CBtvqI30.js";
12
- import { n as assertNoRemovedViteHubOptions } from "./version-CAhBr673.js";
13
+ import { n as assertNoRemovedViteHubOptions } from "./version-DUCd7Orc.js";
13
14
  import { n as viteHubServerImports$1 } from "./nuxt-server-imports-BdJqiVhT.js";
14
15
  import { findPackageJSON } from "node:module";
15
16
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -17,9 +18,9 @@ import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
17
18
  import { fileURLToPath, pathToFileURL } from "node:url";
18
19
  import { mkdir, readFile, writeFile } from "node:fs/promises";
19
20
  import * as v from "valibot";
21
+ import { createEnvImportAliases } from "@vite-hub/env/vite";
20
22
  import { mergeGeneratedSourceNitroConfig } from "@vite-hub/source/vite";
21
23
  import { createLogger, mergeConfig } from "vite";
22
- import { createEnvImportAliases } from "@vite-hub/env/vite";
23
24
  import { nuxtPageRoutes } from "@vite-hub/bundle/vite";
24
25
  import { findNearestFile } from "pkg-types";
25
26
  // ../internal/src/build/nuxt-vue-imports.ts
@@ -147,6 +148,13 @@ const nitroConfigResolvedNames = /* @__PURE__ */ new Set([
147
148
  "@vite-hub/workflow/vite",
148
149
  "vite-hub/agent-invocations"
149
150
  ]);
151
+ /**
152
+ * Whether the Nitro replay runs the plugin's `configResolved` hook. The Database owner runs first, so consumers can read
153
+ * its Definitions. Env runs only when Nuxt builds Nitro without a Vite environment (`nitroOnly`).
154
+ */
155
+ function replaysNitroConfigResolved(name, nitroOnly) {
156
+ return name === "@vite-hub/database/vite" || nitroConfigResolvedNames.has(name) || nitroOnly && name === "@vite-hub/env/vite";
157
+ }
150
158
  function pluginResolveIdHandler(plugin) {
151
159
  if (typeof plugin.resolveId === "function") return plugin.resolveId;
152
160
  return plugin.resolveId?.handler;
@@ -164,9 +172,9 @@ function withHookFilter(hook, handler) {
164
172
  function nitroRuntimeResolver(plugin, config, agentOptions) {
165
173
  const resolveId = nitroRuntimeResolverNames.has(plugin.name) ? pluginResolveIdHandler(plugin) : void 0;
166
174
  const load = nitroRuntimeResolverNames.has(plugin.name) ? pluginLoadHandler(plugin) : void 0;
167
- const transformWorkspaceAgent = plugin.vitehub?.agent?.transformWorkspaceAgent;
168
- const serverTransform = !transformWorkspaceAgent && nitroServerTransformNames.has(plugin.name) ? typeof plugin.transform === "function" ? plugin.transform : plugin.transform?.handler : void 0;
169
- if (!resolveId && !load && !transformWorkspaceAgent && !serverTransform) return;
175
+ const transformAgentDefinition = plugin.vitehub?.agent?.transformAgentDefinition;
176
+ const serverTransform = !transformAgentDefinition && nitroServerTransformNames.has(plugin.name) ? typeof plugin.transform === "function" ? plugin.transform : plugin.transform?.handler : void 0;
177
+ if (!resolveId && !load && !transformAgentDefinition && !serverTransform) return;
170
178
  const replayResolveId = resolveId && function(id, importer, options) {
171
179
  if (isCloudflareDevShim(id) && isRecord(config.alias) && typeof config.alias[id] === "string") return;
172
180
  return resolveId.call(this, id, importer, {
@@ -187,21 +195,28 @@ function nitroRuntimeResolver(plugin, config, agentOptions) {
187
195
  ssr: true
188
196
  });
189
197
  };
198
+ const replayAgentTransform = transformAgentDefinition && {
199
+ filter: { id: /\.[cm]?[jt]s(?:[?#]|$)/i },
200
+ handler(code, id) {
201
+ const resolver = typeof this?.resolve === "function" ? this : void 0;
202
+ return transformAgentDefinition(code, id, {
203
+ ...agentOptions,
204
+ ...resolver ? { resolve: async (specifier, importer) => (await resolver.resolve(specifier, importer, { skipSelf: true }))?.id } : {}
205
+ });
206
+ }
207
+ };
190
208
  const originalHooks = {
191
209
  ...replayResolveId ? { resolveId: withHookFilter(plugin.resolveId, replayResolveId) } : {},
192
210
  ...replayLoad ? { load: withHookFilter(plugin.load, replayLoad) } : {},
193
- ...replayServerTransform ? { transform: withHookFilter(plugin.transform, replayServerTransform) } : {}
211
+ ...replayServerTransform ? { transform: withHookFilter(plugin.transform, replayServerTransform) } : {},
212
+ ...replayAgentTransform ? { transform: replayAgentTransform } : {}
194
213
  };
195
214
  return {
196
215
  originalHooks,
197
216
  plugin: {
198
217
  name: `vite-hub/nuxt-runtime-resolver:${plugin.name}`,
199
218
  ...originalHooks,
200
- ...plugin.name === "@vite-hub/i18n/vite" && plugin.renderChunk ? { renderChunk: plugin.renderChunk } : {},
201
- ...transformWorkspaceAgent ? { transform: {
202
- filter: { id: /\.[cm]?[jt]s(?:[?#]|$)/i },
203
- handler: (code, id) => transformWorkspaceAgent(code, id, agentOptions)
204
- } } : {}
219
+ ...plugin.name === "@vite-hub/i18n/vite" && plugin.renderChunk ? { renderChunk: plugin.renderChunk } : {}
205
220
  }
206
221
  };
207
222
  }
@@ -438,14 +453,14 @@ function normalizeGeneratedNitroPlugins(config, root) {
438
453
  * Put these plugins before Nitro's own resolvers, so they see generated and cache imports first. Each one goes first, so
439
454
  * in a build the Forge and Drizzle checks can see imports before Nitro resolves them.
440
455
  */
441
- function installNitroBuildPlugins(config, generatedRoots, dev = false, sections = [], build = false) {
456
+ function installNitroBuildPlugins(config, generatedRoots, dev = false, sections = [], build = false, documents, development) {
442
457
  const rollupConfig = config.rollupConfig ??= {};
443
458
  const plugins = rollupConfig.plugins ??= [];
444
459
  for (const plugin of [
445
460
  nitroCacheBypass(),
446
461
  nitroViteHubH3(generatedRoots),
447
462
  nitroOptionalPeers(config),
448
- consoleOperationFeatures(sections),
463
+ consoleOperationFeatures(sections, documents, development),
449
464
  ...dev ? [nitroCloudflareWorkersDev] : [],
450
465
  ...build ? [forgeBuildCheckPlugin(), withPrintedDiagnostics(drizzleBuildCheckPlugin())] : []
451
466
  ]) if (!plugins.some((candidate) => candidate.name === plugin.name)) plugins.unshift(plugin);
@@ -468,7 +483,7 @@ function asReplayResolvedConfig(config) {
468
483
  }
469
484
  async function finalizeNitroReplayPlugins(plugins, config, nitroOnly) {
470
485
  const databaseOwners = plugins.filter((plugin) => plugin.name === "@vite-hub/database/vite");
471
- const consumers = plugins.filter((plugin) => nitroConfigResolvedNames.has(plugin.name) || nitroOnly && plugin.name === "@vite-hub/env/vite");
486
+ const consumers = plugins.filter((plugin) => plugin.name !== "@vite-hub/database/vite" && replaysNitroConfigResolved(plugin.name, nitroOnly));
472
487
  for (const plugin of [...databaseOwners, ...consumers]) {
473
488
  const configResolved = pluginConfigResolvedHandler(plugin);
474
489
  if (!configResolved) continue;
@@ -613,9 +628,9 @@ export default defineNuxtPlugin({
613
628
  mode: "client"
614
629
  });
615
630
  }
616
- async function installConsole({ nuxt, projectRoot, name, sections, discovery, writeGeneratedPlugin, canDiscoverDefinitions, access, writePlugin }) {
631
+ async function installConsole({ nuxt, projectRoot, name, sections, discovery, writeGeneratedApp, canDiscoverDefinitions, access, siteAccess, writeApp }) {
617
632
  const { discoveryRoot, serverDirs } = discovery;
618
- const plugin = resolveGeneratedConsolePlugin(projectRoot, nuxt.options.dev === true);
633
+ const app = resolveGeneratedConsoleApp(projectRoot, nuxt.options.dev === true);
619
634
  installConsoleProjectName(projectRoot, resolveConsoleProjectName(projectRoot, name));
620
635
  if (nuxt.options.dev && nuxt.hook) {
621
636
  Reflect.apply(nuxt.hook, nuxt, ["nitro:init", (nitro) => {
@@ -645,10 +660,11 @@ async function installConsole({ nuxt, projectRoot, name, sections, discovery, wr
645
660
  ...documentEditorSections
646
661
  ]);
647
662
  const nitro = nuxt.options.nitro ??= {};
648
- addConsoleRpcHandler(nitro, consoleRuntimeRoot);
649
- addConsoleAppRoutes(nitro, consoleRuntimeRoot);
650
- const plugins = (nitro.plugins ??= []).filter((candidate) => !generatedConsolePluginRegistration(candidate));
651
- nitro.plugins = plugins;
663
+ addConsoleRpcHandler(nitro, consoleRuntimeRoot, void 0, { siteAccess });
664
+ nitro.alias = {
665
+ ...nitro.alias,
666
+ [consoleAppModuleId]: app
667
+ };
652
668
  const refreshAgentDefinitions = serializeConsoleRefresh(async () => {
653
669
  const discoverySections = canDiscoverDefinitions() ? sections : sections.filter((section) => section !== "databases" && !isConsoleContributedSectionId(section));
654
670
  const catalog = await discoverConsoleBuildCatalog({
@@ -656,17 +672,16 @@ async function installConsole({ nuxt, projectRoot, name, sections, discovery, wr
656
672
  projectRoot,
657
673
  sections: discoverySections
658
674
  });
659
- await writePlugin(plugin, catalog);
675
+ await writeApp(app, catalog);
660
676
  });
661
- if (writeGeneratedPlugin) await refreshAgentDefinitions();
662
- if (nuxt.options.dev && writeGeneratedPlugin) {
677
+ if (writeGeneratedApp) await refreshAgentDefinitions();
678
+ if (nuxt.options.dev && writeGeneratedApp) {
663
679
  const hookBuilderWatch = nuxt.hook;
664
680
  hookBuilderWatch?.("builder:watch", async (_event, _path) => {
665
681
  await refreshAgentDefinitions();
666
682
  });
667
683
  }
668
- if (!plugins.includes(plugin)) plugins.push(plugin);
669
- return plugin;
684
+ return app;
670
685
  }
671
686
  function agentWorkflowRegistryTransform(plugin) {
672
687
  return plugin.vitehub?.agent?.transformWorkflowRegistry;
@@ -738,11 +753,21 @@ function linkedViteHubPackageRoots(projectRoot) {
738
753
  const scope = join(nodeModules, "@vite-hub");
739
754
  return [join(nodeModules, "vite-hub"), ...existsSync(scope) ? readdirSync(scope).map((name) => join(scope, name)) : []].filter(existsSync).map((link) => realpathSync(link)).filter((root) => !root.split(sep).includes("node_modules"));
740
755
  }
741
- /** Add packages that Nitro must bundle, unless Nitro already bundles every package. */
756
+ const viteHubPackages = /(?:^|[\\/]node_modules[\\/])(?:vite-hub|@vite-hub[\\/][^\\/]+)(?:[\\/](?!(?:.*[\\/])?node_modules[\\/])|$)/;
757
+ const viteHubPackageStrings = /^(?:vite-hub|@vite-hub\/[^/]*)$/;
758
+ /**
759
+ * Nitro reads a string entry as an unanchored path pattern, so `"vite-hub"` (which Nuxt also adds from `build.transpile`)
760
+ * matches a project folder such as `~/vite-hub-shop`. Nitro then bundles every dependency of that app, and native packages
761
+ * such as libSQL fail to load. Replace those strings with a pattern for the installed ViteHub packages only.
762
+ */
742
763
  function addNoExternals(config, entries) {
743
764
  if (config.noExternals === true) return;
744
- const current = Array.isArray(config.noExternals) ? config.noExternals : [];
745
- config.noExternals = [.../* @__PURE__ */ new Set([...current, ...entries])];
765
+ const kept = (Array.isArray(config.noExternals) ? config.noExternals : []).filter((entry) => typeof entry !== "string" || !viteHubPackageStrings.test(entry));
766
+ config.noExternals = [.../* @__PURE__ */ new Set([
767
+ ...kept,
768
+ viteHubPackages,
769
+ ...entries
770
+ ])];
746
771
  }
747
772
  async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot, deferHint) {
748
773
  const incomingNoExternals = typeof nitroConfig.noExternals === "boolean" ? nitroConfig.noExternals : void 0;
@@ -1023,16 +1048,16 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1023
1048
  const runtimeCapabilityImports = {
1024
1049
  blob: consoleBlobEnabled ? "vite-hub/blob" : false,
1025
1050
  connections: options.connections ? generatedModules.connectionsAgent : false,
1026
- console: consoleOptions ? "vite-hub/console/server" : false,
1051
+ console: consoleOptions ? generatedModules.consoleAgent : false,
1027
1052
  db: options.database ? "@vite-hub/database/runtime/registry" : false,
1028
1053
  i18n: options.i18n ? "vite-hub/i18n/server" : false,
1029
1054
  realtime: options.realtime ? "vite-hub/realtime/agent" : false,
1030
- ...ownerModules.emailVite ? { email: "vite-hub/email" } : {},
1055
+ ...ownerModules.emailVite && options.email ? { email: "vite-hub/email" } : {},
1031
1056
  ...ownerModules.kvVite ? { kv: "vite-hub/kv" } : {}
1032
1057
  };
1033
1058
  const consoleInvocationRootState = {};
1034
1059
  const consoleInvokeEnabled = consoleOptions ? consoleOptions.invoke ?? Boolean(nuxt.options.dev) : false;
1035
- let generatedConsolePluginPath;
1060
+ let generatedConsoleAppPath;
1036
1061
  let consoleWorkflowConfigResolved = false;
1037
1062
  const effectiveAuth = options.auth;
1038
1063
  const serverAutoImports = resolveViteHubServerImports({
@@ -1067,30 +1092,39 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1067
1092
  if (!nuxt.options.dev && !nuxt.options._prepare) assertConsoleProductionAuth(configuredConsole);
1068
1093
  }
1069
1094
  }
1070
- const writeNuxtConsolePlugin = (file, catalog) => writeConsoleNitroPlugin({
1071
- file,
1095
+ const consoleSiteAccess = resolveConsoleSiteAccess(options.comments, {
1072
1096
  projectRoot,
1073
- name: options.name,
1074
- sections: consoleSections,
1075
- catalog,
1076
- blobStores: consoleBlobStores,
1077
- invoke: consoleInvokeEnabled,
1078
- active: () => !consoleInvocationRootState.closed,
1079
- access: consoleAccess,
1080
- runtimeCapabilityImports,
1081
- development: nuxt.options.dev === true,
1082
- target: {
1083
- host: {
1084
- name: plan.host,
1085
- preset: nitroPreset
1086
- },
1087
- framework: {
1088
- name: "nuxt",
1089
- version: nuxt._version
1090
- }
1091
- },
1092
- ...consoleOptions?.pill === false ? {} : { pageTool: { base: nuxt.options.app?.baseURL || "/" } }
1097
+ serverDirs: resolveNuxtServerDirs(nuxt.options)
1093
1098
  });
1099
+ let consoleDocumentEditors;
1100
+ const writeNuxtConsoleApp = (file, catalog) => {
1101
+ const appModule = {
1102
+ file,
1103
+ projectRoot,
1104
+ name: options.name,
1105
+ sections: consoleSections,
1106
+ catalog,
1107
+ blobStores: consoleBlobStores,
1108
+ invoke: consoleInvokeEnabled,
1109
+ active: () => !consoleInvocationRootState.closed,
1110
+ access: consoleAccess,
1111
+ runtimeCapabilityImports: resolveConsoleRuntimeCapabilityImports(runtimeCapabilityImports, replayPlugins),
1112
+ development: nuxt.options.dev === true,
1113
+ target: {
1114
+ host: {
1115
+ name: plan.host,
1116
+ preset: nitroPreset
1117
+ },
1118
+ framework: {
1119
+ name: "nuxt",
1120
+ version: nuxt._version
1121
+ }
1122
+ },
1123
+ site: consoleSiteAccess
1124
+ };
1125
+ consoleDocumentEditors = consoleAppModuleHasDocumentEditors(appModule);
1126
+ return writeConsoleAppModule(appModule);
1127
+ };
1094
1128
  const viteConfig = nuxt.options.vite;
1095
1129
  const secondaryProjectRoots = [.../* @__PURE__ */ new Set([...configuredProjectRoots(options, rootDir, viteRoot), ...options.connections ? [viteRoot] : []])].filter((root) => root !== projectRoot);
1096
1130
  const generatedTypes = [
@@ -1232,9 +1266,12 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1232
1266
  if (nuxt.options.dev && !nuxt.options.vitehubCliDiscovery) publishNuxtDevServer(nuxt);
1233
1267
  typesPlugin?.api?.setPrepareSources?.(sourcePlugin?.api?.prepareSources);
1234
1268
  await typesPlugin?.api?.prepareTypes?.({ projectRoot });
1269
+ const consoleUrl = resolveConsoleUrl(consoleOptions);
1270
+ const consoleUrlDefine = consoleUrl === void 0 ? {} : { __VITEHUB_CONSOLE_URL__: JSON.stringify(consoleUrl) };
1235
1271
  viteConfig.define = {
1236
1272
  ...viteConfig.define,
1237
- __VITEHUB_APP_BASE_URL__: JSON.stringify(nuxt.options.app?.baseURL || "/")
1273
+ __VITEHUB_APP_BASE_URL__: JSON.stringify(nuxt.options.app?.baseURL || "/"),
1274
+ ...consoleUrlDefine
1238
1275
  };
1239
1276
  viteConfig[VITEHUB_GENERATED_ROOT] = join(nuxt.options.buildDir, "vitehub");
1240
1277
  viteConfig[VITEHUB_NITRO_CONFIG_CONTEXT] = true;
@@ -1281,6 +1318,10 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1281
1318
  });
1282
1319
  const nitro3ExternalLists = /* @__PURE__ */ new WeakMap();
1283
1320
  nuxt.hook?.("nitro:config", async (config) => {
1321
+ if (consoleUrl !== void 0) config.replace = {
1322
+ ...isRecord(config.replace) ? config.replace : {},
1323
+ ...consoleUrlDefine
1324
+ };
1284
1325
  const previousExternalList = nitro3ExternalLists.get(config);
1285
1326
  if (previousExternalList && config.noExternals === previousExternalList) config.noExternals = false;
1286
1327
  const incomingNoExternals = config.noExternals;
@@ -1324,8 +1365,7 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1324
1365
  consoleBlobStores.splice(0, consoleBlobStores.length, ...resolvedReplayedBlob ? Object.keys(resolvedReplayedBlob.stores || { default: resolvedReplayedBlob.store }) : []);
1325
1366
  installConsoleSections(projectRoot, consoleSections);
1326
1367
  installConsoleProjectName(projectRoot, resolveConsoleProjectName(projectRoot, options.name));
1327
- addConsoleRpcHandler(config, consoleRuntimeRoot);
1328
- addConsoleAppRoutes(config, consoleRuntimeRoot);
1368
+ addConsoleRpcHandler(config, consoleRuntimeRoot, void 0, { siteAccess: consoleSiteAccess });
1329
1369
  if (!nuxt.options.vitehubCliDiscovery) {
1330
1370
  const consoleCatalog = await discoverConsoleBuildCatalog({
1331
1371
  contentImportBase: "vite-hub/content",
@@ -1342,13 +1382,11 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1342
1382
  workspaceDiscoveryRoot: configuredProjectRoot(viteRoot, options.workspace),
1343
1383
  workflowDiscoveryRoot: rootDir
1344
1384
  });
1345
- await writeNuxtConsolePlugin(generatedConsolePluginPath ?? resolveGeneratedConsolePlugin(projectRoot, nuxt.options.dev === true), consoleCatalog);
1385
+ await writeNuxtConsoleApp(generatedConsoleAppPath ?? resolveGeneratedConsoleApp(projectRoot, nuxt.options.dev === true), consoleCatalog);
1346
1386
  }
1347
1387
  }
1348
1388
  Object.assign(config, mergeGeneratedSourceNitroConfig(config, generatedSourceHandlers));
1349
1389
  addNoExternals(config, [
1350
- "vite-hub",
1351
- "@vite-hub/",
1352
1390
  join(projectRoot, ".vitehub"),
1353
1391
  h3RuntimeRoot,
1354
1392
  ...linkedViteHubPackageRoots(projectRoot)
@@ -1358,12 +1396,13 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1358
1396
  if (!nuxt.options.experimental?.nitroViteEnvironment) {
1359
1397
  installNitroRuntimeResolvers(config, replayPlugins, {
1360
1398
  root: replayConfig.root || viteRoot,
1399
+ projectRoot: rootDir,
1361
1400
  serverDirs: resolveNuxtServerDirs(nuxt.options)
1362
1401
  });
1363
1402
  await installNitroViteImports(config, rootDir);
1364
1403
  }
1365
1404
  normalizeGeneratedNitroPlugins(config, projectRoot);
1366
- installNitroBuildPlugins(config, [join(projectRoot, ".vitehub"), join(nuxt.options.buildDir, "vitehub")], nuxt.options.dev === true && plan.host === "cloudflare", consoleSections, !nuxt.options.dev);
1405
+ installNitroBuildPlugins(config, [join(projectRoot, ".vitehub"), join(nuxt.options.buildDir, "vitehub")], nuxt.options.dev === true && plan.host === "cloudflare", consoleSections, !nuxt.options.dev, () => nuxt.options.dev ? consoleDocumentEditorSectionIds.length > 0 : consoleDocumentEditors, nuxt.options.dev === true);
1367
1406
  if (nuxt.options.dev && plan.host === "cloudflare") await writeCloudflareDevShims(nuxt.options.buildDir, config.alias ??= {});
1368
1407
  if (plan.host === "cloudflare") {
1369
1408
  if (!nuxt.options.dev) {
@@ -1458,11 +1497,12 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1458
1497
  addNuxtVueImports(nuxt, "vite-hub/realtime", ["defineRealtime"]);
1459
1498
  addNuxtVueImports(nuxt, "vite-hub/realtime/vue", ["useRealtimeTiptap"]);
1460
1499
  }
1461
- if (consoleOptions) generatedConsolePluginPath = await installConsole({
1500
+ if (consoleOptions) generatedConsoleAppPath = await installConsole({
1462
1501
  nuxt,
1463
1502
  projectRoot,
1464
1503
  name: options.name,
1465
1504
  sections: consoleSections,
1505
+ siteAccess: consoleSiteAccess,
1466
1506
  discovery: {
1467
1507
  contentImportBase: "vite-hub/content",
1468
1508
  databaseDiscoveryRoot: configuredDatabaseDiscoveryRoot,
@@ -1476,10 +1516,10 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
1476
1516
  workflowDiscoveryRoot: rootDir,
1477
1517
  workspaceDiscoveryRoot: configuredProjectRoot(viteRoot, options.workspace)
1478
1518
  },
1479
- writeGeneratedPlugin: !nuxt.options.vitehubCliDiscovery,
1519
+ writeGeneratedApp: !nuxt.options.vitehubCliDiscovery,
1480
1520
  canDiscoverDefinitions: () => consoleWorkflowConfigResolved,
1481
1521
  access: consoleAccess,
1482
- writePlugin: writeNuxtConsolePlugin
1522
+ writeApp: writeNuxtConsoleApp
1483
1523
  });
1484
1524
  };
1485
1525
  viteHubNuxtModule.getMeta = async () => ({
@@ -1,14 +1,15 @@
1
1
  import { t as installOperationRegistry } from "./operation-registry-DfQbL7vE.js";
2
- import { a as createOperationRegistry, p as operationsOf } from "./operations-CD_mu_Ww.js";
3
- import { n as consoleOperations } from "./operations-vRLiH7dh.js";
2
+ import { a as createOperationRegistry, p as operationsOf } from "./operations-DksTrRMb.js";
3
+ import { r as consoleOperations } from "./operations-byxiZ2R2.js";
4
4
  // src/console/runtime/server/operation-contributions.ts
5
5
  const contributionKey = Symbol.for("vitehub.console.operations");
6
6
  const scope = globalThis;
7
7
  let builtin;
8
8
  /**
9
- * Install the operations of the app: the ones `vite-hub` owns and the ones that Vite plugins contribute. The generated
10
- * Console runtime calls this when it loads. Agent tools load it through `installedOperationRegistry()`, so they need no
11
- * prior RPC call.
9
+ * Install the operations of the app: the glue operations of `vite-hub`, and the ones of each configured primitive and
10
+ * Vite plugin. The generated Console runtime calls this when it loads. Agent tools load it through
11
+ * `installedOperationRegistry()`, so they need no prior RPC call. An operation that runs app code is registered only
12
+ * when `console.invoke` is on. Without options, nothing is held back.
12
13
  */
13
14
  function installConsoleOperations(contributed = [], options = {}) {
14
15
  const heldBack = /* @__PURE__ */ new Set();
@@ -36,7 +37,7 @@ function installConsoleOperations(contributed = [], options = {}) {
36
37
  function isHeldBackConsoleOperation(name) {
37
38
  return scope[contributionKey]?.heldBack.has(name) === true;
38
39
  }
39
- /** The installed operations. Without an install, the operations of `vite-hub`, built once. */
40
+ /** The installed operations. Without an install, the glue operations of `vite-hub`, built once. */
40
41
  function consoleOperationRegistry() {
41
42
  const installed = scope[contributionKey];
42
43
  if (installed) return installed.registry;
@@ -5,15 +5,16 @@ interface ConsoleOperationContribution {
5
5
  plugin?: string;
6
6
  }
7
7
  /**
8
- * Install the operations of the app: the ones `vite-hub` owns and the ones that Vite plugins contribute. The generated
9
- * Console runtime calls this when it loads. Agent tools load it through `installedOperationRegistry()`, so they need no
10
- * prior RPC call.
8
+ * Install the operations of the app: the glue operations of `vite-hub`, and the ones of each configured primitive and
9
+ * Vite plugin. The generated Console runtime calls this when it loads. Agent tools load it through
10
+ * `installedOperationRegistry()`, so they need no prior RPC call. An operation that runs app code is registered only
11
+ * when `console.invoke` is on. Without options, nothing is held back.
11
12
  */
12
13
  declare function installConsoleOperations(contributed?: readonly ConsoleOperationContribution[], options?: {
13
14
  invoke?: boolean;
14
15
  }): OperationRegistry;
15
16
  /** Whether the app has the operation `name` but holds it back, because it runs app code and `console.invoke` is off. */
16
17
  declare function isHeldBackConsoleOperation(name: string): boolean;
17
- /** The installed operations. Without an install, the operations of `vite-hub`, built once. */
18
+ /** The installed operations. Without an install, the glue operations of `vite-hub`, built once. */
18
19
  declare function consoleOperationRegistry(): OperationRegistry;
19
20
  export { isHeldBackConsoleOperation as i, consoleOperationRegistry as n, installConsoleOperations as r, ConsoleOperationContribution as t };
@@ -120,7 +120,8 @@ const reservedOperationNamespaces = [
120
120
  "login",
121
121
  "logout",
122
122
  "update",
123
- "whoami"
123
+ "whoami",
124
+ "apps"
124
125
  ]
125
126
  ];
126
127
  /** Input keys that the generated CLI commands read themselves. */
@@ -0,0 +1 @@
1
+ export { n as loadConsoleOperations } from "./operation-modules-DHWkPcfS.js";
@@ -0,0 +1,139 @@
1
+ import { t as invariant } from "./invariant-Dj2R1eMr.js";
2
+ import { n as relative, r as resolve, t as dirname } from "./pathe.M-eThtNZ-D4EC7Wue.js";
3
+ import { existsSync, realpathSync } from "node:fs";
4
+ import { fileURLToPath } from "node:url";
5
+ // ../internal/src/build/paths.ts
6
+ function resolveRuntimeModule(packageDir, modulePath) {
7
+ const distFile = resolve(packageDir, "dist", `${modulePath}.js`);
8
+ return existsSync(distFile) ? distFile : resolve(packageDir, "src", `${modulePath}.ts`);
9
+ }
10
+ const packageDirs = /* @__PURE__ */ new Map();
11
+ function findPackageDir(file) {
12
+ const start = dirname(file);
13
+ const cached = packageDirs.get(start);
14
+ if (cached) return cached;
15
+ let dir = start;
16
+ while (!existsSync(resolve(dir, "package.json"))) {
17
+ const parent = dirname(dir);
18
+ invariant(parent !== dir, `a file that a package resolver found has a package.json above it (${file})`);
19
+ dir = parent;
20
+ }
21
+ packageDirs.set(start, dir);
22
+ return dir;
23
+ }
24
+ /**
25
+ * The absolute path of a module that the calling package builds, such as `ownModule(import.meta.url, "runtime/state")`.
26
+ * Owner plugins write this path into generated code, so the module needs no package export, and an app resolves it
27
+ * only when the owner's feature is on. It is the `dist` file, or the `src` file before the package is built.
28
+ */
29
+ function ownModule(importMetaUrl, modulePath) {
30
+ return resolveRuntimeModule(findPackageDir(fileURLToPath(importMetaUrl)), modulePath);
31
+ }
32
+ function createImportPath(fromFile, targetFile) {
33
+ const fromDir = realpathIfExists(dirname(fromFile));
34
+ const target = realpathIfExists(targetFile);
35
+ const importPath = relative(fromDir, target);
36
+ return importPath.startsWith(".") ? importPath : `./${importPath}`;
37
+ }
38
+ function realpathIfExists(path) {
39
+ try {
40
+ return realpathSync.native(path);
41
+ } catch {
42
+ return resolve(path);
43
+ }
44
+ }
45
+ // src/internal/generated-modules.ts
46
+ /**
47
+ * Modules of this package that only generated code imports. Generated code imports each one by its absolute path, so
48
+ * each is a build entry and not a package export.
49
+ */
50
+ const generatedModules = {
51
+ commentsRealtime: ownModule(import.meta.url, "comments/realtime"),
52
+ commentsRuntimeAuth: ownModule(import.meta.url, "comments/runtime/auth"),
53
+ connectionsAgent: ownModule(import.meta.url, "connections/agent"),
54
+ consoleAgent: ownModule(import.meta.url, "console/runtime/server/agent-console"),
55
+ consoleAgentOperations: ownModule(import.meta.url, "agent/console/operations"),
56
+ consoleAuthOperations: ownModule(import.meta.url, "auth/console/operations"),
57
+ consoleBlob: ownModule(import.meta.url, "console/runtime/server/blob"),
58
+ consoleDatabase: ownModule(import.meta.url, "console/runtime/server/database"),
59
+ consoleDatabaseOperations: ownModule(import.meta.url, "database/console/operations"),
60
+ consoleDefinitions: ownModule(import.meta.url, "console/runtime/server/definitions"),
61
+ consoleDocumentOperations: ownModule(import.meta.url, "content/console/operations"),
62
+ consoleDocuments: ownModule(import.meta.url, "console/runtime/server/documents"),
63
+ consoleEnv: ownModule(import.meta.url, "console/runtime/server/env"),
64
+ consoleEnvOperations: ownModule(import.meta.url, "env/console/operations"),
65
+ consoleLogsOperations: ownModule(import.meta.url, "logs/console/operations"),
66
+ consoleMediaOperations: ownModule(import.meta.url, "blob/console/operations"),
67
+ consoleOperations: ownModule(import.meta.url, "console/runtime/server/operation-contributions"),
68
+ consolePill: ownModule(import.meta.url, "console/runtime/server/pill"),
69
+ consoleSections: ownModule(import.meta.url, "console/runtime/server/sections"),
70
+ consoleSetup: ownModule(import.meta.url, "console/runtime/server/setup"),
71
+ consoleSiteAccessOperations: ownModule(import.meta.url, "console/runtime/server/site-access-operation"),
72
+ consoleWorkspaceOperations: ownModule(import.meta.url, "workspace/console/operations"),
73
+ consoleSiteVisitor: ownModule(import.meta.url, "console/runtime/server/site-visitor")
74
+ };
75
+ // src/console/operation-modules.ts
76
+ /** The Console operations that `vite-hub` owns, one module per primitive. The glue operations are in `consoleOperations`. */
77
+ const consoleOperationModules = [
78
+ {
79
+ export: "agentConsoleOperations",
80
+ module: generatedModules.consoleAgentOperations,
81
+ enabled: ({ sections }) => sections.includes("agents"),
82
+ load: async () => (await import("./agent/console/operations.js")).agentConsoleOperations
83
+ },
84
+ {
85
+ export: "authConsoleOperations",
86
+ module: generatedModules.consoleAuthOperations,
87
+ enabled: ({ sections }) => sections.includes("auth"),
88
+ load: async () => (await import("./auth/console/operations.js")).authConsoleOperations
89
+ },
90
+ {
91
+ export: "databaseConsoleOperations",
92
+ module: generatedModules.consoleDatabaseOperations,
93
+ enabled: ({ sections }) => sections.includes("databases"),
94
+ load: async () => (await import("./database/console/operations.js")).databaseConsoleOperations
95
+ },
96
+ {
97
+ export: "documentConsoleOperations",
98
+ module: generatedModules.consoleDocumentOperations,
99
+ enabled: ({ documents }) => documents,
100
+ load: async () => (await import("./content/console/operations.js")).documentConsoleOperations
101
+ },
102
+ {
103
+ export: "envConsoleOperations",
104
+ module: generatedModules.consoleEnvOperations,
105
+ enabled: ({ sections }) => sections.includes("env"),
106
+ load: async () => (await import("./env/console/operations.js")).envConsoleOperations
107
+ },
108
+ {
109
+ export: "logsConsoleOperations",
110
+ module: generatedModules.consoleLogsOperations,
111
+ enabled: ({ sections }) => sections.includes("logs"),
112
+ load: async () => (await import("./logs/console/operations.js")).logsConsoleOperations
113
+ },
114
+ {
115
+ export: "mediaConsoleOperations",
116
+ module: generatedModules.consoleMediaOperations,
117
+ enabled: ({ documents, sections }) => documents && sections.includes("blob"),
118
+ load: async () => (await import("./blob/console/operations.js")).mediaConsoleOperations
119
+ },
120
+ {
121
+ export: "siteAccessOperations",
122
+ module: generatedModules.consoleSiteAccessOperations,
123
+ enabled: ({ site }) => site,
124
+ load: async () => (await import("./console/runtime/server/site-access-operation.js")).siteAccessOperations
125
+ },
126
+ {
127
+ export: "workspaceConsoleOperations",
128
+ module: generatedModules.consoleWorkspaceOperations,
129
+ enabled: ({ sections }) => sections.includes("workspaces"),
130
+ load: async () => (await import("./workspace/console/operations.js")).workspaceConsoleOperations
131
+ }
132
+ ];
133
+ /** Every Console operation that `vite-hub` owns, for the CLI and the build checks. */
134
+ async function loadConsoleOperations() {
135
+ const { consoleOperations } = await import("./operations-D-7ljPqw.js");
136
+ const modules = await Promise.all(consoleOperationModules.map((entry) => entry.load()));
137
+ return [...consoleOperations, ...modules.flat()];
138
+ }
139
+ export { ownModule as a, createImportPath as i, loadConsoleOperations as n, generatedModules as r, consoleOperationModules as t };
@@ -0,0 +1 @@
1
+ export { r as consoleOperations } from "./operations-byxiZ2R2.js";
@@ -1,6 +1,6 @@
1
1
  import { t as internalErrorDiagnostics } from "./error-diagnostics-kKXseq8d.js";
2
2
  import { r as isRecordOrFunction } from "./object-DRSmpe04.js";
3
- import { a as operationInputJsonSchema, i as isSectionId, n as invalidDefinition, o as reservedOperationNamespaces, r as isOperation } from "./operation-definition-DTpNvLd8.js";
3
+ import { a as operationInputJsonSchema, i as isSectionId, n as invalidDefinition, o as reservedOperationNamespaces, r as isOperation } from "./operation-definition-D04Rdjbe.js";
4
4
  // ../internal/src/operations.ts
5
5
  /** Response header of the local dev RPC. Its value is {@link projectRootHash} of the project that the server runs. */
6
6
  const operationRootHeader = "x-vitehub-root";