vite-hub 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/README.md +34 -36
  2. package/dist/_internal/runtime/browser-errors.d.ts +1 -1
  3. package/dist/_internal/runtime/browser-errors.js +1 -1
  4. package/dist/{access-F0YP5D5E.js → access-BDST818p.js} +6 -6
  5. package/dist/{access-policy-BsB3QVe5.d.ts → access-policy-CGXhO3Ee.d.ts} +3 -3
  6. package/dist/{access-policy-B_DCpZUt.js → access-policy-DjBKLo3c.js} +2 -2
  7. package/dist/{account-Bsu-LBOF.d.ts → account-BnOAU055.d.ts} +1 -1
  8. package/dist/{agent-invocations.post-DIm8tJV2.js → agent-invocations.post-CcPvfA0n.js} +7 -7
  9. package/dist/{agents-DnHexzTJ.js → agents-BDeazoAW.js} +2 -2
  10. package/dist/{agents-y5hBFHUQ.js → agents-BoWau_ei.js} +1 -1
  11. package/dist/{auth-BFVHYizM.d.ts → auth-BZOy7obk.d.ts} +2 -2
  12. package/dist/{auth-types-DWpTBZvp.d.ts → auth-types-CyqhWvYF.d.ts} +1 -1
  13. package/dist/bin.js +15 -7
  14. package/dist/{blob-CiUmptIp.d.ts → blob-CFLwMsjH.d.ts} +1 -1
  15. package/dist/{blob-BRV6_wZa.js → blob-CpvlM8jp.js} +3 -3
  16. package/dist/cache/operations.d.ts +1 -1
  17. package/dist/cache/operations.js +2 -2
  18. package/dist/cache.js +1 -1
  19. package/dist/choices/vue.d.ts +1 -0
  20. package/dist/choices/vue.js +2 -0
  21. package/dist/choices.d.ts +1 -0
  22. package/dist/choices.js +2 -0
  23. package/dist/cli-config-UAGTmuFa.js +2 -0
  24. package/dist/{cli-config-Bpjjfz5j.js → cli-config-wxKjF2Y0.js} +1 -16
  25. package/dist/console/auth-types.d.ts +1 -1
  26. package/dist/console/auth.d.ts +1 -1
  27. package/dist/console/auth.js +1 -1
  28. package/dist/console/runtime/client/account.d.ts +1 -1
  29. package/dist/console/runtime/client/account.js +2 -2
  30. package/dist/console/runtime/client/blob-media.d.ts +1 -1
  31. package/dist/console/runtime/client/blob-media.js +3 -3
  32. package/dist/console/runtime/client/comment-thread.js +1 -1
  33. package/dist/console/runtime/client/content-heads.d.ts +45 -0
  34. package/dist/console/runtime/client/content-heads.js +58 -0
  35. package/dist/console/runtime/client/documents.d.ts +2 -2
  36. package/dist/console/runtime/client/documents.js +1 -1
  37. package/dist/console/runtime/client/editor.d.ts +1 -1
  38. package/dist/console/runtime/client/invocation.js +3 -3
  39. package/dist/console/runtime/client/live.d.ts +1 -1
  40. package/dist/console/runtime/client/mcp-client.js +1 -1
  41. package/dist/console/runtime/client/media-library.d.ts +1 -1
  42. package/dist/console/runtime/client/media-library.js +1 -1
  43. package/dist/console/runtime/client/media-uploads.d.ts +1 -1
  44. package/dist/console/runtime/client/media-uploads.js +1 -1
  45. package/dist/console/runtime/client/operation-view.d.ts +1 -1
  46. package/dist/console/runtime/client/operation-view.js +2 -2
  47. package/dist/console/runtime/client/presence.d.ts +1 -1
  48. package/dist/console/runtime/client/problem.js +2 -2
  49. package/dist/console/runtime/client/project-link.d.ts +1 -1
  50. package/dist/console/runtime/client/project-link.js +1 -1
  51. package/dist/console/runtime/client/project-session.d.ts +2 -2
  52. package/dist/console/runtime/client/project-session.js +4 -4
  53. package/dist/console/runtime/client/project.d.ts +1 -1
  54. package/dist/console/runtime/client/project.js +1 -1
  55. package/dist/console/runtime/client/publish.d.ts +1 -1
  56. package/dist/console/runtime/client/rate-limit.js +2 -2
  57. package/dist/console/runtime/client/read-only.d.ts +1 -1
  58. package/dist/console/runtime/client/read-only.js +1 -1
  59. package/dist/console/runtime/client/request.js +1 -1
  60. package/dist/console/runtime/client/schedule-run.js +2 -2
  61. package/dist/console/runtime/client/sections.d.ts +1 -1
  62. package/dist/console/runtime/client/sections.js +1 -1
  63. package/dist/console/runtime/client/sidebar.ts +1 -1
  64. package/dist/console/runtime/client/site-access.js +2 -2
  65. package/dist/console/runtime/client/ticket.js +1 -1
  66. package/dist/console/runtime/client/workflow.js +2 -2
  67. package/dist/console/runtime/components/console-content-heads.vue +72 -0
  68. package/dist/console/runtime/components/console-document-dashboard.vue +43 -35
  69. package/dist/console/runtime/components/console-documents.vue +1 -0
  70. package/dist/console/runtime/components/console-markdown-editor.vue +4 -1
  71. package/dist/console/runtime/components/invocation/agent-invocation.ts +18 -5
  72. package/dist/console/runtime/components/invocation/internal/input-attachments.ts +69 -0
  73. package/dist/console/runtime/components/invocation/internal/invocation-activity.ts +67 -12
  74. package/dist/console/runtime/components/invocation/internal/invocation-conversation.ts +12 -4
  75. package/dist/console/runtime/components/invocation/invocation.css +16 -0
  76. package/dist/console/runtime/console-route.js +1 -1
  77. package/dist/console/runtime/definitions.d.ts +1 -1
  78. package/dist/console/runtime/definitions.js +1 -1
  79. package/dist/console/runtime/diagnostics.ts +30 -30
  80. package/dist/console/runtime/page-tool/page-tool.js +1 -1
  81. package/dist/console/runtime/public/skills/vitehub/SKILL.md +3 -3
  82. package/dist/console/runtime/public/skills/vitehub/references/framework-composition.md +1 -1
  83. package/dist/console/runtime/public/skills/vitehub/references/preview-contract.md +9 -1
  84. package/dist/console/runtime/public/skills/vitehub/references/primitives/channels.md +1 -1
  85. package/dist/console/runtime/public/skills/vitehub/references/primitives/database.md +1 -1
  86. package/dist/console/runtime/public/skills/vitehub/references/primitives/markdown-template.md +3 -3
  87. package/dist/console/runtime/public/skills/vitehub/references/project-shapes.md +2 -2
  88. package/dist/console/runtime/public/skills/vitehub/references/sandboxes-hosts.md +4 -4
  89. package/dist/console/runtime/sections.d.ts +1 -1
  90. package/dist/console/runtime/sections.js +1 -1
  91. package/dist/console/runtime/server/access-policy.d.ts +1 -1
  92. package/dist/console/runtime/server/access-policy.js +1 -1
  93. package/dist/console/runtime/server/agents.get.js +2 -2
  94. package/dist/console/runtime/server/auth.d.ts +1 -1
  95. package/dist/console/runtime/server/auth.js +2 -2
  96. package/dist/console/runtime/server/blob.d.ts +1 -1
  97. package/dist/console/runtime/server/blob.js +1 -1
  98. package/dist/console/runtime/server/channel-replay.d.ts +2 -2
  99. package/dist/console/runtime/server/channel-replay.js +4 -4
  100. package/dist/console/runtime/server/database.d.ts +1 -1
  101. package/dist/console/runtime/server/database.get.d.ts +1 -1
  102. package/dist/console/runtime/server/database.get.js +2 -2
  103. package/dist/console/runtime/server/database.js +1 -1
  104. package/dist/console/runtime/server/definitions.d.ts +1 -1
  105. package/dist/console/runtime/server/definitions.get.d.ts +3 -3
  106. package/dist/console/runtime/server/definitions.get.js +3 -3
  107. package/dist/console/runtime/server/definitions.js +1 -1
  108. package/dist/console/runtime/server/development.d.ts +2 -2
  109. package/dist/console/runtime/server/development.js +2 -2
  110. package/dist/console/runtime/server/documents.d.ts +1 -1
  111. package/dist/console/runtime/server/documents.js +1 -1
  112. package/dist/console/runtime/server/env.get.d.ts +1 -1
  113. package/dist/console/runtime/server/env.get.js +3 -3
  114. package/dist/console/runtime/server/invocation-capabilities.get.js +2 -2
  115. package/dist/console/runtime/server/invocation-workspace.get.d.ts +1 -1
  116. package/dist/console/runtime/server/invocation-workspace.get.js +5 -5
  117. package/dist/console/runtime/server/invocation.get.d.ts +1 -1
  118. package/dist/console/runtime/server/invocation.get.js +6 -6
  119. package/dist/console/runtime/server/invocations.get.js +3 -3
  120. package/dist/console/runtime/server/logs.get.d.ts +2 -2
  121. package/dist/console/runtime/server/logs.get.js +5 -5
  122. package/dist/console/runtime/server/mcp-client-operations.d.ts +1 -1
  123. package/dist/console/runtime/server/mcp-client-operations.js +3 -3
  124. package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
  125. package/dist/console/runtime/server/operation-contributions.js +1 -1
  126. package/dist/console/runtime/server/page-auth.d.ts +1 -1
  127. package/dist/console/runtime/server/page-tool.d.ts +1 -1
  128. package/dist/console/runtime/server/page-tool.js +2 -2
  129. package/dist/console/runtime/server/rpc.d.ts +2 -2
  130. package/dist/console/runtime/server/rpc.js +7 -7
  131. package/dist/console/runtime/server/search.get.js +1 -1
  132. package/dist/console/runtime/server/sections.d.ts +4 -4
  133. package/dist/console/runtime/server/sections.get.d.ts +1 -1
  134. package/dist/console/runtime/server/sections.get.js +5 -5
  135. package/dist/console/runtime/server/sections.js +3 -3
  136. package/dist/console/runtime/server/setup.d.ts +3 -3
  137. package/dist/console/runtime/server/setup.js +2 -2
  138. package/dist/console/runtime/server/site-entry.d.ts +1 -1
  139. package/dist/console/runtime/server/site-entry.js +9 -6
  140. package/dist/console/runtime/server/site-session.d.ts +5 -1
  141. package/dist/console/runtime/server/site-session.js +1 -1
  142. package/dist/console/runtime/server/status.get.d.ts +2 -2
  143. package/dist/console/runtime/server/status.get.js +5 -5
  144. package/dist/console/runtime/server/tickets.d.ts +1 -1
  145. package/dist/console/runtime/server/tickets.js +1 -1
  146. package/dist/console/runtime/server/usage.get.d.ts +2 -2
  147. package/dist/console/runtime/server/usage.get.js +7 -7
  148. package/dist/console/runtime/server/workspace-files.get.d.ts +1 -1
  149. package/dist/console/runtime/server/workspace-files.get.js +3 -3
  150. package/dist/console/server.d.ts +5 -5
  151. package/dist/console/server.js +6 -6
  152. package/dist/console/ui.js +121 -20
  153. package/dist/{console-route-COvNB_Xj.js → console-route-CBuqZ4wO.js} +1 -1
  154. package/dist/{database-J7M0B3ED.js → database-BdOBjPkS.js} +1 -1
  155. package/dist/{database-BVyhAxq-.d.ts → database-DyPVMjp_.d.ts} +1 -1
  156. package/dist/{definitions-BDRkT5-f.js → definitions-BW6SvmMM.js} +1 -0
  157. package/dist/{definitions-bepsXY5G.js → definitions-CNq_Shkh.js} +3 -3
  158. package/dist/{definitions-CxDT8D8Y.d.ts → definitions-DB4LbZ7T.d.ts} +2 -0
  159. package/dist/{definitions-CGTWTj67.d.ts → definitions-Dbgxfz3I.d.ts} +1 -1
  160. package/dist/development-W5EwONyL.d.ts +12 -0
  161. package/dist/{development-BzeSHZGH.js → development-zLxOp-AO.js} +12 -2
  162. package/dist/{diagnostics-D0DefmQj.js → diagnostics-9U_fYxMy.js} +30 -30
  163. package/dist/doctor.js +88 -107
  164. package/dist/{documents-C97WMaJZ.d.ts → documents-BASIRZ91.d.ts} +1 -1
  165. package/dist/{documents-RVHsQKFw.d.ts → documents-CboVhYFz.d.ts} +3 -3
  166. package/dist/{documents-DwPfR-fz.js → documents-CjJTCrY8.js} +3 -3
  167. package/dist/{documents-8US1nUgK.js → documents-qrHHqlNU.js} +1 -1
  168. package/dist/durability/operations.d.ts +1 -1
  169. package/dist/durability/operations.js +2 -2
  170. package/dist/{entries-D48wVEaS.js → entries-Bj-jPs_J.js} +1 -1
  171. package/dist/{error-diagnostics-C2rjmOlX.js → error-diagnostics-Bm3JKYjz.js} +19 -11
  172. package/dist/error-diagnostics.ts +19 -11
  173. package/dist/index.d.ts +15 -2
  174. package/dist/index.js +8 -4
  175. package/dist/internal/disabled-redis-driver.js +1 -1
  176. package/dist/internal/disabled-upstash-driver.js +1 -1
  177. package/dist/internal/test-loader.js +1 -1
  178. package/dist/internal/test-server.js +1 -1
  179. package/dist/{internal-BP_O70ic.d.ts → internal-CO4OqqaS.d.ts} +3 -3
  180. package/dist/{invocation-page-undo-BkUau8X7.js → invocation-page-undo-DIZ-s3xT.js} +2 -2
  181. package/dist/{invocations-CsucCJuq.js → invocations-CK_-G540.js} +3 -3
  182. package/dist/logs/memory.js +1 -1
  183. package/dist/logs/source.js +1 -1
  184. package/dist/logs.js +2 -2
  185. package/dist/{mcp-client-D0mUt18v.js → mcp-client-By4zk0vU.js} +6 -6
  186. package/dist/{media-wZMY6f2M.js → media-BHpQ-4jw.js} +4 -4
  187. package/dist/{media-library-CEo-Ye2B.d.ts → media-library-D9ThbXqs.d.ts} +1 -1
  188. package/dist/{media-library-BChf8XOd.js → media-library-NaOMBKWS.js} +2 -2
  189. package/dist/{memory-DhirB6SA.js → memory-DTmq-Z6x.js} +2 -2
  190. package/dist/{nuxt-server-imports-Lnaf5Fe-.js → nuxt-server-imports-DH60Z7LA.js} +3 -2
  191. package/dist/nuxt.d.ts +1 -1
  192. package/dist/nuxt.js +94 -67
  193. package/dist/{operation-contributions-DflAv5AC.js → operation-contributions-BdS0z3tx.js} +2 -2
  194. package/dist/{operation-contributions-fZyVo662.d.ts → operation-contributions-DpkO_iSU.d.ts} +1 -1
  195. package/dist/{operation-definition-Bn8V2hab.js → operation-definition-a5keEpCd.js} +6 -1
  196. package/dist/{operations-DX9EkHwb.d.ts → operations-B0689BG1.d.ts} +5 -0
  197. package/dist/operations-CAQmIxGK.js +2 -0
  198. package/dist/{operations-B6N-ja8x.js → operations-CWP9dF3i.js} +11 -11
  199. package/dist/{operations-Dj_cp-UK.js → operations-EOdyctDc.js} +1 -1
  200. package/dist/{optional-owners-Crm6kVS5.js → optional-owners-BNA2OX6z.js} +37 -23
  201. package/dist/{page-tool-BCRyx3pM.d.ts → page-tool-CRCK1RHV.d.ts} +1 -1
  202. package/dist/{plugins-DQ8pF-38.js → plugins-B-DpgDPB.js} +1459 -714
  203. package/dist/{plugins-5uDXr9Km.d.ts → plugins-BqAtIEX2.d.ts} +75 -56
  204. package/dist/{project-C2dnB9Kf.js → project-C4N_Zcjl.js} +3 -3
  205. package/dist/{project-5EN7JaXI.d.ts → project-CufkVP1u.d.ts} +2 -2
  206. package/dist/{project-DOeM0zg3.js → project-DlWTGB7h.js} +1 -1
  207. package/dist/{project-link-D_XQvBOC.d.ts → project-link-BuOzBH9f.d.ts} +1 -1
  208. package/dist/{project-link-Qi7nltHM.js → project-link-D-6UefhA.js} +2 -2
  209. package/dist/{request-yCybBeqT.js → request-DE8w_cSM.js} +8 -3
  210. package/dist/{request-BUYAlAJl.js → request-DbFfYmCu.js} +2 -2
  211. package/dist/{runtime-DM8Z6KLT.js → runtime-DQuHg7OO.js} +1 -1
  212. package/dist/{runtime-DG34DLXc.js → runtime-OsEDfbM9.js} +1 -1
  213. package/dist/runtime-feature-guard-B64MMW9I.js +140 -0
  214. package/dist/scan-module-D_3X08mj.js +2 -0
  215. package/dist/scan-module-Df58L_6T.js +311 -0
  216. package/dist/{secret-AZLhaNyr.js → secret-Dy5uqvq9.js} +1 -1
  217. package/dist/{sections-BriKrBgN.d.ts → sections-BogiCmtz.d.ts} +2 -2
  218. package/dist/{sections-ACHVTCWn.d.ts → sections-CyrXbbkG.d.ts} +4 -4
  219. package/dist/{sections-4xyBoiar.d.ts → sections-Do7X4Nwt.d.ts} +1 -2
  220. package/dist/{sections-D6AM5Gy5.js → sections-DumoLKQN.js} +2 -3
  221. package/dist/{sections-CUJyQA9d.js → sections-et20h8w3.js} +3 -3
  222. package/dist/{sections.get-1lHjyKCI.d.ts → sections.get-COiLcQ0P.d.ts} +2 -2
  223. package/dist/seo/runtime.js +1 -1
  224. package/dist/{server-DbjFYSeU.js → server-BRJE4t-W.js} +2 -2
  225. package/dist/{setup-DLZFzuLv.d.ts → setup-ZbA1by7W.d.ts} +4 -3
  226. package/dist/{site-access-Bhsty_v4.js → site-access-BbJUe5QI.js} +1 -1
  227. package/dist/{site-access-CyRtc0gZ.js → site-access-BmE8HGxs.js} +4 -4
  228. package/dist/{site-session-Jf21TVw8.js → site-session-odJq1dYa.js} +5 -5
  229. package/dist/skills/operations.d.ts +1 -1
  230. package/dist/skills/operations.js +2 -2
  231. package/dist/skills.d.ts +1 -1
  232. package/dist/{skills.get-CHQMzSD_.js → skills.get-Bl8cBe8u.js} +2 -2
  233. package/dist/{source-w9BHUwyO.js → source-D4wWtoHh.js} +1 -1
  234. package/dist/task/operations.d.ts +1 -1
  235. package/dist/task/operations.js +2 -2
  236. package/dist/test/register.js +1 -1
  237. package/dist/{ticket-RKQF6Wy9.js → ticket-Cudn1dq3.js} +1 -1
  238. package/dist/{tickets-CfJhT7d0.js → tickets-C_0Fhc00.js} +6 -6
  239. package/dist/{usage-Bc0YY_ka.js → usage-B4taNt4a.js} +1 -1
  240. package/dist/{usage-index-CMMT4cXQ.js → usage-index-BsGAFzyq.js} +1 -1
  241. package/dist/{version-DDRL_OYz.js → version-DNmSsk5r.js} +22 -19
  242. package/dist/{cli-DjoDGgT4.js → vite-stage-mmtwQIMA.js} +32 -2
  243. package/dist/{workspace-history-l47NPVSy.js → workspace-history-CraoERnc.js} +1 -1
  244. package/package.json +93 -93
  245. package/dist/cli-config--rAg6V-a.js +0 -2
  246. package/dist/decisions/vue.d.ts +0 -1
  247. package/dist/decisions/vue.js +0 -2
  248. package/dist/decisions.d.ts +0 -1
  249. package/dist/decisions.js +0 -2
  250. package/dist/development-DgaQ05jw.d.ts +0 -9
  251. package/dist/operations-H9q0QB2C.js +0 -2
  252. package/dist/runtime-feature-guard-rpZz1eMF.js +0 -55
  253. package/dist/scan-module-BTeOuZsp.js +0 -2
  254. package/dist/scan-module-DlHQ8a0X.js +0 -148
@@ -0,0 +1,311 @@
1
+ import { parseSync } from "vite";
2
+ //#region ../internal/src/build/ast-walk.ts
3
+ /** The oxc parser grammar for a file, from its extension. Defaults to TypeScript. */
4
+ function moduleLanguage(file) {
5
+ if (/\.(?:c|m)?tsx$/i.test(file)) return "tsx";
6
+ if (/\.(?:c|m)?jsx$/i.test(file)) return "jsx";
7
+ if (/\.(?:c|m)?js$/i.test(file)) return "js";
8
+ return "ts";
9
+ }
10
+ function isNode(value) {
11
+ return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string";
12
+ }
13
+ /** Visits `node` and its descendants. Return `false` from `visit` to skip the children of a node. */
14
+ function walk(node, visit, parent) {
15
+ if (visit(node, parent) === false) return;
16
+ const fields = node;
17
+ for (const key in fields) {
18
+ const child = fields[key];
19
+ if (typeof child !== "object" || child === null || key === "parent") continue;
20
+ if (Array.isArray(child)) {
21
+ for (const item of child) if (isNode(item)) walk(item, visit, node);
22
+ } else if (isNode(child)) walk(child, visit, node);
23
+ }
24
+ }
25
+ //#endregion
26
+ //#region ../internal/src/build/scan-module.ts
27
+ /**
28
+ * Reads facts from JavaScript and TypeScript modules at build and dev time. The scanner parses each module once with
29
+ * the oxc parser that Vite ships through Rolldown, and never runs it. Values that are not static literals read as
30
+ * `dynamic`, so callers can report their own diagnostics.
31
+ */
32
+ /** The value of an expression that the scanner cannot read without running the module. */
33
+ const dynamic = Symbol("dynamic");
34
+ /** Parses a module once. `file` selects the grammar from its extension and defaults to TypeScript. */
35
+ function scanModule(source, file = "module.ts") {
36
+ const result = parseSync(file, source, {
37
+ lang: moduleLanguage(file),
38
+ preserveParens: false,
39
+ sourceType: "module"
40
+ });
41
+ return {
42
+ comments: result.comments,
43
+ errors: result.errors,
44
+ file,
45
+ program: result.program,
46
+ source
47
+ };
48
+ }
49
+ /** Lists the names that a module exports. A default export reads as `default`. Type-only exports are left out. */
50
+ function exportNames(source, file = "module.ts") {
51
+ const { module } = parseSync(file, source, {
52
+ lang: moduleLanguage(file),
53
+ sourceType: "module"
54
+ });
55
+ return module.staticExports.flatMap((statement) => statement.entries).flatMap((entry) => {
56
+ if (entry.isType) return [];
57
+ if (entry.exportName.kind === "Default") return ["default"];
58
+ return entry.exportName.name === null ? [] : [entry.exportName.name];
59
+ });
60
+ }
61
+ /** The source text of a node. */
62
+ function nodeText(module, node) {
63
+ return module.source.slice(node.start, node.end);
64
+ }
65
+ /** Removes parentheses, `as`, `satisfies`, `!`, and `<T>` assertions around an expression. */
66
+ function unwrapExpression(node) {
67
+ while (node.type === "ParenthesizedExpression" || node.type === "TSAsExpression" || node.type === "TSSatisfiesExpression" || node.type === "TSNonNullExpression" || node.type === "TSTypeAssertion") node = node.expression;
68
+ return node;
69
+ }
70
+ /** A call argument without assertions, or undefined for a spread or missing argument. */
71
+ function argumentExpression(argument) {
72
+ return argument === void 0 || argument.type === "SpreadElement" ? void 0 : unwrapExpression(argument);
73
+ }
74
+ /** Calls whose callee is a plain identifier in `names`, such as `defineCollection(...)`, in source order. */
75
+ function findCalls(module, names) {
76
+ const wanted = new Set(names);
77
+ const calls = [];
78
+ walk(module.program, (node) => {
79
+ if (node.type === "CallExpression" && node.callee.type === "Identifier" && wanted.has(node.callee.name)) calls.push(node);
80
+ });
81
+ return calls.sort((left, right) => left.start - right.start);
82
+ }
83
+ /** The expression of `export default <expression>`, without assertions. Declarations return undefined. */
84
+ function defaultExportExpression(module) {
85
+ for (const statement of module.program.body) {
86
+ if (statement.type !== "ExportDefaultDeclaration") continue;
87
+ const declaration = statement.declaration;
88
+ if (declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration" || declaration.type === "TSInterfaceDeclaration") return;
89
+ return unwrapExpression(declaration);
90
+ }
91
+ }
92
+ /**
93
+ * Finds `export default defineX({ ... })` for one of `names`. With `positionalOptionsIndex`, a call whose first
94
+ * argument is not an object and that has more than one argument reads its options from that argument. Returns
95
+ * undefined when the options are not an object literal.
96
+ */
97
+ function findDefaultExportCall(module, names, options = {}) {
98
+ const call = defaultExportExpression(module);
99
+ if (call?.type !== "CallExpression" || call.callee.type !== "Identifier" || !names.includes(call.callee.name)) return;
100
+ const name = call.callee.name;
101
+ const first = argumentExpression(call.arguments[0]);
102
+ if (first?.type === "ObjectExpression") return {
103
+ call,
104
+ name,
105
+ options: first
106
+ };
107
+ if (options.positionalOptionsIndex === void 0 || first === void 0 || call.arguments.length < 2) return;
108
+ const positional = call.arguments[options.positionalOptionsIndex];
109
+ if (positional === void 0) return {
110
+ call,
111
+ name
112
+ };
113
+ const object = argumentExpression(positional);
114
+ return object?.type === "ObjectExpression" ? {
115
+ call,
116
+ name,
117
+ options: object
118
+ } : void 0;
119
+ }
120
+ function staticKey(property) {
121
+ const key = property.key;
122
+ if (key.type === "Identifier" && !property.computed) return key.name;
123
+ if (key.type === "PrivateIdentifier") return;
124
+ const value = staticValue(key);
125
+ return typeof value === "string" || typeof value === "number" || typeof value === "bigint" ? String(value) : void 0;
126
+ }
127
+ /** The members of an object literal in source order. */
128
+ function objectProperties(object) {
129
+ return object.properties.map((node) => node.type === "SpreadElement" ? {
130
+ computed: false,
131
+ key: void 0,
132
+ node,
133
+ value: void 0
134
+ } : {
135
+ computed: node.computed,
136
+ key: staticKey(node),
137
+ node,
138
+ value: unwrapExpression(node.value)
139
+ });
140
+ }
141
+ /** The last member named `name`, which is the one that the object keeps at runtime. */
142
+ function findProperty(object, name) {
143
+ return objectProperties(object).findLast((property) => property.key === name);
144
+ }
145
+ /** The value of a template literal without substitutions. */
146
+ function staticTemplate(node) {
147
+ if (node.expressions.length) return dynamic;
148
+ return node.quasis[0]?.value.cooked ?? dynamic;
149
+ }
150
+ const escapePattern = /\\(u\{[^}]*\}?|u[\s\S]{0,4}|x[\s\S]{0,2}|0\d|[\s\S])/g;
151
+ /**
152
+ * True when a string literal has an escape that strict mode code rejects. The parser recovers from some bad escapes
153
+ * and accepts legacy octal escapes, so the scanner checks them again.
154
+ */
155
+ function hasInvalidEscape(raw) {
156
+ for (const [, escape = ""] of raw.matchAll(escapePattern)) if (escape.startsWith("u{")) {
157
+ const code = escape.slice(2, -1);
158
+ if (!escape.endsWith("}") || !/^[\da-fA-F]+$/.test(code) || Number.parseInt(code, 16) > 1114111) return true;
159
+ } else if (escape.startsWith("u")) {
160
+ if (!/^u[\da-fA-F]{4}$/.test(escape)) return true;
161
+ } else if (escape.startsWith("x")) {
162
+ if (!/^x[\da-fA-F]{2}$/.test(escape)) return true;
163
+ } else if (/^(?:[1-9]|0\d)$/.test(escape)) return true;
164
+ return false;
165
+ }
166
+ /**
167
+ * Reads a literal value: strings, numbers, booleans, `null`, `undefined`, template literals without substitutions,
168
+ * and arrays and objects of these. Any other expression gives `dynamic`.
169
+ */
170
+ function staticValue(node) {
171
+ node = unwrapExpression(node);
172
+ switch (node.type) {
173
+ case "Literal":
174
+ if ("regex" in node) return dynamic;
175
+ return typeof node.value === "string" && hasInvalidEscape(node.raw ?? "") ? dynamic : node.value;
176
+ case "TemplateLiteral": return staticTemplate(node);
177
+ case "Identifier": return node.name === "undefined" ? void 0 : dynamic;
178
+ case "UnaryExpression": {
179
+ if (node.operator === "void") return staticValue(node.argument) === dynamic ? dynamic : void 0;
180
+ const value = staticValue(node.argument);
181
+ if (node.operator === "-" && (typeof value === "number" || typeof value === "bigint")) return -value;
182
+ return dynamic;
183
+ }
184
+ case "ArrayExpression": {
185
+ const values = [];
186
+ for (const element of node.elements) {
187
+ if (element === null || element.type === "SpreadElement") return dynamic;
188
+ const value = staticValue(element);
189
+ if (value === dynamic) return dynamic;
190
+ values.push(value);
191
+ }
192
+ return values;
193
+ }
194
+ case "ObjectExpression": {
195
+ const values = {};
196
+ for (const property of objectProperties(node)) {
197
+ if (property.key === void 0 || property.node.type !== "Property" || property.node.kind !== "init" || property.node.method || property.value === void 0) return dynamic;
198
+ const value = staticValue(property.value);
199
+ if (value === dynamic) return dynamic;
200
+ Object.defineProperty(values, property.key, {
201
+ configurable: true,
202
+ enumerable: true,
203
+ value,
204
+ writable: true
205
+ });
206
+ }
207
+ return values;
208
+ }
209
+ default: return dynamic;
210
+ }
211
+ }
212
+ /** The static string value of an expression, or undefined when it is not a string literal. */
213
+ function staticString(node) {
214
+ if (node === void 0) return;
215
+ const value = staticValue(node);
216
+ return typeof value === "string" ? value : void 0;
217
+ }
218
+ function isLineTerminator(char) {
219
+ return char === "\n" || char === "\r" || char === "\u2028" || char === "\u2029";
220
+ }
221
+ /** Comments, JSX text, and string, template, and regular expression literals, sorted by position. Templates are not split. */
222
+ function literalSpans(module) {
223
+ const spans = module.comments.map((comment) => ({
224
+ end: comment.end,
225
+ inert: true,
226
+ start: comment.start
227
+ }));
228
+ walk(module.program, (node) => {
229
+ if (node.type === "TemplateLiteral" || node.type === "JSXText") {
230
+ spans.push({
231
+ end: node.end,
232
+ inert: node.type === "JSXText",
233
+ start: node.start
234
+ });
235
+ return false;
236
+ }
237
+ if (node.type === "Literal" && (typeof node.value === "string" || "regex" in node)) spans.push({
238
+ end: node.end,
239
+ inert: false,
240
+ start: node.start
241
+ });
242
+ });
243
+ return spans.sort((left, right) => left.start - right.start);
244
+ }
245
+ /**
246
+ * The module source with comments, strings, templates, regular expressions, and JSX text replaced by spaces. Line
247
+ * terminators and all positions stay the same, so text matches map back to the source.
248
+ */
249
+ function maskLiterals(module) {
250
+ const output = module.source.split("");
251
+ for (const span of literalSpans(module)) for (let index = span.start; index < span.end; index++) if (!isLineTerminator(output[index] ?? "")) output[index] = " ";
252
+ return output.join("");
253
+ }
254
+ const codeTokenPattern = /(?:0[xX][\da-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?[\d_]+)?)n?|(?:[\p{ID_Start}$_]|\\u\{[\da-fA-F]+\}|\\u[\da-fA-F]{4})(?:[\p{ID_Continue}$‌‍]|\\u\{[\da-fA-F]+\}|\\u[\da-fA-F]{4})*|\S/gu;
255
+ function decodeIdentifier(token) {
256
+ return token.replace(/\\u(?:\{([\da-fA-F]+)\}|([\da-fA-F]{4}))/g, (_escape, point, unit) => String.fromCodePoint(Number.parseInt(point ?? unit ?? "0", 16)));
257
+ }
258
+ /**
259
+ * Splits a module into tokens. The parser finds literals and comments, so a `/` is never confused between division
260
+ * and a regular expression. Identifier escapes are decoded.
261
+ */
262
+ function moduleTokens(module) {
263
+ const { source } = module;
264
+ const tokens = [];
265
+ const starts = [];
266
+ const lineBreaks = /* @__PURE__ */ new Set();
267
+ let previousEnd = 0;
268
+ const push = (token, start) => {
269
+ for (let index = previousEnd; index < start; index++) if (isLineTerminator(source[index] ?? "")) {
270
+ lineBreaks.add(tokens.length);
271
+ break;
272
+ }
273
+ tokens.push(token);
274
+ starts.push(start);
275
+ previousEnd = start + token.length;
276
+ };
277
+ const scanCode = (start, end) => {
278
+ const pattern = new RegExp(codeTokenPattern.source, codeTokenPattern.flags);
279
+ const code = source.slice(start, end);
280
+ for (const match of code.matchAll(pattern)) {
281
+ const token = match[0];
282
+ push(/^[\p{ID_Start}$_\\]/u.test(token) ? decodeIdentifier(token) : token, start + match.index);
283
+ previousEnd = start + match.index + token.length;
284
+ }
285
+ };
286
+ let cursor = 0;
287
+ for (const span of literalSpans(module)) {
288
+ if (span.start < cursor) continue;
289
+ scanCode(cursor, span.start);
290
+ if (!span.inert) push(source.slice(span.start, span.end), span.start);
291
+ cursor = span.end;
292
+ }
293
+ scanCode(cursor, source.length);
294
+ return {
295
+ lineBreaks,
296
+ starts,
297
+ tokens
298
+ };
299
+ }
300
+ /** The source of each `${...}` substitution in a template literal, such as the source of one template token. */
301
+ function templateExpressionSources(template) {
302
+ const module = scanModule(`(${template})`);
303
+ const statement = module.program.body[0];
304
+ if (statement?.type !== "ExpressionStatement") return [];
305
+ const expression = unwrapExpression(statement.expression);
306
+ const literal = expression.type === "TaggedTemplateExpression" ? expression.quasi : expression;
307
+ if (literal.type !== "TemplateLiteral") return [];
308
+ return literal.expressions.map((_node, index) => module.source.slice(literal.quasis[index]?.end ?? 0, literal.quasis[index + 1]?.start ?? 0));
309
+ }
310
+ //#endregion
311
+ export { moduleLanguage as _, findCalls as a, maskLiterals as c, objectProperties as d, scanModule as f, unwrapExpression as g, templateExpressionSources as h, exportNames as i, moduleTokens as l, staticValue as m, defaultExportExpression as n, findDefaultExportCall as o, staticString as p, dynamic as r, findProperty as s, argumentExpression as t, nodeText as u, walk as v };
@@ -1,4 +1,4 @@
1
- import { o as internalErrorDiagnostics } from "./operation-definition-Bn8V2hab.js";
1
+ import { o as internalErrorDiagnostics } from "./operation-definition-a5keEpCd.js";
2
2
  //#region ../internal/src/secret.ts
3
3
  const secretEncoder = new TextEncoder();
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { t as ConsoleContributedSection } from "./definitions-CxDT8D8Y.js";
2
- import { a as ConsoleSectionId, r as ConsoleSectionDetails } from "./sections-4xyBoiar.js";
1
+ import { t as ConsoleContributedSection } from "./definitions-DB4LbZ7T.js";
2
+ import { a as ConsoleSectionId, r as ConsoleSectionDetails } from "./sections-Do7X4Nwt.js";
3
3
  import { a as RouteLocationRaw, o as RouteRecordRaw, r as RouteLocationNormalized, s as Router } from "./vue-router-C68IU1jM.js";
4
4
  //#region src/console/runtime/client/sections.d.ts
5
5
  interface ConsoleNavigation {
@@ -1,7 +1,7 @@
1
- import { a as ConsoleSectionId } from "./sections-4xyBoiar.js";
2
- import "./access-policy-BsB3QVe5.js";
3
- import { t as ConsoleProjectBuild } from "./project-5EN7JaXI.js";
4
- import "./setup-DLZFzuLv.js";
1
+ import { a as ConsoleSectionId } from "./sections-Do7X4Nwt.js";
2
+ import "./access-policy-CGXhO3Ee.js";
3
+ import { t as ConsoleProjectBuild } from "./project-CufkVP1u.js";
4
+ import "./setup-ZbA1by7W.js";
5
5
  //#region src/console/runtime/server/sections.d.ts
6
6
  declare function getConsoleSections(): readonly ConsoleSectionId[];
7
7
  declare function getConsoleProjectName(): string | undefined;
@@ -142,9 +142,8 @@ declare function resolveConsoleSectionIds(options: {
142
142
  connections?: unknown;
143
143
  database?: unknown;
144
144
  email?: unknown;
145
- host?: unknown;
146
145
  kv?: unknown;
147
- observability?: unknown;
146
+ logs?: unknown;
148
147
  queue?: unknown;
149
148
  rateLimit?: unknown;
150
149
  sandboxTask?: unknown;
@@ -322,10 +322,9 @@ function describeConsoleSectionRoutes(section) {
322
322
  * `workspaces`, `workflows`, `queues`, and `schedules`. `console/contributions.ts` maps each id to its owner.
323
323
  */
324
324
  function resolveConsoleSectionIds(options) {
325
- const workflowEnabled = options.workflow !== false && Boolean(options.workflow || options.agent && options.host !== "netlify");
326
325
  return [
327
326
  ...options.auth ? ["auth"] : [],
328
- ...options.observability && typeof options.observability === "object" && "logs" in options.observability && options.observability.logs ? ["logs"] : [],
327
+ ...options.logs ? ["logs"] : [],
329
328
  ...options.env ? ["env"] : [],
330
329
  ...options.agent ? [
331
330
  "agents",
@@ -344,7 +343,7 @@ function resolveConsoleSectionIds(options) {
344
343
  ...options.rateLimit ? ["rate-limits"] : [],
345
344
  ...options.sandboxTask ? ["sandbox-tasks"] : [],
346
345
  ...options.workspace ? ["workspaces"] : [],
347
- ...workflowEnabled ? ["workflows"] : [],
346
+ ...options.workflow ? ["workflows"] : [],
348
347
  ...options.queue ? ["queues"] : [],
349
348
  ...options.schedule ? ["schedules"] : []
350
349
  ];
@@ -1,6 +1,6 @@
1
- import { t as parseConsoleContributedSection } from "./definitions-BDRkT5-f.js";
2
- import { f as consoleSectionRouteName, s as consoleSectionDetails, x as isConsoleSectionId, y as isConsoleBuiltinSectionId } from "./sections-D6AM5Gy5.js";
3
- import { u as requestConsole } from "./request-yCybBeqT.js";
1
+ import { t as parseConsoleContributedSection } from "./definitions-BW6SvmMM.js";
2
+ import { f as consoleSectionRouteName, s as consoleSectionDetails, x as isConsoleSectionId, y as isConsoleBuiltinSectionId } from "./sections-DumoLKQN.js";
3
+ import { u as requestConsole } from "./request-DE8w_cSM.js";
4
4
  //#region src/console/runtime/client/sections.ts
5
5
  /** The Console path of `sections.list`. Views pass it as `sectionsBase`, and the navigation cache keys on it. */
6
6
  const consoleSectionsPath = "/_vitehub/api/sections";
@@ -1,5 +1,5 @@
1
- import { t as ConsoleContributedSection } from "./definitions-CxDT8D8Y.js";
2
- import { o as ConsoleAccess } from "./access-policy-BsB3QVe5.js";
1
+ import { t as ConsoleContributedSection } from "./definitions-DB4LbZ7T.js";
2
+ import { o as ConsoleAccess } from "./access-policy-CGXhO3Ee.js";
3
3
  //#region src/console/runtime/server/sections.get.d.ts
4
4
  interface ConsoleSectionsResponse {
5
5
  contributions?: readonly ConsoleContributedSection[];
@@ -1,4 +1,4 @@
1
- import { t as viteHubErrorDiagnostics } from "../error-diagnostics-C2rjmOlX.js";
1
+ import { t as viteHubErrorDiagnostics } from "../error-diagnostics-Bm3JKYjz.js";
2
2
  import { getStandardContext } from "@vite-hub/runtime";
3
3
  //#region ../internal/src/sitemap.ts
4
4
  /** One sitemap file holds at most this many URLs. */
@@ -1,5 +1,5 @@
1
- import { t as viteHubErrorDiagnostics } from "./error-diagnostics-C2rjmOlX.js";
2
- import { o as encodeAgentRouteParam } from "./console-route-COvNB_Xj.js";
1
+ import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
2
+ import { o as encodeAgentRouteParam } from "./console-route-CBuqZ4wO.js";
3
3
  import { consoleInvocationUrl, resolvePublicUrl } from "@vite-hub/runtime";
4
4
  //#region src/console/server.ts
5
5
  const agentConsole = { resolve(context) {
@@ -1,6 +1,7 @@
1
- import { a as ConsoleSectionId } from "./sections-4xyBoiar.js";
2
- import "./access-policy-BsB3QVe5.js";
3
- import { t as ConsoleProjectBuild } from "./project-5EN7JaXI.js";
1
+ import { a as ConsoleSectionId } from "./sections-Do7X4Nwt.js";
2
+ import "./access-policy-CGXhO3Ee.js";
3
+ import { t as ConsoleProjectBuild } from "./project-CufkVP1u.js";
4
+ import "./development-W5EwONyL.js";
4
5
  //#region src/console/runtime/server/setup.d.ts
5
6
  declare function installConsoleSections(projectRoot: string, sections: readonly ConsoleSectionId[], navigationSections?: readonly ConsoleSectionId[]): readonly ConsoleSectionId[];
6
7
  /** Generated production output installs what its build recorded, so `project.get` names the build that serves it. */
@@ -1,2 +1,2 @@
1
- import { a as listSessions, c as revokeSession, i as listInvites, l as withPageTools, n as linkSite, o as openSiteSession, r as listGrants, s as revokeInvite, t as inviteGuest } from "./site-access-CyRtc0gZ.js";
1
+ import { a as listSessions, c as revokeSession, i as listInvites, l as withPageTools, n as linkSite, o as openSiteSession, r as listGrants, s as revokeInvite, t as inviteGuest } from "./site-access-BmE8HGxs.js";
2
2
  export { inviteGuest, linkSite, listGrants, listInvites, listSessions, openSiteSession, revokeInvite, revokeSession, withPageTools };
@@ -1,10 +1,10 @@
1
- import { f as readConsoleAccessGrants, m as readConsoleOperationUser } from "./access-F0YP5D5E.js";
2
- import { i as consoleRequestError } from "./request-BUYAlAJl.js";
1
+ import { f as readConsoleAccessGrants, m as readConsoleOperationUser } from "./access-BDST818p.js";
2
+ import { i as consoleRequestError } from "./request-DbFfYmCu.js";
3
3
  import { d as viteHubPageToolsResetCookie, p as viteHubSessionMarkerCookie, u as viteHubPageToolsQuery } from "./page-tools-shared-D3fFoEV2.js";
4
4
  import "./site-access-BycrwM2v.js";
5
5
  import { a as viteHubPageGrants } from "./page-tools-BkSSBFoi.js";
6
- import { a as listConsoleSiteSessions, c as requireConsoleSiteKey, l as revokeConsoleSiteSession, n as consoleSiteKV, o as openConsoleSiteSession } from "./site-session-Jf21TVw8.js";
7
- import { a as base64url, f as seeOther, i as authFailure, m as ticketProblem, n as appOrigin, o as consoleInvitePrefix, r as authConsole, s as consoleRecordStore, t as appBase, u as issueConsoleTicket } from "./tickets-CfJhT7d0.js";
6
+ import { a as listConsoleSiteSessions, c as requireConsoleSiteKey, l as revokeConsoleSiteSession, n as consoleSiteKV, o as openConsoleSiteSession } from "./site-session-odJq1dYa.js";
7
+ import { a as base64url, f as seeOther, i as authFailure, m as ticketProblem, n as appOrigin, o as consoleInvitePrefix, r as authConsole, s as consoleRecordStore, t as appBase, u as issueConsoleTicket } from "./tickets-C_0Fhc00.js";
8
8
  //#region src/console/runtime/server/site-access.ts
9
9
  /**
10
10
  * Site access: the Console signs browsers in to the app, so the page tools work there without a password.
@@ -1,6 +1,6 @@
1
- import { c as isConsoleDevelopmentRuntime, i as consoleRequestError } from "./request-BUYAlAJl.js";
1
+ import { c as isConsoleDevelopmentRuntime, i as consoleRequestError } from "./request-DbFfYmCu.js";
2
2
  import { r as getConsoleSections } from "./sections-C83x0slv.js";
3
- import { r as readViteHubSecret, t as deriveViteHubSecret } from "./secret-AZLhaNyr.js";
3
+ import { r as readViteHubSecret, t as deriveViteHubSecret } from "./secret-Dy5uqvq9.js";
4
4
  import { n as getActiveCloudflareEnv, t as activeEnvStorageKey } from "./cloudflare-env-lookup-DKXdr4P_.js";
5
5
  import { importSealKey, sealWithKey, unsealWithKey } from "@vite-hub/env/seal";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -44,7 +44,7 @@ function unwrap([error, value]) {
44
44
  }
45
45
  /** The keys of a KV store below a prefix. Some drivers list keys with `/` where the key had `:`. */
46
46
  async function consoleSiteKeys(kv, prefix) {
47
- return (unwrap(await kv.keys(prefix.replace(/:$/, ""))) ?? []).map((key) => key.replaceAll("/", ":")).filter((key) => key.startsWith(prefix));
47
+ return (unwrap(await kv.list({ prefix }))?.keys ?? []).map((key) => key.replaceAll("/", ":")).filter((key) => key.startsWith(prefix));
48
48
  }
49
49
  const memoryKey = Symbol.for("vitehub.console.tickets");
50
50
  const memoryScope = globalThis;
@@ -73,8 +73,8 @@ function memorySiteKV() {
73
73
  entries.delete(key);
74
74
  return [void 0, value];
75
75
  },
76
- async keys(base) {
77
- return [void 0, [...entries.keys()].filter((key) => key.startsWith(base) && live(key) !== null)];
76
+ async list({ prefix }) {
77
+ return [void 0, { keys: [...entries.keys()].filter((key) => key.startsWith(prefix) && live(key) !== null) }];
78
78
  },
79
79
  async delete(key) {
80
80
  entries.delete(key);
@@ -1,4 +1,4 @@
1
- import { n as AnyOperation } from "../operations-DX9EkHwb.js";
1
+ import { n as AnyOperation } from "../operations-B0689BG1.js";
2
2
  //#region src/skills/runtime.d.ts
3
3
  /** One skill that the app serves, as the Console and `vitehub served-skills` show it. */
4
4
  interface ServedSkillSummary {
@@ -1,5 +1,5 @@
1
- import { t as defineOperation } from "../operation-definition-Bn8V2hab.js";
2
- import { g as table } from "../operations-Dj_cp-UK.js";
1
+ import { t as defineOperation } from "../operation-definition-a5keEpCd.js";
2
+ import { g as table } from "../operations-EOdyctDc.js";
3
3
  import * as v from "valibot";
4
4
  //#region src/skills/operations.ts
5
5
  const runtime = () => import("../runtime-YLWfdrtO.js");
package/dist/skills.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Result } from "@vite-hub/runtime";
2
2
  //#region src/skills.d.ts
3
- /** The codes of `vite-hub/skills`. Each has a heading on https://vitehub.dev/docs/development/skills. */
3
+ /** The codes of `vite-hub/skills`. Each has a row in the Errors table of https://vitehub.dev/docs/console/skills. */
4
4
  export type SkillErrorCode = "SKILL_DUPLICATE_NAME" | "SKILL_FILE_MISSING" | "SKILL_INVALID_FRONTMATTER" | "SKILL_INVALID_PATH" | "SKILL_NOT_FOUND" | "SKILL_SETTINGS_UNAVAILABLE";
5
5
  /** One file of a skill. */
6
6
  export interface SkillFile {
@@ -1,5 +1,5 @@
1
- import { i as consoleRequestError } from "./request-BUYAlAJl.js";
2
- import { c as getConsoleAgents, s as getConsoleAgentDefinition } from "./agents-DnHexzTJ.js";
1
+ import { i as consoleRequestError } from "./request-DbFfYmCu.js";
2
+ import { c as getConsoleAgents, s as getConsoleAgentDefinition } from "./agents-BDeazoAW.js";
3
3
  import { inspectAgentSkillFiles } from "@vite-hub/agent/server/internal";
4
4
  //#region src/console/runtime/server/skills.get.ts
5
5
  const maxFileBytes = 524288;
@@ -1,4 +1,4 @@
1
- import { t as viteHubErrorDiagnostics } from "./error-diagnostics-C2rjmOlX.js";
1
+ import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
2
2
  import * as v from "valibot";
3
3
  //#region src/logs/source.ts
4
4
  const logLevelSchema = v.picklist([
@@ -1,4 +1,4 @@
1
- import { n as AnyOperation } from "../operations-DX9EkHwb.js";
1
+ import { n as AnyOperation } from "../operations-B0689BG1.js";
2
2
  //#region src/task/runtime.d.ts
3
3
  /** One task that the Nitro runtime registers. */
4
4
  interface TaskSummary {
@@ -1,7 +1,7 @@
1
- import { t as defineOperation } from "../operation-definition-Bn8V2hab.js";
1
+ import { t as defineOperation } from "../operation-definition-a5keEpCd.js";
2
2
  import * as v from "valibot";
3
3
  //#region src/task/operations.ts
4
- const runtime = () => import("../runtime-DG34DLXc.js");
4
+ const runtime = () => import("../runtime-OsEDfbM9.js");
5
5
  function defineTaskOperation(definition) {
6
6
  return defineOperation({
7
7
  ...definition,
@@ -1,4 +1,4 @@
1
- import { t as viteHubErrorDiagnostics } from "../error-diagnostics-C2rjmOlX.js";
1
+ import { t as viteHubErrorDiagnostics } from "../error-diagnostics-Bm3JKYjz.js";
2
2
  import { register } from "node:module";
3
3
  import { join } from "node:path";
4
4
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
@@ -1,4 +1,4 @@
1
- import { t as ConsoleRequestError } from "./request-yCybBeqT.js";
1
+ import { t as ConsoleRequestError } from "./request-DE8w_cSM.js";
2
2
  //#region src/console/runtime/client/ticket.ts
3
3
  function isTab(value) {
4
4
  return typeof value === "object" && value !== null && "close" in value && "location" in value;
@@ -1,11 +1,11 @@
1
1
  import { r as operationRpcPath } from "./operation-rpc-DI9txNxK.js";
2
- import { r as consoleDiagnosticBody } from "./diagnostics-D0DefmQj.js";
3
- import { a as installedConsoleAccessPolicy } from "./access-policy-B_DCpZUt.js";
4
- import { g as isConsoleLoopbackRequest, m as readConsoleOperationUser, o as consoleImpersonation, p as readConsoleAccessUser } from "./access-F0YP5D5E.js";
5
- import { i as consoleRequestError, n as consoleErrorResult } from "./request-BUYAlAJl.js";
2
+ import { r as consoleDiagnosticBody } from "./diagnostics-9U_fYxMy.js";
3
+ import { a as installedConsoleAccessPolicy } from "./access-policy-DjBKLo3c.js";
4
+ import { g as isConsoleLoopbackRequest, m as readConsoleOperationUser, o as consoleImpersonation, p as readConsoleAccessUser } from "./access-BDST818p.js";
5
+ import { i as consoleRequestError, n as consoleErrorResult } from "./request-DbFfYmCu.js";
6
6
  import { n as loadConsoleRuntime } from "./runtime-DxfJOfCd.js";
7
7
  import { r as getConsoleSections } from "./sections-C83x0slv.js";
8
- import { n as consoleSiteKV, r as consoleSiteKeys } from "./site-session-Jf21TVw8.js";
8
+ import { n as consoleSiteKV, r as consoleSiteKeys } from "./site-session-odJq1dYa.js";
9
9
  import { getStandardContext } from "@vite-hub/runtime/internal/h3";
10
10
  import { resolvePublicUrl } from "@vite-hub/runtime";
11
11
  //#region src/console/runtime/server/tickets.ts
@@ -348,7 +348,7 @@ async function redeemConsoleTicket(event) {
348
348
  if (record.origin !== appOrigin(request) || record.base !== appBase(request)) return ticketProblem(403, "CONSOLE_TICKET_MISMATCH", "This one-time link was made for another app.");
349
349
  await loadConsoleRuntime();
350
350
  if (record.purpose === "content.preview") return await openPreview(record);
351
- if (record.purpose === "page.member" || record.purpose === "page.guest") return await (await import("./site-access-Bhsty_v4.js")).openSiteSession(record, request, event);
351
+ if (record.purpose === "page.member" || record.purpose === "page.guest") return await (await import("./site-access-BbJUe5QI.js")).openSiteSession(record, request, event);
352
352
  return await impersonate(record, request, event, `${record.origin}${record.base}/`);
353
353
  } catch (error) {
354
354
  return failurePage(error);
@@ -1,4 +1,4 @@
1
- import { t as viteHubErrorDiagnostics } from "./error-diagnostics-C2rjmOlX.js";
1
+ import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
2
2
  import { t as consoleHttpError } from "./http-error-Bs6e8_-8.js";
3
3
  import * as v from "valibot";
4
4
  //#region src/console/runtime/server/usage.ts
@@ -1,5 +1,5 @@
1
1
  import { n as invariantError } from "./invariant-DolT9EEx.js";
2
- import { _ as withRecordedCost, a as decimalString, f as publicTotals, g as usageSession, h as usageQueryWindow, i as decimal, l as modelUsage, m as usageCursor, n as compareUsageModels, o as emptyTotals, p as stringValue, s as finishUsage, t as addDecimal } from "./usage-Bc0YY_ka.js";
2
+ import { _ as withRecordedCost, a as decimalString, f as publicTotals, g as usageSession, h as usageQueryWindow, i as decimal, l as modelUsage, m as usageCursor, n as compareUsageModels, o as emptyTotals, p as stringValue, s as finishUsage, t as addDecimal } from "./usage-B4taNt4a.js";
3
3
  //#region src/console/runtime/server/usage-index.ts
4
4
  const metrics = [
5
5
  "inputTokens",