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,4 +1,3 @@
1
- //#region src/console/runtime/client/project.d.ts
2
1
  /**
3
2
  * The app that the Console reads and changes. Every Console request goes to this project, so one Console build can
4
3
  * reach an app on another origin.
@@ -44,5 +43,4 @@ export declare function projectFetch(path: string, init?: Omit<RequestInit, "cre
44
43
  * Whether the project is on another origin than the Console page, such as in an `account` Console. Cookies, frames, and
45
44
  * WebSockets of the app do not work then, so features that need them show a note instead.
46
45
  */
47
- export declare function isRemoteProject(): boolean;
48
- //#endregion
46
+ export declare function isRemoteProject(): boolean;
@@ -1,2 +1 @@
1
- import { a as projectRequest, c as setConsoleProject, i as projectFetch, n as isRemoteProject, o as projectUrl, r as projectAppUrl, s as resolveProjectUrl, t as consoleProject } from "../../../project-DlWTGB7h.js";
2
- export { consoleProject, isRemoteProject, projectAppUrl, projectFetch, projectRequest, projectUrl, resolveProjectUrl, setConsoleProject };
1
+ export { t as consoleProject, n as isRemoteProject, r as projectAppUrl, i as projectFetch, a as projectRequest, o as projectUrl, s as resolveProjectUrl, c as setConsoleProject } from "../../../project-DRC67Uiu.js";
@@ -1,2 +1,2 @@
1
- import { a as consoleProjectHost, c as consoleProjectsStorageKey, d as normalizeProjectUrl, i as ConsoleProjectTarget, l as createConsoleProjectStore, n as ConsoleProjectStorage, o as consoleProjectName, r as ConsoleProjectStore, s as consoleProjectTarget, t as ConsoleLinkedProject, u as memoryProjectStorage } from "../../../projects-Ddvl9EJp.js";
1
+ import { a as consoleProjectHost, c as consoleProjectsStorageKey, d as normalizeProjectUrl, i as ConsoleProjectTarget, l as createConsoleProjectStore, n as ConsoleProjectStorage, o as consoleProjectName, r as ConsoleProjectStore, s as consoleProjectTarget, t as ConsoleLinkedProject, u as memoryProjectStorage } from "../../../projects-mgPxrKZr.js";
2
2
  export { ConsoleLinkedProject, ConsoleProjectStorage, ConsoleProjectStore, ConsoleProjectTarget, consoleProjectHost, consoleProjectName, consoleProjectTarget, consoleProjectsStorageKey, createConsoleProjectStore, memoryProjectStorage, normalizeProjectUrl };
@@ -1,2 +1 @@
1
- import { a as createConsoleProjectStore, i as consoleProjectsStorageKey, n as consoleProjectName, o as memoryProjectStorage, r as consoleProjectTarget, s as normalizeProjectUrl, t as consoleProjectHost } from "../../../projects-CAcXztf4.js";
2
- export { consoleProjectHost, consoleProjectName, consoleProjectTarget, consoleProjectsStorageKey, createConsoleProjectStore, memoryProjectStorage, normalizeProjectUrl };
1
+ export { t as consoleProjectHost, n as consoleProjectName, r as consoleProjectTarget, i as consoleProjectsStorageKey, a as createConsoleProjectStore, o as memoryProjectStorage, s as normalizeProjectUrl } from "../../../projects-BRp0iseV.js";
@@ -1,5 +1,4 @@
1
- import { k as ConsoleDocumentsClient, m as ConsoleDocumentPublishExpectation } from "../../../documents-BASIRZ91.js";
2
- //#region src/console/runtime/client/publish.d.ts
1
+ import { k as ConsoleDocumentsClient, m as ConsoleDocumentPublishExpectation } from "../../../documents-CApMRd4o.js";
3
2
  /**
4
3
  * Publishes reviewed changes of several collections, one publish per collection, and returns how many documents
5
4
  * changed. Each publish sends exactly the draft digests that the caller showed, so a draft saved since then fails with
@@ -8,5 +7,4 @@ import { k as ConsoleDocumentsClient, m as ConsoleDocumentPublishExpectation } f
8
7
  export declare function publishConsoleDocumentChanges(client: Pick<ConsoleDocumentsClient, "publish">, changes: ReadonlyArray<{
9
8
  change: ConsoleDocumentPublishExpectation;
10
9
  collection: string;
11
- }>): Promise<number>;
12
- //#endregion
10
+ }>): Promise<number>;
@@ -1,4 +1,4 @@
1
- //#region src/console/runtime/client/publish.ts
1
+ // src/console/runtime/client/publish.ts
2
2
  /**
3
3
  * Publishes reviewed changes of several collections, one publish per collection, and returns how many documents
4
4
  * changed. Each publish sends exactly the draft digests that the caller showed, so a draft saved since then fails with
@@ -14,5 +14,4 @@ async function publishConsoleDocumentChanges(client, changes) {
14
14
  for (const [collection, expect] of byCollection) count += (await client.publish(collection, expect)).documents.length;
15
15
  return count;
16
16
  }
17
- //#endregion
18
17
  export { publishConsoleDocumentChanges };
@@ -1,4 +1,3 @@
1
- //#region src/console/runtime/client/rate-limit.d.ts
2
1
  /** The counter of one policy of a Rate Limit, as the Console shows it. */
3
2
  export interface ConsoleRateLimitCounter {
4
3
  limit: number;
@@ -32,5 +31,4 @@ export declare function parseConsoleRateLimitReset(value: unknown): ConsoleRateL
32
31
  /** Reads the counter of one key without consuming a token. */
33
32
  export declare function peekConsoleRateLimit(base: string, name: string, key: string, signal?: AbortSignal): Promise<ConsoleRateLimitPeek>;
34
33
  /** Deletes the counter of one key, where the provider supports it. */
35
- export declare function resetConsoleRateLimit(base: string, name: string, key: string): Promise<ConsoleRateLimitReset>;
36
- //#endregion
34
+ export declare function resetConsoleRateLimit(base: string, name: string, key: string): Promise<ConsoleRateLimitReset>;
@@ -1,6 +1,6 @@
1
- import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-B1yAIaSn.js";
2
- import { u as requestConsole } from "../../../request-Cs0FqxEL.js";
3
- //#region src/console/runtime/client/rate-limit.ts
1
+ import { u as requestConsole } from "../../../request-XFVx7CGC.js";
2
+ import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-CBtvqI30.js";
3
+ // src/console/runtime/client/rate-limit.ts
4
4
  function record(value) {
5
5
  return value instanceof Object && !Array.isArray(value) ? Object.fromEntries(Object.entries(value)) : void 0;
6
6
  }
@@ -92,5 +92,4 @@ async function resetConsoleRateLimit(base, name, key) {
92
92
  method: "POST"
93
93
  }));
94
94
  }
95
- //#endregion
96
95
  export { parseConsoleRateLimitPeek, parseConsoleRateLimitReset, peekConsoleRateLimit, resetConsoleRateLimit };
@@ -1,9 +1,7 @@
1
- import { a as ConsoleSectionId } from "../../../sections-Do7X4Nwt.js";
2
- //#region src/console/runtime/client/read-only.d.ts
1
+ import { a as ConsoleSectionId } from "../../../sections-DCoCa4nF.js";
3
2
  /**
4
3
  * Whether the access may only read the section (`"<section>:read"` in `console.authorize`). The write actions of the
5
4
  * page are hidden then. The server refuses them either way. Unknown navigation counts as writable, so a failed load
6
5
  * does not lock the page.
7
6
  */
8
- export declare function isConsoleSectionReadOnly(sectionsBase: string, section: ConsoleSectionId): Promise<boolean>;
9
- //#endregion
7
+ export declare function isConsoleSectionReadOnly(sectionsBase: string, section: ConsoleSectionId): Promise<boolean>;
@@ -1,5 +1,5 @@
1
- import { o as loadConsoleNavigation } from "../../../sections-BKUReack.js";
2
- //#region src/console/runtime/client/read-only.ts
1
+ import { o as loadConsoleNavigation } from "../../../sections-ZFAlI4JW.js";
2
+ // src/console/runtime/client/read-only.ts
3
3
  /**
4
4
  * Whether the access may only read the section (`"<section>:read"` in `console.authorize`). The write actions of the
5
5
  * page are hidden then. The server refuses them either way. Unknown navigation counts as writable, so a failed load
@@ -8,5 +8,4 @@ import { o as loadConsoleNavigation } from "../../../sections-BKUReack.js";
8
8
  async function isConsoleSectionReadOnly(sectionsBase, section) {
9
9
  return (await loadConsoleNavigation(sectionsBase))?.readOnly.includes(section) ?? false;
10
10
  }
11
- //#endregion
12
11
  export { isConsoleSectionReadOnly };
@@ -1,2 +1,2 @@
1
- import { a as consoleNetworkError, c as isConsoleSignInRequired, d as requestConsole, f as requestConsoleOperation, i as consoleErrorFields, l as isRetryableConsoleRequestError, n as ConsoleRequestError, o as consoleOperationCall, r as appendUniqueConsoleKeys, s as consoleResponseError, t as ConsoleErrorFields, u as loadConsoleKVPages } from "../../../request-SBLxvpyr.js";
2
- export { ConsoleErrorFields, ConsoleRequestError, appendUniqueConsoleKeys, consoleErrorFields, consoleNetworkError, consoleOperationCall, consoleResponseError, isConsoleSignInRequired, isRetryableConsoleRequestError, loadConsoleKVPages, requestConsole, requestConsoleOperation };
1
+ import { a as consoleNetworkError, c as isConsoleSignInRequired, d as requestConsole, f as requestConsoleOperation, i as consoleErrorFields, l as isRetryableConsoleRequestError, n as ConsoleRequestError, o as consoleOperationCall, p as requestConsoleUsage, r as appendUniqueConsoleKeys, s as consoleResponseError, t as ConsoleErrorFields, u as loadConsoleKVPages } from "../../../request-DkoE0b2h.js";
2
+ export { ConsoleErrorFields, ConsoleRequestError, appendUniqueConsoleKeys, consoleErrorFields, consoleNetworkError, consoleOperationCall, consoleResponseError, isConsoleSignInRequired, isRetryableConsoleRequestError, loadConsoleKVPages, requestConsole, requestConsoleOperation, requestConsoleUsage };
@@ -1,2 +1 @@
1
- import { a as consoleOperationCall, c as isRetryableConsoleRequestError, d as requestConsoleOperation, i as consoleNetworkError, l as loadConsoleKVPages, n as appendUniqueConsoleKeys, o as consoleResponseError, r as consoleErrorFields, s as isConsoleSignInRequired, t as ConsoleRequestError, u as requestConsole } from "../../../request-Cs0FqxEL.js";
2
- export { ConsoleRequestError, appendUniqueConsoleKeys, consoleErrorFields, consoleNetworkError, consoleOperationCall, consoleResponseError, isConsoleSignInRequired, isRetryableConsoleRequestError, loadConsoleKVPages, requestConsole, requestConsoleOperation };
1
+ export { t as ConsoleRequestError, n as appendUniqueConsoleKeys, r as consoleErrorFields, i as consoleNetworkError, a as consoleOperationCall, o as consoleResponseError, s as isConsoleSignInRequired, c as isRetryableConsoleRequestError, l as loadConsoleKVPages, u as requestConsole, d as requestConsoleOperation, f as requestConsoleUsage } from "../../../request-XFVx7CGC.js";
@@ -1,6 +1,5 @@
1
- import { i as RouteLocationNormalizedLoaded, n as LocationQueryRaw$1, t as LocationQuery$1 } from "../../../vue-router-C68IU1jM.js";
1
+ import { i as RouteLocationNormalizedLoaded, n as LocationQueryRaw$1, t as LocationQuery } from "../../../vue-router-plZJLlpm.js";
2
2
  import { Ref } from "vue";
3
- //#region src/console/runtime/client/route-query.d.ts
4
3
  /** One query parameter of a page. */
5
4
  export interface ConsoleQueryParam<T> {
6
5
  /** The value without the parameter. A value equal to it leaves the URL. */
@@ -42,9 +41,9 @@ export declare function queryFlag(options?: {
42
41
  history?: "push" | "replace";
43
42
  }): ConsoleQueryParam<boolean>;
44
43
  /** Reads the page state from a route query. Missing and invalid values read as their defaults. */
45
- export declare function readConsoleQuery<P extends ConsoleQueryParams>(params: P, query: LocationQuery$1 | Readonly<Record<string, unknown>>): ConsoleQueryValues<P>;
44
+ export declare function readConsoleQuery<P extends ConsoleQueryParams>(params: P, query: LocationQuery | Readonly<Record<string, unknown>>): ConsoleQueryValues<P>;
46
45
  /** Writes the page state into a route query. Defaults leave the URL, and parameters that the page does not own stay. */
47
- export declare function writeConsoleQuery<P extends ConsoleQueryParams>(params: P, values: Partial<ConsoleQueryValues<P>>, query: LocationQuery$1 | LocationQueryRaw$1): LocationQueryRaw$1;
46
+ export declare function writeConsoleQuery<P extends ConsoleQueryParams>(params: P, values: Partial<ConsoleQueryValues<P>>, query: LocationQuery | LocationQueryRaw$1): LocationQueryRaw$1;
48
47
  /**
49
48
  * Binds page state to the URL. Each key of `params` is a query parameter name and becomes a ref.
50
49
  * Changing a ref writes the URL at once: `push` parameters add a history entry, the others replace it, so Back and
@@ -57,4 +56,4 @@ export declare function useConsoleQuery<P extends ConsoleQueryParams>(params: P,
57
56
  active?: (route: RouteLocationNormalizedLoaded) => boolean;
58
57
  onRestore?: (names: Array<keyof P & string>) => void;
59
58
  }): { [K in keyof P]: Ref<ConsoleQueryValues<P>[K]>; };
60
- //#endregion
59
+ export {};
@@ -1,2 +1 @@
1
- import { a as querySelection, c as useConsoleQuery, i as queryInteger, l as writeConsoleQuery, n as queryChoice, o as queryText, r as queryFlag, s as readConsoleQuery, t as consoleQueryText } from "../../../route-query-CRVWXIrc.js";
2
- export { consoleQueryText, queryChoice, queryFlag, queryInteger, querySelection, queryText, readConsoleQuery, useConsoleQuery, writeConsoleQuery };
1
+ export { t as consoleQueryText, n as queryChoice, r as queryFlag, i as queryInteger, a as querySelection, o as queryText, s as readConsoleQuery, c as useConsoleQuery, l as writeConsoleQuery } from "../../../route-query-BWVl6ZO6.js";
@@ -1,4 +1,3 @@
1
- //#region src/console/runtime/client/schedule-run.d.ts
2
1
  /** One manual Schedule run as the Schedules page shows it. `unavailable` means the run did not start. */
3
2
  export interface ConsoleScheduleRunView {
4
3
  durationMs?: number;
@@ -9,5 +8,4 @@ export interface ConsoleScheduleRunView {
9
8
  export declare function parseConsoleScheduleRun(value: unknown): ConsoleScheduleRunView;
10
9
  export declare function consoleScheduleRunDescription(run: ConsoleScheduleRunView): string;
11
10
  /** Runs a manual Schedule Definition through the Console. Request failures become an `unavailable` result. */
12
- export declare function runConsoleScheduleDefinition(base: string, name: string): Promise<ConsoleScheduleRunView>;
13
- //#endregion
11
+ export declare function runConsoleScheduleDefinition(base: string, name: string): Promise<ConsoleScheduleRunView>;
@@ -1,6 +1,6 @@
1
- import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-B1yAIaSn.js";
2
- import { u as requestConsole } from "../../../request-Cs0FqxEL.js";
3
- //#region src/console/runtime/client/schedule-run.ts
1
+ import { u as requestConsole } from "../../../request-XFVx7CGC.js";
2
+ import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-CBtvqI30.js";
3
+ // src/console/runtime/client/schedule-run.ts
4
4
  function record(value) {
5
5
  return value instanceof Object && !Array.isArray(value) ? Object.fromEntries(Object.entries(value)) : void 0;
6
6
  }
@@ -43,5 +43,4 @@ async function runConsoleScheduleDefinition(base, name) {
43
43
  };
44
44
  }
45
45
  }
46
- //#endregion
47
46
  export { consoleScheduleRunDescription, parseConsoleScheduleRun, runConsoleScheduleDefinition };
@@ -1,2 +1,2 @@
1
- import { a as consoleFieldIssueMessage, c as consoleItemTitle, d as consoleValueParts, f as consoleValueSummary, h as humanizeConsoleFieldIssues, i as compactConsoleFieldValues, l as consoleSchemaDefaults, m as groupConsoleFieldIssues, n as ConsoleSchemaField, o as consoleFieldLabel, p as describeConsoleSchemaFields, r as ConsoleSchemaFieldKind, s as consoleFieldValueIssue, t as ConsoleFieldIssue, u as consoleSchemaItemValue } from "../../../schema-form-C-fy3xaU.js";
1
+ import { a as consoleFieldIssueMessage, c as consoleItemTitle, d as consoleValueParts, f as consoleValueSummary, h as humanizeConsoleFieldIssues, i as compactConsoleFieldValues, l as consoleSchemaDefaults, m as groupConsoleFieldIssues, n as ConsoleSchemaField, o as consoleFieldLabel, p as describeConsoleSchemaFields, r as ConsoleSchemaFieldKind, s as consoleFieldValueIssue, t as ConsoleFieldIssue, u as consoleSchemaItemValue } from "../../../schema-form-Bl79Bdm-.js";
2
2
  export { ConsoleFieldIssue, ConsoleSchemaField, ConsoleSchemaFieldKind, compactConsoleFieldValues, consoleFieldIssueMessage, consoleFieldLabel, consoleFieldValueIssue, consoleItemTitle, consoleSchemaDefaults, consoleSchemaItemValue, consoleValueParts, consoleValueSummary, describeConsoleSchemaFields, groupConsoleFieldIssues, humanizeConsoleFieldIssues };
@@ -1,4 +1,4 @@
1
- //#region src/console/runtime/client/schema-form.ts
1
+ // src/console/runtime/client/schema-form.ts
2
2
  /** Groups field issues by the dotted path of the form field they belong to, such as `author.name` or `tags`. */
3
3
  function groupConsoleFieldIssues(issues) {
4
4
  const grouped = {};
@@ -292,5 +292,4 @@ function consoleFieldValueIssue(field, value) {
292
292
  if (field.maximum !== void 0 && value > field.maximum) return `${field.label} must be at most ${field.maximum}.`;
293
293
  }
294
294
  }
295
- //#endregion
296
295
  export { compactConsoleFieldValues, consoleFieldIssueMessage, consoleFieldLabel, consoleFieldValueIssue, consoleItemTitle, consoleSchemaDefaults, consoleSchemaItemValue, consoleValueParts, consoleValueSummary, describeConsoleSchemaFields, groupConsoleFieldIssues, humanizeConsoleFieldIssues };
@@ -1,2 +1,2 @@
1
- import { a as createConsoleSectionLoader, c as parseConsoleNavigation, d as resolveConsoleSectionDetails, f as seedConsoleNavigation, i as consoleSectionsPath, l as reloadConsoleNavigation, n as consoleNavigationError, o as isConsoleSectionRevoked, p as subscribeConsoleNavigation, r as consolePendingSectionRoute, s as loadConsoleNavigation, t as ConsoleNavigation, u as resolveConsoleSectionDeepLink } from "../../../sections-BogiCmtz.js";
1
+ import { a as createConsoleSectionLoader, c as parseConsoleNavigation, d as resolveConsoleSectionDetails, f as seedConsoleNavigation, i as consoleSectionsPath, l as reloadConsoleNavigation, n as consoleNavigationError, o as isConsoleSectionRevoked, p as subscribeConsoleNavigation, r as consolePendingSectionRoute, s as loadConsoleNavigation, t as ConsoleNavigation, u as resolveConsoleSectionDeepLink } from "../../../sections-BMkFB3S-.js";
2
2
  export { ConsoleNavigation, consoleNavigationError, consolePendingSectionRoute, consoleSectionsPath, createConsoleSectionLoader, isConsoleSectionRevoked, loadConsoleNavigation, parseConsoleNavigation, reloadConsoleNavigation, resolveConsoleSectionDeepLink, resolveConsoleSectionDetails, seedConsoleNavigation, subscribeConsoleNavigation };
@@ -1,2 +1 @@
1
- import { a as isConsoleSectionRevoked, c as reloadConsoleNavigation, d as seedConsoleNavigation, f as subscribeConsoleNavigation, i as createConsoleSectionLoader, l as resolveConsoleSectionDeepLink, n as consolePendingSectionRoute, o as loadConsoleNavigation, r as consoleSectionsPath, s as parseConsoleNavigation, t as consoleNavigationError, u as resolveConsoleSectionDetails } from "../../../sections-BKUReack.js";
2
- export { consoleNavigationError, consolePendingSectionRoute, consoleSectionsPath, createConsoleSectionLoader, isConsoleSectionRevoked, loadConsoleNavigation, parseConsoleNavigation, reloadConsoleNavigation, resolveConsoleSectionDeepLink, resolveConsoleSectionDetails, seedConsoleNavigation, subscribeConsoleNavigation };
1
+ export { t as consoleNavigationError, n as consolePendingSectionRoute, r as consoleSectionsPath, i as createConsoleSectionLoader, a as isConsoleSectionRevoked, o as loadConsoleNavigation, s as parseConsoleNavigation, c as reloadConsoleNavigation, l as resolveConsoleSectionDeepLink, u as resolveConsoleSectionDetails, d as seedConsoleNavigation, f as subscribeConsoleNavigation } from "../../../sections-ZFAlI4JW.js";
@@ -1,35 +1,102 @@
1
- import { t as ConsoleTicketLink } from "../../../ticket-Pr_8ZtXW.js";
2
- import { n as ConsoleRequestError } from "../../../request-SBLxvpyr.js";
3
- import { n as SiteInvite, r as SiteSession, t as SiteGrant } from "../../../site-access-DxfdOel1.js";
4
- //#region src/console/runtime/client/site-access.d.ts
5
- export declare function isSiteAuthUnavailable(error: unknown): error is ConsoleRequestError;
6
- /** Everything the Site access section shows, read in one go. */
1
+ import { n as ConsoleRequestError } from "../../../request-DkoE0b2h.js";
2
+ import { t as ConsoleLink } from "../../../site-link-Dtw8MNVB.js";
3
+ export declare const siteAccessOperations: {
4
+ readonly link: "site.link";
5
+ readonly sessions: "site.sessions";
6
+ readonly revokeSession: "site.revoke-session";
7
+ readonly invite: "site.invite";
8
+ readonly invites: "site.invites";
9
+ readonly revokeInvite: "site.revoke-invite";
10
+ readonly grants: "site.grants";
11
+ };
12
+ export interface SiteSession {
13
+ id: string;
14
+ kind: "member" | "guest";
15
+ person: {
16
+ id: string;
17
+ name: string;
18
+ email?: string;
19
+ image?: string;
20
+ };
21
+ grants: string[];
22
+ device: string;
23
+ createdAt: string;
24
+ lastSeenAt: string;
25
+ expiresAt: string;
26
+ }
27
+ export interface SiteInvite {
28
+ id: string;
29
+ name: string;
30
+ grants: string[];
31
+ path: string;
32
+ expiresAt: string;
33
+ createdBy: {
34
+ id: string;
35
+ name: string;
36
+ };
37
+ }
38
+ export interface SiteGrant {
39
+ id: string;
40
+ label: string;
41
+ description?: string;
42
+ membersOnly?: true;
43
+ }
44
+ /**
45
+ * Whether the Console keeps the Site access of the open project: an app that answers
46
+ * `site.access`. Else the app keeps it, and the Console calls its `site.*` operations.
47
+ */
48
+ export declare function usesConsoleSiteAccess(): boolean;
49
+ /**
50
+ * Whether a Site access request was refused with a reason to show: any refusal of the Console, such as a missing role or
51
+ * a bad invite, or the Auth setup guidance of an app that keeps Site access itself.
52
+ */
53
+ export declare function isSiteAccessProblem(error: unknown): error is ConsoleRequestError;
54
+ /**
55
+ * Everything the Site access section shows, read in one go: from the Console, or from the app when the app keeps Site
56
+ * access. `sessionsError` is the Auth setup guidance of an app that cannot list its site browsers.
57
+ */
7
58
  export declare function readSiteAccess(signal?: AbortSignal): Promise<{
8
59
  sessions: SiteSession[];
9
60
  invites: SiteInvite[];
10
61
  grants: SiteGrant[];
11
62
  sessionsError?: ConsoleRequestError;
12
63
  }>;
13
- /** Opens the app in a new tab, and signs that browser in as you on the way. */
64
+ /**
65
+ * Opens the app in a new tab, signed in as you. With Site access in the Console, the tab opens
66
+ * `<app>/_vitehub/site?project=<id>`, which goes through the Console, with the pass and the policy of this project, and
67
+ * back to the page. Else the app signs the tab in with a link of its own.
68
+ */
14
69
  export declare function openSite(path?: string): Promise<void>;
15
- /** A one-time link for a phone: it lasts 10 minutes, so there is time to scan it. */
16
- export declare function phoneLink(): Promise<ConsoleTicketLink>;
17
- /** Invites a guest. The answer has the link, which the Console shows once: the app keeps only its hash. */
70
+ /** A one-time link for a phone, such as `/go/<code>` of the Console: it lasts 10 minutes, so there is time to scan it. */
71
+ export declare function phoneLink(): Promise<ConsoleLink>;
72
+ /** Invites a guest. The answer has the link, which the Console shows once: the Console or the app keeps only its hash. */
18
73
  export declare function inviteGuest(input: {
19
74
  name: string;
20
75
  grants: string[];
21
76
  expiresInDays: 1 | 7 | 30;
22
- }): Promise<ConsoleTicketLink & {
77
+ }): Promise<ConsoleLink & {
23
78
  invite: SiteInvite;
24
79
  }>;
80
+ /** Revokes the pass of a browser, or its app session when the app keeps Site access. */
25
81
  export declare function revokeSession(id: string): Promise<void>;
26
82
  export declare function revokeInvite(id: string): Promise<void>;
83
+ export declare function readHostedCommentsAccess(commentsProject: string): Promise<{
84
+ sessions: SiteSession[];
85
+ invites: SiteInvite[];
86
+ grants: SiteGrant[];
87
+ }>;
88
+ export declare function inviteHostedCommentsGuest(commentsProject: string, input: {
89
+ name: string;
90
+ grants: string[];
91
+ expiresInDays: number;
92
+ }): Promise<ConsoleLink & {
93
+ invite: SiteInvite;
94
+ }>;
95
+ export declare function revokeHostedCommentsAccess(commentsProject: string, type: "invites" | "sessions", id: string): Promise<void>;
27
96
  /** The QR code of a link as SVG markup. It draws with `currentColor`, so it follows the theme. */
28
97
  export declare function qrCode(url: string): string;
29
98
  /**
30
- * What a browser may do, in words: `Console and every page tool` for a member, else the labels of its grants, such as
31
- * `Read comments, Write comments`. Grants the catalogue does not know keep their id.
99
+ * What a browser may do, in words: the labels of its grants, such as `Read comments, Write comments`, or for a member of
100
+ * an app that keeps Site access itself, `Console and every page tool`. Grants the catalogue does not know keep their id.
32
101
  */
33
- export declare function grantSummary(kind: "member" | "guest", grants: readonly string[], catalogue: readonly SiteGrant[]): string;
34
- //#endregion
35
- export type { SiteGrant, SiteInvite, SiteSession };
102
+ export declare function grantSummary(kind: "member" | "guest", grants: readonly string[], catalogue: readonly SiteGrant[]): string;
@@ -1,7 +1,9 @@
1
- import { d as requestConsoleOperation, t as ConsoleRequestError } from "../../../request-Cs0FqxEL.js";
2
- import { t as openConsoleTicket } from "../../../ticket-DtBAstEU.js";
3
- import { t as siteAccessOperations } from "../../../site-access-BycrwM2v.js";
4
- //#region ../../node_modules/.pnpm/uqr@0.1.3/node_modules/uqr/dist/index.mjs
1
+ import { n as isRecord } from "../../../object-DRSmpe04.js";
2
+ import "../../../site-token-Wa7fhjwg.js";
3
+ import { M as useConsoleProjects } from "../../../project-session-8pN7pRo8.js";
4
+ import { d as requestConsoleOperation, o as consoleResponseError, t as ConsoleRequestError } from "../../../request-XFVx7CGC.js";
5
+ import { t as openConsoleLink } from "../../../site-link-Bvo2SxPo.js";
6
+ // ../../node_modules/.pnpm/uqr@0.1.3/node_modules/uqr/dist/index.mjs
5
7
  var QrCodeDataType = /* @__PURE__ */ ((QrCodeDataType2) => {
6
8
  QrCodeDataType2[QrCodeDataType2["Border"] = -1] = "Border";
7
9
  QrCodeDataType2[QrCodeDataType2["Data"] = 0] = "Data";
@@ -877,48 +879,174 @@ function renderSVG(data, options = {}) {
877
879
  svg += "</svg>";
878
880
  return svg;
879
881
  }
880
- //#endregion
881
- //#region src/console/runtime/client/site-access.ts
882
- function isSiteAuthUnavailable(error) {
883
- return error instanceof ConsoleRequestError && error.code === "AUTH_CONSOLE_UNAVAILABLE";
882
+ // src/console/runtime/client/site-access.ts
883
+ const siteAccessOperations = {
884
+ link: "site.link",
885
+ sessions: "site.sessions",
886
+ revokeSession: "site.revoke-session",
887
+ invite: "site.invite",
888
+ invites: "site.invites",
889
+ revokeInvite: "site.revoke-invite",
890
+ grants: "site.grants"
891
+ };
892
+ /**
893
+ * Whether the Console keeps the Site access of the open project: an app that answers
894
+ * `site.access`. Else the app keeps it, and the Console calls its `site.*` operations.
895
+ */
896
+ function usesConsoleSiteAccess() {
897
+ const projects = useConsoleProjects();
898
+ return Boolean(projects.current.value && projects.info.value?.operations.includes("site.access"));
884
899
  }
885
- /** Everything the Site access section shows, read in one go. */
886
- async function readSiteAccess(signal) {
887
- const options = signal ? { signal } : {};
900
+ /**
901
+ * Whether a Site access request was refused with a reason to show: any refusal of the Console, such as a missing role or
902
+ * a bad invite, or the Auth setup guidance of an app that keeps Site access itself.
903
+ */
904
+ function isSiteAccessProblem(error) {
905
+ return error instanceof ConsoleRequestError && (usesConsoleSiteAccess() || error.code === "AUTH_CONSOLE_UNAVAILABLE");
906
+ }
907
+ async function appOperation(operation, input, signal) {
908
+ const body = await requestConsoleOperation(operation, input, signal ? { signal } : {});
909
+ if (!isRecord(body)) throw new ConsoleRequestError(502, `The app answered ${operation} with no JSON object.`);
910
+ return body;
911
+ }
912
+ function currentProject() {
913
+ const project = useConsoleProjects().current.value;
914
+ if (!project) throw new ConsoleRequestError(409, "Open a project to manage its Site access.");
915
+ return project;
916
+ }
917
+ async function siteApi(method, path, input = {}) {
918
+ const project = input.commentsProject ?? currentProject().id;
919
+ const surface = input.commentsProject === void 0 ? "site" : "comments-access";
920
+ const response = await fetch(`/api/projects/${encodeURIComponent(project)}/${surface}${path}`, {
921
+ credentials: "same-origin",
922
+ headers: {
923
+ accept: "application/json",
924
+ ...input.body === void 0 ? {} : { "content-type": "application/json" }
925
+ },
926
+ method,
927
+ ...input.body === void 0 ? {} : { body: JSON.stringify(input.body) },
928
+ ...input.signal ? { signal: input.signal } : {}
929
+ });
930
+ if (!response.ok) throw await consoleResponseError(response);
931
+ const body = await response.json().catch(() => void 0);
932
+ if (!isRecord(body)) throw new ConsoleRequestError(502, "The Console answered Site access with no JSON object.");
933
+ return body;
934
+ }
935
+ function linkOf(body) {
936
+ const { url, expiresAt } = body;
937
+ if (typeof url !== "string" || typeof expiresAt !== "string") throw new ConsoleRequestError(502, "The Console answered without a link.");
938
+ return {
939
+ url,
940
+ expiresAt
941
+ };
942
+ }
943
+ function listOf(body, name, isItem) {
944
+ const value = body[name];
945
+ if (!Array.isArray(value) || !value.every(isItem)) throw new ConsoleRequestError(502, `The Console answered Site access without a list of ${name}.`);
946
+ return value;
947
+ }
948
+ function hasId(value) {
949
+ return isRecord(value) && typeof value.id === "string";
950
+ }
951
+ function isSession(value) {
952
+ return hasId(value) && (value.kind === "member" || value.kind === "guest") && isRecord(value.person) && Array.isArray(value.grants);
953
+ }
954
+ function isInvite(value) {
955
+ return hasId(value) && typeof value.name === "string" && Array.isArray(value.grants) && typeof value.expiresAt === "string";
956
+ }
957
+ function isGrant(value) {
958
+ return hasId(value) && typeof value.label === "string";
959
+ }
960
+ async function readAppSiteAccess(signal) {
888
961
  const [sessions, invites, grants] = await Promise.all([
889
- requestConsoleOperation(siteAccessOperations.sessions, {}, options).catch((error) => {
890
- if (isSiteAuthUnavailable(error)) return error;
962
+ appOperation(siteAccessOperations.sessions, {}, signal).catch((error) => {
963
+ if (error instanceof ConsoleRequestError && error.code === "AUTH_CONSOLE_UNAVAILABLE") return error;
891
964
  throw error;
892
965
  }),
893
- requestConsoleOperation(siteAccessOperations.invites, {}, options),
894
- requestConsoleOperation(siteAccessOperations.grants, {}, options)
966
+ appOperation(siteAccessOperations.invites, {}, signal),
967
+ appOperation(siteAccessOperations.grants, {}, signal)
895
968
  ]);
896
969
  return {
897
- ...isSiteAuthUnavailable(sessions) ? {
970
+ ...sessions instanceof ConsoleRequestError ? {
898
971
  sessions: [],
899
972
  sessionsError: sessions
900
- } : { sessions: sessions.sessions },
901
- invites: invites.invites,
902
- grants: grants.grants
973
+ } : { sessions: listOf(sessions, "sessions", isSession) },
974
+ invites: listOf(invites, "invites", isInvite),
975
+ grants: listOf(grants, "grants", isGrant)
903
976
  };
904
977
  }
905
- /** Opens the app in a new tab, and signs that browser in as you on the way. */
978
+ /**
979
+ * Everything the Site access section shows, read in one go: from the Console, or from the app when the app keeps Site
980
+ * access. `sessionsError` is the Auth setup guidance of an app that cannot list its site browsers.
981
+ */
982
+ async function readSiteAccess(signal) {
983
+ if (!usesConsoleSiteAccess()) return await readAppSiteAccess(signal);
984
+ const body = await siteApi("GET", "", signal ? { signal } : {});
985
+ return {
986
+ sessions: listOf(body, "sessions", isSession),
987
+ invites: listOf(body, "invites", isInvite),
988
+ grants: listOf(body, "grants", isGrant)
989
+ };
990
+ }
991
+ /**
992
+ * Opens the app in a new tab, signed in as you. With Site access in the Console, the tab opens
993
+ * `<app>/_vitehub/site?project=<id>`, which goes through the Console, with the pass and the policy of this project, and
994
+ * back to the page. Else the app signs the tab in with a link of its own.
995
+ */
906
996
  async function openSite(path) {
907
- await openConsoleTicket(() => requestConsoleOperation(siteAccessOperations.link, path ? { path } : {}));
997
+ if (!usesConsoleSiteAccess()) {
998
+ await openConsoleLink(() => appOperation(siteAccessOperations.link, path ? { path } : {}));
999
+ return;
1000
+ }
1001
+ const { id, url } = currentProject();
1002
+ await openConsoleLink(async () => ({ url: `${url.replace(/\/+$/, "")}/_vitehub/site?${new URLSearchParams({
1003
+ return: path ?? "/",
1004
+ project: id
1005
+ })}` }));
908
1006
  }
909
- /** A one-time link for a phone: it lasts 10 minutes, so there is time to scan it. */
1007
+ /** A one-time link for a phone, such as `/go/<code>` of the Console: it lasts 10 minutes, so there is time to scan it. */
910
1008
  async function phoneLink() {
911
- return await requestConsoleOperation(siteAccessOperations.link, { qr: true });
1009
+ return linkOf(usesConsoleSiteAccess() ? await siteApi("POST", "/codes", { body: {} }) : await appOperation(siteAccessOperations.link, { qr: true }));
912
1010
  }
913
- /** Invites a guest. The answer has the link, which the Console shows once: the app keeps only its hash. */
1011
+ /** Invites a guest. The answer has the link, which the Console shows once: the Console or the app keeps only its hash. */
914
1012
  async function inviteGuest(input) {
915
- return await requestConsoleOperation(siteAccessOperations.invite, input);
1013
+ const body = usesConsoleSiteAccess() ? await siteApi("POST", "/invites", { body: input }) : await appOperation(siteAccessOperations.invite, input);
1014
+ if (!isInvite(body.invite)) throw new ConsoleRequestError(502, "The answer has no invite.");
1015
+ return {
1016
+ ...linkOf(body),
1017
+ invite: body.invite
1018
+ };
916
1019
  }
1020
+ /** Revokes the pass of a browser, or its app session when the app keeps Site access. */
917
1021
  async function revokeSession(id) {
918
- await requestConsoleOperation(siteAccessOperations.revokeSession, { id });
1022
+ if (usesConsoleSiteAccess()) await siteApi("DELETE", `/sessions/${encodeURIComponent(id)}`);
1023
+ else await appOperation(siteAccessOperations.revokeSession, { id });
919
1024
  }
920
1025
  async function revokeInvite(id) {
921
- await requestConsoleOperation(siteAccessOperations.revokeInvite, { id });
1026
+ if (usesConsoleSiteAccess()) await siteApi("DELETE", `/invites/${encodeURIComponent(id)}`);
1027
+ else await appOperation(siteAccessOperations.revokeInvite, { id });
1028
+ }
1029
+ async function readHostedCommentsAccess(commentsProject) {
1030
+ const body = await siteApi("GET", "", { commentsProject });
1031
+ return {
1032
+ sessions: listOf(body, "sessions", isSession),
1033
+ invites: listOf(body, "invites", isInvite),
1034
+ grants: listOf(body, "grants", isGrant)
1035
+ };
1036
+ }
1037
+ async function inviteHostedCommentsGuest(commentsProject, input) {
1038
+ const body = await siteApi("POST", "/invites", {
1039
+ body: input,
1040
+ commentsProject
1041
+ });
1042
+ if (!isInvite(body.invite)) throw new ConsoleRequestError(502, "The answer has no invite.");
1043
+ return {
1044
+ ...linkOf(body),
1045
+ invite: body.invite
1046
+ };
1047
+ }
1048
+ async function revokeHostedCommentsAccess(commentsProject, type, id) {
1049
+ await siteApi("DELETE", `/${type}/${encodeURIComponent(id)}`, { commentsProject });
922
1050
  }
923
1051
  /** The QR code of a link as SVG markup. It draws with `currentColor`, so it follows the theme. */
924
1052
  function qrCode(url) {
@@ -929,13 +1057,12 @@ function qrCode(url) {
929
1057
  });
930
1058
  }
931
1059
  /**
932
- * What a browser may do, in words: `Console and every page tool` for a member, else the labels of its grants, such as
933
- * `Read comments, Write comments`. Grants the catalogue does not know keep their id.
1060
+ * What a browser may do, in words: the labels of its grants, such as `Read comments, Write comments`, or for a member of
1061
+ * an app that keeps Site access itself, `Console and every page tool`. Grants the catalogue does not know keep their id.
934
1062
  */
935
1063
  function grantSummary(kind, grants, catalogue) {
936
- if (kind === "member") return "Console and every page tool";
1064
+ if (kind === "member" && !usesConsoleSiteAccess()) return "Console and every page tool";
937
1065
  const labels = grants.map((id) => catalogue.find((grant) => grant.id === id)?.label ?? id);
938
1066
  return labels.length ? labels.join(", ") : "Nothing";
939
1067
  }
940
- //#endregion
941
- export { grantSummary, inviteGuest, isSiteAuthUnavailable, openSite, phoneLink, qrCode, readSiteAccess, revokeInvite, revokeSession };
1068
+ export { grantSummary, inviteGuest, inviteHostedCommentsGuest, isSiteAccessProblem, openSite, phoneLink, qrCode, readHostedCommentsAccess, readSiteAccess, revokeHostedCommentsAccess, revokeInvite, revokeSession, siteAccessOperations, usesConsoleSiteAccess };
@@ -0,0 +1,2 @@
1
+ import { n as openConsoleLink, r as openSiteAction, t as ConsoleLink } from "../../../site-link-Dtw8MNVB.js";
2
+ export { ConsoleLink, openConsoleLink, openSiteAction };
@@ -0,0 +1 @@
1
+ export { t as openConsoleLink, n as openSiteAction } from "../../../site-link-Bvo2SxPo.js";
@@ -1,5 +1,4 @@
1
1
  import { StoredDataContext, UseStoredDataOptions, UseStoredDataReturn } from "@vite-hub/device/vue";
2
- //#region src/console/runtime/client/stored.d.ts
3
2
  /**
4
3
  * The version of the answers that the Console keeps on the device. Change it when the shape of a stored answer changes,
5
4
  * so the next visit does not show an answer of the old shape.
@@ -29,5 +28,4 @@ export interface ConsoleStoredRead<T> {
29
28
  * Read `key` with `useStoredData()` outside a component, for as long as the boot needs it. Call `openDevice()` before,
30
29
  * or `stored` is always `undefined`.
31
30
  */
32
- export declare function readStored<T>(key: string, loader: (context: StoredDataContext) => Promise<T>, options?: UseStoredDataOptions<T, undefined>): ConsoleStoredRead<T>;
33
- //#endregion
31
+ export declare function readStored<T>(key: string, loader: (context: StoredDataContext) => Promise<T>, options?: UseStoredDataOptions<T, undefined>): ConsoleStoredRead<T>;
@@ -1,2 +1 @@
1
- import { a as readStored, i as consoleProjectKey, n as consoleAppCheckKey, r as consoleDeviceVersion, t as consoleAccountKey } from "../../../stored-Dhv2qsQv.js";
2
- export { consoleAccountKey, consoleAppCheckKey, consoleDeviceVersion, consoleProjectKey, readStored };
1
+ export { t as consoleAccountKey, n as consoleAppCheckKey, r as consoleDeviceVersion, i as consoleProjectKey, a as readStored } from "../../../stored-J3TetMKf.js";
@@ -1,5 +1,4 @@
1
1
  import { ShallowRef } from "vue";
2
- //#region src/console/runtime/client/toast.d.ts
3
2
  /**
4
3
  * Console toasts. They live in their own list, not in Nuxt UI `useToast()`: that list is shared with the host app, so a
5
4
  * Console mounted in a Nuxt app would show its toasts in the host toaster, or nowhere when the host turns toasts off.
@@ -35,5 +34,4 @@ export interface ConsoleToasts {
35
34
  toasts: Readonly<ShallowRef<readonly ConsoleToast[]>>;
36
35
  }
37
36
  /** Shows Console toasts: one sentence, `{Noun} {past participle}` for success, `Couldn't … Try again.` for errors. */
38
- export declare function useConsoleToast(): ConsoleToasts;
39
- //#endregion
37
+ export declare function useConsoleToast(): ConsoleToasts;