vite-hub 0.5.0 → 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 (553) hide show
  1. package/README.md +9 -8
  2. package/dist/_internal/runtime/browser-errors.d.ts +0 -2
  3. package/dist/_internal/runtime/browser-errors.js +3 -4
  4. package/dist/_internal/runtime/redirects.d.ts +1 -2
  5. package/dist/_internal/runtime/redirects.js +2 -3
  6. package/dist/_internal/runtime/request-policy.d.ts +1 -2
  7. package/dist/_internal/runtime/request-policy.js +2 -3
  8. package/dist/_internal/runtime/security.d.ts +1 -2
  9. package/dist/_internal/runtime/security.js +1 -2
  10. package/dist/{access-BC9HtX_M.js → access-CUFHPi8T.js} +13 -140
  11. package/dist/{access-policy-DhsEACna.d.ts → access-DkBck8Vu.d.ts} +17 -21
  12. package/dist/{access-policy-CVZg9LPR.js → access-policy-BM48XstY.js} +5 -6
  13. package/dist/{account-Cjj-tYzo.d.ts → account-DNr8fHcQ.d.ts} +5 -7
  14. package/dist/{console/runtime/server → agent/console}/agents.get.d.ts +2 -3
  15. package/dist/{console/runtime/server → agent/console}/agents.get.js +3 -4
  16. package/dist/{console/runtime/server → agent/console}/channel-replay.d.ts +3 -5
  17. package/dist/{console/runtime/server → agent/console}/channel-replay.js +6 -7
  18. package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.d.ts +1 -3
  19. package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.js +4 -5
  20. package/dist/agent/console/invocation-workspace.get.d.ts +6 -0
  21. package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.js +6 -7
  22. package/dist/{console/runtime/server → agent/console}/invocation.get.d.ts +4 -6
  23. package/dist/{console/runtime/server → agent/console}/invocation.get.js +8 -9
  24. package/dist/{console/runtime/server → agent/console}/invocations.get.d.ts +1 -2
  25. package/dist/{console/runtime/server → agent/console}/invocations.get.js +5 -6
  26. package/dist/agent/console/invocations.usage.d.ts +6 -0
  27. package/dist/agent/console/invocations.usage.js +51 -0
  28. package/dist/agent/console/operations.d.ts +6 -0
  29. package/dist/agent/console/operations.js +247 -0
  30. package/dist/{console/runtime/server → agent/console}/status.get.d.ts +2 -4
  31. package/dist/{console/runtime/server → agent/console}/status.get.js +6 -7
  32. package/dist/{server-W0c79AYZ.js → agent-console-CHsLxKk_.js} +4 -4
  33. package/dist/agent-console-FmaYpVv-.d.ts +14 -0
  34. package/dist/{agent-invocations.post-C3Onl2yH.js → agent-invocations.post-CF5anHY6.js} +14 -17
  35. package/dist/agents-DBm_PJie.js +1 -0
  36. package/dist/{agents-B76RICcy.js → agents-DXLHsE7x.js} +5 -6
  37. package/dist/{agents-C94A4N9u.d.ts → agents-Gyw4VKPt.d.ts} +0 -2
  38. package/dist/auth/console/auth.d.ts +25 -0
  39. package/dist/{console/runtime/server → auth/console}/auth.js +11 -13
  40. package/dist/auth/console/operations.d.ts +3 -0
  41. package/dist/auth/console/operations.js +135 -0
  42. package/dist/auth/server.js +1 -2
  43. package/dist/{auth-operations-GcQk0O0X.js → auth-operations-BKqoX8Ua.js} +4 -5
  44. package/dist/{auth-types-D3ugQ8xM.d.ts → auth-types-Cotn7406.d.ts} +4 -21
  45. package/dist/bin.js +8 -11
  46. package/dist/blob/console/operations.d.ts +3 -0
  47. package/dist/blob/console/operations.js +44 -0
  48. package/dist/blob/nuxt-image.js +1 -2
  49. package/dist/{blob-BcgsZtqM.js → blob-iw8pWQ6o.js} +5 -6
  50. package/dist/{blob-iVewd7KQ.d.ts → blob-uNin0_TV.d.ts} +1 -3
  51. package/dist/{browser-error-limits-CToqAD-O.js → browser-error-limits-B0yS95zt.js} +2 -4
  52. package/dist/cache/operations.d.ts +2 -4
  53. package/dist/cache/operations.js +3 -4
  54. package/dist/cache.d.ts +1 -3
  55. package/dist/cache.js +2 -3
  56. package/dist/{cli-config-FPHk1nbC.js → cli-config-BX8H4ZCo.js} +2 -3
  57. package/dist/cli-config-DgpmE_7z.js +1 -0
  58. package/dist/cms.js +1 -2
  59. package/dist/console/auth-types.d.ts +2 -2
  60. package/dist/console/auth.d.ts +2 -4
  61. package/dist/console/auth.js +2 -3
  62. package/dist/console/runtime/auth-operations.d.ts +4 -6
  63. package/dist/console/runtime/auth-operations.js +1 -2
  64. package/dist/console/runtime/client/account-views.d.ts +1 -3
  65. package/dist/console/runtime/client/account-views.js +1 -2
  66. package/dist/console/runtime/client/account.d.ts +1 -1
  67. package/dist/console/runtime/client/account.js +29 -45
  68. package/dist/console/runtime/client/appearance.d.ts +1 -2
  69. package/dist/console/runtime/client/appearance.js +1 -2
  70. package/dist/console/runtime/client/auth-management.ts +6 -6
  71. package/dist/console/runtime/client/blob-media.d.ts +2 -4
  72. package/dist/console/runtime/client/blob-media.js +5 -6
  73. package/dist/console/runtime/client/comment-thread.d.ts +1 -3
  74. package/dist/console/runtime/client/comment-thread.js +3 -4
  75. package/dist/console/runtime/client/content-heads.d.ts +1 -2
  76. package/dist/console/runtime/client/content-heads.js +2 -3
  77. package/dist/console/runtime/client/documents.d.ts +2 -2
  78. package/dist/console/runtime/client/documents.js +1 -2
  79. package/dist/console/runtime/client/editor.d.ts +3 -5
  80. package/dist/console/runtime/client/editor.js +1 -2
  81. package/dist/console/runtime/client/env-groups.d.ts +1 -3
  82. package/dist/console/runtime/client/env-groups.js +1 -2
  83. package/dist/console/runtime/client/env-status.d.ts +1 -3
  84. package/dist/console/runtime/client/env-status.js +1 -2
  85. package/dist/console/runtime/client/format.d.ts +1 -3
  86. package/dist/console/runtime/client/format.js +1 -2
  87. package/dist/console/runtime/client/invocation-deletion.d.ts +1 -2
  88. package/dist/console/runtime/client/invocation-deletion.js +1 -2
  89. package/dist/console/runtime/client/invocation.d.ts +1 -2
  90. package/dist/console/runtime/client/invocation.js +4 -5
  91. package/dist/console/runtime/client/live.d.ts +2 -4
  92. package/dist/console/runtime/client/live.js +1 -2
  93. package/dist/console/runtime/client/mcp-client.d.ts +7 -5
  94. package/dist/console/runtime/client/mcp-client.js +10 -5
  95. package/dist/console/runtime/client/media-library.d.ts +1 -1
  96. package/dist/console/runtime/client/media-library.js +1 -2
  97. package/dist/console/runtime/client/media-uploads.d.ts +2 -4
  98. package/dist/console/runtime/client/media-uploads.js +2 -3
  99. package/dist/console/runtime/client/media.d.ts +1 -1
  100. package/dist/console/runtime/client/media.js +1 -2
  101. package/dist/console/runtime/client/operation-view.d.ts +2 -4
  102. package/dist/console/runtime/client/operation-view.js +4 -5
  103. package/dist/console/runtime/client/presence.d.ts +2 -4
  104. package/dist/console/runtime/client/presence.js +1 -2
  105. package/dist/console/runtime/client/preview.d.ts +1 -3
  106. package/dist/console/runtime/client/preview.js +1 -2
  107. package/dist/console/runtime/client/problem.d.ts +2 -4
  108. package/dist/console/runtime/client/problem.js +3 -4
  109. package/dist/console/runtime/client/project-link.d.ts +1 -1
  110. package/dist/console/runtime/client/project-link.js +1 -2
  111. package/dist/console/runtime/client/project-session.d.ts +19 -10
  112. package/dist/console/runtime/client/project-session.js +1 -723
  113. package/dist/console/runtime/client/project.d.ts +1 -3
  114. package/dist/console/runtime/client/project.js +1 -2
  115. package/dist/console/runtime/client/projects.d.ts +1 -1
  116. package/dist/console/runtime/client/projects.js +1 -2
  117. package/dist/console/runtime/client/publish.d.ts +2 -4
  118. package/dist/console/runtime/client/publish.js +1 -2
  119. package/dist/console/runtime/client/rate-limit.d.ts +1 -3
  120. package/dist/console/runtime/client/rate-limit.js +3 -4
  121. package/dist/console/runtime/client/read-only.d.ts +2 -4
  122. package/dist/console/runtime/client/read-only.js +2 -3
  123. package/dist/console/runtime/client/request.d.ts +2 -2
  124. package/dist/console/runtime/client/request.js +1 -2
  125. package/dist/console/runtime/client/route-query.d.ts +4 -5
  126. package/dist/console/runtime/client/route-query.js +1 -2
  127. package/dist/console/runtime/client/schedule-run.d.ts +1 -3
  128. package/dist/console/runtime/client/schedule-run.js +3 -4
  129. package/dist/console/runtime/client/schema-form.d.ts +1 -1
  130. package/dist/console/runtime/client/schema-form.js +1 -2
  131. package/dist/console/runtime/client/sections.d.ts +1 -1
  132. package/dist/console/runtime/client/sections.js +1 -2
  133. package/dist/console/runtime/client/site-access.d.ts +83 -16
  134. package/dist/console/runtime/client/site-access.js +159 -32
  135. package/dist/console/runtime/client/site-link.d.ts +2 -0
  136. package/dist/console/runtime/client/site-link.js +1 -0
  137. package/dist/console/runtime/client/stored.d.ts +1 -3
  138. package/dist/console/runtime/client/stored.js +1 -2
  139. package/dist/console/runtime/client/toast.d.ts +1 -3
  140. package/dist/console/runtime/client/toast.js +1 -2
  141. package/dist/console/runtime/client/workflow.d.ts +1 -3
  142. package/dist/console/runtime/client/workflow.js +3 -4
  143. package/dist/console/runtime/components/console-account-home.vue +9 -7
  144. package/dist/console/runtime/components/console-account-link.vue +8 -5
  145. package/dist/console/runtime/components/console-account-setup.vue +10 -7
  146. package/dist/console/runtime/components/console-account-shell.vue +7 -2
  147. package/dist/console/runtime/components/console-account-unlink.vue +2 -3
  148. package/dist/console/runtime/components/console-app-settings.vue +8 -2
  149. package/dist/console/runtime/components/console-auth-detail.vue +1 -1
  150. package/dist/console/runtime/components/console-auth-event-list.vue +1 -0
  151. package/dist/console/runtime/components/console-document-editor.vue +3 -4
  152. package/dist/console/runtime/components/console-hosted-comments-embed.vue +106 -0
  153. package/dist/console/runtime/components/console-mcp-callback.vue +6 -1
  154. package/dist/console/runtime/components/console-mcp-items.vue +3 -16
  155. package/dist/console/runtime/components/console-site.vue +10 -8
  156. package/dist/console/runtime/components/console-usage.vue +2 -2
  157. package/dist/console/runtime/console-route.d.ts +1 -3
  158. package/dist/console/runtime/console-route.js +1 -2
  159. package/dist/console/runtime/definitions.d.ts +1 -1
  160. package/dist/console/runtime/definitions.js +1 -2
  161. package/dist/console/runtime/diagnostics.ts +14 -49
  162. package/dist/console/runtime/mcp-client.d.ts +2 -2
  163. package/dist/console/runtime/mcp-client.js +1 -2
  164. package/dist/console/runtime/operation-loader.d.ts +1 -0
  165. package/dist/console/runtime/operation-loader.js +10 -0
  166. package/dist/console/runtime/page-tool/account.js +26 -0
  167. package/dist/console/runtime/page-tool/page-tool.js +2 -2
  168. package/dist/console/runtime/rpc.d.ts +1 -1
  169. package/dist/console/runtime/rpc.js +1 -2
  170. package/dist/console/runtime/sections.d.ts +2 -2
  171. package/dist/console/runtime/sections.js +1 -2
  172. package/dist/console/runtime/server/access-policy.d.ts +1 -1
  173. package/dist/console/runtime/server/access-policy.js +1 -2
  174. package/dist/console/runtime/server/agent-console.d.ts +2 -0
  175. package/dist/console/runtime/server/agent-console.js +1 -0
  176. package/dist/console/runtime/server/blob.d.ts +1 -1
  177. package/dist/console/runtime/server/blob.js +1 -2
  178. package/dist/console/runtime/server/database.d.ts +1 -1
  179. package/dist/console/runtime/server/database.js +1 -2
  180. package/dist/console/runtime/server/definitions.d.ts +1 -1
  181. package/dist/console/runtime/server/definitions.get.d.ts +4 -6
  182. package/dist/console/runtime/server/definitions.get.js +5 -6
  183. package/dist/console/runtime/server/definitions.js +1 -2
  184. package/dist/console/runtime/server/development.d.ts +1 -1
  185. package/dist/console/runtime/server/development.js +1 -2
  186. package/dist/console/runtime/server/documents.d.ts +2 -2
  187. package/dist/console/runtime/server/documents.js +3 -3
  188. package/dist/console/runtime/server/entry-site-access.d.ts +3 -0
  189. package/dist/console/runtime/server/entry-site-access.js +4 -0
  190. package/dist/console/runtime/server/entry.d.ts +3 -0
  191. package/dist/console/runtime/server/entry.js +4 -0
  192. package/dist/console/runtime/server/env.d.ts +1 -3
  193. package/dist/console/runtime/server/env.js +1 -2
  194. package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
  195. package/dist/console/runtime/server/operation-contributions.js +1 -2
  196. package/dist/console/runtime/server/pill.d.ts +45 -0
  197. package/dist/console/runtime/server/pill.js +62 -0
  198. package/dist/console/runtime/server/rpc.d.ts +5 -10
  199. package/dist/console/runtime/server/rpc.js +19 -27
  200. package/dist/console/runtime/server/runtime.d.ts +1 -1
  201. package/dist/console/runtime/server/runtime.js +1 -2
  202. package/dist/console/runtime/server/sections.d.ts +5 -5
  203. package/dist/console/runtime/server/sections.get.d.ts +1 -1
  204. package/dist/console/runtime/server/sections.get.js +8 -9
  205. package/dist/console/runtime/server/sections.js +6 -6
  206. package/dist/console/runtime/server/setup.d.ts +5 -5
  207. package/dist/console/runtime/server/setup.js +5 -5
  208. package/dist/console/runtime/server/site-access-operation.d.ts +7 -0
  209. package/dist/console/runtime/server/site-access-operation.js +36 -0
  210. package/dist/console/runtime/server/site-actions.d.ts +73 -0
  211. package/dist/console/runtime/server/site-actions.js +105 -0
  212. package/dist/console/runtime/server/site-entry.d.ts +16 -9
  213. package/dist/console/runtime/server/site-entry.js +62 -46
  214. package/dist/console/runtime/server/site-visitor.d.ts +17 -0
  215. package/dist/console/runtime/server/site-visitor.js +1 -0
  216. package/dist/console/runtime/server/site.d.ts +27 -0
  217. package/dist/console/runtime/server/site.js +1 -0
  218. package/dist/console/runtime/skills.d.ts +1 -3
  219. package/dist/console/runtime/skills.js +1 -2
  220. package/dist/console/server.d.ts +9 -25
  221. package/dist/console/server.js +8 -8
  222. package/dist/console/ui.d.ts +0 -10
  223. package/dist/console/ui.js +14 -27
  224. package/dist/console-lazy-views-VEjcbL4Q.js +1 -0
  225. package/dist/{console-route-CM2G5hiC.js → console-route-DbdnLkkF.js} +2 -3
  226. package/dist/console-signature--55DIKf2.js +237 -0
  227. package/dist/console.d.ts +1 -3
  228. package/dist/console.js +1 -2
  229. package/dist/content/console/operations.d.ts +3 -0
  230. package/dist/content/console/operations.js +62 -0
  231. package/dist/{console/runtime/server → database/console}/database.get.d.ts +2 -3
  232. package/dist/{console/runtime/server → database/console}/database.get.js +4 -5
  233. package/dist/database/console/operations.d.ts +3 -0
  234. package/dist/database/console/operations.js +49 -0
  235. package/dist/{database-UMJgnU2z.js → database-CrgBUdIx.js} +3 -4
  236. package/dist/{database-DC67Ipm-.d.ts → database-yFezh5U1.d.ts} +1 -3
  237. package/dist/{definition-catalog-BUcclwSH.js → definition-catalog-1xPPtzOx.js} +3 -4
  238. package/dist/definition-catalog-M5ua7JRS.js +1 -0
  239. package/dist/{definitions-BW6SvmMM.js → definitions-BFYqXchw.js} +1 -2
  240. package/dist/{definitions-DB4LbZ7T.d.ts → definitions-ChvMnA1L.d.ts} +0 -2
  241. package/dist/{definitions-DTytrw42.js → definitions-DGo2rNQ9.js} +5 -6
  242. package/dist/{definitions-Dbgxfz3I.d.ts → definitions-DRkgHKmk.d.ts} +1 -3
  243. package/dist/{deployment-BUshgN5Q.js → deployment-CURATxjG.js} +2 -3
  244. package/dist/deployment-l7RuKdEp.js +1 -0
  245. package/dist/{dev-peer-CHjyHYG6.js → dev-peer-CRYp01PE.js} +2 -222
  246. package/dist/dev-peer-CX5C9243.js +1 -0
  247. package/dist/{development-zLxOp-AO.js → development-DD567hhJ.js} +2 -3
  248. package/dist/{development-RnopiRwK.d.ts → development-I40mfD7B.d.ts} +1 -3
  249. package/dist/{diagnostics-DtR0TAmq.js → diagnostics-DLHqjKGe.js} +3 -9
  250. package/dist/diagnostics-DgGKvWzF.d.ts +7 -0
  251. package/dist/docs/nuxt.js +1 -2
  252. package/dist/doctor.d.ts +0 -6
  253. package/dist/doctor.js +11492 -12152
  254. package/dist/{documents-BDR0AkYR.d.ts → documents-A-7Ho0g0.d.ts} +12 -16
  255. package/dist/{documents-B4R4JSfH.js → documents-BduuZjm3.js} +6 -6
  256. package/dist/{documents-BASIRZ91.d.ts → documents-CApMRd4o.d.ts} +4 -7
  257. package/dist/{documents-BewAPY61.js → documents-D6ueeoUR.js} +17 -21
  258. package/dist/durability/operations.d.ts +2 -4
  259. package/dist/durability/operations.js +3 -4
  260. package/dist/{entries-DbyNPLC9.js → entries-UFs9n1MB.js} +2 -3
  261. package/dist/{console/runtime/server → env/console}/env.get.d.ts +2 -4
  262. package/dist/env/console/env.get.js +15 -0
  263. package/dist/env/console/operations.d.ts +3 -0
  264. package/dist/env/console/operations.js +12 -0
  265. package/dist/env/vite.d.ts +1 -0
  266. package/dist/env/vite.js +2 -0
  267. package/dist/{env-Dg1I_DWr.js → env-D-wtSupz.js} +2 -3
  268. package/dist/{error-diagnostics-B1yAIaSn.js → error-diagnostics-CBtvqI30.js} +2 -7
  269. package/dist/{error-diagnostics-C0KyI408.js → error-diagnostics-kKXseq8d.js} +5 -2
  270. package/dist/error-diagnostics.ts +1 -7
  271. package/dist/{features-CC5OcZqJ.js → features-BXRKlmtN.js} +5 -6
  272. package/dist/features-CD5i5I8V.js +1 -0
  273. package/dist/{format-BOYlanIZ.js → format-Df-bS4Ly.js} +1 -2
  274. package/dist/{github-login-Bi3bfjRX.js → github-login-W-vaahWP.js} +1 -2
  275. package/dist/{host-CkL0jjBq.js → host-DeNPYIeV.js} +1 -2
  276. package/dist/{http-error-Bs6e8_-8.js → http-error-BorAxJYM.js} +1 -2
  277. package/dist/index.d.ts +1 -7
  278. package/dist/index.js +5 -7
  279. package/dist/{inspect-DbZuP_7b.js → inspect-CWwAuL-B.js} +2 -3
  280. package/dist/internal/agent-invocations-libsql.js +1 -2
  281. package/dist/internal/disabled-redis-driver.d.ts +1 -3
  282. package/dist/internal/disabled-redis-driver.js +2 -3
  283. package/dist/internal/disabled-upstash-driver.d.ts +1 -3
  284. package/dist/internal/disabled-upstash-driver.js +2 -3
  285. package/dist/internal/test-loader.d.ts +1 -3
  286. package/dist/internal/test-loader.js +2 -3
  287. package/dist/internal/test-server.js +2 -3
  288. package/dist/{internal-BreyUsQ6.js → internal-0C_CC601.js} +1 -2
  289. package/dist/{internal-Cc9N0shU.d.ts → internal-BRNf11h3.d.ts} +14 -8
  290. package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
  291. package/dist/{invocation-page-undo-DqYcPlkQ.js → invocation-page-undo-DHbXczWY.js} +8 -7
  292. package/dist/invocations-B60XWNES.js +45 -0
  293. package/dist/{limits-BUlwWYQE.js → limits-BLo31qDR.js} +1 -2
  294. package/dist/logs/client.d.ts +1 -3
  295. package/dist/logs/client.js +1 -2
  296. package/dist/{console/runtime/server → logs/console}/logs.get.d.ts +3 -5
  297. package/dist/{console/runtime/server → logs/console}/logs.get.js +7 -8
  298. package/dist/logs/console/operations.d.ts +3 -0
  299. package/dist/logs/console/operations.js +23 -0
  300. package/dist/logs/host.d.ts +2 -4
  301. package/dist/logs/host.js +1 -2
  302. package/dist/logs/memory.d.ts +1 -1
  303. package/dist/logs/memory.js +1 -2
  304. package/dist/logs/source.d.ts +1 -1
  305. package/dist/logs/source.js +1 -2
  306. package/dist/logs.d.ts +2 -2
  307. package/dist/logs.js +2 -2
  308. package/dist/loopback-Bl9Cvj1k.js +139 -0
  309. package/dist/mcp/eval.d.ts +1 -0
  310. package/dist/mcp/eval.js +2 -0
  311. package/dist/{mcp-client-C_sEmyQw.d.ts → mcp-client-uXVvS7RL.d.ts} +5 -10
  312. package/dist/{media-uKX4Wy-c.d.ts → media-C79RB1oH.d.ts} +0 -2
  313. package/dist/{media-D3OfyKni.js → media-CNwnh6CG.js} +8 -9
  314. package/dist/{media-library-o8RRsnn_.js → media-library-DTC8TLsZ.js} +5 -6
  315. package/dist/{media-library-D9ThbXqs.d.ts → media-library-DxGu6w9z.d.ts} +0 -2
  316. package/dist/{memory-C54SDH_l.js → memory-D3EJS_Bp.js} +3 -4
  317. package/dist/{memory-2bbl4hcV.d.ts → memory-GK5ZGWrp.d.ts} +1 -3
  318. package/dist/{nuxt-server-auto-imports-cfTZYvgy.js → nuxt-server-auto-imports-4aT5BD4u.js} +1 -2
  319. package/dist/{nuxt-server-imports-75bWMeXc.js → nuxt-server-imports-BdJqiVhT.js} +1 -2
  320. package/dist/nuxt.d.ts +1 -3
  321. package/dist/nuxt.js +276 -182
  322. package/dist/{object-D8pRdprI.js → object-DRSmpe04.js} +1 -2
  323. package/dist/{operation-contributions-C3lwePQu.js → operation-contributions-BU10k2QS.js} +9 -9
  324. package/dist/{operation-contributions-CrdmqtJW.d.ts → operation-contributions-xwjDzj28.d.ts} +6 -7
  325. package/dist/{operation-definition-DxjKcCGm.js → operation-definition-D04Rdjbe.js} +7 -9
  326. package/dist/operation-modules-BUXlwjvd.js +1 -0
  327. package/dist/operation-modules-DHWkPcfS.js +139 -0
  328. package/dist/{operation-registry-BogGwk_I.js → operation-registry-DfQbL7vE.js} +1 -2
  329. package/dist/{operation-rpc-DI9txNxK.js → operation-rpc-BMdfapja.js} +3 -4
  330. package/dist/operations-D-7ljPqw.js +1 -0
  331. package/dist/{operations-TTjL_7Zc.d.ts → operations-DgFhA1WE.d.ts} +0 -4
  332. package/dist/{operations-CFYGXqLm.js → operations-DksTrRMb.js} +4 -5
  333. package/dist/operations-byxiZ2R2.js +113 -0
  334. package/dist/{optional-owners-O6sj4uoj.js → optional-owners-Cypch7V3.js} +4 -6
  335. package/dist/{out-fRNaVslw.js → out-Cw5Tvr92.js} +2933 -2301
  336. package/dist/{owned-paths-BnjT0FhU.js → owned-paths-MjjDftBn.js} +1 -2
  337. package/dist/page/pill.iife.js +2 -2
  338. package/dist/page-tools-BeZrtn4S.js +46 -0
  339. package/dist/page-tools-Chk8Gm9x.d.ts +23 -0
  340. package/dist/page-tools-shared-BLPidmCi.js +39 -0
  341. package/dist/{pathe.M-eThtNZ-J4gfe1m9.js → pathe.M-eThtNZ-D4EC7Wue.js} +1 -2
  342. package/dist/{plugins-DoXnU6-s.d.ts → plugins-BmkOoyIh.d.ts} +25 -110
  343. package/dist/{plugins-BTZQaFtZ.js → plugins-DfXcUnzN.js} +1779 -1384
  344. package/dist/presets/workspace.js +1 -2
  345. package/dist/{project-Dgyq1F1V.d.ts → project-B2qWt8on.d.ts} +3 -12
  346. package/dist/{project-DlWTGB7h.js → project-DRC67Uiu.js} +1 -2
  347. package/dist/{project-DXZRZEPX.js → project-_juMSuAS.js} +8 -11
  348. package/dist/{project-link-DT99MoyU.js → project-link-CJbCkOlC.js} +7 -8
  349. package/dist/{project-link-bNS-KROO.d.ts → project-link-Ck3vuq9w.d.ts} +2 -4
  350. package/dist/{project-root-v6ba4tn7.js → project-root-mAVQGZTX.js} +1 -2
  351. package/dist/project-session-8pN7pRo8.js +764 -0
  352. package/dist/{projects-CAcXztf4.js → projects-BRp0iseV.js} +1 -2
  353. package/dist/{projects-Ddvl9EJp.d.ts → projects-mgPxrKZr.d.ts} +0 -2
  354. package/dist/{registry-zw6aE2N9.js → registry-B8JE5NY-.js} +1 -2
  355. package/dist/{registry-CDKLACCZ.js → registry-CnPC-gNu.js} +1 -2
  356. package/dist/{request-CMA2UKKq.js → request-D769eiBL.js} +5 -6
  357. package/dist/{request-D7h3SQ92.d.ts → request-DYmjLTqP.d.ts} +2 -4
  358. package/dist/{request-SBLxvpyr.d.ts → request-DkoE0b2h.d.ts} +11 -4
  359. package/dist/{request-Cs0FqxEL.js → request-XFVx7CGC.js} +30 -9
  360. package/dist/{request-origin-COUkgHd6.js → request-origin-pzWr9UUu.js} +1 -2
  361. package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
  362. package/dist/{route-query-CRVWXIrc.js → route-query-BWVl6ZO6.js} +4 -5
  363. package/dist/routes-D02vxUSg.js +26 -0
  364. package/dist/{rpc-DIUA61pv.js → rpc-D3tsx5lZ.js} +1 -2
  365. package/dist/{rpc-7nlHSv3y.d.ts → rpc-oijgKQtD.d.ts} +0 -2
  366. package/dist/{runtime-YLWfdrtO.js → runtime-CAbuQGMP.js} +3 -4
  367. package/dist/{runtime-B-46Bawt.js → runtime-CRJsqVTa.js} +2 -3
  368. package/dist/{runtime-DxfJOfCd.js → runtime-DA7HJe10.js} +3 -4
  369. package/dist/runtime-DGvimtvc.d.ts +5 -0
  370. package/dist/{runtime-CX_l_78I.js → runtime-F0CTqBFx.js} +5 -6
  371. package/dist/{runtime-feature-guard-CuyPVGj9.js → runtime-feature-guard-BKAMRZzM.js} +6 -7
  372. package/dist/scan-module-B1A24jqP.js +1 -0
  373. package/dist/{scan-module-Df58L_6T.js → scan-module-BfZvDBxb.js} +2 -4
  374. package/dist/{schema-form-C-fy3xaU.d.ts → schema-form-Bl79Bdm-.d.ts} +0 -2
  375. package/dist/search-jgMrZJXR.js +84 -0
  376. package/dist/{sections-DumoLKQN.js → sections-AUGy9EkY.js} +2 -8
  377. package/dist/{sections-BogiCmtz.d.ts → sections-BMkFB3S-.d.ts} +4 -6
  378. package/dist/{sections-C83x0slv.js → sections-BNTdIEJw.js} +2 -3
  379. package/dist/{sections-Do7X4Nwt.d.ts → sections-DCoCa4nF.d.ts} +1 -8
  380. package/dist/sections-DjeAUX7o.d.ts +8 -0
  381. package/dist/{sections-BKUReack.js → sections-ZFAlI4JW.js} +14 -7
  382. package/dist/{sections.get-H46e2urg.d.ts → sections.get-BY5dClJY.d.ts} +2 -4
  383. package/dist/seo/runtime.d.ts +2 -5
  384. package/dist/seo/runtime.js +3 -5
  385. package/dist/{seo-CtLywyRx.d.ts → seo-CgW5uI9L.d.ts} +0 -2
  386. package/dist/seo.d.ts +1 -1
  387. package/dist/seo.js +1 -2
  388. package/dist/{setup-BC0P3eZy.d.ts → setup-BBnZPziq.d.ts} +5 -10
  389. package/dist/{setup-DNGzawFn.js → setup-yc3_WKNG.js} +4 -17
  390. package/dist/site-CZCIWsUQ.js +169 -0
  391. package/dist/site-link-Bvo2SxPo.js +58 -0
  392. package/dist/site-link-Dtw8MNVB.d.ts +18 -0
  393. package/dist/site-pages-B6J8U2Nq.js +66 -0
  394. package/dist/site-token-Wa7fhjwg.js +215 -0
  395. package/dist/site-visitor-BkhE2TA0.js +89 -0
  396. package/dist/skills/operations.d.ts +1 -5
  397. package/dist/skills/operations.js +4 -5
  398. package/dist/{skills-DdpSMiCI.js → skills-C1MaGEbO.js} +1 -2
  399. package/dist/skills.d.ts +1 -2
  400. package/dist/{skills.get-CRd06TTb.js → skills.get-CW8vc_Hf.js} +3 -4
  401. package/dist/skills.js +1 -2
  402. package/dist/{source-Cw3iYvJF.js → source-DYFndd0W.js} +2 -3
  403. package/dist/{source-S-LChQvw.d.ts → source-DemBtwla.d.ts} +0 -2
  404. package/dist/{stored-Dhv2qsQv.js → stored-J3TetMKf.js} +1 -2
  405. package/dist/task/operations.d.ts +1 -5
  406. package/dist/task/operations.js +3 -4
  407. package/dist/test/register.js +2 -3
  408. package/dist/test.d.ts +0 -4
  409. package/dist/test.js +1 -2
  410. package/dist/ui/vite.js +1 -2
  411. package/dist/usage-DBi7aOhx.js +33 -0
  412. package/dist/{version-dkga9imp.js → version-DUCd7Orc.js} +24 -21
  413. package/dist/{vite-stage-D7fe614I.js → vite-stage-Dmo4RgnK.js} +3 -5
  414. package/dist/{vue-router-C68IU1jM.d.ts → vue-router-plZJLlpm.d.ts} +120 -182
  415. package/dist/workspace/console/operations.d.ts +3 -0
  416. package/dist/workspace/console/operations.js +22 -0
  417. package/dist/{console/runtime/server → workspace/console}/workspace-files.get.d.ts +3 -5
  418. package/dist/{console/runtime/server → workspace/console}/workspace-files.get.js +4 -5
  419. package/dist/{workspace-history-B95Q-kGI.js → workspace-history-B52xib2J.js} +3 -4
  420. package/dist/{workspace-history-CeVwBB6Q.d.ts → workspace-history-WuxgLsi4.d.ts} +0 -2
  421. package/package.json +158 -149
  422. package/dist/agents-BhFggA26.js +0 -2
  423. package/dist/auth-GFIN6xSJ.d.ts +0 -120
  424. package/dist/cli-config-g_mbWdjT.js +0 -2
  425. package/dist/cloudflare-env-lookup-DKXdr4P_.js +0 -16
  426. package/dist/console/runtime/client/ticket.d.ts +0 -2
  427. package/dist/console/runtime/client/ticket.js +0 -2
  428. package/dist/console/runtime/page/loader.js +0 -134
  429. package/dist/console/runtime/server/auth.d.ts +0 -2
  430. package/dist/console/runtime/server/env.get.js +0 -16
  431. package/dist/console/runtime/server/invocation-workspace.get.d.ts +0 -8
  432. package/dist/console/runtime/server/mcp-client-operations.d.ts +0 -5
  433. package/dist/console/runtime/server/mcp-client-operations.js +0 -139
  434. package/dist/console/runtime/server/page-auth.d.ts +0 -18
  435. package/dist/console/runtime/server/page-auth.js +0 -44
  436. package/dist/console/runtime/server/page-tool.d.ts +0 -2
  437. package/dist/console/runtime/server/page-tool.js +0 -110
  438. package/dist/console/runtime/server/page-tools-route.d.ts +0 -2
  439. package/dist/console/runtime/server/page-tools-route.js +0 -5
  440. package/dist/console/runtime/server/search.get.d.ts +0 -4
  441. package/dist/console/runtime/server/search.get.js +0 -97
  442. package/dist/console/runtime/server/site-session.d.ts +0 -80
  443. package/dist/console/runtime/server/site-session.js +0 -2
  444. package/dist/console/runtime/server/tickets.d.ts +0 -2
  445. package/dist/console/runtime/server/tickets.js +0 -2
  446. package/dist/console/runtime/server/usage.get.d.ts +0 -10
  447. package/dist/console/runtime/server/usage.get.js +0 -92
  448. package/dist/console/runtime/site-access.d.ts +0 -2
  449. package/dist/console/runtime/site-access.js +0 -2
  450. package/dist/console-lazy-views-DXnIkdyd.js +0 -2
  451. package/dist/definition-catalog-og_1razf.js +0 -2
  452. package/dist/deployment-C2B0hBBj.js +0 -2
  453. package/dist/diagnostics-CjGiniKb.d.ts +0 -11
  454. package/dist/features-ujWsvlEH.js +0 -2
  455. package/dist/invocations-6jxqLkGY.js +0 -86
  456. package/dist/mcp-client-C91h8Taa.js +0 -1024
  457. package/dist/mcp-client-CTbTbn7d.js +0 -10
  458. package/dist/operations-5Lwd1xEI.js +0 -2
  459. package/dist/operations-ChEXk2ij.js +0 -853
  460. package/dist/page-tool-PmxH65gt.d.ts +0 -69
  461. package/dist/page-tools-ClgqElu-.js +0 -462
  462. package/dist/page-tools-DcCCtDKi.d.ts +0 -23
  463. package/dist/page-tools-shared-aNC9YtoI.js +0 -125
  464. package/dist/runtime-B_btezs1.d.ts +0 -7
  465. package/dist/scan-module-D_3X08mj.js +0 -2
  466. package/dist/secret-DELGKpCJ.js +0 -44
  467. package/dist/sections-CFiMNsqu.d.ts +0 -10
  468. package/dist/site-access-BycrwM2v.js +0 -18
  469. package/dist/site-access-CAiWyKOD.js +0 -2
  470. package/dist/site-access-DxfdOel1.d.ts +0 -55
  471. package/dist/site-access-L1qbvKt6.js +0 -293
  472. package/dist/site-session-CRwgKtTF.js +0 -300
  473. package/dist/skills/vitehub/SKILL.md +0 -142
  474. package/dist/skills/vitehub/agents/openai.yaml +0 -4
  475. package/dist/skills/vitehub/references/agent-definitions.md +0 -36
  476. package/dist/skills/vitehub/references/bundle.md +0 -57
  477. package/dist/skills/vitehub/references/capabilities-authority.md +0 -30
  478. package/dist/skills/vitehub/references/channels-triggers.md +0 -27
  479. package/dist/skills/vitehub/references/framework-composition.md +0 -29
  480. package/dist/skills/vitehub/references/preview-contract.md +0 -44
  481. package/dist/skills/vitehub/references/primitives/auth.md +0 -14
  482. package/dist/skills/vitehub/references/primitives/blob.md +0 -13
  483. package/dist/skills/vitehub/references/primitives/browser.md +0 -17
  484. package/dist/skills/vitehub/references/primitives/cache.md +0 -13
  485. package/dist/skills/vitehub/references/primitives/channels.md +0 -11
  486. package/dist/skills/vitehub/references/primitives/connections.md +0 -14
  487. package/dist/skills/vitehub/references/primitives/content.md +0 -13
  488. package/dist/skills/vitehub/references/primitives/database.md +0 -15
  489. package/dist/skills/vitehub/references/primitives/email.md +0 -11
  490. package/dist/skills/vitehub/references/primitives/env.md +0 -13
  491. package/dist/skills/vitehub/references/primitives/kv.md +0 -13
  492. package/dist/skills/vitehub/references/primitives/markdown-template.md +0 -13
  493. package/dist/skills/vitehub/references/primitives/queue.md +0 -14
  494. package/dist/skills/vitehub/references/primitives/rate-limit.md +0 -11
  495. package/dist/skills/vitehub/references/primitives/realtime.md +0 -19
  496. package/dist/skills/vitehub/references/primitives/sandbox-task.md +0 -11
  497. package/dist/skills/vitehub/references/primitives/sandbox.md +0 -13
  498. package/dist/skills/vitehub/references/primitives/schedule.md +0 -11
  499. package/dist/skills/vitehub/references/primitives/shell.md +0 -11
  500. package/dist/skills/vitehub/references/primitives/source.md +0 -11
  501. package/dist/skills/vitehub/references/primitives/workflow.md +0 -11
  502. package/dist/skills/vitehub/references/primitives/workspace.md +0 -11
  503. package/dist/skills/vitehub/references/project-patterns.md +0 -19
  504. package/dist/skills/vitehub/references/project-shapes.md +0 -81
  505. package/dist/skills/vitehub/references/proof-recovery.md +0 -31
  506. package/dist/skills/vitehub/references/sandboxes-hosts.md +0 -26
  507. package/dist/skills/vitehub/references/schedules-workflows-invocations.md +0 -28
  508. package/dist/skills/vitehub/references/server-primitives.md +0 -39
  509. package/dist/skills/vitehub/references/workspaces-sources-access.md +0 -26
  510. package/dist/ticket-DtBAstEU.js +0 -31
  511. package/dist/ticket-Pr_8ZtXW.d.ts +0 -14
  512. package/dist/tickets-DahBmKDT.js +0 -357
  513. package/dist/usage-CoQXs5nW.d.ts +0 -22
  514. package/dist/usage-index-VJAZ7a0p.js +0 -335
  515. package/dist/usage-jKtAgJZ0.js +0 -571
  516. /package/dist/{console/runtime/public/skills → console-skills}/index.json +0 -0
  517. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/SKILL.md +0 -0
  518. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/agents/openai.yaml +0 -0
  519. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/agent-definitions.md +0 -0
  520. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/bundle.md +0 -0
  521. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/capabilities-authority.md +0 -0
  522. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/channels-triggers.md +0 -0
  523. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/framework-composition.md +0 -0
  524. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/preview-contract.md +0 -0
  525. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/auth.md +0 -0
  526. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/blob.md +0 -0
  527. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/browser.md +0 -0
  528. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/cache.md +0 -0
  529. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/channels.md +0 -0
  530. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/connections.md +0 -0
  531. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/content.md +0 -0
  532. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/database.md +0 -0
  533. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/email.md +0 -0
  534. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/env.md +0 -0
  535. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/kv.md +0 -0
  536. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/markdown-template.md +0 -0
  537. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/queue.md +0 -0
  538. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/rate-limit.md +0 -0
  539. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/realtime.md +0 -0
  540. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox-task.md +0 -0
  541. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox.md +0 -0
  542. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/schedule.md +0 -0
  543. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/shell.md +0 -0
  544. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/source.md +0 -0
  545. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workflow.md +0 -0
  546. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workspace.md +0 -0
  547. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-patterns.md +0 -0
  548. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-shapes.md +0 -0
  549. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/proof-recovery.md +0 -0
  550. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/sandboxes-hosts.md +0 -0
  551. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/schedules-workflows-invocations.md +0 -0
  552. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/server-primitives.md +0 -0
  553. /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/workspaces-sources-access.md +0 -0
@@ -1,2 +1 @@
1
- import { a as parseConsoleDocumentSetup, c as parseConsoleSectionContent, i as parseConsoleDocumentCollections, n as parseConsoleDefinitionFields, o as parseConsoleRecordActivity, r as parseConsoleDefinitionSummaries, s as parseConsoleRecordLink, t as parseConsoleContributedSection } from "../../definitions-BW6SvmMM.js";
2
- export { parseConsoleContributedSection, parseConsoleDefinitionFields, parseConsoleDefinitionSummaries, parseConsoleDocumentCollections, parseConsoleDocumentSetup, parseConsoleRecordActivity, parseConsoleRecordLink, parseConsoleSectionContent };
1
+ export { t as parseConsoleContributedSection, n as parseConsoleDefinitionFields, r as parseConsoleDefinitionSummaries, i as parseConsoleDocumentCollections, a as parseConsoleDocumentSetup, o as parseConsoleRecordActivity, s as parseConsoleRecordLink, c as parseConsoleSectionContent } from "../../definitions-BFYqXchw.js";
@@ -16,8 +16,6 @@ export type ConsoleDiagnosticCode =
16
16
  | "CONSOLE_KEY_UNKNOWN"
17
17
  | "CONSOLE_LOOPBACK_ONLY"
18
18
  | "CONSOLE_MCP_AUTHORIZATION_FAILED"
19
- | "CONSOLE_MCP_KEY_INVALID"
20
- | "CONSOLE_MCP_KV_REQUIRED"
21
19
  | "CONSOLE_MCP_SIGNED_OUT"
22
20
  | "CONSOLE_MCP_UNREACHABLE"
23
21
  | "CONSOLE_NOT_FOUND"
@@ -30,11 +28,8 @@ export type ConsoleDiagnosticCode =
30
28
  | "CONSOLE_SIGNATURE_MISSING"
31
29
  | "CONSOLE_SIGNATURE_ORIGIN"
32
30
  | "CONSOLE_SIGNATURE_STALE"
33
- | "CONSOLE_SITE_SECRET_MISSING"
34
- | "CONSOLE_TICKET_INVALID"
35
- | "CONSOLE_TICKET_MISMATCH"
36
- | "CONSOLE_TICKET_NO_PERSON"
37
- | "CONSOLE_TICKET_STORE_MISSING"
31
+ | "CONSOLE_SITE_ACCOUNT_MISMATCH"
32
+ | "CONSOLE_SITE_TOKEN_REFUSED"
38
33
  | "CONSOLE_UNAVAILABLE"
39
34
 
40
35
  export type ConsoleDiagnosticData = {
@@ -145,36 +140,6 @@ const consoleDiagnostics = /*#__PURE__*/ defineDiagnostics({
145
140
  `${consoleGuide}/signed-requests`,
146
141
  "docs",
147
142
  ),
148
- CONSOLE_SITE_SECRET_MISSING: code(
149
- "Site access without Auth seals the browser's cookie with VITEHUB_SECRET, and the app has none.",
150
- "Set VITEHUB_SECRET on the server. Generate one with `openssl rand -base64 32`, then restart or deploy.",
151
- `${consoleGuide}/site-access#site-access-without-auth`,
152
- "docs",
153
- ),
154
- CONSOLE_TICKET_INVALID: code(
155
- "This one-time link expired, was used, or was changed.",
156
- "Open the page again from the ViteHub Console. Each link works once, within 60 seconds.",
157
- `${consoleGuide}/site-access#one-time-links`,
158
- "docs",
159
- ),
160
- CONSOLE_TICKET_MISMATCH: code(
161
- "This one-time link was made for another person or another app.",
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}/site-access#one-time-links`,
164
- "docs",
165
- ),
166
- CONSOLE_TICKET_NO_PERSON: code(
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
- "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#site-access-from-the-terminal`,
170
- "docs",
171
- ),
172
- CONSOLE_TICKET_STORE_MISSING: code(
173
- "One-time links need a store that every instance of the app shares, and the app has none.",
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, add a Database: when the default KV store cannot take a key out once, such as Cloudflare KV, the links go in its `vitehub_console_site` table. Or use a default KV store on Redis, Upstash, or the `database` driver.",
175
- `${consoleGuide}/site-access#one-time-links`,
176
- "docs",
177
- ),
178
143
  CONSOLE_LOOPBACK_ONLY: code(
179
144
  "The development Console without signed calls accepts only requests from this machine.",
180
145
  "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.",
@@ -199,18 +164,6 @@ const consoleDiagnostics = /*#__PURE__*/ defineDiagnostics({
199
164
  `${consoleGuide}/mcp-client`,
200
165
  "docs",
201
166
  ),
202
- CONSOLE_MCP_KEY_INVALID: code(
203
- "VITEHUB_CONSOLE_MCP_KEY is not 32 random bytes, so the Console cannot seal MCP connections.",
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}/mcp-client#keep-connections-across-restarts`,
206
- "docs",
207
- ),
208
- CONSOLE_MCP_KV_REQUIRED: code(
209
- "VITEHUB_CONSOLE_MCP_KEY is set, but the app has no configured default KV store for MCP connections.",
210
- "Set kv: true in vitehub(), or configure a default KV store, then rebuild the app.",
211
- `${consoleGuide}/mcp-client#keep-connections-across-restarts`,
212
- "docs",
213
- ),
214
167
  CONSOLE_REQUEST_INVALID: code(
215
168
  "The server cannot read this Console request.",
216
169
  "Reload the Console. If this continues, deploy the Console and the server from the same build.",
@@ -229,6 +182,18 @@ const consoleDiagnostics = /*#__PURE__*/ defineDiagnostics({
229
182
  `${consoleGuide}/limits-and-errors#fix-common-failures`,
230
183
  "reload",
231
184
  ),
185
+ CONSOLE_SITE_ACCOUNT_MISMATCH: code(
186
+ "Impersonation uses the app session of this browser, and it belongs to another person than your Console account, or it has no session.",
187
+ "Sign in to the app in this browser with the email of your ViteHub Console account, then start the impersonation again from the Console. Stop an impersonation in the browser that started it.",
188
+ `${consoleGuide}/site-access#impersonation-and-content-preview`,
189
+ "docs",
190
+ ),
191
+ CONSOLE_SITE_TOKEN_REFUSED: code(
192
+ "The app refused the Site access token that the ViteHub Console sent.",
193
+ "Open the site again from the ViteHub Console, in the same browser. Check that the app has the `VITEHUB_CONSOLE_KEY_<NAME>` of its link and that `vitehub({ publicUrl })` is the URL that you open.",
194
+ `${consoleGuide}/site-access#how-the-app-checks-a-visit`,
195
+ "docs",
196
+ ),
232
197
  CONSOLE_UNAVAILABLE: code(
233
198
  "The server did not answer. It can be restarting, offline, or rate limited.",
234
199
  "Wait a moment, then try again.",
@@ -1,2 +1,2 @@
1
- import { a as ConsoleMcpGrant, c as ConsoleMcpOutcome, d as ConsoleMcpServerInfo, f as ConsoleMcpStatus, i as ConsoleMcpConnection, l as ConsoleMcpOverview, n as ConsoleMcpCandidate, o as ConsoleMcpIdentity, p as consoleMcpCallbackPath, r as ConsoleMcpConnectResult, s as ConsoleMcpListKind, t as ConsoleMcpAuth, u as ConsoleMcpPage } from "../../mcp-client-C_sEmyQw.js";
2
- export { ConsoleMcpAuth, ConsoleMcpCandidate, ConsoleMcpConnectResult, ConsoleMcpConnection, ConsoleMcpGrant, ConsoleMcpIdentity, ConsoleMcpListKind, ConsoleMcpOutcome, ConsoleMcpOverview, ConsoleMcpPage, ConsoleMcpServerInfo, ConsoleMcpStatus, consoleMcpCallbackPath };
1
+ import { a as ConsoleMcpGrant, c as ConsoleMcpOutcome, d as ConsoleMcpServerInfo, f as ConsoleMcpStatus, i as ConsoleMcpConnection, l as ConsoleMcpOverview, n as ConsoleMcpCandidate, o as ConsoleMcpIdentity, r as ConsoleMcpConnectResult, s as ConsoleMcpListKind, t as ConsoleMcpAuth, u as ConsoleMcpPage } from "../../mcp-client-uXVvS7RL.js";
2
+ export { ConsoleMcpAuth, ConsoleMcpCandidate, ConsoleMcpConnectResult, ConsoleMcpConnection, ConsoleMcpGrant, ConsoleMcpIdentity, ConsoleMcpListKind, ConsoleMcpOutcome, ConsoleMcpOverview, ConsoleMcpPage, ConsoleMcpServerInfo, ConsoleMcpStatus };
@@ -1,2 +1 @@
1
- import { t as consoleMcpCallbackPath } from "../../mcp-client-CTbTbn7d.js";
2
- export { consoleMcpCallbackPath };
1
+ export {};
@@ -0,0 +1 @@
1
+ export default function viteHubConsoleOperationLoader(): void;
@@ -0,0 +1,10 @@
1
+ import { n as installOperationRegistryLoader } from "../../operation-registry-DfQbL7vE.js";
2
+ // src/console/runtime/operation-loader.ts
3
+ function viteHubConsoleOperationLoader() {
4
+ installOperationRegistryLoader(async () => {
5
+ await import("#vitehub/console/app");
6
+ const { loadConsoleRuntime } = await import("./server/runtime.js");
7
+ await loadConsoleRuntime();
8
+ });
9
+ }
10
+ export { viteHubConsoleOperationLoader as default };
@@ -0,0 +1,26 @@
1
+ const e=/* @__PURE__ */ new Set;let t,n=!1;function r(){return t?.matches??!1}function i(){let t=r();if(t!==n){n=t;for(let n of e)n(t)}}function a(){t||typeof matchMedia!=`function`||(t=matchMedia(`(prefers-reduced-motion: reduce)`),t.addEventListener?.(`change`,i),n=r())}function o(){return a(),r()}function s(t){return a(),e.add(t),()=>e.delete(t)}const c={snappy:{stiffness:520,damping:34},soft:{stiffness:380,damping:20}},l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Set;let d=0,f=!1,p=0,m=0;function h(e){let t=Math.min(.032,m?(e-m)/1e3:.016)/1;m=e;let n=Array.from(l),r=Array.from(u);for(let[e,r]of n)if(l.get(e)===r){if(e.tween){let n=e.tween;n.elapsed+=t;let r=Math.min(1,n.elapsed/n.duration),i=1-(1-r)**3,a=n.from+(e.target-n.from)*i;e.velocity=(a-e.value)/(t||1),e.value=a,r>=1&&g(e)}else{let{stiffness:n,damping:r}=e.preset,i=t/6;for(let t=0;t<6;t++){let t=-n*(e.value-e.target)-r*e.velocity;e.velocity+=t*i,e.value+=e.velocity*i}Math.abs(e.velocity)<.002&&Math.abs(e.value-e.target)<5e-4&&g(e)}e.frame(e.value,e.velocity)}for(let e of r)u.has(e)&&e(t)===!1&&u.delete(e);l.size||u.size?p=requestAnimationFrame(h):(p=0,m=0)}function g(e){e.value=e.target,e.velocity=0,e.tween=void 0,l.delete(e)}function ee(e){l.set(e,++d),p||=requestAnimationFrame(h)}function te(e){if(!e)return;let t=Array.from(l);for(let[e,n]of t)l.get(e)!==n||e.tween||(g(e),e.frame(e.value,0))}function ne(e,t,n=c.snappy){let r={value:e,velocity:0,target:e,preset:n,tween:void 0,frame:t},i={get value(){return r.value},get velocity(){return r.velocity},get target(){return r.target},get active(){return l.has(r)},to(e,t={}){if(t.preset&&(r.preset=t.preset),t.tween===void 0&&o())return i.set(e);t.tween===void 0&&!f&&(f=!0,s(te)),r.target=e,t.velocity!==void 0&&(r.velocity+=t.velocity),r.tween=t.tween===void 0?void 0:{from:r.value,elapsed:0,duration:t.tween},ee(r)},set(e){r.value=r.target=e,r.velocity=0,r.tween=void 0,l.delete(r),t(e,0)},stop(){r.velocity=0,r.tween=void 0,l.delete(r)}};return i}function _(e){let t=e;for(;t;){if(t.closest(`[data-motion="none"]`))return!0;let e=t.getRootNode();t=e instanceof ShadowRoot?e.host:null}return!1}const re=[`aria-checked`,`aria-selected`,`aria-pressed`,`aria-expanded`,`aria-valuenow`,`aria-valuetext`,`data-state`,`data-checked`,`data-open`,`open`,`data-leaving`],v=/* @__PURE__ */ new Map,y=/* @__PURE__ */ new Set,b=Symbol.for(`vite-hub.motion.layer`);let x;function ie(){let e=Reflect.get(globalThis,b);if(e&&e!==x&&typeof e==`object`&&`define`in e&&`install`in e)return e}function ae(e){x=e,Reflect.get(globalThis,b)||Reflect.set(globalThis,b,e)}function oe(e){let t=[...v.values()];v.clear();for(let n of t)n.removeFromShared=e.define(n.effect,n.isReduced)}function S(e,t=o){let n={effect:e,isReduced:t};v.set(e.name,n);for(let e of y)e();return()=>{if(n.removeFromShared)return n.removeFromShared();if(v.get(e.name)===n){v.delete(e.name);for(let e of y)e()}}}function C(){return[...v.values()].map(e=>e.effect)}function w(){return[...v.values()]}function se(e){return y.add(e),()=>y.delete(e)}function ce(e,t){for(let[n,r]of Object.entries(t))r?e.style.setProperty(n,r):e.style.removeProperty(n)}const T=/* @__PURE__ */ new Map;let E;const D=/* @__PURE__ */ new Map;let O,k=[];const A=Symbol.for(`vite-hub.motion.effect-presses`),le=e=>{let t=Reflect.get(e,A);if(t)return t;let n=/* @__PURE__ */ new Map;return Reflect.set(e,A,n),n},j=/* @__PURE__ */ new Set;function M(e,t){if(j.has(t))return!1;try{return e.matches(t)}catch{return j.add(t),!1}}function N(e){let t=e;for(;;){for(let e of T.keys())if(e instanceof Element&&e.contains(t))return!0;let e=t.getRootNode();if((e instanceof Document||e instanceof ShadowRoot)&&T.has(e))return!0;if(!(e instanceof ShadowRoot))return!1;t=e.host}}function ue(e,t){let n=-1;e.forEach((e,t)=>{e instanceof Element&&e.matches(`[data-motion="none"]`)&&(n=t)});let r=e.findIndex(e=>e instanceof HTMLElement&&M(e,t));return r===-1||r<=n||!N(e[r])?void 0:e[r]}function P(e,t,n){F(e,!0);let r=le(t),i=[];for(let{effect:a,isReduced:o}of w()){if(!a.press||o())continue;let s=ue(n,a.selector);if(!s||e===`key`&&s!==n[0])continue;let c=r.get(s);if(c?.has(a.name))continue;let l=a.press(s,t);if(!l)continue;c?c.add(a.name):r.set(s,/* @__PURE__ */ new Set([a.name]));let u={element:s,press:l};e!==`key`&&!l.move&&(u.leave=()=>I(e,u,!0),s.addEventListener(`pointerleave`,u.leave,{once:!0})),i.push(u)}i.length&&(D.set(e,i),i.some(e=>e.press.move)&&document.addEventListener(`pointermove`,B,{capture:!0,passive:!0}))}function F(e,t=!1){let n=D.get(e);if(n){D.delete(e);for(let{element:e,press:r,leave:i}of n)i&&e.removeEventListener(`pointerleave`,i),t&&r.cancel?r.cancel():r.release();L()}}function I(e,t,n=!1){let r=D.get(e),i=r?.indexOf(t)??-1;r&&i!==-1&&(t.leave&&t.element.removeEventListener(`pointerleave`,t.leave),r.splice(i,1),r.length||D.delete(e),n&&t.press.cancel?t.press.cancel():t.press.release(),L())}function L(){[...D.values()].some(e=>e.some(e=>e.press.move))||document.removeEventListener(`pointermove`,B,{capture:!0})}function R(e){if(e.button!==0)return;let t=e.composedPath();e.isPrimary&&(O={event:e,path:t}),P(e.pointerId,e,t)}function z(e){O?.event.pointerId===e.pointerId&&(O=void 0),F(e.pointerId,e.type===`pointercancel`)}function B(e){for(let{press:t}of D.get(e.pointerId)??[])t.move?.(e)}function V(e){if(e.repeat||e.key!==` `&&e.key!==`Enter`)return;let t=e.composedPath();e.key===` `&&t[0]instanceof Element&&t[0].matches(`a[href], [role=link]`)||P(`key`,e,t)}function H(e){(e.key===` `||e.key===`Enter`)&&F(`key`)}function de(e,t){let n=t.filter(e=>e.content);if(!n.length)return;let r=/* @__PURE__ */ new Map;for(let t of e){if(t.type===`attributes`)continue;let e=t.type===`characterData`?t.target.parentElement:t.target;if(!(e instanceof HTMLElement||e instanceof SVGElement))continue;let n=r.get(e);n||(n={added:[],removed:[],oldText:void 0,texts:/* @__PURE__ */ new Map},r.set(e,n)),t.type===`characterData`?n.texts.has(t.target)||n.texts.set(t.target,t.oldValue):(n.added.push(...t.addedNodes),n.removed.push(...t.removedNodes))}for(let[e,t]of r){if(!e.isConnected)continue;let r=t.added.filter(e=>!t.removed.includes(e)),i=t.removed.filter(e=>!t.added.includes(e)),a=t.texts,o,s=[...e.childNodes];i.length&&s.every(e=>r.includes(e))?o=i.map(e=>e.textContent??``).join(``):a.size===1&&s.length===1&&a.has(s[0])&&(o=a.get(s[0])??``);for(let t of n)M(e,t.selector)&&!_(e)&&t.content(e,{added:r,removed:i,oldText:o})}}function fe(e){if(!O||!e.matches(`[role=separator][data-panel-resize-handle-id]`))return;let t=w().find(({effect:e})=>e.name===`divider`);if(!t||t.isReduced())return;let{event:n,path:r}=O,i=D.get(n.pointerId)??[],a=i.find(t=>t.splitter&&t.element===e);if(e.getAttribute(`data-resize-handle-active`)!==`pointer`){a&&I(n.pointerId,a);return}if(a||!r.includes(e.getRootNode())||!N(e)||_(e))return;let o=t.effect.press?.(e,n);o&&(i.push({element:e,press:o,splitter:!0}),D.set(n.pointerId,i),document.addEventListener(`pointermove`,B,{capture:!0,passive:!0}))}function U(e){let t=[...new Set(e)],n=C(),r=/* @__PURE__ */ new Map;de(t,n);for(let e of t)if(e.type!==`characterData`){if(e.type===`attributes`){let t=e.target;if(!(t instanceof HTMLElement))continue;if(e.attributeName===`data-resize-handle-active`){fe(t);continue}let i=e.attributeName,a=t.getAttribute(i);if(a===e.oldValue)continue;let o=r.get(t);o||r.set(t,o=/* @__PURE__ */ new Map);let s=o.get(i);if(s||o.set(i,s=/* @__PURE__ */ new Set),s.has(e.oldValue))continue;s.add(e.oldValue);for(let r of n)r.state&&M(t,r.selector)&&!_(t)&&r.state(t,{attribute:i,oldValue:e.oldValue,value:a})}else for(let t of e.addedNodes)if(t instanceof HTMLElement&&t.isConnected)for(let e of n){if(!e.enter)continue;let n=M(t,e.selector);if(j.has(e.selector))continue;let r=[...n?[t]:[],...t.querySelectorAll(e.selector)];for(let t of r)_(t)||e.enter(t)}}}function W(e,t){let n=C().some(e=>e.content);t.observe(e,{attributes:!0,attributeFilter:[...re,...C().some(e=>e.name===`divider`)?[`data-resize-handle-active`]:[]],attributeOldValue:!0,childList:n||C().some(e=>e.enter),characterData:n,characterDataOldValue:n,subtree:!0})}function G(e,t){let n=C();for(let[e,r]of t)n.includes(e)||(r(),t.delete(e));for(let r of n)r.watch&&!t.has(r)&&t.set(r,r.watch(e))}function pe(){let e={capture:!0,passive:!0};document.addEventListener(`pointerdown`,R,e),document.addEventListener(`pointerup`,z,e),document.addEventListener(`pointercancel`,z,e),document.addEventListener(`keydown`,V,e),document.addEventListener(`keyup`,H,e),k=[()=>{document.removeEventListener(`pointerdown`,R,e),document.removeEventListener(`pointerup`,z,e),document.removeEventListener(`pointercancel`,z,e),document.removeEventListener(`keydown`,V,e),document.removeEventListener(`keyup`,H,e),O=void 0;for(let e of D.keys())F(e,!0)},s(e=>{if(e){O=void 0;for(let e of D.keys())F(e,!0)}})]}function me(e,t){if(typeof document>`u`)return()=>{};let n=ie();return n?(oe(n),n.install(e,t.effects,o)):(ae(he),K(e,t.effects))}const he={define:S,install:K};function K(e,t,n=o){let r=new Set(C().map(e=>e.name));for(let e of t)r.has(e.name)||S(e,n);if(!E){pe();let e=new MutationObserver((e,t)=>U(e.concat(t.takeRecords())));E=e,k.push(se(()=>{for(let[t,{watchers:n}]of T)W(t,e),G(t,n)}))}let i=T.get(e);if(i)i.installs++;else{let t=/* @__PURE__ */ new Map;W(e,E),T.set(e,{installs:1,watchers:t}),G(e,t)}let a=!1;return()=>{if(a)return;a=!0;let t=T.get(e);if(!t||--t.installs>0)return;T.delete(e);let n=E,r=n.takeRecords();n.disconnect();for(let e of t.watchers.values())e();if(T.size){for(let e of T.keys())W(e,n);r.length&&queueMicrotask(()=>{if(E!==n)return;let e=[...T.keys()];U(r.filter(t=>e.some(e=>e.contains(t.target))))})}else{E=void 0;for(let e of k)e();k=[]}}}const q={stiffness:900,damping:40},ge={stiffness:380,damping:14},_e=`:is(button, a[href], summary, input:is([type=button], [type=submit], [type=reset], [type=checkbox], [type=radio]), ${[`button`,`link`,`tab`,`radio`,`menuitem`,`menuitemradio`,`menuitemcheckbox`,`option`,`checkbox`].map(e=>`[role=${e}]`).join(`, `)}):not(:disabled, [aria-disabled="true"], [role=switch])`,J=/* @__PURE__ */ new WeakMap,Y=e=>e>=40?.03:e>=32?.04:.05;function ve(e){let t=e.dataset.motionPressTarget?e.closest(e.dataset.motionPressTarget):null;if(t instanceof HTMLElement)return{target:t,amount:Y(t.offsetHeight)};let n=e.firstElementChild;return e.childElementCount===1&&!e.textContent?.trim()&&(n instanceof HTMLElement||n instanceof SVGElement)&&n.matches(`svg, img, .iconify, [data-slot=icon], [data-slot$=Icon], [data-slot=swap-icon]`)?{target:n,amount:.15}:{target:e,amount:Y(e.offsetHeight)}}function ye(e){let t=e.transitionDuration.split(`,`);return e.transitionProperty.split(`,`).some((e,n)=>/^\s*(?:scale|all)\s*$/.test(e)&&Number.parseFloat(t[n%t.length])>0)}function X(e,t,n){let{left:r,right:i,top:a,bottom:o,width:s,height:c}=e;return Math.min(t.clientX-r,i-t.clientX)<=s*n||Math.min(t.clientY-a,o-t.clientY)<=c*n}const be={name:`press`,selector:_e,press(e,t){let{target:n,amount:r}=ve(e),i=getComputedStyle(n);if(ye(i)||i.display===`contents`||i.display===`inline`&&n===e&&!(e instanceof HTMLInputElement))return;let a;if(n===e&&`pointerId`in t&&(a=e.getBoundingClientRect(),X(a,t,r)))return;let o=J.get(n);if(!o){let e={amount:r,spring:ne(0,t=>{ce(n,{scale:t?String(1-e.amount*t):null})},q)};o=e,J.set(n,o)}o.amount=r;let{spring:s}=o;s.to(1,{preset:q});let c=!1,l=()=>{c||(c=!0,s.set(0))};return{move:a?e=>{X(a,e,r)&&l()}:void 0,release:()=>{c||s.to(0,{preset:ge})},cancel:l}}},xe=[`comment`],Se={effects:[be]},Ce=[[`0px`,`6px`],[`6px`,`0px`],[`calc(100% - 6px)`,`0px`],[`100%`,`6px`],[`100%`,`50%`],[`100%`,`50%`],[`100%`,`calc(100% - 6px)`],[`calc(100% - 6px)`,`100%`],[`6px`,`100%`],[`0px`,`calc(100% - 6px)`],[`0px`,`50%`],[`0px`,`50%`]],we=e=>e.map(([e,t])=>[`calc(50% + var(--vitehub-hex-w) * ${e})`,`calc(50% + var(--vitehub-hex-h) * ${t})`]),Te=we([[-.28,-.453],[-.208,-.5],[.208,-.5],[.28,-.453],[.488,-.047],[.488,.047],[.28,.453],[.208,.5],[-.208,.5],[-.28,.453],[-.488,.047],[-.488,-.047]]),Ee=we([[-.5,-.5],[-.5,-.5],[.5,-.5],[.5,-.5],[.5,0],[.5,0],[.5,.5],[.5,.5],[-.5,.5],[-.5,.5],[-.5,0],[-.5,0]]),Z=e=>`polygon(${e.map(([e,t])=>`${e} ${t}`).join(`,`)})`,De=Z(Ce),Oe=Z(Te),ke=Z(Ee),Q=e=>`calc(var(--start) + ${e} / 2 + (100% - var(--start) - var(--end) - ${e}) * var(--at) / 100)`;`${Q(`0px`)}${Q(`0px`)}${Q(`var(--vitehub-hex-w)`)}${Q(`var(--vitehub-hex-h)`)}${De}${Oe}${ke}`;function Ae(e,t,n){let r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(let[t,i]of Object.entries({viewBox:e,"aria-hidden":`true`,...n}))r.setAttribute(t,i);let i=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return i.setAttribute(`d`,t),r.append(i),r}function je(e){return e.trim().split(/\s+/).slice(0,2).map(e=>[...e][0]??``).join(``).toLocaleUpperCase()}function Me(e){let t=document.createElement(`span`);if(t.className=`avatar`,t.setAttribute(`aria-hidden`,`true`),t.textContent=je(e.name),e.image){let n=document.createElement(`img`);n.alt=``,n.referrerPolicy=`no-referrer`,n.src=e.image,n.addEventListener(`load`,()=>t.replaceChildren(n),{once:!0})}return t}function $(e,t){let n=document.createElement(`button`);n.type=`button`,n.setAttribute(`role`,`menuitem`),n.tabIndex=-1,n.insertAdjacentHTML(`beforeend`,e);let r=document.createElement(`span`);return r.textContent=t,n.append(r),{item:n,label:r}}function Ne(){let e=new URL(location.href);for(let t of[`vitehub`,...xe])e.searchParams.delete(t);return e}function Pe(e){let{account:t,bar:n,signal:r}=e,i=n.parentElement,a=n.attachShadow({mode:`open`});r.addEventListener(`abort`,me(a,Se),{once:!0});let o=document.createElement(`style`);o.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;transition-duration:150ms;transition-timing-function:cubic-bezier(.23,1,.32,1)}
2
+ @media(hover:hover){button:where(:not(:disabled):hover){background:var(--vitehub-pill-hover);color:var(--vitehub-pill-strong)}}
3
+ button[aria-pressed=true],button[aria-expanded=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text)}
4
+ :host([aria-busy=true]) button,button[aria-busy=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text);cursor:progress}
5
+ button:focus-visible{outline:2px solid var(--vitehub-pill-on);outline-offset:1px}
6
+ button svg{width:14px;height:14px;flex:none}
7
+ @media(any-pointer:coarse){button{min-width:44px;height:44px}}
8
+ @media(prefers-reduced-motion:reduce){button{transition:none}}
9
+ [role=menu]{position:fixed;inset:auto;box-sizing:border-box;width:max-content;min-width:220px;max-width:min(300px,calc(100vw - 16px));margin:0;padding:6px;overflow:visible;border:1px solid var(--vitehub-pill-line);border-radius:12px;background:#171717;color:var(--vitehub-pill-text);font:500 13px/1.3 ui-sans-serif,system-ui,sans-serif;box-shadow:0 16px 40px rgb(0 0 0/30%);color-scheme:dark;pointer-events:auto}
10
+ [role=menuitem]{display:flex;width:100%;height:32px;justify-content:flex-start;gap:8px;font-size:13px}
11
+ [role=menuitem] svg{width:15px;height:15px;color:var(--vitehub-pill-muted)}
12
+ [role=menuitem][hidden]{display:none}
13
+ [role=menuitem][aria-disabled=true]{cursor:progress}
14
+ @media(any-pointer:coarse){[role=menuitem]{height:44px}}
15
+ .who{align-self:flex-start;padding:0 3px}
16
+ .avatar{box-sizing:border-box;display:grid;place-items:center;width:22px;height:22px;flex:none;overflow:hidden;border-radius:50%;background:#404040;color:var(--vitehub-pill-strong);font-size:10px;font-weight:600;line-height:1}
17
+ .avatar img{display:block;width:100%;height:100%;object-fit:cover}
18
+ .me{display:flex;align-items:center;gap:10px;margin-bottom:4px;padding:8px 8px 10px;border-bottom:1px solid var(--vitehub-pill-line)}
19
+ .me .avatar{width:32px;height:32px;font-size:12px}
20
+ .me div{min-width:0}
21
+ .me b,.me small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
22
+ .me b{color:var(--vitehub-pill-strong);font-weight:500}
23
+ .me small{margin-top:2px;color:var(--vitehub-pill-muted);font-size:12px}
24
+ .via{display:flex;align-items:center;gap:6px;padding:6px 8px;color:var(--vitehub-pill-muted);font-size:12px}
25
+ .via svg{width:11px;height:10px;flex:none;fill:var(--vitehub-pill-text)}
26
+ `;let s=document.createElement(`div`);s.id=`account-menu`,s.setAttribute(`popover`,`auto`),s.setAttribute(`role`,`menu`),s.setAttribute(`aria-label`,t.name);let c=document.createElement(`button`);c.type=`button`,c.className=`who`,c.title=t.email?`${t.name} (${t.email})`:t.name,c.setAttribute(`aria-label`,`Account: ${t.name}`),c.setAttribute(`aria-haspopup`,`menu`),c.setAttribute(`aria-expanded`,`false`),c.setAttribute(`aria-controls`,s.id),c.setAttribute(`popovertarget`,s.id),c.append(Me(t));let l=document.createElement(`div`);l.className=`me`,l.setAttribute(`role`,`none`);let u=document.createElement(`div`),d=document.createElement(`b`);if(d.textContent=t.name,u.append(d),t.email){let e=document.createElement(`small`);e.textContent=t.email,u.append(e)}if(l.append(Me(t),u),s.append(l),t.via===`console`){let t=document.createElement(`div`);t.className=`via`,t.setAttribute(`role`,`none`),t.append(Ae(`0 0 20 18`,e.mark,{}),`Signed in with ViteHub Console`),s.append(t)}let f=$(`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 7h10v10M7 17 17 7"/></svg>`,`Open in the Console`),p=$(`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 17 5-5-5-5M21 12H9M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/></svg>`,`Sign out of ${location.host}`);s.append(f.item,p.item),a.append(o,c,s);let m;Fe({menu:s,button:c,pill:i,beforeOpen:()=>{m=e.openConsole?.(),f.item.hidden=!m},signal:r}),f.item.addEventListener(`click`,()=>{s.hidePopover(),m?.()},{signal:r}),Ie(t,p,r)}function Fe(e){let{menu:t,button:n,pill:r,signal:i}=e,a=()=>{let e=t.getRootNode();return e instanceof ShadowRoot||e instanceof Document?e.activeElement:null},o=()=>[...t.querySelectorAll(`[role=menuitem]`)].filter(e=>!e.hidden),s=e=>{let i=document.documentElement.clientWidth,a=document.documentElement.clientHeight,o=(r??n).getBoundingClientRect(),s=n.getBoundingClientRect(),c={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};e===`bottom`||e===`top`?(c.right=`${Math.max(8,i-s.right)}px`,e===`bottom`?c.bottom=`${a-o.top+8}px`:c.top=`${o.bottom+8}px`):(s.top<a/2?c.top=`${Math.max(8,s.top)}px`:c.bottom=`${Math.max(8,a-s.bottom)}px`,e===`left`?c.left=`${o.right+8}px`:c.right=`${i-o.left+8}px`),Object.assign(t.style,c)},c=e=>{if(e!==`bottom`&&e!==`top`)return;let r=document.documentElement.clientWidth,i=n.getBoundingClientRect(),a=t.getBoundingClientRect().width;t.style.right=`auto`,t.style.left=`${Math.max(8,Math.min(i.right-a,r-a-8))}px`};if(t.addEventListener(`beforetoggle`,i=>{if(i.newState===`closed`){t.contains(a())&&n.focus({preventScroll:!0});return}e.beforeOpen?.();let o=r?.getAttribute(`edge`)??`bottom`;s(o),requestAnimationFrame(()=>c(o))},{signal:i}),t.addEventListener(`toggle`,e=>{let t=e.newState===`open`;n.setAttribute(`aria-expanded`,String(t)),t&&o()[0]?.focus({preventScroll:!0})},{signal:i}),t.addEventListener(`keydown`,e=>{let n=o(),r=n.findIndex(e=>e===a()),i=e.key===`ArrowDown`?r+1:e.key===`ArrowUp`?r-1:e.key===`Home`?0:e.key===`End`?n.length-1:void 0;i===void 0?e.key===`Escape`?e.stopPropagation():e.key===`Tab`&&t.hidePopover():(e.preventDefault(),n[(i+n.length)%n.length]?.focus())},{signal:i}),r){let e=new MutationObserver(e=>{e.some(e=>e.oldValue!==r.getAttribute(e.attributeName??``))&&t.hidePopover()});e.observe(r,{attributes:!0,attributeOldValue:!0,attributeFilter:[`collapsed`,`dragging`,`edge`]}),i.addEventListener(`abort`,()=>e.disconnect(),{once:!0})}i.addEventListener(`abort`,()=>t.hidePopover(),{once:!0})}function Ie(e,t,n,r){t.item.addEventListener(`click`,async()=>{if(t.item.getAttribute(`aria-disabled`)===`true`||r?.()===!1)return;t.item.setAttribute(`aria-disabled`,`true`),t.label.textContent=`Signing out…`;let n=await fetch(e.signOut,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:`{}`}).catch(e=>e);if(!(n instanceof Response)||!n.ok){console.error(`[vitehub] The sign-out failed. The session stays.`,n instanceof Response?`The sign-out answered ${n.status}.`:n),t.item.removeAttribute(`aria-disabled`),t.label.textContent=`Could not sign out. Try again`;return}let i=Ne();i.href===location.href?location.reload():location.replace(i)},{signal:n})}var Le=Pe;export{Le as default};
@@ -1,9 +1,9 @@
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/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;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()`."}}});function d(){return typeof __VITEHUB_CONSOLE_URL__==`string`?__VITEHUB_CONSOLE_URL__:`https://console.vitehub.dev`}const f=/* @__PURE__ */ new Set([`localhost`,`127.0.0.1`,`[::1]`]),p=`https://console.invalid`;function m(e){if(!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`))return;let t;try{t=new URL(e,p)}catch{return}if(t.origin!==p)return;let n=t.pathname.replace(/^\/_vitehub(?=\/|$)/,``)||`/`;if(!n.startsWith(`//`))return`${n}${t.search}${t.hash}`}function h(e){let t;try{t=new URL(e)}catch{return}if(t.username||t.password||t.protocol!==`https:`&&!(t.protocol===`http:`&&f.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 g(e,t,n=d()){let r=h(e);if(!r)throw u.RUNTIME_CONSOLE_PROJECT_URL_INVALID({value:e});let i=m(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}const _=/^(?:\/(?!\.\.?(?:\/|$))[^/?#\\]+)*$/;function v(e){let t=new URL(e),n=t.searchParams.get(`base`)??``;return{base:_.test(n)?n:``,consoleOrigin:t.origin}}function y(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 b(e,t,n=[],r){try{return g(`${e}${t}`,y(n),r)}catch{return}}const x=({bar:e,tool:t,onOpen:n})=>{let{base:r,consoleOrigin:i}=v(import.meta.url);if(!b(location.origin,r,[],i))return;let a=e.attachShadow({mode:`open`}),o=document.createElement(`style`);o.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;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[aria-pressed=true],button[aria-expanded=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text)}
5
5
  :host([aria-busy=true]) button,button[aria-busy=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text);cursor:progress}
6
6
  button:focus-visible{outline:2px solid var(--vitehub-pill-on);outline-offset:1px}
7
7
  button svg{width:14px;height:14px;flex:none}
8
8
  @media(any-pointer:coarse){button{min-width:44px;height:44px}}
9
- @media(prefers-reduced-motion:reduce){button{transition:none}}`;let o=document.createElement(`button`);o.type=`button`,o.title=`Open this app in the ViteHub Console, in a new tab`,o.textContent=t.label,o.insertAdjacentHTML(`beforeend`,`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 7h10v10M7 17 17 7"/></svg>`);let s=()=>{let e=[...document.querySelectorAll(`[data-content-field]`)].map(e=>e.getAttribute(`data-content-field`)??``),t=v(location.origin,r,e);t&&window.open(t,`_blank`,`noopener`)};o.addEventListener(`click`,s),n(s),i.append(a,o)};export{y as default};
9
+ @media(prefers-reduced-motion:reduce){button{transition:none}}`;let s=document.createElement(`button`);s.type=`button`,s.title=`Open this app in the ViteHub Console, in a new tab`,s.textContent=t.label,s.insertAdjacentHTML(`beforeend`,`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 7h10v10M7 17 17 7"/></svg>`);let c=()=>{let e=[...document.querySelectorAll(`[data-content-field]`)].map(e=>e.getAttribute(`data-content-field`)??``),t=b(location.origin,r,e,i);t&&window.open(t,`_blank`,`noopener`)};s.addEventListener(`click`,c),n(c),a.append(o,s)};export{x as default};
@@ -1,2 +1,2 @@
1
- import { n as ConsoleRpcResult, r as consoleRpcHeader, t as ConsoleAgentInvocationInput } from "../../rpc-7nlHSv3y.js";
1
+ import { n as ConsoleRpcResult, r as consoleRpcHeader, t as ConsoleAgentInvocationInput } from "../../rpc-oijgKQtD.js";
2
2
  export { ConsoleAgentInvocationInput, ConsoleRpcResult, consoleRpcHeader };
@@ -1,2 +1 @@
1
- import { t as consoleRpcHeader } from "../../rpc-DIUA61pv.js";
2
- export { consoleRpcHeader };
1
+ export { t as consoleRpcHeader } from "../../rpc-D3tsx5lZ.js";
@@ -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-Do7X4Nwt.js";
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
+ import { A as resolveConsoleSectionDocs, C as groupConsoleSections, D as prioritizeConsoleSectionIds, E as isConsoleSectionId, M as resolveConsoleSectionIds, O as readLastConsoleSection, 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 resolveConsoleSectionGroup, k as rememberConsoleSection, 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-DCoCa4nF.js";
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, isConsoleSectionId, prioritizeConsoleSectionIds, readLastConsoleSection, rememberConsoleSection, resolveConsoleSectionDocs, resolveConsoleSectionGroup, resolveConsoleSectionIds };
@@ -1,2 +1 @@
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
- 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
+ export { t as consoleBuiltinSectionIds, n as consoleDocsBase, r as consoleGoToKey, i as consoleGuide, a as consoleOverviewShortcut, o as consolePrimitives, s as consoleSectionDetails, c as consoleSectionGroupIds, l as consoleSectionGroupLabels, u as consoleSectionPageRouteName, d as consoleSectionPageSegment, f as consoleSectionRouteName, p as consoleSectionShortcut, m as consoleSectionShortcutKeys, h as consoleToolSectionIds, g as describeConsoleSectionRoutes, _ as groupConsoleSections, v as insertConsoleSection, y as isConsoleBuiltinSectionId, b as isConsoleSectionId, x as prioritizeConsoleSectionIds, S as readLastConsoleSection, C as rememberConsoleSection, w as resolveConsoleSectionDocs, T as resolveConsoleSectionGroup, E as resolveConsoleSectionIds } from "../../sections-AUGy9EkY.js";
@@ -1,2 +1,2 @@
1
- import { a as installedConsoleAccessPolicy, i as installConsoleAccess, n as consoleAuthorizedSections, r as consoleOpenAccessWarning, t as consoleAuthorizedGrants } from "../../../access-policy-DhsEACna.js";
1
+ import { c as consoleOpenAccessWarning, l as installConsoleAccess, o as consoleAuthorizedGrants, s as consoleAuthorizedSections, u as installedConsoleAccessPolicy } from "../../../access-DkBck8Vu.js";
2
2
  export { consoleAuthorizedGrants, consoleAuthorizedSections, consoleOpenAccessWarning, installConsoleAccess, installedConsoleAccessPolicy };
@@ -1,2 +1 @@
1
- import { a as installedConsoleAccessPolicy, i as installConsoleAccess, n as consoleAuthorizedSections, r as consoleOpenAccessWarning, t as consoleAuthorizedGrants } from "../../../access-policy-CVZg9LPR.js";
2
- export { consoleAuthorizedGrants, consoleAuthorizedSections, consoleOpenAccessWarning, installConsoleAccess, installedConsoleAccessPolicy };
1
+ export { t as consoleAuthorizedGrants, n as consoleAuthorizedSections, r as consoleOpenAccessWarning, i as installConsoleAccess, a as installedConsoleAccessPolicy } from "../../../access-policy-BM48XstY.js";
@@ -0,0 +1,2 @@
1
+ import { n as ConsoleRuntime, r as agentConsole, t as ConsoleInvocationLink } from "../../../agent-console-FmaYpVv-.js";
2
+ export { ConsoleInvocationLink, ConsoleRuntime, agentConsole };
@@ -0,0 +1 @@
1
+ export { t as agentConsole } from "../../../agent-console-CHsLxKk_.js";
@@ -1,2 +1,2 @@
1
- import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-iVewd7KQ.js";
1
+ import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-uNin0_TV.js";
2
2
  export { getConsoleBlob, installConsoleBlob, loadConsoleMedia };
@@ -1,2 +1 @@
1
- import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-BcgsZtqM.js";
2
- export { getConsoleBlob, installConsoleBlob, loadConsoleMedia };
1
+ export { t as getConsoleBlob, n as installConsoleBlob, r as loadConsoleMedia } from "../../../blob-iw8pWQ6o.js";
@@ -1,2 +1,2 @@
1
- import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-DC67Ipm-.js";
1
+ import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-yFezh5U1.js";
2
2
  export { getConsoleDatabase, installConsoleDatabase };
@@ -1,2 +1 @@
1
- import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-UMJgnU2z.js";
2
- export { getConsoleDatabase, installConsoleDatabase };
1
+ export { t as getConsoleDatabase, n as installConsoleDatabase } from "../../../database-CrgBUdIx.js";
@@ -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-Dbgxfz3I.js";
1
+ import { a as installConsoleDefinitions, i as getConsoleSchedules, n as getConsoleContributedSections, o as installConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-DRkgHKmk.js";
2
2
  export { copyConsoleRecords, getConsoleContributedSections, getConsoleDefinitions, getConsoleSchedules, installConsoleDefinitions, installConsoleSchedules };
@@ -1,11 +1,9 @@
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-DhsEACna.js";
4
- //#region src/console/runtime/server/definitions.get.d.ts
1
+ import { t as ConsoleAccess } from "../../../access-DkBck8Vu.js";
2
+ import { y as ConsoleSectionContent } from "../../../definitions-ChvMnA1L.js";
3
+ import { a as ConsoleSectionId } from "../../../sections-DCoCa4nF.js";
5
4
  /** The definitions of one Console section, for the `definitions.list` operation. */
6
5
  export declare function listConsoleDefinitions(input: {
7
6
  section: string;
8
7
  }, access: ConsoleAccess): Promise<ConsoleSectionContent & {
9
8
  section: ConsoleSectionId;
10
- }>;
11
- //#endregion
9
+ }>;
@@ -1,8 +1,8 @@
1
- import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-B1yAIaSn.js";
2
- import { x as isConsoleSectionId } from "../../../sections-DumoLKQN.js";
3
- import { t as consoleHttpError } from "../../../http-error-Bs6e8_-8.js";
4
- import { i as getConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-DTytrw42.js";
5
- //#region src/console/runtime/server/definitions.get.ts
1
+ import { t as consoleHttpError } from "../../../http-error-BorAxJYM.js";
2
+ import { i as getConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-DGo2rNQ9.js";
3
+ import { b as isConsoleSectionId } from "../../../sections-AUGy9EkY.js";
4
+ import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-CBtvqI30.js";
5
+ // src/console/runtime/server/definitions.get.ts
6
6
  function requestError(statusCode, statusMessage) {
7
7
  return consoleHttpError(statusCode, viteHubErrorDiagnostics.VITE_HUB_C0001({ message: statusMessage }));
8
8
  }
@@ -80,5 +80,4 @@ async function listConsoleDefinitions(input, access) {
80
80
  section
81
81
  };
82
82
  }
83
- //#endregion
84
83
  export { listConsoleDefinitions };
@@ -1,2 +1 @@
1
- import { a as installConsoleDefinitions, i as getConsoleSchedules, n as getConsoleContributedSections, o as installConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-DTytrw42.js";
2
- export { copyConsoleRecords, getConsoleContributedSections, getConsoleDefinitions, getConsoleSchedules, installConsoleDefinitions, installConsoleSchedules };
1
+ export { t as copyConsoleRecords, n as getConsoleContributedSections, r as getConsoleDefinitions, i as getConsoleSchedules, a as installConsoleDefinitions, o as installConsoleSchedules } from "../../../definitions-DGo2rNQ9.js";
@@ -1,2 +1,2 @@
1
- import { i as isConsoleDevelopmentBuild, n as consoleSetupRoute, r as installConsoleDevelopment, t as consoleDevelopmentContext } from "../../../development-RnopiRwK.js";
1
+ import { i as isConsoleDevelopmentBuild, n as consoleSetupRoute, r as installConsoleDevelopment, t as consoleDevelopmentContext } from "../../../development-I40mfD7B.js";
2
2
  export { consoleDevelopmentContext, consoleSetupRoute, installConsoleDevelopment, isConsoleDevelopmentBuild };
@@ -1,2 +1 @@
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
+ export { t as consoleDevelopmentContext, n as consoleSetupRoute, r as installConsoleDevelopment, i as isConsoleDevelopmentBuild } from "../../../development-DD567hhJ.js";
@@ -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-BDR0AkYR.js";
2
- export { ConsoleDocumentActionContext, ConsoleDocumentActionName, ConsoleDocumentActions, ConsoleDocumentEditorInstall, ConsoleDocumentEditors, ConsoleMediaAccess, consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, issueConsoleDocumentPreview, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };
1
+ import { a as ConsoleDocumentEditors, c as consoleActionError, d as installConsoleDocuments, f as loadConsoleDocumentActions, g as maximumConsoleDocumentRequestBytes, h as consoleDocumentActionNames, i as ConsoleDocumentEditorInstall, l as consoleDocumentActionContext, m as runConsoleDocumentAction, n as ConsoleDocumentActionName, o as ConsoleMediaAccess, p as readConsoleDocumentSection, r as ConsoleDocumentActions, s as checkConsoleDocumentPreview, t as ConsoleDocumentActionContext, u as guardedHandler } from "../../../documents-A-7Ho0g0.js";
2
+ export { ConsoleDocumentActionContext, ConsoleDocumentActionName, ConsoleDocumentActions, ConsoleDocumentEditorInstall, ConsoleDocumentEditors, ConsoleMediaAccess, checkConsoleDocumentPreview, consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };
@@ -1,3 +1,3 @@
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-BewAPY61.js";
3
- export { consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, issueConsoleDocumentPreview, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };
1
+ import { i as maximumConsoleDocumentRequestBytes, n as consoleDocumentActionNames } from "../../../limits-BLo31qDR.js";
2
+ import { a as installConsoleDocuments, c as runConsoleDocumentAction, i as guardedHandler, n as consoleActionError, o as loadConsoleDocumentActions, r as consoleDocumentActionContext, s as readConsoleDocumentSection, t as checkConsoleDocumentPreview } from "../../../documents-D6ueeoUR.js";
3
+ export { checkConsoleDocumentPreview, consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };
@@ -0,0 +1,3 @@
1
+ import { n as ConsoleRoute } from "../../../request-DYmjLTqP.js";
2
+ declare const consoleSiteAccessEntry: ConsoleRoute;
3
+ export { consoleSiteAccessEntry as default };
@@ -0,0 +1,4 @@
1
+ import { t as consoleRoutes } from "../../../routes-D02vxUSg.js";
2
+ // src/console/runtime/server/entry-site-access.ts
3
+ const consoleSiteAccessEntry = consoleRoutes({ siteAccess: true });
4
+ export { consoleSiteAccessEntry as default };
@@ -0,0 +1,3 @@
1
+ import { n as ConsoleRoute } from "../../../request-DYmjLTqP.js";
2
+ declare const consoleEntry: ConsoleRoute;
3
+ export { consoleEntry as default };
@@ -0,0 +1,4 @@
1
+ import { t as consoleRoutes } from "../../../routes-D02vxUSg.js";
2
+ // src/console/runtime/server/entry.ts
3
+ const consoleEntry = consoleRoutes({ siteAccess: false });
4
+ export { consoleEntry as default };
@@ -1,6 +1,4 @@
1
1
  import { ServerEnvDescription } from "@vite-hub/env";
2
- //#region src/console/runtime/server/env.d.ts
3
2
  /** Keeps the Server Env declarations for `env.get`. The `env.inspect` operation of Env reads their status. */
4
3
  export declare function installConsoleEnv(projectRoot: string, description: ServerEnvDescription): ServerEnvDescription;
5
- export declare function getConsoleEnv(): ServerEnvDescription;
6
- //#endregion
4
+ export declare function getConsoleEnv(): ServerEnvDescription;
@@ -1,2 +1 @@
1
- import { n as installConsoleEnv, t as getConsoleEnv } from "../../../env-Dg1I_DWr.js";
2
- export { getConsoleEnv, installConsoleEnv };
1
+ export { t as getConsoleEnv, n as installConsoleEnv } from "../../../env-D-wtSupz.js";
@@ -1,2 +1,2 @@
1
- import { i as isHeldBackConsoleOperation, n as consoleOperationRegistry, r as installConsoleOperations, t as ConsoleOperationContribution } from "../../../operation-contributions-CrdmqtJW.js";
1
+ import { i as isHeldBackConsoleOperation, n as consoleOperationRegistry, r as installConsoleOperations, t as ConsoleOperationContribution } from "../../../operation-contributions-xwjDzj28.js";
2
2
  export { ConsoleOperationContribution, consoleOperationRegistry, installConsoleOperations, isHeldBackConsoleOperation };
@@ -1,2 +1 @@
1
- import { n as installConsoleOperations, r as isHeldBackConsoleOperation, t as consoleOperationRegistry } from "../../../operation-contributions-C3lwePQu.js";
2
- export { consoleOperationRegistry, installConsoleOperations, isHeldBackConsoleOperation };
1
+ export { t as consoleOperationRegistry, n as installConsoleOperations, r as isHeldBackConsoleOperation } from "../../../operation-contributions-BU10k2QS.js";
@@ -0,0 +1,45 @@
1
+ import { t as ViteHubSiteVisitor } from "../../../page-tools-Chk8Gm9x.js";
2
+ /**
3
+ * The person who is signed in to the app, as the session route returns it. The pill shows them with a menu that signs
4
+ * them out. The route sends it only to a signed-in visitor who gets at least one tool.
5
+ */
6
+ interface ViteHubPageAccount {
7
+ /** The display name, such as `Ada Lovelace`. */
8
+ name: string;
9
+ email?: string;
10
+ /** An `https:` or `http:` URL of the person's picture. Without it, the pill shows their initials. */
11
+ image?: string;
12
+ /** `console` when the ViteHub Console signed this browser in, through Site access. */
13
+ via?: "console";
14
+ /** The path that ends the app session with a `POST`, such as `/api/auth/sign-out`. It ends no other session. */
15
+ signOut: string;
16
+ /** A guest of Site access, whose one-time invite cannot sign them in again, so the exit button never signs them out. */
17
+ guest?: true;
18
+ }
19
+ /** What the Comments pill passes to each segment that it loads. */
20
+ export interface ConsolePillOptions {
21
+ /** The app base, such as `/portal/`. Default: the root. */
22
+ base?: string;
23
+ /** Whether a development server runs the app. It shows the Console segment to every visitor. */
24
+ development?: boolean;
25
+ /** The `vite-hub` version of the app. The Console serves the segment script of this version. */
26
+ version: string;
27
+ useCurrentGrants?: boolean;
28
+ }
29
+ /** What the account menu of the pill shows for a Site access person. `signOut` is the app's `/_vitehub/site`. */
30
+ export declare function consolePageAccount(visitor: ViteHubSiteVisitor, signOut: string): ViteHubPageAccount;
31
+ /**
32
+ * The URL of the Console segment script on the ViteHub Console, such as
33
+ * `https://console.vitehub.dev/page/0.4.0/page-tool.js?base=/portal`, or the same path on the Console of
34
+ * `vitehub({ console: { url } })`. The script reads the app base from `base`.
35
+ */
36
+ export declare function consolePillScript(version: string, base?: string): string;
37
+ /**
38
+ * Adds the **Console** segment to the Comments pill. The ViteHub Console serves its script, so the page needs a
39
+ * Content Security Policy that allows scripts from the Console origin. The segment shows to a Site access person with
40
+ * the `console` role, a member of the Console team, and on a development server to every visitor. The Console checks
41
+ * the person and the team itself, so the segment gives no access. It also installs the reader of the Site access
42
+ * cookie, which Comments reads, and the account of the pill: the Site access person and a sign-out of Site access.
43
+ */
44
+ export declare function installConsolePill(nitroApp: unknown, options: ConsolePillOptions): void;
45
+ export {};
@@ -0,0 +1,62 @@
1
+ import { i as viteHubPageGrants, n as registerViteHubPageAccount, r as registerViteHubPageTool, t as installViteHubSiteVisitor } from "../../../page-tools-BeZrtn4S.js";
2
+ import { installRequestStandardContext } from "@vite-hub/runtime/internal/h3";
3
+ import { configuredConsoleOrigin } from "@vite-hub/runtime/internal/console";
4
+ // src/console/runtime/server/pill.ts
5
+ const siteSignOutPath = "/_vitehub/site";
6
+ /** What the account menu of the pill shows for a Site access person. `signOut` is the app's `/_vitehub/site`. */
7
+ function consolePageAccount(visitor, signOut) {
8
+ return {
9
+ name: visitor.name,
10
+ ...visitor.kind === "member" && visitor.email ? { email: visitor.email } : {},
11
+ ...visitor.image ? { image: visitor.image } : {},
12
+ via: "console",
13
+ ...visitor.kind === "guest" ? { guest: true } : {},
14
+ signOut
15
+ };
16
+ }
17
+ /**
18
+ * The URL of the Console segment script on the ViteHub Console, such as
19
+ * `https://console.vitehub.dev/page/0.4.0/page-tool.js?base=/portal`, or the same path on the Console of
20
+ * `vitehub({ console: { url } })`. The script reads the app base from `base`.
21
+ */
22
+ function consolePillScript(version, base = "/") {
23
+ return `${configuredConsoleOrigin()}/page/${encodeURIComponent(version)}/page-tool.js?${new URLSearchParams({ base: base.replace(/\/+$/, "") })}`;
24
+ }
25
+ /**
26
+ * Adds the **Console** segment to the Comments pill. The ViteHub Console serves its script, so the page needs a
27
+ * Content Security Policy that allows scripts from the Console origin. The segment shows to a Site access person with
28
+ * the `console` role, a member of the Console team, and on a development server to every visitor. The Console checks
29
+ * the person and the team itself, so the segment gives no access. It also installs the reader of the Site access
30
+ * cookie, which Comments reads, and the account of the pill: the Site access person and a sign-out of Site access.
31
+ */
32
+ function installConsolePill(nitroApp, options) {
33
+ const base = options.base || "/";
34
+ const development = options.development === true;
35
+ const site = async (request) => {
36
+ const visitor = await (await import("./site-visitor.js")).readConsoleSiteVisitor(request, base, development);
37
+ if (visitor?.kind !== "member" || !options.useCurrentGrants) return visitor;
38
+ return {
39
+ ...visitor,
40
+ roles: [.../* @__PURE__ */ new Set([...visitor.roles, ...viteHubPageGrants(request).map((grant) => grant.id)])]
41
+ };
42
+ };
43
+ installViteHubSiteVisitor(site);
44
+ const signOut = `${base.replace(/\/+$/, "")}${siteSignOutPath}`;
45
+ registerViteHubPageAccount(nitroApp, async ({ request }) => {
46
+ installRequestStandardContext(request);
47
+ const visitor = await site(request);
48
+ return visitor && consolePageAccount(visitor, signOut);
49
+ });
50
+ registerViteHubPageTool(nitroApp, {
51
+ id: "console",
52
+ label: "Console",
53
+ icon: "i-lucide-square-terminal",
54
+ script: consolePillScript(options.version, base),
55
+ async allowed({ request }) {
56
+ if (development) return true;
57
+ installRequestStandardContext(request);
58
+ return (await site(request))?.roles.includes("console") === true;
59
+ }
60
+ });
61
+ }
62
+ export { consolePageAccount, consolePillScript, installConsolePill };