vite-hub 0.3.1 → 0.4.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 (254) hide show
  1. package/README.md +34 -36
  2. package/dist/_internal/runtime/browser-errors.d.ts +1 -1
  3. package/dist/_internal/runtime/browser-errors.js +1 -1
  4. package/dist/{access-F0YP5D5E.js → access-BDST818p.js} +6 -6
  5. package/dist/{access-policy-BsB3QVe5.d.ts → access-policy-CGXhO3Ee.d.ts} +3 -3
  6. package/dist/{access-policy-B_DCpZUt.js → access-policy-DjBKLo3c.js} +2 -2
  7. package/dist/{account-Bsu-LBOF.d.ts → account-BnOAU055.d.ts} +1 -1
  8. package/dist/{agent-invocations.post-DIm8tJV2.js → agent-invocations.post-CcPvfA0n.js} +7 -7
  9. package/dist/{agents-DnHexzTJ.js → agents-BDeazoAW.js} +2 -2
  10. package/dist/{agents-y5hBFHUQ.js → agents-BoWau_ei.js} +1 -1
  11. package/dist/{auth-BFVHYizM.d.ts → auth-BZOy7obk.d.ts} +2 -2
  12. package/dist/{auth-types-DWpTBZvp.d.ts → auth-types-CyqhWvYF.d.ts} +1 -1
  13. package/dist/bin.js +15 -7
  14. package/dist/{blob-CiUmptIp.d.ts → blob-CFLwMsjH.d.ts} +1 -1
  15. package/dist/{blob-BRV6_wZa.js → blob-CpvlM8jp.js} +3 -3
  16. package/dist/cache/operations.d.ts +1 -1
  17. package/dist/cache/operations.js +2 -2
  18. package/dist/cache.js +1 -1
  19. package/dist/choices/vue.d.ts +1 -0
  20. package/dist/choices/vue.js +2 -0
  21. package/dist/choices.d.ts +1 -0
  22. package/dist/choices.js +2 -0
  23. package/dist/cli-config-UAGTmuFa.js +2 -0
  24. package/dist/{cli-config-Bpjjfz5j.js → cli-config-wxKjF2Y0.js} +1 -16
  25. package/dist/console/auth-types.d.ts +1 -1
  26. package/dist/console/auth.d.ts +1 -1
  27. package/dist/console/auth.js +1 -1
  28. package/dist/console/runtime/client/account.d.ts +1 -1
  29. package/dist/console/runtime/client/account.js +2 -2
  30. package/dist/console/runtime/client/blob-media.d.ts +1 -1
  31. package/dist/console/runtime/client/blob-media.js +3 -3
  32. package/dist/console/runtime/client/comment-thread.js +1 -1
  33. package/dist/console/runtime/client/content-heads.d.ts +45 -0
  34. package/dist/console/runtime/client/content-heads.js +58 -0
  35. package/dist/console/runtime/client/documents.d.ts +2 -2
  36. package/dist/console/runtime/client/documents.js +1 -1
  37. package/dist/console/runtime/client/editor.d.ts +1 -1
  38. package/dist/console/runtime/client/invocation.js +3 -3
  39. package/dist/console/runtime/client/live.d.ts +1 -1
  40. package/dist/console/runtime/client/mcp-client.js +1 -1
  41. package/dist/console/runtime/client/media-library.d.ts +1 -1
  42. package/dist/console/runtime/client/media-library.js +1 -1
  43. package/dist/console/runtime/client/media-uploads.d.ts +1 -1
  44. package/dist/console/runtime/client/media-uploads.js +1 -1
  45. package/dist/console/runtime/client/operation-view.d.ts +1 -1
  46. package/dist/console/runtime/client/operation-view.js +2 -2
  47. package/dist/console/runtime/client/presence.d.ts +1 -1
  48. package/dist/console/runtime/client/problem.js +2 -2
  49. package/dist/console/runtime/client/project-link.d.ts +1 -1
  50. package/dist/console/runtime/client/project-link.js +1 -1
  51. package/dist/console/runtime/client/project-session.d.ts +2 -2
  52. package/dist/console/runtime/client/project-session.js +4 -4
  53. package/dist/console/runtime/client/project.d.ts +1 -1
  54. package/dist/console/runtime/client/project.js +1 -1
  55. package/dist/console/runtime/client/publish.d.ts +1 -1
  56. package/dist/console/runtime/client/rate-limit.js +2 -2
  57. package/dist/console/runtime/client/read-only.d.ts +1 -1
  58. package/dist/console/runtime/client/read-only.js +1 -1
  59. package/dist/console/runtime/client/request.js +1 -1
  60. package/dist/console/runtime/client/schedule-run.js +2 -2
  61. package/dist/console/runtime/client/sections.d.ts +1 -1
  62. package/dist/console/runtime/client/sections.js +1 -1
  63. package/dist/console/runtime/client/sidebar.ts +1 -1
  64. package/dist/console/runtime/client/site-access.js +2 -2
  65. package/dist/console/runtime/client/ticket.js +1 -1
  66. package/dist/console/runtime/client/workflow.js +2 -2
  67. package/dist/console/runtime/components/console-content-heads.vue +72 -0
  68. package/dist/console/runtime/components/console-document-dashboard.vue +43 -35
  69. package/dist/console/runtime/components/console-documents.vue +1 -0
  70. package/dist/console/runtime/components/console-markdown-editor.vue +4 -1
  71. package/dist/console/runtime/components/invocation/agent-invocation.ts +18 -5
  72. package/dist/console/runtime/components/invocation/internal/input-attachments.ts +69 -0
  73. package/dist/console/runtime/components/invocation/internal/invocation-activity.ts +67 -12
  74. package/dist/console/runtime/components/invocation/internal/invocation-conversation.ts +12 -4
  75. package/dist/console/runtime/components/invocation/invocation.css +16 -0
  76. package/dist/console/runtime/console-route.js +1 -1
  77. package/dist/console/runtime/definitions.d.ts +1 -1
  78. package/dist/console/runtime/definitions.js +1 -1
  79. package/dist/console/runtime/diagnostics.ts +30 -30
  80. package/dist/console/runtime/page-tool/page-tool.js +1 -1
  81. package/dist/console/runtime/public/skills/vitehub/SKILL.md +3 -3
  82. package/dist/console/runtime/public/skills/vitehub/references/framework-composition.md +1 -1
  83. package/dist/console/runtime/public/skills/vitehub/references/preview-contract.md +9 -1
  84. package/dist/console/runtime/public/skills/vitehub/references/primitives/channels.md +1 -1
  85. package/dist/console/runtime/public/skills/vitehub/references/primitives/database.md +1 -1
  86. package/dist/console/runtime/public/skills/vitehub/references/primitives/markdown-template.md +3 -3
  87. package/dist/console/runtime/public/skills/vitehub/references/project-shapes.md +2 -2
  88. package/dist/console/runtime/public/skills/vitehub/references/sandboxes-hosts.md +4 -4
  89. package/dist/console/runtime/sections.d.ts +1 -1
  90. package/dist/console/runtime/sections.js +1 -1
  91. package/dist/console/runtime/server/access-policy.d.ts +1 -1
  92. package/dist/console/runtime/server/access-policy.js +1 -1
  93. package/dist/console/runtime/server/agents.get.js +2 -2
  94. package/dist/console/runtime/server/auth.d.ts +1 -1
  95. package/dist/console/runtime/server/auth.js +2 -2
  96. package/dist/console/runtime/server/blob.d.ts +1 -1
  97. package/dist/console/runtime/server/blob.js +1 -1
  98. package/dist/console/runtime/server/channel-replay.d.ts +2 -2
  99. package/dist/console/runtime/server/channel-replay.js +4 -4
  100. package/dist/console/runtime/server/database.d.ts +1 -1
  101. package/dist/console/runtime/server/database.get.d.ts +1 -1
  102. package/dist/console/runtime/server/database.get.js +2 -2
  103. package/dist/console/runtime/server/database.js +1 -1
  104. package/dist/console/runtime/server/definitions.d.ts +1 -1
  105. package/dist/console/runtime/server/definitions.get.d.ts +3 -3
  106. package/dist/console/runtime/server/definitions.get.js +3 -3
  107. package/dist/console/runtime/server/definitions.js +1 -1
  108. package/dist/console/runtime/server/development.d.ts +2 -2
  109. package/dist/console/runtime/server/development.js +2 -2
  110. package/dist/console/runtime/server/documents.d.ts +1 -1
  111. package/dist/console/runtime/server/documents.js +1 -1
  112. package/dist/console/runtime/server/env.get.d.ts +1 -1
  113. package/dist/console/runtime/server/env.get.js +3 -3
  114. package/dist/console/runtime/server/invocation-capabilities.get.js +2 -2
  115. package/dist/console/runtime/server/invocation-workspace.get.d.ts +1 -1
  116. package/dist/console/runtime/server/invocation-workspace.get.js +5 -5
  117. package/dist/console/runtime/server/invocation.get.d.ts +1 -1
  118. package/dist/console/runtime/server/invocation.get.js +6 -6
  119. package/dist/console/runtime/server/invocations.get.js +3 -3
  120. package/dist/console/runtime/server/logs.get.d.ts +2 -2
  121. package/dist/console/runtime/server/logs.get.js +5 -5
  122. package/dist/console/runtime/server/mcp-client-operations.d.ts +1 -1
  123. package/dist/console/runtime/server/mcp-client-operations.js +3 -3
  124. package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
  125. package/dist/console/runtime/server/operation-contributions.js +1 -1
  126. package/dist/console/runtime/server/page-auth.d.ts +1 -1
  127. package/dist/console/runtime/server/page-tool.d.ts +1 -1
  128. package/dist/console/runtime/server/page-tool.js +2 -2
  129. package/dist/console/runtime/server/rpc.d.ts +2 -2
  130. package/dist/console/runtime/server/rpc.js +7 -7
  131. package/dist/console/runtime/server/search.get.js +1 -1
  132. package/dist/console/runtime/server/sections.d.ts +4 -4
  133. package/dist/console/runtime/server/sections.get.d.ts +1 -1
  134. package/dist/console/runtime/server/sections.get.js +5 -5
  135. package/dist/console/runtime/server/sections.js +3 -3
  136. package/dist/console/runtime/server/setup.d.ts +3 -3
  137. package/dist/console/runtime/server/setup.js +2 -2
  138. package/dist/console/runtime/server/site-entry.d.ts +1 -1
  139. package/dist/console/runtime/server/site-entry.js +9 -6
  140. package/dist/console/runtime/server/site-session.d.ts +5 -1
  141. package/dist/console/runtime/server/site-session.js +1 -1
  142. package/dist/console/runtime/server/status.get.d.ts +2 -2
  143. package/dist/console/runtime/server/status.get.js +5 -5
  144. package/dist/console/runtime/server/tickets.d.ts +1 -1
  145. package/dist/console/runtime/server/tickets.js +1 -1
  146. package/dist/console/runtime/server/usage.get.d.ts +2 -2
  147. package/dist/console/runtime/server/usage.get.js +7 -7
  148. package/dist/console/runtime/server/workspace-files.get.d.ts +1 -1
  149. package/dist/console/runtime/server/workspace-files.get.js +3 -3
  150. package/dist/console/server.d.ts +5 -5
  151. package/dist/console/server.js +6 -6
  152. package/dist/console/ui.js +121 -20
  153. package/dist/{console-route-COvNB_Xj.js → console-route-CBuqZ4wO.js} +1 -1
  154. package/dist/{database-J7M0B3ED.js → database-BdOBjPkS.js} +1 -1
  155. package/dist/{database-BVyhAxq-.d.ts → database-DyPVMjp_.d.ts} +1 -1
  156. package/dist/{definitions-BDRkT5-f.js → definitions-BW6SvmMM.js} +1 -0
  157. package/dist/{definitions-bepsXY5G.js → definitions-CNq_Shkh.js} +3 -3
  158. package/dist/{definitions-CxDT8D8Y.d.ts → definitions-DB4LbZ7T.d.ts} +2 -0
  159. package/dist/{definitions-CGTWTj67.d.ts → definitions-Dbgxfz3I.d.ts} +1 -1
  160. package/dist/development-W5EwONyL.d.ts +12 -0
  161. package/dist/{development-BzeSHZGH.js → development-zLxOp-AO.js} +12 -2
  162. package/dist/{diagnostics-D0DefmQj.js → diagnostics-9U_fYxMy.js} +30 -30
  163. package/dist/doctor.js +88 -107
  164. package/dist/{documents-C97WMaJZ.d.ts → documents-BASIRZ91.d.ts} +1 -1
  165. package/dist/{documents-RVHsQKFw.d.ts → documents-CboVhYFz.d.ts} +3 -3
  166. package/dist/{documents-DwPfR-fz.js → documents-CjJTCrY8.js} +3 -3
  167. package/dist/{documents-8US1nUgK.js → documents-qrHHqlNU.js} +1 -1
  168. package/dist/durability/operations.d.ts +1 -1
  169. package/dist/durability/operations.js +2 -2
  170. package/dist/{entries-D48wVEaS.js → entries-Bj-jPs_J.js} +1 -1
  171. package/dist/{error-diagnostics-C2rjmOlX.js → error-diagnostics-Bm3JKYjz.js} +19 -11
  172. package/dist/error-diagnostics.ts +19 -11
  173. package/dist/index.d.ts +15 -2
  174. package/dist/index.js +8 -4
  175. package/dist/internal/disabled-redis-driver.js +1 -1
  176. package/dist/internal/disabled-upstash-driver.js +1 -1
  177. package/dist/internal/test-loader.js +1 -1
  178. package/dist/internal/test-server.js +1 -1
  179. package/dist/{internal-BP_O70ic.d.ts → internal-CO4OqqaS.d.ts} +3 -3
  180. package/dist/{invocation-page-undo-BkUau8X7.js → invocation-page-undo-DIZ-s3xT.js} +2 -2
  181. package/dist/{invocations-CsucCJuq.js → invocations-CK_-G540.js} +3 -3
  182. package/dist/logs/memory.js +1 -1
  183. package/dist/logs/source.js +1 -1
  184. package/dist/logs.js +2 -2
  185. package/dist/{mcp-client-D0mUt18v.js → mcp-client-By4zk0vU.js} +6 -6
  186. package/dist/{media-wZMY6f2M.js → media-BHpQ-4jw.js} +4 -4
  187. package/dist/{media-library-CEo-Ye2B.d.ts → media-library-D9ThbXqs.d.ts} +1 -1
  188. package/dist/{media-library-BChf8XOd.js → media-library-NaOMBKWS.js} +2 -2
  189. package/dist/{memory-DhirB6SA.js → memory-DTmq-Z6x.js} +2 -2
  190. package/dist/{nuxt-server-imports-Lnaf5Fe-.js → nuxt-server-imports-DH60Z7LA.js} +3 -2
  191. package/dist/nuxt.d.ts +1 -1
  192. package/dist/nuxt.js +94 -67
  193. package/dist/{operation-contributions-DflAv5AC.js → operation-contributions-BdS0z3tx.js} +2 -2
  194. package/dist/{operation-contributions-fZyVo662.d.ts → operation-contributions-DpkO_iSU.d.ts} +1 -1
  195. package/dist/{operation-definition-Bn8V2hab.js → operation-definition-a5keEpCd.js} +6 -1
  196. package/dist/{operations-DX9EkHwb.d.ts → operations-B0689BG1.d.ts} +5 -0
  197. package/dist/operations-CAQmIxGK.js +2 -0
  198. package/dist/{operations-B6N-ja8x.js → operations-CWP9dF3i.js} +11 -11
  199. package/dist/{operations-Dj_cp-UK.js → operations-EOdyctDc.js} +1 -1
  200. package/dist/{optional-owners-Crm6kVS5.js → optional-owners-BNA2OX6z.js} +37 -23
  201. package/dist/{page-tool-BCRyx3pM.d.ts → page-tool-CRCK1RHV.d.ts} +1 -1
  202. package/dist/{plugins-DQ8pF-38.js → plugins-B-DpgDPB.js} +1459 -714
  203. package/dist/{plugins-5uDXr9Km.d.ts → plugins-BqAtIEX2.d.ts} +75 -56
  204. package/dist/{project-C2dnB9Kf.js → project-C4N_Zcjl.js} +3 -3
  205. package/dist/{project-5EN7JaXI.d.ts → project-CufkVP1u.d.ts} +2 -2
  206. package/dist/{project-DOeM0zg3.js → project-DlWTGB7h.js} +1 -1
  207. package/dist/{project-link-D_XQvBOC.d.ts → project-link-BuOzBH9f.d.ts} +1 -1
  208. package/dist/{project-link-Qi7nltHM.js → project-link-D-6UefhA.js} +2 -2
  209. package/dist/{request-yCybBeqT.js → request-DE8w_cSM.js} +8 -3
  210. package/dist/{request-BUYAlAJl.js → request-DbFfYmCu.js} +2 -2
  211. package/dist/{runtime-DM8Z6KLT.js → runtime-DQuHg7OO.js} +1 -1
  212. package/dist/{runtime-DG34DLXc.js → runtime-OsEDfbM9.js} +1 -1
  213. package/dist/runtime-feature-guard-B64MMW9I.js +140 -0
  214. package/dist/scan-module-D_3X08mj.js +2 -0
  215. package/dist/scan-module-Df58L_6T.js +311 -0
  216. package/dist/{secret-AZLhaNyr.js → secret-Dy5uqvq9.js} +1 -1
  217. package/dist/{sections-BriKrBgN.d.ts → sections-BogiCmtz.d.ts} +2 -2
  218. package/dist/{sections-ACHVTCWn.d.ts → sections-CyrXbbkG.d.ts} +4 -4
  219. package/dist/{sections-4xyBoiar.d.ts → sections-Do7X4Nwt.d.ts} +1 -2
  220. package/dist/{sections-D6AM5Gy5.js → sections-DumoLKQN.js} +2 -3
  221. package/dist/{sections-CUJyQA9d.js → sections-et20h8w3.js} +3 -3
  222. package/dist/{sections.get-1lHjyKCI.d.ts → sections.get-COiLcQ0P.d.ts} +2 -2
  223. package/dist/seo/runtime.js +1 -1
  224. package/dist/{server-DbjFYSeU.js → server-BRJE4t-W.js} +2 -2
  225. package/dist/{setup-DLZFzuLv.d.ts → setup-ZbA1by7W.d.ts} +4 -3
  226. package/dist/{site-access-Bhsty_v4.js → site-access-BbJUe5QI.js} +1 -1
  227. package/dist/{site-access-CyRtc0gZ.js → site-access-BmE8HGxs.js} +4 -4
  228. package/dist/{site-session-Jf21TVw8.js → site-session-odJq1dYa.js} +5 -5
  229. package/dist/skills/operations.d.ts +1 -1
  230. package/dist/skills/operations.js +2 -2
  231. package/dist/skills.d.ts +1 -1
  232. package/dist/{skills.get-CHQMzSD_.js → skills.get-Bl8cBe8u.js} +2 -2
  233. package/dist/{source-w9BHUwyO.js → source-D4wWtoHh.js} +1 -1
  234. package/dist/task/operations.d.ts +1 -1
  235. package/dist/task/operations.js +2 -2
  236. package/dist/test/register.js +1 -1
  237. package/dist/{ticket-RKQF6Wy9.js → ticket-Cudn1dq3.js} +1 -1
  238. package/dist/{tickets-CfJhT7d0.js → tickets-C_0Fhc00.js} +6 -6
  239. package/dist/{usage-Bc0YY_ka.js → usage-B4taNt4a.js} +1 -1
  240. package/dist/{usage-index-CMMT4cXQ.js → usage-index-BsGAFzyq.js} +1 -1
  241. package/dist/{version-DDRL_OYz.js → version-DNmSsk5r.js} +22 -19
  242. package/dist/{cli-DjoDGgT4.js → vite-stage-mmtwQIMA.js} +32 -2
  243. package/dist/{workspace-history-l47NPVSy.js → workspace-history-CraoERnc.js} +1 -1
  244. package/package.json +93 -93
  245. package/dist/cli-config--rAg6V-a.js +0 -2
  246. package/dist/decisions/vue.d.ts +0 -1
  247. package/dist/decisions/vue.js +0 -2
  248. package/dist/decisions.d.ts +0 -1
  249. package/dist/decisions.js +0 -2
  250. package/dist/development-DgaQ05jw.d.ts +0 -9
  251. package/dist/operations-H9q0QB2C.js +0 -2
  252. package/dist/runtime-feature-guard-rpZz1eMF.js +0 -55
  253. package/dist/scan-module-BTeOuZsp.js +0 -2
  254. package/dist/scan-module-DlHQ8a0X.js +0 -148
@@ -1,6 +1,6 @@
1
1
  import { defineDiagnostics, type Diagnostic } from "nostics"
2
2
 
3
- const consoleGuide = "https://vitehub.dev/docs/development/console"
3
+ const consoleGuide = "https://vitehub.dev/docs/console"
4
4
 
5
5
  /** What the Console offers as the next step for a failure. */
6
6
  export type ConsoleDiagnosticAction = "docs" | "reload" | "retry" | "sign-in"
@@ -70,175 +70,175 @@ const consoleDiagnostics = /*#__PURE__*/ defineDiagnostics({
70
70
  CONSOLE_SIGN_IN_REQUIRED: code(
71
71
  "You are not signed in, or your session ended.",
72
72
  "Sign in again.",
73
- `${consoleGuide}#how-each-mode-checks-a-request`,
73
+ `${consoleGuide}/access#who-can-call-the-endpoint`,
74
74
  "sign-in",
75
75
  ),
76
76
  CONSOLE_ACCESS_DENIED: code(
77
77
  "The Console access policy rejected this account.",
78
78
  "Sign in with an account that the access policy allows, or ask the Console owner for access.",
79
- `${consoleGuide}#how-each-mode-checks-a-request`,
79
+ `${consoleGuide}/access#who-can-call-the-endpoint`,
80
80
  "docs",
81
81
  ),
82
82
  CONSOLE_DEVELOPMENT_ONLY: code(
83
83
  "The Console endpoint without Console options runs only on the development server.",
84
84
  "For production, set console: true, and set the VITEHUB_CONSOLE_KEY_<NAME> line that the ViteHub Console shows when you link the app.",
85
- `${consoleGuide}#protect-the-console-route`,
85
+ `${consoleGuide}/access#who-can-call-the-endpoint`,
86
86
  "docs",
87
87
  ),
88
88
  CONSOLE_ACCESS_NOT_CONFIGURED: code(
89
89
  "Console access is not configured. The server has no Console access policy.",
90
90
  "Build the app with the ViteHub plugin, so the generated Console output installs its access policy.",
91
- `${consoleGuide}#protect-the-console-route`,
91
+ `${consoleGuide}/access#who-can-call-the-endpoint`,
92
92
  "docs",
93
93
  ),
94
94
  CONSOLE_ORIGIN_REJECTED: code(
95
95
  "The request did not come from the Console origin.",
96
96
  "Open the Console from its own URL. A proxy must forward the public Host and Origin headers.",
97
- `${consoleGuide}#protect-the-console-route`,
97
+ `${consoleGuide}/access#who-can-call-the-endpoint`,
98
98
  "docs",
99
99
  ),
100
100
  CONSOLE_SIGNATURE_MISSING: code(
101
101
  "This app takes only signed Console requests, and this request is not signed.",
102
102
  "Open the app from the ViteHub Console, or set `VITEHUB_CONSOLE_PRIVATE_KEY_<NAME>` for the CLI. `vitehub secret console-key` prints a new key pair; set its public key on the app.",
103
- `${consoleGuide}#sign-console-requests`,
103
+ `${consoleGuide}/signed-requests`,
104
104
  "docs",
105
105
  ),
106
106
  CONSOLE_SIGNATURE_INVALID: code(
107
107
  "The signature does not match the request.",
108
108
  "Use the private key whose public key is in the `VITEHUB_CONSOLE_KEY_<NAME>` that the signature names. If the Console linked the app again, set the new line that its setup page shows.",
109
- `${consoleGuide}#sign-console-requests`,
109
+ `${consoleGuide}/signed-requests`,
110
110
  "docs",
111
111
  ),
112
112
  CONSOLE_SIGNATURE_STALE: code(
113
113
  "The request was signed more than 5 minutes before or after the app clock.",
114
114
  "Sync the clock of the machine that signs, then send the request again.",
115
- `${consoleGuide}#sign-console-requests`,
115
+ `${consoleGuide}/signed-requests`,
116
116
  "retry",
117
117
  ),
118
118
  CONSOLE_SIGNATURE_ORIGIN: code(
119
119
  "The request was signed for another origin, or the app has no trusted origin.",
120
120
  "Link the app with the URL that serves it. A Node.js server must set `vitehub({ publicUrl })` to its public URL for signed requests.",
121
- `${consoleGuide}#sign-console-requests`,
121
+ `${consoleGuide}/signed-requests`,
122
122
  "docs",
123
123
  ),
124
124
  CONSOLE_SIGNATURE_BODY: code(
125
125
  "The request body is not the body that was signed.",
126
126
  "Send the body bytes that the signature covers. A proxy must not change the body of `POST /_vitehub/rpc`.",
127
- `${consoleGuide}#sign-console-requests`,
127
+ `${consoleGuide}/signed-requests`,
128
128
  "docs",
129
129
  ),
130
130
  CONSOLE_KEY_UNKNOWN: code(
131
131
  "The app has no public key with the name that the signature names.",
132
132
  "Set the `VITEHUB_CONSOLE_KEY_<NAME>` line from the Console setup page, or from `vitehub secret console-key`, on the app. Then restart or deploy the server.",
133
- `${consoleGuide}#sign-console-requests`,
133
+ `${consoleGuide}/signed-requests`,
134
134
  "docs",
135
135
  ),
136
136
  CONSOLE_KEY_NOT_CONFIGURED: code(
137
137
  "`console: true` needs a `VITEHUB_CONSOLE_KEY_<NAME>` variable in the server environment.",
138
138
  "Link the app in the ViteHub Console and set the line that it shows, or run `vitehub secret console-key` and set its public key line. On Cloudflare, run `wrangler secret put VITEHUB_CONSOLE_KEY_<NAME>`. Then restart or deploy the server.",
139
- `${consoleGuide}#sign-console-requests`,
139
+ `${consoleGuide}/signed-requests`,
140
140
  "docs",
141
141
  ),
142
142
  CONSOLE_KEY_MALFORMED: code(
143
143
  "A `VITEHUB_CONSOLE_KEY_<NAME>` variable is not an Ed25519 public key.",
144
144
  "Set the value to the 43 base64url characters that the Console setup page or `vitehub secret console-key` prints, with no quotes or spaces. Then restart or deploy the server.",
145
- `${consoleGuide}#sign-console-requests`,
145
+ `${consoleGuide}/signed-requests`,
146
146
  "docs",
147
147
  ),
148
148
  CONSOLE_SITE_SECRET_MISSING: code(
149
149
  "Site access without Auth seals the browser's cookie with VITEHUB_SECRET, and the app has none.",
150
150
  "Set VITEHUB_SECRET on the server. Generate one with `openssl rand -base64 32`, then restart or deploy.",
151
- `${consoleGuide}#give-browsers-site-access`,
151
+ `${consoleGuide}/site-access#site-access-without-auth`,
152
152
  "docs",
153
153
  ),
154
154
  CONSOLE_TICKET_INVALID: code(
155
155
  "This one-time link expired, was used, or was changed.",
156
156
  "Open the page again from the ViteHub Console. Each link works once, within 60 seconds.",
157
- `${consoleGuide}#one-time-links`,
157
+ `${consoleGuide}/site-access#one-time-links`,
158
158
  "docs",
159
159
  ),
160
160
  CONSOLE_TICKET_MISMATCH: code(
161
161
  "This one-time link was made for another person or another app.",
162
162
  "Open the page from the ViteHub Console in the browser where you are signed in to the app with the email of your Console account.",
163
- `${consoleGuide}#one-time-links`,
163
+ `${consoleGuide}/site-access#one-time-links`,
164
164
  "docs",
165
165
  ),
166
166
  CONSOLE_TICKET_NO_PERSON: code(
167
167
  "A one-time link opens the app as the person who asks for it, and this call names no person. A `vitehub` command signs its calls with a key, not as a person.",
168
168
  "Make the link in the ViteHub Console, where you are signed in. On a development server, which the Console cannot reach, invite the browser as a guest: `vitehub site invite <name> --grants <role>`.",
169
- `${consoleGuide}#site-access-from-the-terminal`,
169
+ `${consoleGuide}/site-access#site-access-from-the-terminal`,
170
170
  "docs",
171
171
  ),
172
172
  CONSOLE_TICKET_STORE_MISSING: code(
173
173
  "One-time links need a store that every instance of the app shares, and the app has none.",
174
174
  "Add app Auth with a Database, such as `defineAuth({ database: authDatabase() })`, then run `vitehub database migrate`. Its verification table keeps each link until it is used. Without Auth, use a default KV store on Redis, Upstash, or the `database` driver.",
175
- `${consoleGuide}#one-time-links`,
175
+ `${consoleGuide}/site-access#one-time-links`,
176
176
  "docs",
177
177
  ),
178
178
  CONSOLE_LOOPBACK_ONLY: code(
179
179
  "The development Console without signed calls accepts only requests from this machine.",
180
180
  "Call it from this machine, such as with `vitehub` commands, or remove console.auth so the app takes calls that the ViteHub Console and the CLI sign.",
181
- `${consoleGuide}#protect-the-console-route`,
181
+ `${consoleGuide}/access#who-can-call-the-endpoint`,
182
182
  "docs",
183
183
  ),
184
184
  CONSOLE_MCP_UNREACHABLE: code(
185
185
  "The MCP server did not answer, or it failed the MCP handshake.",
186
186
  "Check that the server runs and that the URL is its Streamable HTTP endpoint, such as /mcp.",
187
- `${consoleGuide}#connect-to-mcp-servers`,
187
+ `${consoleGuide}/mcp-client`,
188
188
  "retry",
189
189
  ),
190
190
  CONSOLE_MCP_SIGNED_OUT: code(
191
191
  "The MCP server rejects the credentials of this connection.",
192
192
  "Sign in again. For a token, connect again with a new one.",
193
- `${consoleGuide}#connect-to-mcp-servers`,
193
+ `${consoleGuide}/mcp-client`,
194
194
  "docs",
195
195
  ),
196
196
  CONSOLE_MCP_AUTHORIZATION_FAILED: code(
197
197
  "The OAuth sign-in with the MCP server failed.",
198
198
  "Start the sign-in again. The server must publish RFC 9728 metadata that names an authorization server with client registration.",
199
- `${consoleGuide}#connect-to-mcp-servers`,
199
+ `${consoleGuide}/mcp-client`,
200
200
  "docs",
201
201
  ),
202
202
  CONSOLE_MCP_KEY_INVALID: code(
203
203
  "VITEHUB_CONSOLE_MCP_KEY is not 32 random bytes, so the Console cannot seal MCP connections.",
204
204
  "Set VITEHUB_CONSOLE_MCP_KEY to 32 random bytes as base64 or hex, such as the output of openssl rand -base64 32.",
205
- `${consoleGuide}#what-the-mcp-client-keeps`,
205
+ `${consoleGuide}/mcp-client#keep-connections-across-restarts`,
206
206
  "docs",
207
207
  ),
208
208
  CONSOLE_MCP_KV_REQUIRED: code(
209
209
  "VITEHUB_CONSOLE_MCP_KEY is set, but the app has no configured default KV store for MCP connections.",
210
210
  "Set kv: true in vitehub(), or configure a default KV store, then rebuild the app.",
211
- `${consoleGuide}#what-the-mcp-client-keeps`,
211
+ `${consoleGuide}/mcp-client#keep-connections-across-restarts`,
212
212
  "docs",
213
213
  ),
214
214
  CONSOLE_REQUEST_INVALID: code(
215
215
  "The server cannot read this Console request.",
216
216
  "Reload the Console. If this continues, deploy the Console and the server from the same build.",
217
- `${consoleGuide}#fix-common-failures`,
217
+ `${consoleGuide}/limits-and-errors#fix-common-failures`,
218
218
  "reload",
219
219
  ),
220
220
  CONSOLE_NOT_FOUND: code(
221
221
  "The item does not exist, or the server removed it.",
222
222
  "Reload the Console to see the current data.",
223
- `${consoleGuide}#fix-common-failures`,
223
+ `${consoleGuide}/limits-and-errors#fix-common-failures`,
224
224
  "reload",
225
225
  ),
226
226
  CONSOLE_CONFLICT: code(
227
227
  "The data changed after the Console loaded it.",
228
228
  "Reload the Console, then try again.",
229
- `${consoleGuide}#fix-common-failures`,
229
+ `${consoleGuide}/limits-and-errors#fix-common-failures`,
230
230
  "reload",
231
231
  ),
232
232
  CONSOLE_UNAVAILABLE: code(
233
233
  "The server did not answer. It can be restarting, offline, or rate limited.",
234
234
  "Wait a moment, then try again.",
235
- `${consoleGuide}#fix-common-failures`,
235
+ `${consoleGuide}/limits-and-errors#fix-common-failures`,
236
236
  "retry",
237
237
  ),
238
238
  CONSOLE_REQUEST_FAILED: code(
239
239
  "The server could not complete the request.",
240
240
  "Try again. If this continues, read the server logs for this request.",
241
- `${consoleGuide}#fix-common-failures`,
241
+ `${consoleGuide}/limits-and-errors#fix-common-failures`,
242
242
  "retry",
243
243
  ),
244
244
  } satisfies Record<ConsoleDiagnosticCode, ConsoleDiagnosticDefinition>,
@@ -1,5 +1,5 @@
1
1
  function e(e,...t){return typeof e==`function`?e(...t):e}const t=Error.captureStackTrace;var n=class e extends Error{get why(){return this.message}constructor(n,r=e){super(n.why,{cause:n.cause}),this.code=this.name=n.code,this.docs=n.docs,this.fix=n.fix,this.sources=n.sources,this.data=n.data,t?.(this,r)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function r(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}const i=e=>t=>t instanceof n&&e in t;/* @__NO_SIDE_EFFECTS__ */
2
- function a(t){let a=t.reporters??[],o=Symbol(),s=Object.defineProperty({},"is",{value:i(o)}),{docsBase:c}=t;for(let i of Object.keys(t.codes)){let l=t.codes[i],u=l.docs===!1?void 0:l.docs||r(c,i),d=(t={},r={})=>{let s=new n({code:i,why:e(l.why,t),fix:e(l.fix,t),docs:u,cause:t.cause,sources:t.sources,data:e(l.data,t)},d);s[o]=1;for(let e of a)e(s,r);return s};d.is=e=>s.is(e)&&e.code===i,s[i]=d}return s}const o=/^[A-Za-z_$][\w$-]*$/,s=/^[\w$-]+(?:\.[\w$-]+)*$/;function c(e){let t=e.lastIndexOf(`#`);if(t<=0)return;let n=e.slice(t+1),r=e.slice(0,t),i=r.indexOf(`:`),a=i===-1?r:r.slice(0,i),c=i===-1?void 0:r.slice(i+1);if(o.test(a)&&s.test(n)&&c!==``)return c===void 0?{collection:a,field:n}:{collection:a,id:c,field:n}}const l={why:({message:e})=>e===void 0?``:String(e)},u=/*#__PURE__*/ a({docsBase:`https://vitehub.dev/docs/development/diagnostics`,codes:{RUNTIME_R0001:{...l,fix:"Pass `maxDepth` to `normalizeRuntimeDiagnosticError()` as an integer of 0 or more, or remove it to use the default."},RUNTIME_R0002:{...l,fix:"Pass `maxErrors` to `normalizeRuntimeDiagnosticError()` as an integer of 1 or more, or remove it to use the default."},RUNTIME_R0003:{...l,fix:"Pass `maxStringLength` to `normalizeRuntimeDiagnosticError()` as an integer of 64 or more, or remove it to use the default."},RUNTIME_R0004:{...l,fix:"Read the logs of the process that `vitehub drain` waited for to find why its drain failed, then fix that failure and run `vitehub drain` again."},RUNTIME_R0005:{...l,fix:"Read the logs of the process that the message names to find why it stopped, then start it again before you run `vitehub drain`."},RUNTIME_R0006:{...l,fix:"Pass `new ViteHubError()` a nonempty `code` and `message` string within the length limits, and plain JSON `details`."},RUNTIME_R0007:{...l,fix:"Give the execution authority a valid value for each of `credentials`, `environment`, `filesystem.access`, `filesystem.scope`, `isolation`, `network`, and `processes`."},RUNTIME_R0009:{...l,fix:"Set `intervalMs` of the process reconciler to a number of milliseconds from 1 to 2147483647."},RUNTIME_R0010:{...l,fix:"Give the process reconciler a `signal` other than `SIGKILL` or `SIGSTOP`, or set `signal: false`."},RUNTIME_R0011:{...l,fix:"Call `drain()` of the process reconciler after its callback returns, not from inside the callback."},RUNTIME_R0015:{...l,fix:"Pass the `Request` of a Fetchable handler, or the event of an H3 or Nitro route, to `getStandardContext()`."},RUNTIME_R0016:{...l,fix:"Return the body or a `Response` from the handler, in place of setting `~standard.res.body`."},RUNTIME_R0017:l,RUNTIME_R0018:l,RUNTIME_CONSOLE_PATH_INVALID:{why:({value:e})=>`${e} is not a Console path. Use a path that starts with one /, such as /agents/<agent>.`,fix:"Pass `hostedConsoleUrl()` a Console path that starts with one `/`, such as `/kv` or `/agents/<agent>/invocations/<id>`."},RUNTIME_CONSOLE_PROJECT_URL_INVALID:{why:({value:e})=>`${e} is not a project URL. Use the https:// origin of the app, with its base path if it has one.`,fix:"Pass `hostedConsoleUrl()` the `https://` origin of the app, or `http://localhost` in development, with its base path and without a user name or password."},RUNTIME_EXECUTION_BUDGET_AMOUNT_INVALID:{why:({counter:e})=>`[vitehub] Execution budget ${e} amount must be a finite non-negative number.`,fix:"Pass `consume()` and the `record*()` methods of the execution budget a finite number of 0 or more."},RUNTIME_EXECUTION_BUDGET_EXCEEDED:{why:({counter:e})=>`[vitehub] Execution budget exhausted for ${e}.`,fix:"Raise the `executionBudget` limit that `error.counter` names, such as `maxToolCalls`, `maxRetries`, `maxInputBytes`, or `maxOutputBytes`, or give the run less work."},RUNTIME_EXECUTION_BUDGET_LIMIT_INVALID:{why:()=>`[vitehub] Execution budget limits must be finite non-negative numbers.`,fix:"Set each limit of `executionBudget`, such as `maxToolCalls` or `maxOutputBytes`, to a finite number of 0 or more, or remove it."},RUNTIME_SERIALIZED_RESPONSE_INVALID:{why:()=>`Invalid serialized Response`,fix:"Pass `deserializeResponse()` the record that `serializeResponse()` returned, unchanged. Check it first with `isSerializedResponse()`."}}}),d=/* @__PURE__ */ new Set([`localhost`,`127.0.0.1`,`[::1]`]),f=`https://console.invalid`;function p(e){if(!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`))return;let t;try{t=new URL(e,f)}catch{return}if(t.origin!==f)return;let n=t.pathname.replace(/^\/_vitehub(?=\/|$)/,``)||`/`;if(!n.startsWith(`//`))return`${n}${t.search}${t.hash}`}function m(e){let t;try{t=new URL(e)}catch{return}if(t.username||t.password||t.protocol!==`https:`&&!(t.protocol===`http:`&&d.has(t.hostname)))return;let n=t.pathname.search(/\/_vitehub(?=\/|$)/),r=(n===-1?t.pathname:t.pathname.slice(0,n)).replace(/\/+$/,``);return`${t.origin}${r}`}function h(e,t,n=`https://console.vitehub.dev`){let r=m(e);if(!r)throw u.RUNTIME_CONSOLE_PROJECT_URL_INVALID({value:e});let i=p(t);if(!i)throw u.RUNTIME_CONSOLE_PATH_INVALID({value:t});let a=new URL(`/open`,n);return a.search=new URLSearchParams({project:r,path:i}).toString(),a.href}function g(e){let t=e.lastIndexOf(`/_vitehub/console/assets/`);return t>0?e.slice(0,t):``}function _(e){let t=/* @__PURE__ */ new Map;for(let n of e){let e=c(n);e&&t.set(`${e.collection}\0${e.id??``}`,{collection:e.collection,id:e.id})}let n=[...t.values()],r=n.filter(e=>e.id!==void 0),i=n.length===1?n[0]:r.length===1?r[0]:void 0;return i?`/content/${[i.collection,...i.id?.split(`/`)??[]].map(encodeURIComponent).join(`/`)}`:`/`}function v(e,t,n=[]){try{return h(`${e}${t}`,_(n))}catch{return}}const y=({bar:e,tool:t,onOpen:n})=>{let r=g(new URL(import.meta.url).pathname);if(!v(location.origin,r))return;let i=e.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=`button{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:var(--vitehub-pill-justify,center);gap:4px;min-width:28px;height:28px;padding:0 8px;border-radius:8px;font:inherit;white-space:nowrap;color:var(--vitehub-pill-text);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition-property:background-color,color,scale;transition-duration:150ms;transition-timing-function:cubic-bezier(.23,1,.32,1)}
2
+ function a(t){let a=t.reporters??[],o=Symbol(),s=Object.defineProperty({},"is",{value:i(o)}),{docsBase:c}=t;for(let i of Object.keys(t.codes)){let l=t.codes[i],u=l.docs===!1?void 0:l.docs||r(c,i),d=(t={},r={})=>{let s=new n({code:i,why:e(l.why,t),fix:e(l.fix,t),docs:u,cause:t.cause,sources:t.sources,data:e(l.data,t)},d);s[o]=1;for(let e of a)e(s,r);return s};d.is=e=>s.is(e)&&e.code===i,s[i]=d}return s}const o=/^[A-Za-z_$][\w$-]*$/,s=/^[\w$-]+(?:\.[\w$-]+)*$/;function c(e){let t=e.lastIndexOf(`#`);if(t<=0)return;let n=e.slice(t+1),r=e.slice(0,t),i=r.indexOf(`:`),a=i===-1?r:r.slice(0,i),c=i===-1?void 0:r.slice(i+1);if(o.test(a)&&s.test(n)&&c!==``)return c===void 0?{collection:a,field:n}:{collection:a,id:c,field:n}}const l={why:({message:e})=>e===void 0?``:String(e)},u=/*#__PURE__*/ a({docsBase:`https://vitehub.dev/docs/runtime/diagnostics`,codes:{RUNTIME_R0001:{...l,fix:"Pass `maxDepth` to `normalizeRuntimeDiagnosticError()` as an integer of 0 or more, or remove it to use the default."},RUNTIME_R0002:{...l,fix:"Pass `maxErrors` to `normalizeRuntimeDiagnosticError()` as an integer of 1 or more, or remove it to use the default."},RUNTIME_R0003:{...l,fix:"Pass `maxStringLength` to `normalizeRuntimeDiagnosticError()` as an integer of 64 or more, or remove it to use the default."},RUNTIME_R0004:{...l,fix:"Read the logs of the process that `vitehub drain` waited for to find why its drain failed, then fix that failure and run `vitehub drain` again."},RUNTIME_R0005:{...l,fix:"Read the logs of the process that the message names to find why it stopped, then start it again before you run `vitehub drain`."},RUNTIME_R0006:{...l,fix:"Pass `new ViteHubError()` a nonempty `code` and `message` string within the length limits, and plain JSON `details`."},RUNTIME_R0007:{...l,fix:"Give the execution authority a valid value for each of `credentials`, `environment`, `filesystem.access`, `filesystem.scope`, `isolation`, `network`, and `processes`."},RUNTIME_R0009:{...l,fix:"Set `intervalMs` of the process reconciler to a number of milliseconds from 1 to 2147483647."},RUNTIME_R0010:{...l,fix:"Give the process reconciler a `signal` other than `SIGKILL` or `SIGSTOP`, or set `signal: false`."},RUNTIME_R0011:{...l,fix:"Call `drain()` of the process reconciler after its callback returns, not from inside the callback."},RUNTIME_R0015:{...l,fix:"Pass the `Request` of a Fetchable handler, or the event of an H3 or Nitro route, to `getStandardContext()`."},RUNTIME_R0016:{...l,fix:"Return the body or a `Response` from the handler, in place of setting `~standard.res.body`."},RUNTIME_R0017:l,RUNTIME_R0018:l,RUNTIME_CONSOLE_PATH_INVALID:{why:({value:e})=>`${e} is not a Console path. Use a path that starts with one /, such as /agents/<agent>.`,fix:"Pass `hostedConsoleUrl()` a Console path that starts with one `/`, such as `/kv` or `/agents/<agent>/invocations/<id>`."},RUNTIME_CONSOLE_PROJECT_URL_INVALID:{why:({value:e})=>`${e} is not a project URL. Use the https:// origin of the app, with its base path if it has one.`,fix:"Pass `hostedConsoleUrl()` the `https://` origin of the app, or `http://localhost` in development, with its base path and without a user name or password."},RUNTIME_DURATION_INVALID:{why:({option:e,value:t})=>`${e?`\`${e}\``:`The value`} is ${t}, which is not a duration. A duration is a string with a number of 0 or more and a unit, such as "30s", "5m", or "1 day".`,fix:({suggestion:e,unit:t=`milliseconds`,value:n})=>e?`Write the time as a string with a unit: ${n} ${t} is ${e}.`:'Write a number of 0 or more and one unit: `ms`, `s`, `m`, `h`, `d`, or `w`, or a long name such as `minutes` or `days`. For example `"30s"`, `"5m"`, or `"1 day"`.'},RUNTIME_EXECUTION_BUDGET_AMOUNT_INVALID:{why:({counter:e})=>`[vitehub] Execution budget ${e} amount must be a finite non-negative number.`,fix:"Pass `consume()` and the `record*()` methods of the execution budget a finite number of 0 or more."},RUNTIME_EXECUTION_BUDGET_EXCEEDED:{why:({counter:e})=>`[vitehub] Execution budget exhausted for ${e}.`,fix:"Raise the `executionBudget` limit that `error.counter` names, such as `maxToolCalls`, `maxRetries`, `maxInputBytes`, or `maxOutputBytes`, or give the run less work."},RUNTIME_EXECUTION_BUDGET_LIMIT_INVALID:{why:()=>`[vitehub] Execution budget limits must be finite non-negative numbers.`,fix:"Set each limit of `executionBudget`, such as `maxToolCalls` or `maxOutputBytes`, to a finite number of 0 or more, or remove it."},RUNTIME_HIDDEN_ERROR:{why:()=>`The server failed. The error is not a ViteHub error, so its message and stack stay on the server.`,fix:"Read the server logs for the error. To send a code, a why, and a fix to the client, return a `ResultError` from `defineErrors()` and pass it to `toResponse()`."},RUNTIME_SERIALIZED_RESPONSE_INVALID:{why:()=>`Invalid serialized Response`,fix:"Pass `deserializeResponse()` the record that `serializeResponse()` returned, unchanged. Check it first with `isSerializedResponse()`."}}}),d=/* @__PURE__ */ new Set([`localhost`,`127.0.0.1`,`[::1]`]),f=`https://console.invalid`;function p(e){if(!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`))return;let t;try{t=new URL(e,f)}catch{return}if(t.origin!==f)return;let n=t.pathname.replace(/^\/_vitehub(?=\/|$)/,``)||`/`;if(!n.startsWith(`//`))return`${n}${t.search}${t.hash}`}function m(e){let t;try{t=new URL(e)}catch{return}if(t.username||t.password||t.protocol!==`https:`&&!(t.protocol===`http:`&&d.has(t.hostname)))return;let n=t.pathname.search(/\/_vitehub(?=\/|$)/),r=(n===-1?t.pathname:t.pathname.slice(0,n)).replace(/\/+$/,``);return`${t.origin}${r}`}function h(e,t,n=`https://console.vitehub.dev`){let r=m(e);if(!r)throw u.RUNTIME_CONSOLE_PROJECT_URL_INVALID({value:e});let i=p(t);if(!i)throw u.RUNTIME_CONSOLE_PATH_INVALID({value:t});let a=new URL(`/open`,n);return a.search=new URLSearchParams({project:r,path:i}).toString(),a.href}function g(e){let t=e.lastIndexOf(`/_vitehub/console/assets/`);return t>0?e.slice(0,t):``}function _(e){let t=/* @__PURE__ */ new Map;for(let n of e){let e=c(n);e&&t.set(`${e.collection}\0${e.id??``}`,{collection:e.collection,id:e.id})}let n=[...t.values()],r=n.filter(e=>e.id!==void 0),i=n.length===1?n[0]:r.length===1?r[0]:void 0;return i?`/content/${[i.collection,...i.id?.split(`/`)??[]].map(encodeURIComponent).join(`/`)}`:`/`}function v(e,t,n=[]){try{return h(`${e}${t}`,_(n))}catch{return}}const y=({bar:e,tool:t,onOpen:n})=>{let r=g(new URL(import.meta.url).pathname);if(!v(location.origin,r))return;let i=e.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=`button{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:var(--vitehub-pill-justify,center);gap:4px;min-width:28px;height:28px;padding:0 8px;border-radius:8px;font:inherit;white-space:nowrap;color:var(--vitehub-pill-text);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition-property:background-color,color,scale;transition-duration:150ms;transition-timing-function:cubic-bezier(.23,1,.32,1)}
3
3
  @media(hover:hover){button:where(:not(:disabled):hover){background:var(--vitehub-pill-hover);color:var(--vitehub-pill-strong)}}
4
4
  button:where(:not(:disabled):active){scale:.96}
5
5
  button[aria-pressed=true],button[aria-expanded=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text)}
@@ -10,7 +10,7 @@ Use one proof loop: orient, route, inspect the contract, build, and prove. Exact
10
10
  ## 1. Orient
11
11
 
12
12
  - In an existing project, run `pnpm vitehub status --json` first. It parses the config without running it, so it works on a broken config. It names the framework, the host, each feature as `on`, `off`, or `unknown`, the missing packages with their fix, and the host link. In an empty folder, start with `pnpm dlx vite-hub catalog --json`, then create the project with `pnpm dlx vite-hub init`. Where a project exists but `vite-hub` is not installed yet, run `pnpm dlx vite-hub status --json`. No npm package is named `vitehub`, so `npx vitehub` fails. Use the package name `vite-hub`.
13
- - Run `pnpm vitehub catalog --json` before you choose a feature or a host. Where `vite-hub` is not installed yet, use `pnpm dlx vite-hub catalog --json`. It lists each feature key, its packages, and how each host supports it (`native`, `explicit`, or `unsupported`), from the same catalog that the build checks. See [Read a project without loading it](https://vitehub.dev/raw/docs/development/cli.md#read-a-project-without-loading-it).
13
+ - Run `pnpm vitehub catalog --json` before you choose a feature or a host. Where `vite-hub` is not installed yet, use `pnpm dlx vite-hub catalog --json`. It lists each feature key, its packages, and how each host supports it (`native`, `explicit`, or `unsupported`), from the same catalog that the build checks. See [Read a project without loading it](https://vitehub.dev/raw/docs/cli/project.md#read-a-project-without-loading-it).
14
14
  - Then read only what the two commands do not answer: the lockfile, the server entry, nearby project instructions, and config parts that `status` reports as `unknown` or `manual`.
15
15
  - Identify installed ViteHub packages and versions, package manager, framework, host target, and requested outcome.
16
16
  - Open `https://vitehub.dev/llms.txt`, then select the smallest raw Markdown page covering the primary behavior. Links inside references are selection menus; do not open every linked page.
@@ -80,13 +80,13 @@ Before editing, map every requested behavior to:
80
80
 
81
81
  Then implement the smallest coherent set: manifest and lockfile, framework integration, discovered Definition where needed, application or orchestration entrypoint, and proof surface. Keep application authority in application code; grant an Agent access only through visible Capabilities, Workspace rules, Sources, or Channels.
82
82
 
83
- Turn features on with `vitehub add <feature>`, not by editing `vitehub({...})` by hand. It checks the host against the catalog, installs the owner packages, creates requested starter files, and edits the config last. Package installs are not rolled back: a failed install can leave the manifest and lockfile changed without enabling the feature. See [Add a feature](https://vitehub.dev/raw/docs/development/cli.md#add-a-feature).
83
+ Turn features on with `vitehub add <feature>`, not by editing `vitehub({...})` by hand. It checks the host against the catalog, installs the owner packages, creates requested starter files, and edits the config last. Package installs are not rolled back: a failed install can leave the manifest and lockfile changed without enabling the feature. See [Add a feature](https://vitehub.dev/raw/docs/cli/project.md#add-a-feature).
84
84
 
85
85
  - Run `--dry-run` first and read the diff, then apply with `--yes`. Without a terminal, `add` writes nothing until it gets `--yes`.
86
86
  - Pass `--name <name>` for a starter Definition, such as `server/queues/<name>.ts`. It never overwrites a file.
87
87
  - Pass provider options as `--option key=value`, such as `--option email.driver=resend`.
88
88
  - Follow the exit code. `0`: done or unchanged. `2`: input is needed; run the `rerun` command it prints, or supply the options listed in `missing` with their `choices`. `3`: a conflict; read the diagnostic code. For `SETUP_FILE_EXISTS`, choose another `--name`, or edit the existing file by hand and then rerun `vitehub add <feature> --yes` without `--name`, keeping the required `--option` values, to install packages and enable the feature. For `SETUP_CONFIG_MANUAL`, paste the printed `snippet` into the `vitehub()` options by hand. For an unsupported feature, choose another host or report the boundary, because a hand-written key does not give the host the feature. `4` (`SETUP_STALE_PLAN`): the config changed during installation; discard the plan and rerun against the current config.
89
- - Turn a feature off with `vitehub remove <feature>`. Run `--dry-run` first and read the plan, then apply with `--yes`. It deletes the config key, deletes starter files that are still unchanged, and uninstalls packages that nothing else uses. Exit `3` means another feature implies it (`SETUP_FEATURE_IMPLIED`, see `impliedBy`) or the app still uses it (`SETUP_FEATURE_IN_USE`): `references` lists each file and line, including starter files you edited. Delete or move those files and run it again. Pass `--force` only when the developer wants the feature off and the files kept. `remove` never deletes host resources, local data, or the host link; `nextSteps` names the host resources to delete by hand. See [Remove a feature](https://vitehub.dev/raw/docs/development/cli.md#remove-a-feature).
89
+ - Turn a feature off with `vitehub remove <feature>`. Run `--dry-run` first and read the plan, then apply with `--yes`. It deletes the config key, deletes starter files that are still unchanged, and uninstalls packages that nothing else uses. Exit `3` means another feature implies it (`SETUP_FEATURE_IMPLIED`, see `impliedBy`) or the app still uses it (`SETUP_FEATURE_IN_USE`): `references` lists each file and line, including starter files you edited. Delete or move those files and run it again. Pass `--force` only when the developer wants the feature off and the files kept. `remove` never deletes host resources, local data, or the host link; `nextSteps` names the host resources to delete by hand. See [Remove a feature](https://vitehub.dev/raw/docs/cli/project.md#remove-a-feature).
90
90
 
91
91
  Building is complete when every requested behavior has an implemented row and no placeholder, unused integration, implicit authority, or unowned persistence remains.
92
92
 
@@ -18,7 +18,7 @@ vitehub(...)
18
18
  nitro(...)
19
19
  ```
20
20
 
21
- For Nuxt, register `vite-hub/nuxt` and turn features on under the `vitehub` key, for example `vitehub: { auth: true, database: true, schedule: true }`. It is the only Nuxt module for ViteHub primitives. Owner-package Nuxt entries such as `@vite-hub/auth/nuxt` are internal; do not add them to `modules`. Do not reproduce app-local aliases or output rewrites from project examples without a source-backed need.
21
+ For Nuxt, register `vite-hub/nuxt` and turn features on under the `vitehub` key, for example `vitehub: { database: true, kv: true }`. A Definition file turns its feature on without a key, such as `server/auth.ts` or a file in `server/schedules/`; set the key to `false` to keep it off. It is the only Nuxt module for ViteHub primitives. Owner-package Nuxt entries such as `@vite-hub/auth/nuxt` are internal; do not add them to `modules`. Do not reproduce app-local aliases or output rewrites from project examples without a source-backed need.
22
22
 
23
23
  ## Generated state
24
24
 
@@ -6,9 +6,17 @@ Use this for installation, upgrades, `pkg.pr.new`, missing imports, or dependenc
6
6
 
7
7
  For a fresh application, read [Installation](https://vitehub.dev/raw/docs/getting-started/installation.md), install `vite-hub`, inspect `node_modules/vite-hub/package.json`, and use the root `vitehub()` integration plus exported feature subpaths. Open [Import paths](https://vitehub.dev/raw/docs/reference/import-paths.md) only when an export is ambiguous or an existing import must migrate.
8
8
 
9
+ To move an application that installs `vite-hub` to the latest release, run `pnpm vitehub update`. It changes every ViteHub dependency, override, and catalog entry of the workspace together, and installs.
10
+
9
11
  ## Preview packages
10
12
 
11
- Use an immutable full commit SHA. Probe the exact facade tarball before editing:
13
+ Use an immutable full commit SHA. An application that installs `vite-hub` moves every ViteHub package to one preview with one command. It checks that the build has each package, edits dependencies, overrides, and catalogs, sets `blockExoticSubdeps: false` for pnpm, and installs:
14
+
15
+ ```bash
16
+ pnpm vitehub update --preview <full-sha>
17
+ ```
18
+
19
+ For an application without `vite-hub`, probe the exact facade tarball before editing:
12
20
 
13
21
  ```bash
14
22
  curl -I -L --fail "https://pkg.pr.new/vite-hub/vitehub/vite-hub@<full-sha>"
@@ -6,6 +6,6 @@ Source page: https://vitehub.dev/raw/docs/channels.md
6
6
 
7
7
  A Channel is one connection to a platform, defined once in `server/channels/<name>.ts` with `defineChannel({ adapter, on })` from `vite-hub/channels`. Use it for both directions: inbound webhooks go to the `on` targets (a handler, a Queue or Workflow through a handler, or a `defineChannelTrigger()`), or to the Agent that lists the Channel in `defineAgent({ channels: ['name'] })`. Outbound messages go through `useChannel(name).send()` from any server code. `sendChannelTrigger(name, trigger, input)` starts a trigger from code, such as a Schedule, with the same delivery rules as a webhook.
8
8
 
9
- Use `stripe()` or `webhook({ signature, secret })` from `vite-hub/channels` for HTTP senders, and `slack()`, `teams()`, `discord()`, `telegram()`, `github()`, or `gmail()` from `vite-hub/agent/channels` for chat, forge, and mail. Inbound Channels need `agent: true` next to `channels: true`. Keep secrets in Server Env and never parse or verify a webhook by hand. To only check the signature in a plain route, without Agents, use `verifyWebhook(event, { provider: 'stripe', secret: 'STRIPE_WEBHOOK_SECRET' })` from `vite-hub/env`.
9
+ Use `stripe()` or `webhook({ signature, secret })` from `vite-hub/channels` for HTTP senders, and `slack()`, `teams()`, `discord()`, `telegram()`, `github()`, or `gmail()` from `vite-hub/agent/channels` for chat, forge, and mail. Files in `server/channels/` turn Channels on. Install `@vite-hub/channels` and, for inbound Channels, `@vite-hub/agent`. An inbound Channel turns on its webhook route without `agent: true`. Keep secrets in Server Env: a string `secret` is the name of the server variable, such as `webhook({ signature: 'github', secret: 'PREFECT_WEBHOOK_SECRET' })`, and the signature names follow Webhooks. Never parse or verify a webhook by hand. To only check the signature in a plain route, without Agents, use `verifyWebhook(event, { provider: 'stripe', secret: 'STRIPE_WEBHOOK_SECRET' })` from `vite-hub/env`.
10
10
 
11
11
  Prove one signed delivery reaching its target, one duplicate that does not run twice, and one outbound send with its receipt.
@@ -10,6 +10,6 @@ Import `useDatabase` from `vite-hub/database` and select the discovered database
10
10
 
11
11
  For Postgres, set `dialect: 'postgresql'`. ViteHub connects with postgres.js, or with `pg` when the Definition sets `driver: 'node-postgres'`. Put read replica URLs in `connection.replicas` and read from them with `db.$replica`; writes and reads of your own writes use `db`. On D1, use `readReplication: true` instead.
12
12
 
13
- For starting rows, write `server/databases/<name>/seed.ts` and run `vitehub seed database`. Inspect data with `vitehub database sql "<query>"`. `vitehub database drop` and `vitehub database reset` delete every table; they ask first, and need `--force` without a terminal. Each command touches only the local database unless you pass `--remote`.
13
+ For starting rows, write `server/databases/<name>/seed.ts` and run `vitehub seed database`. Inspect data with `vitehub database sql "<query>"`. `vitehub database drop` and `vitehub database reset` delete every table; they ask first, and need `--yes` without a terminal. Each command touches only the local database unless you pass `--remote`.
14
14
 
15
15
  Prove a migration, a typed read, a write, and a restart or remote-host read. Inspect generated schema and provisioning output before deployment.
@@ -1,12 +1,12 @@
1
1
  # Markdown templates
2
2
 
3
- <!-- Generated from docs/content/docs/reference/markdown-templates.md. Edit the agent-only block there. -->
3
+ <!-- Generated from docs/content/docs/markdown-template/index.md. Edit the agent-only block there. -->
4
4
 
5
- Source page: https://vitehub.dev/raw/docs/reference/markdown-templates.md
5
+ Source page: https://vitehub.dev/raw/docs/markdown-template.md
6
6
 
7
7
  Use Markdown Templates when an application needs predictable Markdown composition with data bindings, conditions, or fragments. The renderer does not evaluate JavaScript or read files implicitly.
8
8
 
9
- Start with the [Markdown Template tutorial](https://vitehub.dev/raw/docs/reference/markdown-template-tutorial.md).
9
+ Start with the [Markdown Template tutorial](https://vitehub.dev/raw/docs/markdown-template/get-started.md).
10
10
 
11
11
  Keep input data explicit and validate it before rendering. Use the file integration only with explicit paths or `file:` URLs.
12
12
 
@@ -25,11 +25,11 @@ pnpm dlx vite-hub init <dir> --host <preset> --features <id,id,...> [--option fe
25
25
  - A saved selection of host, features, and options is a _stack_. `init` writes the command that reproduces the stack into the `README.md` stack block, and `vitehub status --json` returns it as `stack.command`. Run that command to make the same project again.
26
26
  - When the developer gives a `--console <pendingId>:sha256:<hex>` value from console.vitehub.dev, pass it to `init` unchanged. See [Link and deploy](sandboxes-hosts.md#link-and-deploy).
27
27
 
28
- See [Create a project](https://vitehub.dev/raw/docs/development/cli.md#create-a-project).
28
+ See [Create a project](https://vitehub.dev/raw/docs/cli/project.md#create-a-project).
29
29
 
30
30
  ## Create the files with `vitehub add`
31
31
 
32
- Run `vitehub status --json`, then `vitehub add <feature> --dry-run` for each feature the shape needs, and apply with `--yes`. Pass `--name <name>` where the shape lists a Definition, so the starter file lands in the discovery path that the build reads. Write a file or config key by hand only when `add` prints a manual `snippet`, or for files that `add` does not create, such as application routes. See [Add a feature](https://vitehub.dev/raw/docs/development/cli.md#add-a-feature).
32
+ Run `vitehub status --json`, then `vitehub add <feature> --dry-run` for each feature the shape needs, and apply with `--yes`. Pass `--name <name>` where the shape lists a Definition, so the starter file lands in the discovery path that the build reads. Write a file or config key by hand only when `add` prints a manual `snippet`, or for files that `add` does not create, such as application routes. See [Add a feature](https://vitehub.dev/raw/docs/cli/project.md#add-a-feature).
33
33
 
34
34
  ## Coherent shapes
35
35
 
@@ -14,12 +14,12 @@ Keep host-specific setup behind the Sandbox or provider boundary. Agent Instruct
14
14
 
15
15
  ## Link and deploy
16
16
 
17
- - Run `vitehub link` to connect the project to its host project. It writes `.vitehub/link.json` and adds `.vitehub` to an existing `.gitignore`. If no `.gitignore` exists, it warns without creating one: create it with a `.vitehub` rule. Confirm the rule before committing, because the link belongs to one machine and must not follow forks or templates. `vitehub unlink` removes the link file and leaves the host project as it is. See [Link a project to its host](https://vitehub.dev/raw/docs/development/cli.md#link-a-project-to-its-host).
17
+ - Run `vitehub link` to connect the project to its host project. It writes `.vitehub/link.json` and adds `.vitehub` to an existing `.gitignore`. If no `.gitignore` exists, it warns without creating one: create it with a `.vitehub` rule. Confirm the rule before committing, because the link belongs to one machine and must not follow forks or templates. `vitehub unlink` removes the link file and leaves the host project as it is. See [Link a project to its host](https://vitehub.dev/raw/docs/cli/project.md#link-a-project-to-its-host).
18
18
  - Host credentials come from environment variables, then from the host CLI login, such as `wrangler login`. Never write a token into a project `.env` or the link file. When `link` exits with `2`, run the login command or set the variable that its `fix` names.
19
- - Deploy with `vitehub deploy --yes`. It builds the app, then runs the deploy command that the build wrote for the host. It runs on the developer's machine with the host credentials above. It never adds a CI workflow; add a GitHub CI deploy only when the developer asks for one. See [Deploy from your machine](https://vitehub.dev/raw/docs/development/cli.md#deploy-from-your-machine).
19
+ - Deploy with `vitehub deploy --yes`. It builds the app, then runs the deploy command that the build wrote for the host. It runs on the developer's machine with the host credentials above. It never adds a CI workflow; add a GitHub CI deploy only when the developer asks for one. See [Deploy from your machine](https://vitehub.dev/raw/docs/cli/project.md#deploy-from-your-machine).
20
20
  - When no credentials resolve, `deploy` exits with `2` (`SETUP_DEPLOY_CREDENTIALS_MISSING`). Ask the developer to log in, or, on Cloudflare and Vercel, offer `--temporary`: a deploy with no account that prints a claim link. A temporary Cloudflare Worker must be claimed within 60 minutes. Treat the claim link as private.
21
- - The Console link: with `console: true`, the developer links the deployed app in console.vitehub.dev, which shows a `VITEHUB_CONSOLE_KEY_<NAME>=<public key>` line. Set it as a host secret, deploy again, and ask the developer to select **Check connection**. For the CLI, `vitehub secret console-key <name>` prints the public key line for the app and a `VITEHUB_CONSOLE_PRIVATE_KEY_<NAME>` line. Never write the private key into the project. See [Sign Console requests](https://vitehub.dev/raw/docs/development/console.md#sign-console-requests).
22
- - Inspect what is deployed with `vitehub deployments --json`: each deployment with its state, target, commit, and `live` flag. `vitehub status --json` has a `live` field with the live commit and how many commits it is behind HEAD. When `live` is `null`, `liveReason` tells why, such as `not-linked` or `no-credentials`. Pass `--offline` to skip the host request. See [List deployments](https://vitehub.dev/raw/docs/development/cli.md#list-deployments).
21
+ - The Console link: with `console: true`, the developer links the deployed app in console.vitehub.dev, which shows a `VITEHUB_CONSOLE_KEY_<NAME>=<public key>` line. Set it as a host secret, deploy again, and ask the developer to select **Check connection**. For the CLI, `vitehub secret console-key <name>` prints the public key line for the app and a `VITEHUB_CONSOLE_PRIVATE_KEY_<NAME>` line. Never write the private key into the project. See [Sign Console requests](https://vitehub.dev/raw/docs/console/signed-requests.md).
22
+ - Inspect what is deployed with `vitehub deployments --json`: each deployment with its state, target, commit, and `live` flag. `vitehub status --json` has a `live` field with the live commit and how many commits it is behind HEAD. When `live` is `null`, `liveReason` tells why, such as `not-linked` or `no-credentials`. Pass `--offline` to skip the host request. See [List deployments](https://vitehub.dev/raw/docs/cli/project.md#list-deployments).
23
23
 
24
24
  ## Proof
25
25
 
@@ -1,2 +1,2 @@
1
- import { A as rememberConsoleSection, C as groupConsoleSections, D as isConsoleSectionId, E as isConsoleMcpClientEnabled, M as resolveConsoleSectionGroup, N as resolveConsoleSectionIds, O as prioritizeConsoleSectionIds, S as describeConsoleSectionRoutes, T as isConsoleBuiltinSectionId, _ as consoleSectionPageSegment, a as ConsoleSectionId, b as consoleSectionShortcutKeys, c as consoleDocsBase, d as consoleOverviewShortcut, f as consolePrimitives, g as consoleSectionPageRouteName, h as consoleSectionGroupLabels, i as ConsoleSectionGroupId, j as resolveConsoleSectionDocs, k as readLastConsoleSection, l as consoleGoToKey, m as consoleSectionGroupIds, n as ConsolePrimitive, o as ConsoleSectionRoute, p as consoleSectionDetails, r as ConsoleSectionDetails, s as consoleBuiltinSectionIds, t as ConsoleBuiltinSectionId, u as consoleGuide, v as consoleSectionRouteName, w as insertConsoleSection, x as consoleToolSectionIds, y as consoleSectionShortcut } from "../../sections-4xyBoiar.js";
1
+ import { A as rememberConsoleSection, C as groupConsoleSections, D as isConsoleSectionId, E as isConsoleMcpClientEnabled, M as resolveConsoleSectionGroup, N as resolveConsoleSectionIds, O as prioritizeConsoleSectionIds, S as describeConsoleSectionRoutes, T as isConsoleBuiltinSectionId, _ as consoleSectionPageSegment, a as ConsoleSectionId, b as consoleSectionShortcutKeys, c as consoleDocsBase, d as consoleOverviewShortcut, f as consolePrimitives, g as consoleSectionPageRouteName, h as consoleSectionGroupLabels, i as ConsoleSectionGroupId, j as resolveConsoleSectionDocs, k as readLastConsoleSection, l as consoleGoToKey, m as consoleSectionGroupIds, n as ConsolePrimitive, o as ConsoleSectionRoute, p as consoleSectionDetails, r as ConsoleSectionDetails, s as consoleBuiltinSectionIds, t as ConsoleBuiltinSectionId, u as consoleGuide, v as consoleSectionRouteName, w as insertConsoleSection, x as consoleToolSectionIds, y as consoleSectionShortcut } from "../../sections-Do7X4Nwt.js";
2
2
  export { ConsoleBuiltinSectionId, ConsolePrimitive, ConsoleSectionDetails, ConsoleSectionGroupId, ConsoleSectionId, ConsoleSectionRoute, consoleBuiltinSectionIds, consoleDocsBase, consoleGoToKey, consoleGuide, consoleOverviewShortcut, consolePrimitives, consoleSectionDetails, consoleSectionGroupIds, consoleSectionGroupLabels, consoleSectionPageRouteName, consoleSectionPageSegment, consoleSectionRouteName, consoleSectionShortcut, consoleSectionShortcutKeys, consoleToolSectionIds, describeConsoleSectionRoutes, groupConsoleSections, insertConsoleSection, isConsoleBuiltinSectionId, isConsoleMcpClientEnabled, isConsoleSectionId, prioritizeConsoleSectionIds, readLastConsoleSection, rememberConsoleSection, resolveConsoleSectionDocs, resolveConsoleSectionGroup, resolveConsoleSectionIds };
@@ -1,2 +1,2 @@
1
- import { C as readLastConsoleSection, D as resolveConsoleSectionIds, E as resolveConsoleSectionGroup, S as prioritizeConsoleSectionIds, T as resolveConsoleSectionDocs, _ as groupConsoleSections, a as consoleOverviewShortcut, b as isConsoleMcpClientEnabled, c as consoleSectionGroupIds, d as consoleSectionPageSegment, f as consoleSectionRouteName, g as describeConsoleSectionRoutes, h as consoleToolSectionIds, i as consoleGuide, l as consoleSectionGroupLabels, m as consoleSectionShortcutKeys, n as consoleDocsBase, o as consolePrimitives, p as consoleSectionShortcut, r as consoleGoToKey, s as consoleSectionDetails, t as consoleBuiltinSectionIds, u as consoleSectionPageRouteName, v as insertConsoleSection, w as rememberConsoleSection, x as isConsoleSectionId, y as isConsoleBuiltinSectionId } from "../../sections-D6AM5Gy5.js";
1
+ import { C as readLastConsoleSection, D as resolveConsoleSectionIds, E as resolveConsoleSectionGroup, S as prioritizeConsoleSectionIds, T as resolveConsoleSectionDocs, _ as groupConsoleSections, a as consoleOverviewShortcut, b as isConsoleMcpClientEnabled, c as consoleSectionGroupIds, d as consoleSectionPageSegment, f as consoleSectionRouteName, g as describeConsoleSectionRoutes, h as consoleToolSectionIds, i as consoleGuide, l as consoleSectionGroupLabels, m as consoleSectionShortcutKeys, n as consoleDocsBase, o as consolePrimitives, p as consoleSectionShortcut, r as consoleGoToKey, s as consoleSectionDetails, t as consoleBuiltinSectionIds, u as consoleSectionPageRouteName, v as insertConsoleSection, w as rememberConsoleSection, x as isConsoleSectionId, y as isConsoleBuiltinSectionId } from "../../sections-DumoLKQN.js";
2
2
  export { consoleBuiltinSectionIds, consoleDocsBase, consoleGoToKey, consoleGuide, consoleOverviewShortcut, consolePrimitives, consoleSectionDetails, consoleSectionGroupIds, consoleSectionGroupLabels, consoleSectionPageRouteName, consoleSectionPageSegment, consoleSectionRouteName, consoleSectionShortcut, consoleSectionShortcutKeys, consoleToolSectionIds, describeConsoleSectionRoutes, groupConsoleSections, insertConsoleSection, isConsoleBuiltinSectionId, isConsoleMcpClientEnabled, isConsoleSectionId, prioritizeConsoleSectionIds, readLastConsoleSection, rememberConsoleSection, resolveConsoleSectionDocs, resolveConsoleSectionGroup, resolveConsoleSectionIds };
@@ -1,2 +1,2 @@
1
- import { a as installedConsoleAccessPolicy, i as installConsoleAccess, n as consoleAuthorizedSections, r as consoleOpenAccessWarning, t as consoleAuthorizedGrants } from "../../../access-policy-BsB3QVe5.js";
1
+ import { a as installedConsoleAccessPolicy, i as installConsoleAccess, n as consoleAuthorizedSections, r as consoleOpenAccessWarning, t as consoleAuthorizedGrants } from "../../../access-policy-CGXhO3Ee.js";
2
2
  export { consoleAuthorizedGrants, consoleAuthorizedSections, consoleOpenAccessWarning, installConsoleAccess, installedConsoleAccessPolicy };
@@ -1,2 +1,2 @@
1
- import { a as installedConsoleAccessPolicy, i as installConsoleAccess, n as consoleAuthorizedSections, r as consoleOpenAccessWarning, t as consoleAuthorizedGrants } from "../../../access-policy-B_DCpZUt.js";
1
+ import { a as installedConsoleAccessPolicy, i as installConsoleAccess, n as consoleAuthorizedSections, r as consoleOpenAccessWarning, t as consoleAuthorizedGrants } from "../../../access-policy-DjBKLo3c.js";
2
2
  export { consoleAuthorizedGrants, consoleAuthorizedSections, consoleOpenAccessWarning, installConsoleAccess, installedConsoleAccessPolicy };
@@ -1,5 +1,5 @@
1
- import { t as getConsoleInvocations } from "../../../invocations-CsucCJuq.js";
2
- import { c as getConsoleAgents, r as consoleAgentInvokerProfiles, s as getConsoleAgentDefinition } from "../../../agents-DnHexzTJ.js";
1
+ import { t as getConsoleInvocations } from "../../../invocations-CK_-G540.js";
2
+ import { c as getConsoleAgents, r as consoleAgentInvokerProfiles, s as getConsoleAgentDefinition } from "../../../agents-BDeazoAW.js";
3
3
  //#region src/console/runtime/server/agents.get.ts
4
4
  /** The Agents of the `agents.list` operation. */
5
5
  async function listConsoleAgents() {
@@ -1,2 +1,2 @@
1
- import { a as runAuthConsoleRead, i as runAuthConsoleAction, n as authConsoleFailure, r as issueImpersonationTicket, t as AuthOperationContext } from "../../../auth-BFVHYizM.js";
1
+ import { a as runAuthConsoleRead, i as runAuthConsoleAction, n as authConsoleFailure, r as issueImpersonationTicket, t as AuthOperationContext } from "../../../auth-BZOy7obk.js";
2
2
  export { AuthOperationContext, authConsoleFailure, issueImpersonationTicket, runAuthConsoleAction, runAuthConsoleRead };
@@ -1,5 +1,5 @@
1
- import { l as consolePerson, o as consoleImpersonation } from "../../../access-F0YP5D5E.js";
2
- import { i as consoleRequestError } from "../../../request-BUYAlAJl.js";
1
+ import { l as consolePerson, o as consoleImpersonation } from "../../../access-BDST818p.js";
2
+ import { i as consoleRequestError } from "../../../request-DbFfYmCu.js";
3
3
  import { r as getConsoleSections } from "../../../sections-C83x0slv.js";
4
4
  import { getAuthConsoleForRequest } from "@vite-hub/auth/server";
5
5
  //#region src/console/runtime/server/auth.ts
@@ -1,2 +1,2 @@
1
- import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-CiUmptIp.js";
1
+ import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-CFLwMsjH.js";
2
2
  export { getConsoleBlob, installConsoleBlob, loadConsoleMedia };
@@ -1,2 +1,2 @@
1
- import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-BRV6_wZa.js";
1
+ import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-CpvlM8jp.js";
2
2
  export { getConsoleBlob, installConsoleBlob, loadConsoleMedia };
@@ -1,5 +1,5 @@
1
- import { r as OperationContext } from "../../../operations-DX9EkHwb.js";
2
- import { o as ConsoleAccess } from "../../../access-policy-BsB3QVe5.js";
1
+ import { r as OperationContext } from "../../../operations-B0689BG1.js";
2
+ import { o as ConsoleAccess } from "../../../access-policy-CGXhO3Ee.js";
3
3
  //#region src/console/runtime/server/channel-replay.d.ts
4
4
  /** The input of `channels.replay`: the Agent, then the replay fields of `handleChannelReplayRequest()`. */
5
5
  export interface ConsoleChannelReplayInput {
@@ -1,7 +1,7 @@
1
- import { i as consoleAccessInvoker, p as readConsoleAccessUser } from "../../../access-F0YP5D5E.js";
2
- import { i as consoleRequestError } from "../../../request-BUYAlAJl.js";
3
- import { o as getConsoleAgentCapabilities, s as getConsoleAgentDefinition } from "../../../agents-DnHexzTJ.js";
4
- import { t as agentConsole } from "../../../server-DbjFYSeU.js";
1
+ import { i as consoleAccessInvoker, p as readConsoleAccessUser } from "../../../access-BDST818p.js";
2
+ import { i as consoleRequestError } from "../../../request-DbFfYmCu.js";
3
+ import { o as getConsoleAgentCapabilities, s as getConsoleAgentDefinition } from "../../../agents-BDeazoAW.js";
4
+ import { t as agentConsole } from "../../../server-BRJE4t-W.js";
5
5
  import { createExecutionContext, createRuntimeWaitUntilController } from "@vite-hub/runtime";
6
6
  import { handleChannelReplayRequest } from "@vite-hub/agent/server/internal";
7
7
  //#region src/console/runtime/server/channel-replay.ts
@@ -1,2 +1,2 @@
1
- import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-BVyhAxq-.js";
1
+ import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-DyPVMjp_.js";
2
2
  export { getConsoleDatabase, installConsoleDatabase };
@@ -1,4 +1,4 @@
1
- import { r as ConsoleDatabaseInspection } from "../../../internal-BP_O70ic.js";
1
+ import { r as ConsoleDatabaseInspection } from "../../../internal-CO4OqqaS.js";
2
2
  import { Column } from "drizzle-orm";
3
3
  import { PgTable } from "drizzle-orm/pg-core";
4
4
  import { SQLiteTable } from "drizzle-orm/sqlite-core";
@@ -1,6 +1,6 @@
1
- import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-C2rjmOlX.js";
1
+ import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-Bm3JKYjz.js";
2
2
  import { t as consoleHttpError } from "../../../http-error-Bs6e8_-8.js";
3
- import { t as getConsoleDatabase } from "../../../database-J7M0B3ED.js";
3
+ import { t as getConsoleDatabase } from "../../../database-BdOBjPkS.js";
4
4
  import { asc, count, desc, getTableColumns, is, or, sql } from "drizzle-orm";
5
5
  import { PgTable, getTableConfig } from "drizzle-orm/pg-core";
6
6
  import { SQLiteTable, getTableConfig as getTableConfig$1 } from "drizzle-orm/sqlite-core";
@@ -1,2 +1,2 @@
1
- import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-J7M0B3ED.js";
1
+ import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-BdOBjPkS.js";
2
2
  export { getConsoleDatabase, installConsoleDatabase };
@@ -1,2 +1,2 @@
1
- import { a as installConsoleDefinitions, i as getConsoleSchedules, n as getConsoleContributedSections, o as installConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-CGTWTj67.js";
1
+ import { a as installConsoleDefinitions, i as getConsoleSchedules, n as getConsoleContributedSections, o as installConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-Dbgxfz3I.js";
2
2
  export { copyConsoleRecords, getConsoleContributedSections, getConsoleDefinitions, getConsoleSchedules, installConsoleDefinitions, installConsoleSchedules };
@@ -1,6 +1,6 @@
1
- import { y as ConsoleSectionContent } from "../../../definitions-CxDT8D8Y.js";
2
- import { a as ConsoleSectionId } from "../../../sections-4xyBoiar.js";
3
- import { o as ConsoleAccess } from "../../../access-policy-BsB3QVe5.js";
1
+ import { y as ConsoleSectionContent } from "../../../definitions-DB4LbZ7T.js";
2
+ import { a as ConsoleSectionId } from "../../../sections-Do7X4Nwt.js";
3
+ import { o as ConsoleAccess } from "../../../access-policy-CGXhO3Ee.js";
4
4
  //#region src/console/runtime/server/definitions.get.d.ts
5
5
  /** The definitions of one Console section, for the `definitions.list` operation. */
6
6
  export declare function listConsoleDefinitions(input: {
@@ -1,7 +1,7 @@
1
- import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-C2rjmOlX.js";
2
- import { x as isConsoleSectionId } from "../../../sections-D6AM5Gy5.js";
1
+ import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-Bm3JKYjz.js";
2
+ import { x as isConsoleSectionId } from "../../../sections-DumoLKQN.js";
3
3
  import { t as consoleHttpError } from "../../../http-error-Bs6e8_-8.js";
4
- import { i as getConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-bepsXY5G.js";
4
+ import { i as getConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-CNq_Shkh.js";
5
5
  //#region src/console/runtime/server/definitions.get.ts
6
6
  function requestError(statusCode, statusMessage) {
7
7
  return consoleHttpError(statusCode, viteHubErrorDiagnostics.VITE_HUB_C0001({ message: statusMessage }));
@@ -1,2 +1,2 @@
1
- import { a as installConsoleDefinitions, i as getConsoleSchedules, n as getConsoleContributedSections, o as installConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-bepsXY5G.js";
1
+ import { a as installConsoleDefinitions, i as getConsoleSchedules, n as getConsoleContributedSections, o as installConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-CNq_Shkh.js";
2
2
  export { copyConsoleRecords, getConsoleContributedSections, getConsoleDefinitions, getConsoleSchedules, installConsoleDefinitions, installConsoleSchedules };
@@ -1,2 +1,2 @@
1
- import { n as installConsoleDevelopment, r as isConsoleDevelopmentBuild, t as consoleSetupRoute } from "../../../development-DgaQ05jw.js";
2
- export { consoleSetupRoute, installConsoleDevelopment, isConsoleDevelopmentBuild };
1
+ import { i as isConsoleDevelopmentBuild, n as consoleSetupRoute, r as installConsoleDevelopment, t as consoleDevelopmentContext } from "../../../development-W5EwONyL.js";
2
+ export { consoleDevelopmentContext, consoleSetupRoute, installConsoleDevelopment, isConsoleDevelopmentBuild };
@@ -1,2 +1,2 @@
1
- import { n as installConsoleDevelopment, r as isConsoleDevelopmentBuild, t as consoleSetupRoute } from "../../../development-BzeSHZGH.js";
2
- export { consoleSetupRoute, installConsoleDevelopment, isConsoleDevelopmentBuild };
1
+ import { i as isConsoleDevelopmentBuild, n as consoleSetupRoute, r as installConsoleDevelopment, t as consoleDevelopmentContext } from "../../../development-zLxOp-AO.js";
2
+ export { consoleDevelopmentContext, consoleSetupRoute, installConsoleDevelopment, isConsoleDevelopmentBuild };
@@ -1,2 +1,2 @@
1
- import { a as ConsoleDocumentEditors, c as consoleDocumentActionContext, d as issueConsoleDocumentPreview, f as loadConsoleDocumentActions, g as maximumConsoleDocumentRequestBytes, h as consoleDocumentActionNames, i as ConsoleDocumentEditorInstall, l as guardedHandler, m as runConsoleDocumentAction, n as ConsoleDocumentActionName, o as ConsoleMediaAccess, p as readConsoleDocumentSection, r as ConsoleDocumentActions, s as consoleActionError, t as ConsoleDocumentActionContext, u as installConsoleDocuments } from "../../../documents-RVHsQKFw.js";
1
+ import { a as ConsoleDocumentEditors, c as consoleDocumentActionContext, d as issueConsoleDocumentPreview, f as loadConsoleDocumentActions, g as maximumConsoleDocumentRequestBytes, h as consoleDocumentActionNames, i as ConsoleDocumentEditorInstall, l as guardedHandler, m as runConsoleDocumentAction, n as ConsoleDocumentActionName, o as ConsoleMediaAccess, p as readConsoleDocumentSection, r as ConsoleDocumentActions, s as consoleActionError, t as ConsoleDocumentActionContext, u as installConsoleDocuments } from "../../../documents-CboVhYFz.js";
2
2
  export { ConsoleDocumentActionContext, ConsoleDocumentActionName, ConsoleDocumentActions, ConsoleDocumentEditorInstall, ConsoleDocumentEditors, ConsoleMediaAccess, consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, issueConsoleDocumentPreview, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };
@@ -1,3 +1,3 @@
1
1
  import { i as maximumConsoleDocumentRequestBytes, n as consoleDocumentActionNames } from "../../../limits-BUlwWYQE.js";
2
- import { a as issueConsoleDocumentPreview, c as runConsoleDocumentAction, i as installConsoleDocuments, n as consoleDocumentActionContext, o as loadConsoleDocumentActions, r as guardedHandler, s as readConsoleDocumentSection, t as consoleActionError } from "../../../documents-DwPfR-fz.js";
2
+ import { a as issueConsoleDocumentPreview, c as runConsoleDocumentAction, i as installConsoleDocuments, n as consoleDocumentActionContext, o as loadConsoleDocumentActions, r as guardedHandler, s as readConsoleDocumentSection, t as consoleActionError } from "../../../documents-CjJTCrY8.js";
3
3
  export { consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, issueConsoleDocumentPreview, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };