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.
- package/README.md +34 -36
- package/dist/_internal/runtime/browser-errors.d.ts +1 -1
- package/dist/_internal/runtime/browser-errors.js +1 -1
- package/dist/{access-F0YP5D5E.js → access-BDST818p.js} +6 -6
- package/dist/{access-policy-BsB3QVe5.d.ts → access-policy-CGXhO3Ee.d.ts} +3 -3
- package/dist/{access-policy-B_DCpZUt.js → access-policy-DjBKLo3c.js} +2 -2
- package/dist/{account-Bsu-LBOF.d.ts → account-BnOAU055.d.ts} +1 -1
- package/dist/{agent-invocations.post-DIm8tJV2.js → agent-invocations.post-CcPvfA0n.js} +7 -7
- package/dist/{agents-DnHexzTJ.js → agents-BDeazoAW.js} +2 -2
- package/dist/{agents-y5hBFHUQ.js → agents-BoWau_ei.js} +1 -1
- package/dist/{auth-BFVHYizM.d.ts → auth-BZOy7obk.d.ts} +2 -2
- package/dist/{auth-types-DWpTBZvp.d.ts → auth-types-CyqhWvYF.d.ts} +1 -1
- package/dist/bin.js +15 -7
- package/dist/{blob-CiUmptIp.d.ts → blob-CFLwMsjH.d.ts} +1 -1
- package/dist/{blob-BRV6_wZa.js → blob-CpvlM8jp.js} +3 -3
- package/dist/cache/operations.d.ts +1 -1
- package/dist/cache/operations.js +2 -2
- package/dist/cache.js +1 -1
- package/dist/choices/vue.d.ts +1 -0
- package/dist/choices/vue.js +2 -0
- package/dist/choices.d.ts +1 -0
- package/dist/choices.js +2 -0
- package/dist/cli-config-UAGTmuFa.js +2 -0
- package/dist/{cli-config-Bpjjfz5j.js → cli-config-wxKjF2Y0.js} +1 -16
- package/dist/console/auth-types.d.ts +1 -1
- package/dist/console/auth.d.ts +1 -1
- package/dist/console/auth.js +1 -1
- package/dist/console/runtime/client/account.d.ts +1 -1
- package/dist/console/runtime/client/account.js +2 -2
- package/dist/console/runtime/client/blob-media.d.ts +1 -1
- package/dist/console/runtime/client/blob-media.js +3 -3
- package/dist/console/runtime/client/comment-thread.js +1 -1
- package/dist/console/runtime/client/content-heads.d.ts +45 -0
- package/dist/console/runtime/client/content-heads.js +58 -0
- package/dist/console/runtime/client/documents.d.ts +2 -2
- package/dist/console/runtime/client/documents.js +1 -1
- package/dist/console/runtime/client/editor.d.ts +1 -1
- package/dist/console/runtime/client/invocation.js +3 -3
- package/dist/console/runtime/client/live.d.ts +1 -1
- package/dist/console/runtime/client/mcp-client.js +1 -1
- package/dist/console/runtime/client/media-library.d.ts +1 -1
- package/dist/console/runtime/client/media-library.js +1 -1
- package/dist/console/runtime/client/media-uploads.d.ts +1 -1
- package/dist/console/runtime/client/media-uploads.js +1 -1
- package/dist/console/runtime/client/operation-view.d.ts +1 -1
- package/dist/console/runtime/client/operation-view.js +2 -2
- package/dist/console/runtime/client/presence.d.ts +1 -1
- package/dist/console/runtime/client/problem.js +2 -2
- package/dist/console/runtime/client/project-link.d.ts +1 -1
- package/dist/console/runtime/client/project-link.js +1 -1
- package/dist/console/runtime/client/project-session.d.ts +2 -2
- package/dist/console/runtime/client/project-session.js +4 -4
- package/dist/console/runtime/client/project.d.ts +1 -1
- package/dist/console/runtime/client/project.js +1 -1
- package/dist/console/runtime/client/publish.d.ts +1 -1
- package/dist/console/runtime/client/rate-limit.js +2 -2
- package/dist/console/runtime/client/read-only.d.ts +1 -1
- package/dist/console/runtime/client/read-only.js +1 -1
- package/dist/console/runtime/client/request.js +1 -1
- package/dist/console/runtime/client/schedule-run.js +2 -2
- package/dist/console/runtime/client/sections.d.ts +1 -1
- package/dist/console/runtime/client/sections.js +1 -1
- package/dist/console/runtime/client/sidebar.ts +1 -1
- package/dist/console/runtime/client/site-access.js +2 -2
- package/dist/console/runtime/client/ticket.js +1 -1
- package/dist/console/runtime/client/workflow.js +2 -2
- package/dist/console/runtime/components/console-content-heads.vue +72 -0
- package/dist/console/runtime/components/console-document-dashboard.vue +43 -35
- package/dist/console/runtime/components/console-documents.vue +1 -0
- package/dist/console/runtime/components/console-markdown-editor.vue +4 -1
- package/dist/console/runtime/components/invocation/agent-invocation.ts +18 -5
- package/dist/console/runtime/components/invocation/internal/input-attachments.ts +69 -0
- package/dist/console/runtime/components/invocation/internal/invocation-activity.ts +67 -12
- package/dist/console/runtime/components/invocation/internal/invocation-conversation.ts +12 -4
- package/dist/console/runtime/components/invocation/invocation.css +16 -0
- package/dist/console/runtime/console-route.js +1 -1
- package/dist/console/runtime/definitions.d.ts +1 -1
- package/dist/console/runtime/definitions.js +1 -1
- package/dist/console/runtime/diagnostics.ts +30 -30
- package/dist/console/runtime/page-tool/page-tool.js +1 -1
- package/dist/console/runtime/public/skills/vitehub/SKILL.md +3 -3
- package/dist/console/runtime/public/skills/vitehub/references/framework-composition.md +1 -1
- package/dist/console/runtime/public/skills/vitehub/references/preview-contract.md +9 -1
- package/dist/console/runtime/public/skills/vitehub/references/primitives/channels.md +1 -1
- package/dist/console/runtime/public/skills/vitehub/references/primitives/database.md +1 -1
- package/dist/console/runtime/public/skills/vitehub/references/primitives/markdown-template.md +3 -3
- package/dist/console/runtime/public/skills/vitehub/references/project-shapes.md +2 -2
- package/dist/console/runtime/public/skills/vitehub/references/sandboxes-hosts.md +4 -4
- package/dist/console/runtime/sections.d.ts +1 -1
- package/dist/console/runtime/sections.js +1 -1
- package/dist/console/runtime/server/access-policy.d.ts +1 -1
- package/dist/console/runtime/server/access-policy.js +1 -1
- package/dist/console/runtime/server/agents.get.js +2 -2
- package/dist/console/runtime/server/auth.d.ts +1 -1
- package/dist/console/runtime/server/auth.js +2 -2
- package/dist/console/runtime/server/blob.d.ts +1 -1
- package/dist/console/runtime/server/blob.js +1 -1
- package/dist/console/runtime/server/channel-replay.d.ts +2 -2
- package/dist/console/runtime/server/channel-replay.js +4 -4
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/database.get.d.ts +1 -1
- package/dist/console/runtime/server/database.get.js +2 -2
- package/dist/console/runtime/server/database.js +1 -1
- package/dist/console/runtime/server/definitions.d.ts +1 -1
- package/dist/console/runtime/server/definitions.get.d.ts +3 -3
- package/dist/console/runtime/server/definitions.get.js +3 -3
- package/dist/console/runtime/server/definitions.js +1 -1
- package/dist/console/runtime/server/development.d.ts +2 -2
- package/dist/console/runtime/server/development.js +2 -2
- package/dist/console/runtime/server/documents.d.ts +1 -1
- package/dist/console/runtime/server/documents.js +1 -1
- package/dist/console/runtime/server/env.get.d.ts +1 -1
- package/dist/console/runtime/server/env.get.js +3 -3
- package/dist/console/runtime/server/invocation-capabilities.get.js +2 -2
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +1 -1
- package/dist/console/runtime/server/invocation-workspace.get.js +5 -5
- package/dist/console/runtime/server/invocation.get.d.ts +1 -1
- package/dist/console/runtime/server/invocation.get.js +6 -6
- package/dist/console/runtime/server/invocations.get.js +3 -3
- package/dist/console/runtime/server/logs.get.d.ts +2 -2
- package/dist/console/runtime/server/logs.get.js +5 -5
- package/dist/console/runtime/server/mcp-client-operations.d.ts +1 -1
- package/dist/console/runtime/server/mcp-client-operations.js +3 -3
- package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
- package/dist/console/runtime/server/operation-contributions.js +1 -1
- package/dist/console/runtime/server/page-auth.d.ts +1 -1
- package/dist/console/runtime/server/page-tool.d.ts +1 -1
- package/dist/console/runtime/server/page-tool.js +2 -2
- package/dist/console/runtime/server/rpc.d.ts +2 -2
- package/dist/console/runtime/server/rpc.js +7 -7
- package/dist/console/runtime/server/search.get.js +1 -1
- package/dist/console/runtime/server/sections.d.ts +4 -4
- package/dist/console/runtime/server/sections.get.d.ts +1 -1
- package/dist/console/runtime/server/sections.get.js +5 -5
- package/dist/console/runtime/server/sections.js +3 -3
- package/dist/console/runtime/server/setup.d.ts +3 -3
- package/dist/console/runtime/server/setup.js +2 -2
- package/dist/console/runtime/server/site-entry.d.ts +1 -1
- package/dist/console/runtime/server/site-entry.js +9 -6
- package/dist/console/runtime/server/site-session.d.ts +5 -1
- package/dist/console/runtime/server/site-session.js +1 -1
- package/dist/console/runtime/server/status.get.d.ts +2 -2
- package/dist/console/runtime/server/status.get.js +5 -5
- package/dist/console/runtime/server/tickets.d.ts +1 -1
- package/dist/console/runtime/server/tickets.js +1 -1
- package/dist/console/runtime/server/usage.get.d.ts +2 -2
- package/dist/console/runtime/server/usage.get.js +7 -7
- package/dist/console/runtime/server/workspace-files.get.d.ts +1 -1
- package/dist/console/runtime/server/workspace-files.get.js +3 -3
- package/dist/console/server.d.ts +5 -5
- package/dist/console/server.js +6 -6
- package/dist/console/ui.js +121 -20
- package/dist/{console-route-COvNB_Xj.js → console-route-CBuqZ4wO.js} +1 -1
- package/dist/{database-J7M0B3ED.js → database-BdOBjPkS.js} +1 -1
- package/dist/{database-BVyhAxq-.d.ts → database-DyPVMjp_.d.ts} +1 -1
- package/dist/{definitions-BDRkT5-f.js → definitions-BW6SvmMM.js} +1 -0
- package/dist/{definitions-bepsXY5G.js → definitions-CNq_Shkh.js} +3 -3
- package/dist/{definitions-CxDT8D8Y.d.ts → definitions-DB4LbZ7T.d.ts} +2 -0
- package/dist/{definitions-CGTWTj67.d.ts → definitions-Dbgxfz3I.d.ts} +1 -1
- package/dist/development-W5EwONyL.d.ts +12 -0
- package/dist/{development-BzeSHZGH.js → development-zLxOp-AO.js} +12 -2
- package/dist/{diagnostics-D0DefmQj.js → diagnostics-9U_fYxMy.js} +30 -30
- package/dist/doctor.js +88 -107
- package/dist/{documents-C97WMaJZ.d.ts → documents-BASIRZ91.d.ts} +1 -1
- package/dist/{documents-RVHsQKFw.d.ts → documents-CboVhYFz.d.ts} +3 -3
- package/dist/{documents-DwPfR-fz.js → documents-CjJTCrY8.js} +3 -3
- package/dist/{documents-8US1nUgK.js → documents-qrHHqlNU.js} +1 -1
- package/dist/durability/operations.d.ts +1 -1
- package/dist/durability/operations.js +2 -2
- package/dist/{entries-D48wVEaS.js → entries-Bj-jPs_J.js} +1 -1
- package/dist/{error-diagnostics-C2rjmOlX.js → error-diagnostics-Bm3JKYjz.js} +19 -11
- package/dist/error-diagnostics.ts +19 -11
- package/dist/index.d.ts +15 -2
- package/dist/index.js +8 -4
- package/dist/internal/disabled-redis-driver.js +1 -1
- package/dist/internal/disabled-upstash-driver.js +1 -1
- package/dist/internal/test-loader.js +1 -1
- package/dist/internal/test-server.js +1 -1
- package/dist/{internal-BP_O70ic.d.ts → internal-CO4OqqaS.d.ts} +3 -3
- package/dist/{invocation-page-undo-BkUau8X7.js → invocation-page-undo-DIZ-s3xT.js} +2 -2
- package/dist/{invocations-CsucCJuq.js → invocations-CK_-G540.js} +3 -3
- package/dist/logs/memory.js +1 -1
- package/dist/logs/source.js +1 -1
- package/dist/logs.js +2 -2
- package/dist/{mcp-client-D0mUt18v.js → mcp-client-By4zk0vU.js} +6 -6
- package/dist/{media-wZMY6f2M.js → media-BHpQ-4jw.js} +4 -4
- package/dist/{media-library-CEo-Ye2B.d.ts → media-library-D9ThbXqs.d.ts} +1 -1
- package/dist/{media-library-BChf8XOd.js → media-library-NaOMBKWS.js} +2 -2
- package/dist/{memory-DhirB6SA.js → memory-DTmq-Z6x.js} +2 -2
- package/dist/{nuxt-server-imports-Lnaf5Fe-.js → nuxt-server-imports-DH60Z7LA.js} +3 -2
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.js +94 -67
- package/dist/{operation-contributions-DflAv5AC.js → operation-contributions-BdS0z3tx.js} +2 -2
- package/dist/{operation-contributions-fZyVo662.d.ts → operation-contributions-DpkO_iSU.d.ts} +1 -1
- package/dist/{operation-definition-Bn8V2hab.js → operation-definition-a5keEpCd.js} +6 -1
- package/dist/{operations-DX9EkHwb.d.ts → operations-B0689BG1.d.ts} +5 -0
- package/dist/operations-CAQmIxGK.js +2 -0
- package/dist/{operations-B6N-ja8x.js → operations-CWP9dF3i.js} +11 -11
- package/dist/{operations-Dj_cp-UK.js → operations-EOdyctDc.js} +1 -1
- package/dist/{optional-owners-Crm6kVS5.js → optional-owners-BNA2OX6z.js} +37 -23
- package/dist/{page-tool-BCRyx3pM.d.ts → page-tool-CRCK1RHV.d.ts} +1 -1
- package/dist/{plugins-DQ8pF-38.js → plugins-B-DpgDPB.js} +1459 -714
- package/dist/{plugins-5uDXr9Km.d.ts → plugins-BqAtIEX2.d.ts} +75 -56
- package/dist/{project-C2dnB9Kf.js → project-C4N_Zcjl.js} +3 -3
- package/dist/{project-5EN7JaXI.d.ts → project-CufkVP1u.d.ts} +2 -2
- package/dist/{project-DOeM0zg3.js → project-DlWTGB7h.js} +1 -1
- package/dist/{project-link-D_XQvBOC.d.ts → project-link-BuOzBH9f.d.ts} +1 -1
- package/dist/{project-link-Qi7nltHM.js → project-link-D-6UefhA.js} +2 -2
- package/dist/{request-yCybBeqT.js → request-DE8w_cSM.js} +8 -3
- package/dist/{request-BUYAlAJl.js → request-DbFfYmCu.js} +2 -2
- package/dist/{runtime-DM8Z6KLT.js → runtime-DQuHg7OO.js} +1 -1
- package/dist/{runtime-DG34DLXc.js → runtime-OsEDfbM9.js} +1 -1
- package/dist/runtime-feature-guard-B64MMW9I.js +140 -0
- package/dist/scan-module-D_3X08mj.js +2 -0
- package/dist/scan-module-Df58L_6T.js +311 -0
- package/dist/{secret-AZLhaNyr.js → secret-Dy5uqvq9.js} +1 -1
- package/dist/{sections-BriKrBgN.d.ts → sections-BogiCmtz.d.ts} +2 -2
- package/dist/{sections-ACHVTCWn.d.ts → sections-CyrXbbkG.d.ts} +4 -4
- package/dist/{sections-4xyBoiar.d.ts → sections-Do7X4Nwt.d.ts} +1 -2
- package/dist/{sections-D6AM5Gy5.js → sections-DumoLKQN.js} +2 -3
- package/dist/{sections-CUJyQA9d.js → sections-et20h8w3.js} +3 -3
- package/dist/{sections.get-1lHjyKCI.d.ts → sections.get-COiLcQ0P.d.ts} +2 -2
- package/dist/seo/runtime.js +1 -1
- package/dist/{server-DbjFYSeU.js → server-BRJE4t-W.js} +2 -2
- package/dist/{setup-DLZFzuLv.d.ts → setup-ZbA1by7W.d.ts} +4 -3
- package/dist/{site-access-Bhsty_v4.js → site-access-BbJUe5QI.js} +1 -1
- package/dist/{site-access-CyRtc0gZ.js → site-access-BmE8HGxs.js} +4 -4
- package/dist/{site-session-Jf21TVw8.js → site-session-odJq1dYa.js} +5 -5
- package/dist/skills/operations.d.ts +1 -1
- package/dist/skills/operations.js +2 -2
- package/dist/skills.d.ts +1 -1
- package/dist/{skills.get-CHQMzSD_.js → skills.get-Bl8cBe8u.js} +2 -2
- package/dist/{source-w9BHUwyO.js → source-D4wWtoHh.js} +1 -1
- package/dist/task/operations.d.ts +1 -1
- package/dist/task/operations.js +2 -2
- package/dist/test/register.js +1 -1
- package/dist/{ticket-RKQF6Wy9.js → ticket-Cudn1dq3.js} +1 -1
- package/dist/{tickets-CfJhT7d0.js → tickets-C_0Fhc00.js} +6 -6
- package/dist/{usage-Bc0YY_ka.js → usage-B4taNt4a.js} +1 -1
- package/dist/{usage-index-CMMT4cXQ.js → usage-index-BsGAFzyq.js} +1 -1
- package/dist/{version-DDRL_OYz.js → version-DNmSsk5r.js} +22 -19
- package/dist/{cli-DjoDGgT4.js → vite-stage-mmtwQIMA.js} +32 -2
- package/dist/{workspace-history-l47NPVSy.js → workspace-history-CraoERnc.js} +1 -1
- package/package.json +93 -93
- package/dist/cli-config--rAg6V-a.js +0 -2
- package/dist/decisions/vue.d.ts +0 -1
- package/dist/decisions/vue.js +0 -2
- package/dist/decisions.d.ts +0 -1
- package/dist/decisions.js +0 -2
- package/dist/development-DgaQ05jw.d.ts +0 -9
- package/dist/operations-H9q0QB2C.js +0 -2
- package/dist/runtime-feature-guard-rpZz1eMF.js +0 -55
- package/dist/scan-module-BTeOuZsp.js +0 -2
- package/dist/scan-module-DlHQ8a0X.js +0 -148
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# vite-hub
|
|
2
2
|
|
|
3
|
-
[](https://npmx.dev/package/vite-hub)
|
|
4
|
+
[](https://npmx.dev/package/vite-hub)
|
|
5
|
+
[](https://github.com/vite-hub/vitehub/blob/main/LICENSE)
|
|
6
|
+
[](https://vitehub.dev/docs)
|
|
7
7
|
|
|
8
8
|
`vite-hub` is the ViteHub application distribution. It registers enabled integrations through one `vitehub()` call and exposes application APIs on explicit `vite-hub/*` feature imports.
|
|
9
9
|
|
|
@@ -17,13 +17,11 @@ Use it for a Vite or Nuxt application that needs Server Primitives, Agents, or b
|
|
|
17
17
|
pnpm add vite-hub
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
If pnpm stops with `ERR_PNPM_IGNORED_BUILDS` and names `esbuild`, the packages from that command are installed. Run `pnpm approve-builds esbuild` one time to let esbuild run its install script.
|
|
21
|
-
|
|
22
20
|
`vite-hub` includes Env, Source, Logs, and the Console endpoint. Every other feature is an optional peer, so an app installs and loads only what it enables. An app without features installs no feature package. Add their packages before you enable them:
|
|
23
21
|
|
|
24
22
|
| Feature | Add these packages |
|
|
25
23
|
| --- | --- |
|
|
26
|
-
| `agent` | `@vite-hub/agent
|
|
24
|
+
| `agent` | `@vite-hub/agent` |
|
|
27
25
|
| `auth` | `@vite-hub/auth better-auth` |
|
|
28
26
|
| `blob` | `@vite-hub/blob` |
|
|
29
27
|
| `browser` | `@vite-hub/browser` |
|
|
@@ -45,7 +43,7 @@ If pnpm stops with `ERR_PNPM_IGNORED_BUILDS` and names `esbuild`, the packages f
|
|
|
45
43
|
| `.template.md` imports | `@vite-hub/markdown-template` |
|
|
46
44
|
| Console with Agents | `@libsql/client drizzle-orm` |
|
|
47
45
|
| Console MCP client (`console.mcpClient`) | `@modelcontextprotocol/sdk` |
|
|
48
|
-
| `vite-hub/
|
|
46
|
+
| `vite-hub/choices` | `@vite-hub/choices` |
|
|
49
47
|
| `vite-hub/device` | `@vite-hub/device` |
|
|
50
48
|
| `vite-hub/forge` | `@vite-hub/forge` |
|
|
51
49
|
| `vite-hub/gateways` | `@vite-hub/gateways` |
|
|
@@ -56,7 +54,7 @@ If pnpm stops with `ERR_PNPM_IGNORED_BUILDS` and names `esbuild`, the packages f
|
|
|
56
54
|
|
|
57
55
|
A build with an enabled feature whose package is missing fails with the `pnpm add` command to run. When an installed package is outside the range that `vite-hub` supports, the build continues and warns with the `pnpm add` command that installs a supported version. Vercel Workflow requires `@vercel/functions` for all definitions; add `workflow` and `@workflow/builders` for native durable definitions. See the [Workflow hosts guide](https://vitehub.dev/docs/workflows/hosts) for installation. Other provider SDKs, such as `@vercel/sandbox` for Sandbox Tasks, stay with their feature guides.
|
|
58
56
|
|
|
59
|
-
You need Node.js
|
|
57
|
+
You need Node.js 24.15 or newer, Vite 8 or newer, and an ESM package with `"type": "module"` or a `vite.config.mts` file. Hosted primitives and model providers can also require credentials, network access, and billed accounts. Their feature guides list those requirements before the first provider call.
|
|
60
58
|
|
|
61
59
|
## Configure ViteHub
|
|
62
60
|
|
|
@@ -96,33 +94,31 @@ Custom H3 and Nuxt routes can import `getRuntimeContext` from
|
|
|
96
94
|
Standard Context (`event["~standard"]`): request, bindings, host `waitUntil`,
|
|
97
95
|
and a fresh memo cache. Without a real host lifetime API, await the
|
|
98
96
|
returned `flushWaitUntil()` before responding. See the
|
|
99
|
-
[Runtime Context guide](https://vitehub.dev/docs/
|
|
97
|
+
[Runtime Context guide](https://vitehub.dev/docs/runtime/context).
|
|
100
98
|
|
|
101
99
|
The public hosts are `cloudflare`, `netlify`, `vercel`, `deno`, and `node`. Each resolves once to a host, runtime, Nitro output, packaging policy, and service adapters. The build fails when `nitro.preset`, `NITRO_PRESET`, `SERVER_PRESET`, or `VITEHUB_HOST` selects a different host than `host`. In Nuxt, without `host`, the host comes from `nitro.preset` when it names one, such as `cloudflare-module`. `vitehub deploy --host <host>` is the exception: it builds with `VITEHUB_HOST=<host>` and `VITEHUB_HOST_SOURCE=cli`, and that host wins over `host`.
|
|
102
100
|
|
|
103
101
|
ViteHub derives one deployment identity from the nearest `package.json` name, falling back to the Vite root directory name. Set `name` to pin the identity explicitly. Cloudflare Workers Builds supplies its connected Worker through `WRANGLER_CI_OVERRIDE_NAME`; the Cloudflare host uses it after explicit `name` and fails when the two resolve to different values because the connected Worker remains the deployment target. Cloudflare uses the resolved identity for the default Worker, Blob bucket, Queue prefix, Rate Limit namespace, Sandbox, and Container names. Explicit Wrangler Worker names remain authoritative outside Workers Builds, while explicit Blob bucket, driver, and store options still win. The Workers Builds fallback derives deterministic names but does not provision the corresponding R2 bucket or Queue.
|
|
104
102
|
|
|
105
|
-
|
|
103
|
+
A Definition file turns its feature on, with no key: `server/agents/`, `server/auth.ts`, `server/browsers/`, `server/channels/`, `server/connections/`, `server/queues/`, `server/realtime/`, `server/schedules/`, `server/workflows/`, and `server/workspaces/`. Set the key to `false` to keep the feature off, or to an object to set its options. When the package of the feature is missing, the build fails with `VITE_HUB_DEFINITION_PACKAGE_MISSING` and the `pnpm add` command.
|
|
104
|
+
|
|
105
|
+
Agents run inline when Workflow is off. An Agent Definition does not turn Workflow on. Set `workflow: true` or add a Workflow Definition to use the configured Workflow driver. OpenWorkflow and Cloudflare Workflows make discovered Agent turns durable; the default Vercel driver still runs Agent turns inline.
|
|
106
|
+
|
|
107
|
+
Blob, Database, Email, KV, Rate Limit, and Sandbox Task have no Definition files to find, so they are opt-in with their key:
|
|
106
108
|
|
|
107
109
|
```ts
|
|
108
110
|
import { vitehub } from "vite-hub"
|
|
109
111
|
|
|
110
112
|
vitehub({
|
|
111
|
-
agent: true,
|
|
112
113
|
blob: true,
|
|
113
114
|
host: "cloudflare",
|
|
114
|
-
auth: true,
|
|
115
115
|
database: true,
|
|
116
116
|
email: {
|
|
117
117
|
driver: "resend",
|
|
118
118
|
},
|
|
119
119
|
kv: true,
|
|
120
|
-
queue: true,
|
|
121
120
|
rateLimit: true,
|
|
122
121
|
sandboxTask: true,
|
|
123
|
-
schedule: true,
|
|
124
|
-
workflow: true,
|
|
125
|
-
workspace: true,
|
|
126
122
|
});
|
|
127
123
|
```
|
|
128
124
|
|
|
@@ -146,6 +142,8 @@ Nuxt's Cloudflare preset enables Nitro deployment configuration by default and
|
|
|
146
142
|
writes `.output/server/wrangler.json`. Set `nitro.cloudflare.deployConfig: false`
|
|
147
143
|
only when you manage that configuration yourself. `vitehub deploy` uploads the Worker secrets with each new version.
|
|
148
144
|
See [Upload secrets with the version](https://vitehub.dev/docs/frameworks-hosts/cloudflare#upload-secrets-with-the-version).
|
|
145
|
+
With `cloudflare: { vars: true }`, the build writes the non-secret Server Env values it finds to the Worker's `vars`.
|
|
146
|
+
See [Worker vars from Server Env](https://vitehub.dev/docs/frameworks-hosts/cloudflare#worker-vars-from-server-env).
|
|
149
147
|
|
|
150
148
|
A successful build proves that ViteHub discovered the configured definitions and wrote the selected output. It does not prove that remote resources exist, credentials are valid, deployment succeeded, or a hosted provider completed a live operation. Follow the selected [host guide](https://vitehub.dev/docs/frameworks-hosts) for provisioning, environment variables, deployment commands, and current proof.
|
|
151
149
|
|
|
@@ -155,11 +153,11 @@ Nitro output includes `.vitehub/nitro/error-log.mjs`. It logs each unhandled req
|
|
|
155
153
|
|
|
156
154
|
`vitehub({ redirects: { host: "example.com", https: true, trailingSlash: "remove" } })` sends every request to one canonical address in one redirect: `301` for `GET` and `HEAD`, `308` for other methods. `trailingSlash` changes page paths only. `vite dev`, local names, IP addresses, and preview hosts such as `*.workers.dev` (add more with `previewHosts`) keep their host and scheme. On Cloudflare, ViteHub sets `assets.run_worker_first` so static files redirect too. Move single pages with Nitro `routeRules`. On Cloudflare, ViteHub also writes their redirects to the static `_redirects` file, after the lines of `public/_redirects`. See [Redirect to one canonical address](https://vitehub.dev/docs/frameworks-hosts/redirects).
|
|
157
155
|
|
|
158
|
-
`vitehub({ health: true })` adds `/
|
|
156
|
+
`vitehub({ health: true })` adds `/_vitehub/health` for load balancers and container health checks, on every host. It answers `{ ok: true, version, commit, vitehub }`, where `version` is the app's `package.json` version, `commit` is the commit of the build from the CI or host variables, else from Git, else `null`, and `vitehub` is the installed `vite-hub` version. It checks each Database (`SELECT 1`), each KV store (one read), and each Blob store (opens the root directory on `fs`, lists up to one object on `s3` with `s3:ListBucket`, and checks object metadata on other drivers) of the app, with 2 seconds for each, and answers `503` with `ok: false` when one fails, for example `{ ok: false, commit, vitehub, checks: { database: { default: true }, kv: { default: false } } }`. The error goes to the server log, never to the response. `health: { route: "/api/health" }` moves the route.
|
|
159
157
|
|
|
160
158
|
`vitehub({ publicUrl, seo: { sitemap: true } })` serves `/sitemap.xml` and `/robots.txt` on every host. The sitemap lists the Nuxt pages without a dynamic part, the static prerender routes, the published Content pages with a URL, and the pages that `server/sitemap.ts` returns with `defineSitemap()` from `vite-hub/seo`. `exclude` leaves path prefixes out, and `pages: false` keeps only Content and `server/sitemap.ts` entries. URLs start with `publicUrl`, else the request origin; a build that prerenders the files needs `publicUrl` (`SEO_PUBLIC_URL_MISSING`). `robots: { disallow }` adds `Disallow` lines. ViteHub keeps the app's own `public/robots.txt`, and a server route for `/sitemap.xml` fails the build with `SEO_SITEMAP_ROUTE_EXISTS`. See [Sitemap and robots.txt](https://vitehub.dev/docs/frameworks-hosts/sitemap).
|
|
161
159
|
|
|
162
|
-
`vitehub({ deploy: { check: ["/", "/api/products"] } })` makes `vitehub deploy` request those paths, and the health route with `health`, on the deployed URL after each deploy. A path that does not answer with a `2xx` status fails the deploy with the rollback command of the host. `deploy: { indexNow: true }` with a string `publicUrl` serves an IndexNow key file and sends the sitemap URLs to IndexNow after each production deploy. See [Check the deployed app](https://vitehub.dev/docs/
|
|
160
|
+
`vitehub({ deploy: { check: ["/", "/api/products"] } })` makes `vitehub deploy` request those paths, and the health route with `health`, on the deployed URL after each deploy. A path that does not answer with a `2xx` status fails the deploy with the rollback command of the host. `deploy: { indexNow: true }` with a string `publicUrl` serves an IndexNow key file and sends the sitemap URLs to IndexNow after each production deploy. See [Check the deployed app](https://vitehub.dev/docs/cli/project#check-the-deployed-app).
|
|
163
161
|
|
|
164
162
|
`vitehub({ trustProxy: true })` trusts a proxy that ends TLS: when the server sees `http:` and the first `X-Forwarded-Proto` value is `https`, the request URL becomes `https:` before any middleware or route runs. It never reads `X-Forwarded-Host`. `vitehub({ sameOriginWrites: true })` answers `403` to a write with cookies whose `Sec-Fetch-Site` is `same-site` or `cross-site`, or whose `Origin` is not the app's origin; `exclude` lists path prefixes that take writes from other sites. See [Run behind a reverse proxy](https://vitehub.dev/docs/frameworks-hosts/node-self-hosted#run-behind-a-reverse-proxy).
|
|
165
163
|
|
|
@@ -212,7 +210,7 @@ pnpm vitehub task list
|
|
|
212
210
|
pnpm vitehub task run db:seed '{"title":"First note"}' --yes
|
|
213
211
|
```
|
|
214
212
|
|
|
215
|
-
`vitehub inspect definitions --kind task` lists the task files without a running server. Read the [CLI guide](https://vitehub.dev/docs/
|
|
213
|
+
`vitehub inspect definitions --kind task` lists the task files without a running server. Read the [CLI guide](https://vitehub.dev/docs/cli/primitives#run-app-tasks) for payload options and limits.
|
|
216
214
|
|
|
217
215
|
## Configure TypeScript
|
|
218
216
|
|
|
@@ -304,35 +302,35 @@ Retention defaults to 30 days and 10,000 terminal records. To change a limit, pa
|
|
|
304
302
|
|
|
305
303
|
## Invoke Agents from the Console
|
|
306
304
|
|
|
307
|
-
The Console **Skills** page shows the bundled files of each discovered Agent Definition in a searchable tree. Read Markdown previews or file source, including supporting references and scripts. Source-mounted Skills are available in the session Workspace. See [Inspect Skills](https://vitehub.dev/docs/
|
|
305
|
+
The Console **Skills** page shows the bundled files of each discovered Agent Definition in a searchable tree. Read Markdown previews or file source, including supporting references and scripts. Source-mounted Skills are available in the session Workspace. See [Inspect Skills](https://vitehub.dev/docs/console/agents#skills-and-usage).
|
|
308
306
|
|
|
309
|
-
The Console **Usage** page provides session history with date, Agent, status, and search filters. Open a row to inspect that session in the existing Agents view. History keeps completed, failed, and cancelled Agent Invocations visible even when token or cost evidence is unavailable. Totals use the same filters as the history table. See [Session history and usage](https://vitehub.dev/docs/
|
|
307
|
+
The Console **Usage** page provides session history with date, Agent, status, and search filters. Open a row to inspect that session in the existing Agents view. History keeps completed, failed, and cancelled Agent Invocations visible even when token or cost evidence is unavailable. Totals use the same filters as the history table. See [Session history and usage](https://vitehub.dev/docs/console/agents#skills-and-usage) for the identity, coverage, and pagination contract.
|
|
310
308
|
|
|
311
|
-
Apps do not serve a Console page, a Console MCP, or a Console sign-in. They serve one Console route, `POST /_vitehub/rpc`, which the ViteHub Console at console.vitehub.dev and the CLI call with signed requests. `console: true` takes only requests signed with an Ed25519 key whose public key is in a `VITEHUB_CONSOLE_KEY_<NAME>` runtime env var. A dev server without such a var also answers this machine without a signature, so the local `vitehub` CLI works. `console: { auth: false }` takes calls without a signature from this machine, for development; a production build with it fails with `VITE_HUB_B0022`, even with `authorize` set. `console.auth: "token"`, `console.auth: "app"`, `console.auth: { ... }` (Console Auth), `console.origins`, `console.mcp`, `console.signInPage`, and `console.embed` are removed, and fail the build with `VITE_HUB_B0020` and the fix. See [Move from auth: "app" or Console Auth](https://vitehub.dev/docs/
|
|
309
|
+
Apps do not serve a Console page, a Console MCP, or a Console sign-in. They serve one Console route, `POST /_vitehub/rpc`, which the ViteHub Console at console.vitehub.dev and the CLI call with signed requests. `console: true` takes only requests signed with an Ed25519 key whose public key is in a `VITEHUB_CONSOLE_KEY_<NAME>` runtime env var. A dev server without such a var also answers this machine without a signature, so the local `vitehub` CLI works. `console: { auth: false }` takes calls without a signature from this machine, for development; a production build with it fails with `VITE_HUB_B0022`, even with `authorize` set. `console.auth: "token"`, `console.auth: "app"`, `console.auth: { ... }` (Console Auth), `console.origins`, `console.mcp`, `console.signInPage`, and `console.embed` are removed, and fail the build with `VITE_HUB_B0020` and the fix. See [Move from auth: "app" or Console Auth](https://vitehub.dev/docs/console/migrate#move-from-auth-app-or-console-auth).
|
|
312
310
|
|
|
313
311
|
Without a `console` option, `vite dev` serves the operation RPC, so `vitehub <command>` works. `console: false` turns the Console endpoint off completely: no `/_vitehub` route in development or production.
|
|
314
312
|
|
|
315
313
|
Add `authorize: "./server/console-authorize.ts"` to decide who may use the Console. The file default-exports `defineConsoleAuthorize()` from `vite-hub/console/auth`. It receives the `Request` and the signer and its `key` name: `via: "console"` with the `user` and `team` that the Console signed, or `via: "cli"` with no `user`. When the ViteHub MCP of the Console calls for the user, `surface` is `"mcp"`: the RPC then refuses operations with `mcp: false`, runs the others with the `mcp` surface, and refuses a destructive call that the person did not confirm. A caller with `readOnly: true` runs only operations that read. The app ignores caller fields that it does not know, so a newer Console can still call it. An Agent that calls Console operations as tools receives `via: "agent"`, never a signed `via`. With `auth: false`, it receives only the `Request`. It returns `true`, `false`, a `Response`, or `{ sections: ["content"] }` to allow only some Console sections. Every Console operation declares its section, and the server returns `403` outside the allowed sections. The navigation hides the other sections.
|
|
316
314
|
|
|
317
|
-
Set `console.mcpClient: true` to add the MCP client section. It runs on the server. It connects to the app's own `/mcp` and to other MCP servers with OAuth or a bearer token, as the Console caller, and it can hold several accounts of one server at once. Tokens and MCP sessions stay on the server and never reach the browser: in memory, or sealed in the app's KV store with `VITEHUB_CONSOLE_MCP_KEY`. See [Connect to MCP servers](https://vitehub.dev/docs/
|
|
315
|
+
Set `console.mcpClient: true` to add the MCP client section. It runs on the server. It connects to the app's own `/mcp` and to other MCP servers with OAuth or a bearer token, as the Console caller, and it can hold several accounts of one server at once. Tokens and MCP sessions stay on the server and never reach the browser: in memory, or sealed in the app's KV store with `VITEHUB_CONSOLE_MCP_KEY`. See [Connect to MCP servers](https://vitehub.dev/docs/console/mcp-client).
|
|
318
316
|
|
|
319
|
-
`invoke` defaults to `true` on the development server and `false` in a production build. Invocation also enables the Schedules page **Run now** button and the `schedule.run` operation (`vitehub schedule run <name>`) for Static Schedule Definitions that set `manual: true`; see [Run Schedules on demand](https://vitehub.dev/docs/
|
|
317
|
+
`invoke` defaults to `true` on the development server and `false` in a production build. Invocation also enables the Schedules page **Run now** button and the `schedule.run` operation (`vitehub schedule run <name>`) for Static Schedule Definitions that set `manual: true`; see [Run Schedules on demand](https://vitehub.dev/docs/cli/primitives#run-a-schedule-on-demand).
|
|
320
318
|
|
|
321
319
|
`impersonation: true` adds the `auth.impersonate` and `auth.stop-impersonating` operations. Each returns a one-time link, `GET /_vitehub/rpc?ticket=<ticket>`, that the browser opens on the app. The browser's app session must belong to the email of the signed Console person and have Better Auth's `impersonate` permission. It is off by default. It needs app Auth with Better Auth's admin plugin and `events.store`. The session lasts one hour by default and cannot create credentials.
|
|
322
320
|
|
|
323
|
-
One-time links also open Content previews (`documents.preview`). A link works once, for 60 seconds, on the app origin and mount that made it, for the person who asked. The app keeps the SHA-256 of each link in Better Auth's verification table, so every instance sees it. A development server without an Auth database keeps them in memory. A production app without one refuses links with `CONSOLE_TICKET_STORE_MISSING`. See [One-time links](https://vitehub.dev/docs/
|
|
321
|
+
One-time links also open Content previews (`documents.preview`). A link works once, for 60 seconds, on the app origin and mount that made it, for the person who asked. The app keeps the SHA-256 of each link in Better Auth's verification table, so every instance sees it. A development server without an Auth database keeps them in memory. A production app without one refuses links with `CONSOLE_TICKET_STORE_MISSING`. See [One-time links](https://vitehub.dev/docs/console/site-access#one-time-links).
|
|
324
322
|
|
|
325
323
|
Auth changes from the Console, such as `auth.ban`, run as the app user with the email of the signed Console person, with a live app session of that user. CLI calls name no person, so they cannot run Auth changes.
|
|
326
324
|
|
|
327
325
|
All Console paths use the application base: an explicit ViteHub application base (set from Nuxt `app.baseURL`), otherwise a root-relative Vite `base`. With `base: "/portal/"`, the route is `/portal/_vitehub/rpc`. Absolute and protocol-relative Vite bases such as `https://cdn.example/portal/` and `//cdn.example/portal/` are asset CDN URLs; without an explicit application base, the route stays at the root. Relative bases (`""` or `"./"`) also use root routes. When Nitro `baseURL` matches the application base, Nitro adds it once.
|
|
328
326
|
|
|
329
|
-
The Console route takes only signed requests on `POST /_vitehub/rpc`. Each caller has an Ed25519 key pair. The app reads the public keys from `VITEHUB_CONSOLE_KEY_<NAME>` variables of the host environment on each request, on Cloudflare from the Worker `env`. A key is 43 base64url characters, the raw 32-byte public key. The ViteHub Console makes one key pair for each linked app and shows its line. `vitehub secret console-key [name]` makes one for the CLI, which signs with `VITEHUB_CONSOLE_PRIVATE_KEY_<NAME>`. A request carries two headers: `x-vitehub-signature: key=<NAME>, t=<seconds>, origin=<app origin>, body=<SHA-256>, v1=<signature>` and `x-vitehub-caller`, the base64url JSON of who calls. The Ed25519 signature covers `vitehub-signature-v1`, the method, the path and query, the app origin, the time, the key name, the SHA-256 of the exact body bytes, and the caller header, one per line. The app origin is `vitehub({ publicUrl })` when it is set, else the URL of the request as the host routed it; `Host` and `X-Forwarded-*` headers never count. The app refuses a time more than 5 minutes off. Refusals are `401` with `CONSOLE_SIGNATURE_MISSING`, `CONSOLE_SIGNATURE_STALE`, `CONSOLE_SIGNATURE_ORIGIN`, `CONSOLE_KEY_UNKNOWN`, `CONSOLE_SIGNATURE_INVALID`, or `CONSOLE_SIGNATURE_BODY`. No key, or a malformed one, is `500` with `CONSOLE_KEY_NOT_CONFIGURED` or `CONSOLE_KEY_MALFORMED`. Bearer tokens and cookies never count. Rotate a key by adding a key with a new name, then removing the old variable. See [Sign Console requests](https://vitehub.dev/docs/
|
|
327
|
+
The Console route takes only signed requests on `POST /_vitehub/rpc`. Each caller has an Ed25519 key pair. The app reads the public keys from `VITEHUB_CONSOLE_KEY_<NAME>` variables of the host environment on each request, on Cloudflare from the Worker `env`. A key is 43 base64url characters, the raw 32-byte public key. The ViteHub Console makes one key pair for each linked app and shows its line. `vitehub secret console-key [name]` makes one for the CLI, which signs with `VITEHUB_CONSOLE_PRIVATE_KEY_<NAME>`. A request carries two headers: `x-vitehub-signature: key=<NAME>, t=<seconds>, origin=<app origin>, body=<SHA-256>, v1=<signature>` and `x-vitehub-caller`, the base64url JSON of who calls. The Ed25519 signature covers `vitehub-signature-v1`, the method, the path and query, the app origin, the time, the key name, the SHA-256 of the exact body bytes, and the caller header, one per line. The app origin is `vitehub({ publicUrl })` when it is set, else the URL of the request as the host routed it; `Host` and `X-Forwarded-*` headers never count. The app refuses a time more than 5 minutes off. Refusals are `401` with `CONSOLE_SIGNATURE_MISSING`, `CONSOLE_SIGNATURE_STALE`, `CONSOLE_SIGNATURE_ORIGIN`, `CONSOLE_KEY_UNKNOWN`, `CONSOLE_SIGNATURE_INVALID`, or `CONSOLE_SIGNATURE_BODY`. No key, or a malformed one, is `500` with `CONSOLE_KEY_NOT_CONFIGURED` or `CONSOLE_KEY_MALFORMED`. Bearer tokens and cookies never count. Rotate a key by adding a key with a new name, then removing the old variable. See [Sign Console requests](https://vitehub.dev/docs/console/signed-requests).
|
|
330
328
|
|
|
331
|
-
A call without a signature, with `auth: false` or on a dev server without a `console` option, must come from the app origin, or send `x-vitehub-console: 1` without an `Origin` header, so a foreign page cannot call it without a CORS preflight. Browsers cannot call the Console route from another origin. Each Console operation is one stateless `POST /_vitehub/rpc` request with one birpc call as its JSON body, `{ "m": "<operation>", "a": [input], "t": "q", "i": "<id>" }`, and one birpc reply as its response, so hosts such as Cloudflare Workers can send consecutive calls to different instances. The `project.get` operation (`vitehub project info`) returns `{ protocol: 1, name, vitehub, build, sections, operations }`: the `vite-hub` version, the time and Git commit of the production build, and the installed sections and operations that `authorize` allows for the caller. The Console page also gets `navigation`, the answer of `sections.list`, so it opens a project with one call. It works without Agents. See [Read the project](https://vitehub.dev/docs/
|
|
329
|
+
A call without a signature, with `auth: false` or on a dev server without a `console` option, must come from the app origin, or send `x-vitehub-console: 1` without an `Origin` header, so a foreign page cannot call it without a CORS preflight. Browsers cannot call the Console route from another origin. Each Console operation is one stateless `POST /_vitehub/rpc` request with one birpc call as its JSON body, `{ "m": "<operation>", "a": [input], "t": "q", "i": "<id>" }`, and one birpc reply as its response, so hosts such as Cloudflare Workers can send consecutive calls to different instances. The `project.get` operation (`vitehub project info`) returns `{ protocol: 1, name, vitehub, build, sections, operations }`: the `vite-hub` version, the time and Git commit of the production build, and the installed sections and operations that `authorize` allows for the caller. The Console page also gets `navigation`, the answer of `sections.list`, so it opens a project with one call. It works without Agents. See [Read the project](https://vitehub.dev/docs/console/sections#read-the-project).
|
|
332
330
|
|
|
333
331
|
[console.vitehub.dev](https://console.vitehub.dev) is the Console app, [`@vite-hub/console`](../console). People sign in with GitHub or a passkey, link apps for their team, and the Console server signs each call with the key of the link. It calls apps from its server, so it cannot open a `vite dev` server on your machine; use the `vitehub` commands there. `hostedConsoleUrl(projectUrl, path)` from `vite-hub/runtime` builds a link to one page of a project, such as `https://console.vitehub.dev/open?project=<app URL>&path=/kv`. The Console opens that page of the app of your team with that URL, or Home when your team has not linked it.
|
|
334
332
|
|
|
335
|
-
Console invocation requests accept a `prompt`, optional `invokerProfileId`, and optional prior `messages`. Use the `ConsoleAgentInvocationInput` type from `vite-hub/console`. History requires valid user or assistant Messages with unique IDs and only text, file, image, or audio parts. The Console rejects tool and approval parts, appends the new user prompt, and starts a new invocation. See the [Console guide](https://vitehub.dev/docs/
|
|
333
|
+
Console invocation requests accept a `prompt`, optional `invokerProfileId`, and optional prior `messages`. Use the `ConsoleAgentInvocationInput` type from `vite-hub/console`. History requires valid user or assistant Messages with unique IDs and only text, file, image, or audio parts. The Console rejects tool and approval parts, appends the new user prompt, and starts a new invocation. See the [Console guide](https://vitehub.dev/docs/console/agents#start-agent-invocations) for the access and history contracts.
|
|
336
334
|
|
|
337
335
|
The Console reads the app-wide Agent journal. It does not configure or store one. See [Record Agent invocations](#record-agent-invocations).
|
|
338
336
|
|
|
@@ -340,7 +338,7 @@ The Console reads the app-wide Agent journal. It does not configure or store one
|
|
|
340
338
|
|
|
341
339
|
## Console images
|
|
342
340
|
|
|
343
|
-
The Console accepts up to ten PNG, JPEG, WebP, or GIF images per message, within a combined 10 MiB limit. Configure durable Blob storage to keep the bytes, and content-enabled Invocation storage to keep message references. Agents can return published Blob image URLs in Markdown. See [Console usage](https://vitehub.dev/docs/
|
|
341
|
+
The Console accepts up to ten PNG, JPEG, WebP, or GIF images per message, within a combined 10 MiB limit. Configure durable Blob storage to keep the bytes, and content-enabled Invocation storage to keep message references. Agents can return published Blob image URLs in Markdown. See [Console usage](https://vitehub.dev/docs/console/agents#attach-images).
|
|
344
342
|
|
|
345
343
|
Console image uploads require invocation to be enabled. The Console fixes the Agent, route, and invoker profile when submission starts, so switching Agents during an upload cannot redirect the input. Uploads without a usable Blob serving URL are removed before the request fails.
|
|
346
344
|
|
|
@@ -348,19 +346,19 @@ Console image uploads require invocation to be enabled. The Console fixes the Ag
|
|
|
348
346
|
|
|
349
347
|
`vite-hub/logs` uses Evlog's public logger API and adds a read-only `LogSource` contract for existing pipelines. A bounded local buffer supports development inspection without adding an exporter. Read the [Logs guide](https://vitehub.dev/docs/logs) and [Logs contract](src/logs/README.md) for retention, redaction and source ownership.
|
|
350
348
|
|
|
351
|
-
Logs
|
|
349
|
+
Logs has its own `logs` key. Turn it on with `vitehub({ console: { auth: false }, logs: true })` during local development. It attaches a bounded buffer to Evlog's existing drain and reuses an installed Evlog Nitro module. Pass `logs: { maxEntries: 256 }` to size the buffer, and `observability: { evlog: { redact: true } }` to configure Evlog when ViteHub owns its setup. If another integration already installed Evlog, configure the options there.
|
|
352
350
|
|
|
353
|
-
`observability: { browserErrors: true }` sends uncaught browser errors to `POST /
|
|
351
|
+
`observability: { browserErrors: true }` sends uncaught browser errors to `POST /_vitehub/browser-errors`, and the server logs each one as an error on the Evlog event of that request. A Vite app gets a script in `index.html`, and a Nuxt app a client plugin that also reports `vue:error` and `app:error`. Report an error that the app catches with the browser's `reportError(error)`. The route takes same-origin requests only, 16 KiB at most, and 20 reports a minute from one address. It is off by default. See [Log browser errors](https://vitehub.dev/docs/logs/configure#log-browser-errors).
|
|
354
352
|
|
|
355
|
-
For production, use `
|
|
353
|
+
For production, use `logs: { source: './server/logs.ts' }`. That server module must default-export a `LogSource` from `vite-hub/logs/source` that reads the existing backend. Without `observability`, this form starts no logger, buffer, SDK, or exporter. `logs: true` fails a production build because a temporary process buffer cannot provide shared production history. The source owns retention and cursor semantics and must apply each advertised filter.
|
|
356
354
|
|
|
357
355
|
Explorer and Stream keep selected event data in the right inspector. Search includes structured fields. Follow refreshes the newest page every two seconds and is a polling view, not guaranteed delivery of every event. The browser retains at most 1,000 loaded events. The Console shows local retention limits and dropped or evicted counts. The same read operation is available as `vitehub logs list --level error --limit 50 --json` and through Console RPC `logs.list`, under the same section access policy.
|
|
358
356
|
|
|
359
|
-
With the Cloudflare host, ViteHub defaults the generated Wrangler configuration to `observability: { enabled: true }`, with or without `
|
|
357
|
+
With the Cloudflare host, ViteHub defaults the generated Wrangler configuration to `observability: { enabled: true }`, with or without `logs`. An `observability` key in the project `wrangler.json` or in `nitro.cloudflare.wrangler` is preserved, including `enabled: false`. This enables Cloudflare's native collection. It does not create an exporter, configure a destination, or connect that history to the Console. Those remain owned by the existing backend and its source adapter.
|
|
360
358
|
|
|
361
359
|
## Agent Skills
|
|
362
360
|
|
|
363
|
-
`vite-hub/skills` serves the Agent Skills of an app to coding agents from one list. `defineSkills()` reads an `import.meta.glob()` of `skills/**` and starts a skill at each `SKILL.md`. `serveSkills(request, skills)` answers Agent Skills Discovery v0.2.0 at `/.well-known/agent-skills/` (index with digests, `.tar.gz` for a multi-file skill) and v0.1.0 at `/.well-known/skills/`, which `npx skills add <origin>` reads. It returns `undefined` for other paths, so it fits in a middleware. `skillsMcp(skills)` gives the MCP Skills extension results (`skills/list`, `skills/get`, `skill://` resources) for any MCP server library. Pass a function instead of a list to change the skills at runtime. `skillSettings(skills, { store: kv })` adds a switch to each skill: default-export it from `server/skills.ts`, serve `settings.enabled`, and turn skills on and off without a deploy in the Console **Served skills** section or with `vitehub served-skills set <name> false`. Read the [Agent Skills guide](https://vitehub.dev/docs/
|
|
361
|
+
`vite-hub/skills` serves the Agent Skills of an app to coding agents from one list. `defineSkills()` reads an `import.meta.glob()` of `skills/**` and starts a skill at each `SKILL.md`. `serveSkills(request, skills)` answers Agent Skills Discovery v0.2.0 at `/.well-known/agent-skills/` (index with digests, `.tar.gz` for a multi-file skill) and v0.1.0 at `/.well-known/skills/`, which `npx skills add <origin>` reads. It returns `undefined` for other paths, so it fits in a middleware. `skillsMcp(skills)` gives the MCP Skills extension results (`skills/list`, `skills/get`, `skill://` resources) for any MCP server library. Pass a function instead of a list to change the skills at runtime. `skillSettings(skills, { store: kv })` adds a switch to each skill: default-export it from `server/skills.ts`, serve `settings.enabled`, and turn skills on and off without a deploy in the Console **Served skills** section or with `vitehub served-skills set <name> false`. Read the [Agent Skills guide](https://vitehub.dev/docs/console/skills).
|
|
364
362
|
|
|
365
363
|
```ts
|
|
366
364
|
// server/middleware/skills.ts
|
|
@@ -374,4 +372,4 @@ export default defineHandler(event => serveSkills(event.req, skills))
|
|
|
374
372
|
|
|
375
373
|
## ViteHub MCP
|
|
376
374
|
|
|
377
|
-
Apps do not serve a Console MCP. Agents connect to the ViteHub MCP of the Console: `https://console.vitehub.dev/mcp` for docs tools without sign-in, and `https://console.vitehub.dev/mcp/account` with a Console account for docs and project tools, which run the operations of the team's apps with signed calls. An operation sets `mcp: false` to stay out of it, or `mcp: { format }` to shape its text. See [ViteHub MCP](https://vitehub.dev/docs/
|
|
375
|
+
Apps do not serve a Console MCP. Agents connect to the ViteHub MCP of the Console: `https://console.vitehub.dev/mcp` for docs tools without sign-in, and `https://console.vitehub.dev/mcp/account` with a Console account for docs and project tools, which run the operations of the team's apps with signed calls. An operation sets `mcp: false` to stay out of it, or `mcp: { format }` to shape its text. See [ViteHub MCP](https://vitehub.dev/docs/console/mcp). For an MCP server of your own app, see `vitehub({ mcp: true })` and [MCP server](https://vitehub.dev/docs/mcp).
|
|
@@ -11,7 +11,7 @@ export interface BrowserErrorReport {
|
|
|
11
11
|
}
|
|
12
12
|
/** The report in a request body, with each field cut to size. `undefined` when the body is not a report. */
|
|
13
13
|
export declare function parseBrowserErrorReport(body: unknown): BrowserErrorReport | undefined;
|
|
14
|
-
/** The `{ fetch }` handler of `POST <base>/
|
|
14
|
+
/** The `{ fetch }` handler of `POST <base>/_vitehub/browser-errors`. `now` is for tests. */
|
|
15
15
|
export declare function createBrowserErrorsHandler(now?: () => number): {
|
|
16
16
|
fetch: (request: Request) => Promise<Response>;
|
|
17
17
|
};
|
|
@@ -129,7 +129,7 @@ function reply(status, headers = {}) {
|
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
/** The `{ fetch }` handler of `POST <base>/
|
|
132
|
+
/** The `{ fetch }` handler of `POST <base>/_vitehub/browser-errors`. `now` is for tests. */
|
|
133
133
|
function createBrowserErrorsHandler(now = Date.now) {
|
|
134
134
|
const limit = minuteLimit(now);
|
|
135
135
|
return { async fetch(request) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-
|
|
1
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
2
2
|
import { r as operationRpcPath } from "./operation-rpc-DI9txNxK.js";
|
|
3
|
-
import { r as consoleDiagnosticBody } from "./diagnostics-
|
|
3
|
+
import { r as consoleDiagnosticBody } from "./diagnostics-9U_fYxMy.js";
|
|
4
4
|
import { c as readConsolePublicKeys, i as isViteHubLoopbackPeer, l as verifyConsoleSignature } from "./dev-peer-am78OsHH.js";
|
|
5
|
-
import { l as operationListed, o as operationAccessAllows } from "./operations-
|
|
6
|
-
import {
|
|
7
|
-
import { a as installedConsoleAccessPolicy, n as consoleAuthorizedSections, t as consoleAuthorizedGrants } from "./access-policy-
|
|
8
|
-
import { c as isConsoleDevelopmentRuntime, i as consoleRequestError } from "./request-
|
|
5
|
+
import { l as operationListed, o as operationAccessAllows } from "./operations-EOdyctDc.js";
|
|
6
|
+
import { i as isConsoleDevelopmentBuild } from "./development-zLxOp-AO.js";
|
|
7
|
+
import { a as installedConsoleAccessPolicy, n as consoleAuthorizedSections, t as consoleAuthorizedGrants } from "./access-policy-DjBKLo3c.js";
|
|
8
|
+
import { c as isConsoleDevelopmentRuntime, i as consoleRequestError } from "./request-DbFfYmCu.js";
|
|
9
9
|
import { n as loadConsoleRuntime } from "./runtime-DxfJOfCd.js";
|
|
10
10
|
import { getStandardContext } from "@vite-hub/runtime/internal/h3";
|
|
11
11
|
import { defineGrant } from "@vite-hub/runtime/internal/grant";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./operations-
|
|
2
|
-
import { l as ConsoleUser, n as ConsoleAuthorize } from "./auth-types-
|
|
3
|
-
import { a as ConsoleSectionId } from "./sections-
|
|
1
|
+
import "./operations-B0689BG1.js";
|
|
2
|
+
import { l as ConsoleUser, n as ConsoleAuthorize } from "./auth-types-CyqhWvYF.js";
|
|
3
|
+
import { a as ConsoleSectionId } from "./sections-Do7X4Nwt.js";
|
|
4
4
|
import "./request-D7h3SQ92.js";
|
|
5
5
|
import "@vite-hub/agent";
|
|
6
6
|
//#region src/console/runtime/server/access.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as invariantError, t as invariant } from "./invariant-DolT9EEx.js";
|
|
2
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-
|
|
2
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
3
3
|
import { r as installOperationSectionResolver } from "./operation-registry-BogGwk_I.js";
|
|
4
|
-
import {
|
|
4
|
+
import { i as isConsoleDevelopmentBuild } from "./development-zLxOp-AO.js";
|
|
5
5
|
import { isRuntimeResponse } from "@vite-hub/runtime/internal/runtime-type";
|
|
6
6
|
//#region src/console/runtime/server/access-policy.ts
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ConsoleProjectBuild } from "./project-link-
|
|
1
|
+
import { t as ConsoleProjectBuild } from "./project-link-BuOzBH9f.js";
|
|
2
2
|
//#region src/console/runtime/client/account.d.ts
|
|
3
3
|
/** A project of the active team, as `GET /api/projects` returns it. The page never sees the private key. */
|
|
4
4
|
interface ConsoleAccountProject {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as invariant } from "./invariant-DolT9EEx.js";
|
|
2
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-
|
|
3
|
-
import { d as consoleRequest, h as withConsoleAccess, i as consoleAccessInvoker } from "./access-
|
|
2
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
3
|
+
import { d as consoleRequest, h as withConsoleAccess, i as consoleAccessInvoker } from "./access-BDST818p.js";
|
|
4
4
|
import { t as consoleHttpError } from "./http-error-Bs6e8_-8.js";
|
|
5
|
-
import { a as consoleRequestJSON, l as setConsoleResponseStatus, o as consoleRequestURL, t as assertConsoleRequest } from "./request-
|
|
6
|
-
import { t as getConsoleBlob } from "./blob-
|
|
5
|
+
import { a as consoleRequestJSON, l as setConsoleResponseStatus, o as consoleRequestURL, t as assertConsoleRequest } from "./request-DbFfYmCu.js";
|
|
6
|
+
import { t as getConsoleBlob } from "./blob-CpvlM8jp.js";
|
|
7
7
|
import { t as consoleAttachmentRequestBytes } from "./limits-BUlwWYQE.js";
|
|
8
|
-
import { a as decodeAgentRouteParam, o as encodeAgentRouteParam } from "./console-route-
|
|
9
|
-
import { o as getConsoleAgentCapabilities, r as consoleAgentInvokerProfiles, s as getConsoleAgentDefinition } from "./agents-
|
|
10
|
-
import { t as agentConsole } from "./server-
|
|
8
|
+
import { a as decodeAgentRouteParam, o as encodeAgentRouteParam } from "./console-route-CBuqZ4wO.js";
|
|
9
|
+
import { o as getConsoleAgentCapabilities, r as consoleAgentInvokerProfiles, s as getConsoleAgentDefinition } from "./agents-BDeazoAW.js";
|
|
10
|
+
import { t as agentConsole } from "./server-BRJE4t-W.js";
|
|
11
11
|
import { n as vitehubOwnedPrefix } from "./owned-paths-BnjT0FhU.js";
|
|
12
12
|
import { agentInvocationId, createMessage, deserializeMessages, isAttachmentPart, startAgentInvocation } from "@vite-hub/agent";
|
|
13
13
|
import * as v from "valibot";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-
|
|
1
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
2
2
|
import { a as resolveConsoleSuppliedInvocations, i as resolveConsoleInvocations, r as markConsoleSuppliedInvocations } from "./internal-BreyUsQ6.js";
|
|
3
|
-
import { r as installConsoleInvocations } from "./invocations-
|
|
3
|
+
import { r as installConsoleInvocations } from "./invocations-CK_-G540.js";
|
|
4
4
|
import * as v from "valibot";
|
|
5
5
|
import { agentInvocationsDisabledKey, agentInvocationsFallbackKey, installAgentInvocationsOverride, resolveDefaultAgentInvocations } from "@vite-hub/agent/invocations/app";
|
|
6
6
|
import { markDiscoveredAgentName } from "@vite-hub/agent/server/internal";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as getConsoleAgents, s as getConsoleAgentDefinition } from "./agents-
|
|
1
|
+
import { c as getConsoleAgents, s as getConsoleAgentDefinition } from "./agents-BDeazoAW.js";
|
|
2
2
|
export { getConsoleAgentDefinition, getConsoleAgents };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as OperationContext } from "./operations-
|
|
1
|
+
import { r as OperationContext } from "./operations-B0689BG1.js";
|
|
2
2
|
import { n as ConsoleDiagnosticCode } from "./diagnostics-CjGiniKb.js";
|
|
3
3
|
import { t as ConsoleRequestEvent } from "./request-D7h3SQ92.js";
|
|
4
|
-
import { o as ConsoleAccess } from "./access-policy-
|
|
4
|
+
import { o as ConsoleAccess } from "./access-policy-CGXhO3Ee.js";
|
|
5
5
|
import { Result, ResultError } from "@vite-hub/runtime";
|
|
6
6
|
import { AuthConsole, AuthConsoleErrorCode, AuthConsoleMutation } from "@vite-hub/auth/console-runtime";
|
|
7
7
|
//#region src/console/runtime/server/tickets.d.ts
|
|
@@ -9,7 +9,7 @@ interface ConsoleCallerUser {
|
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/console/auth-types.d.ts
|
|
11
11
|
/** The signed-in user that the Console gives `console.authorize`. */
|
|
12
|
-
type ConsoleUser = AccessAuthorizationContext["user"];
|
|
12
|
+
type ConsoleUser = AccessAuthorizationContext<unknown, false>["user"];
|
|
13
13
|
/** The request that `console.authorize` checks with `console: { auth: false }` in development. It has no signature and no user. */
|
|
14
14
|
interface ConsoleOpenAuthorizeContext {
|
|
15
15
|
request: Request;
|
package/dist/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-
|
|
4
|
-
import { t as loadViteHubCliConfig } from "./cli-config-
|
|
2
|
+
import { i as importOptionalOwner, l as requireOptionalOwner, t as assertFeaturePackages } from "./optional-owners-BNA2OX6z.js";
|
|
3
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
4
|
+
import { t as loadViteHubCliConfig } from "./cli-config-wxKjF2Y0.js";
|
|
5
5
|
import { runViteHubCliEntrypoint } from "@vite-hub/cli";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import { parseArgs } from "node:util";
|
|
@@ -285,11 +285,19 @@ function createSandboxCliNamespace() {
|
|
|
285
285
|
const agentRuntimeFeatures = {
|
|
286
286
|
features: [{
|
|
287
287
|
name: "invocations",
|
|
288
|
-
run: async (args, context) =>
|
|
288
|
+
run: async (args, context) => {
|
|
289
|
+
const cli = requireOptionalOwner(await importOptionalOwner("@vite-hub/agent", () => import("@vite-hub/agent/internal/agent-invocations-cli")), "agent");
|
|
290
|
+
const { readAgentJournalStateUrl } = await import("./runtime-feature-guard-B64MMW9I.js");
|
|
291
|
+
const stateUrl = await readAgentJournalStateUrl(context.rootDir, context.env);
|
|
292
|
+
return cli.runAgentInvocationsCli(args, {
|
|
293
|
+
...context,
|
|
294
|
+
...stateUrl ? { stateUrl } : {}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
289
297
|
}],
|
|
290
298
|
name: "agent"
|
|
291
299
|
};
|
|
292
|
-
const [connectionsCli,
|
|
300
|
+
const [connectionsCli, choicesCli] = await Promise.all([process.argv[2] === "connections" ? importOptionalOwner("@vite-hub/connections", () => import("@vite-hub/connections/cli")) : void 0, importOptionalOwner("@vite-hub/choices", () => import("@vite-hub/choices/cli"))]);
|
|
293
301
|
const kvCli = process.argv[2] === "kv" ? await importOptionalOwner("@vite-hub/kv", () => import("@vite-hub/kv/cli")) : void 0;
|
|
294
302
|
const bundleCli = process.argv[2] === "bundle" ? await import("@vite-hub/bundle/cli") : void 0;
|
|
295
303
|
const contentArgs = process.argv.slice(4);
|
|
@@ -308,7 +316,7 @@ runViteHubCliEntrypoint({
|
|
|
308
316
|
loadConfig: loadViteHubCliConfig,
|
|
309
317
|
runtimeFeatureGuard: async (namespace, feature, cwd) => {
|
|
310
318
|
if (namespace !== "agent" || feature !== "invocations") return true;
|
|
311
|
-
const { isAgentCliEnabled } = await import("./runtime-feature-guard-
|
|
319
|
+
const { isAgentCliEnabled } = await import("./runtime-feature-guard-B64MMW9I.js");
|
|
312
320
|
return isAgentCliEnabled(cwd);
|
|
313
321
|
},
|
|
314
322
|
runtimeFeatures: [
|
|
@@ -319,7 +327,7 @@ runViteHubCliEntrypoint({
|
|
|
319
327
|
],
|
|
320
328
|
runtimeNamespaces: [
|
|
321
329
|
...bundleCli?.bundleCliContributor.namespaces ?? [],
|
|
322
|
-
...
|
|
330
|
+
...choicesCli ? [choicesCli.createChoicesCliNamespace()] : [],
|
|
323
331
|
createMigrateCliNamespace(),
|
|
324
332
|
createSandboxCliNamespace(),
|
|
325
333
|
secretRuntimeNamespace
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ConsoleMediaLibrary, t as ConsoleBlobInspection } from "./internal-
|
|
1
|
+
import { i as ConsoleMediaLibrary, t as ConsoleBlobInspection } from "./internal-CO4OqqaS.js";
|
|
2
2
|
import { BlobStorage } from "@vite-hub/blob";
|
|
3
3
|
//#region src/console/runtime/server/blob.d.ts
|
|
4
4
|
declare function installConsoleBlob(projectRoot: string, storage: BlobStorage, stores?: readonly string[]): ConsoleBlobInspection;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-
|
|
1
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
2
2
|
import { n as consoleState } from "./internal-BreyUsQ6.js";
|
|
3
|
-
import { i as consoleRequestError } from "./request-
|
|
3
|
+
import { i as consoleRequestError } from "./request-DbFfYmCu.js";
|
|
4
4
|
//#region src/console/runtime/server/blob.ts
|
|
5
5
|
function installConsoleBlob(projectRoot, storage, stores = ["default"]) {
|
|
6
6
|
const installedStores = [...new Set(stores.filter((store) => store.length > 0))].filter((store) => store !== "default").sort();
|
|
7
7
|
installedStores.unshift("default");
|
|
8
8
|
return consoleState().blob = {
|
|
9
|
-
...import.meta.viteHubConsoleDocuments === false ? {} : { media: () => import("./media-
|
|
9
|
+
...import.meta.viteHubConsoleDocuments === false ? {} : { media: () => import("./media-BHpQ-4jw.js") },
|
|
10
10
|
storage,
|
|
11
11
|
stores: installedStores
|
|
12
12
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AnyOperation } from "../operations-
|
|
1
|
+
import { n as AnyOperation } from "../operations-B0689BG1.js";
|
|
2
2
|
//#region src/cache/operations.d.ts
|
|
3
3
|
/** The `cache.*` operations: list, get, and delete. The Console, `vitehub cache`, and agents run them. */
|
|
4
4
|
export declare const cacheOperations: readonly AnyOperation[];
|
package/dist/cache/operations.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as defineOperation } from "../operation-definition-
|
|
1
|
+
import { t as defineOperation } from "../operation-definition-a5keEpCd.js";
|
|
2
2
|
import * as v from "valibot";
|
|
3
3
|
//#region src/cache/operations.ts
|
|
4
|
-
const runtime = () => import("../runtime-
|
|
4
|
+
const runtime = () => import("../runtime-DQuHg7OO.js");
|
|
5
5
|
function defineCacheOperation(definition) {
|
|
6
6
|
return defineOperation({
|
|
7
7
|
...definition,
|
package/dist/cache.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-
|
|
1
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
2
2
|
import { defineCachedFunction as defineCachedFunction$1, defineCachedHandler as defineCachedHandler$1 } from "nitro/cache";
|
|
3
3
|
import { defineHandler, toResponse } from "nitro/h3";
|
|
4
4
|
//#region src/cache.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@vite-hub/choices/vue";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@vite-hub/choices";
|
package/dist/choices.js
ADDED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as createCliDiscoveryNitroCloser, t as loadAllEnv } from "./vite-stage-mmtwQIMA.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
|
-
//#region ../internal/src/vite-stage.ts
|
|
7
|
-
/**
|
|
8
|
-
* Vite's `loadEnv(mode, envDir, "")`: every `.env` value of the mode and the whole shell. With `DEBUG=vite:env`, Vite
|
|
9
|
-
* logs that result to stderr, secrets included. loadEnv is synchronous, so this drops only the writes of this call.
|
|
10
|
-
*/
|
|
11
|
-
function loadAllEnv(loadEnv, mode, envDir) {
|
|
12
|
-
const write = process.stderr.write;
|
|
13
|
-
process.stderr.write = () => true;
|
|
14
|
-
try {
|
|
15
|
-
return loadEnv(mode, envDir, "");
|
|
16
|
-
} finally {
|
|
17
|
-
process.stderr.write = write;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
6
|
//#region src/internal/cli-config.ts
|
|
22
7
|
const configExtensions = [
|
|
23
8
|
"js",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ConsoleOpenAuthorizeContext, c as ConsoleSignedConsoleAuthorizeContext, i as ConsoleAuthorizeResult, l as ConsoleUser, n as ConsoleAuthorize, o as ConsolePageAuthorizeContext, r as ConsoleAuthorizeContext, s as ConsoleSignedCliAuthorizeContext, t as ConsoleAgentAuthorizeContext } from "../auth-types-
|
|
1
|
+
import { a as ConsoleOpenAuthorizeContext, c as ConsoleSignedConsoleAuthorizeContext, i as ConsoleAuthorizeResult, l as ConsoleUser, n as ConsoleAuthorize, o as ConsolePageAuthorizeContext, r as ConsoleAuthorizeContext, s as ConsoleSignedCliAuthorizeContext, t as ConsoleAgentAuthorizeContext } from "../auth-types-CyqhWvYF.js";
|
|
2
2
|
export { ConsoleAgentAuthorizeContext, ConsoleAuthorize, ConsoleAuthorizeContext, ConsoleAuthorizeResult, ConsoleOpenAuthorizeContext, ConsolePageAuthorizeContext, ConsoleSignedCliAuthorizeContext, ConsoleSignedConsoleAuthorizeContext, ConsoleUser };
|
package/dist/console/auth.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ConsoleOpenAuthorizeContext, c as ConsoleSignedConsoleAuthorizeContext, i as ConsoleAuthorizeResult, l as ConsoleUser, n as ConsoleAuthorize, o as ConsolePageAuthorizeContext, r as ConsoleAuthorizeContext, s as ConsoleSignedCliAuthorizeContext, t as ConsoleAgentAuthorizeContext } from "../auth-types-
|
|
1
|
+
import { a as ConsoleOpenAuthorizeContext, c as ConsoleSignedConsoleAuthorizeContext, i as ConsoleAuthorizeResult, l as ConsoleUser, n as ConsoleAuthorize, o as ConsolePageAuthorizeContext, r as ConsoleAuthorizeContext, s as ConsoleSignedCliAuthorizeContext, t as ConsoleAgentAuthorizeContext } from "../auth-types-CyqhWvYF.js";
|
|
2
2
|
//#region src/console/auth.d.ts
|
|
3
3
|
/** Define the function that every Console call runs after the signature check. Set its file path as `console.authorize`. */
|
|
4
4
|
export declare function defineConsoleAuthorize(authorize: ConsoleAuthorize): ConsoleAuthorize;
|
package/dist/console/auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as viteHubErrorDiagnostics } from "../error-diagnostics-
|
|
1
|
+
import { t as viteHubErrorDiagnostics } from "../error-diagnostics-Bm3JKYjz.js";
|
|
2
2
|
//#region src/console/auth.ts
|
|
3
3
|
/** Define the function that every Console call runs after the signature check. Set its file path as `console.authorize`. */
|
|
4
4
|
function defineConsoleAuthorize(authorize) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as linkConsoleGitHub, B as renameConsoleAccountProject, C as deleteConsolePasskey, D as inviteConsoleMember, E as endConsoleSession, F as loadConsoleSignInMethods, G as signInWithGitHub, H as revealConsoleEnvValue, I as loadConsoleSignInState, J as switchConsoleTeam, K as signInWithPasskey, L as loadConsoleTeam, M as listConsolePasskeys, N as listConsoleSignInProviders, O as leaveConsoleTeam, P as loadConsoleEnvStage, R as removeConsoleMember, S as deleteConsoleEnvValue, T as earlyConsoleTeam, U as revokeConsoleApiKey, V as renameConsoleTeam, W as setConsoleEnvValue, Y as unlinkConsoleAccountProject, _ as addConsolePasskey, a as ConsoleAccountTeam, b as createConsoleApiKey, c as ConsoleEnvVariable, d as ConsoleSignInState, f as ConsoleTeamDetails, g as accountAppStatusLabels, h as acceptConsoleInvitation, i as ConsoleAccountProject, j as listConsoleApiKeys, k as linkConsoleAccountProject, l as ConsolePasskey, m as ConsoleTeamMember, n as ConsoleAccountAppStatus, o as ConsoleApiKey, p as ConsoleTeamInvitation, q as signUpWithPasskey, r as ConsoleAccountCheck, s as ConsoleEnvStage, t as ConsoleAccount, u as ConsoleSignInMethods, v as cancelConsoleInvitation, w as earlyConsoleSignInState, x as createConsoleTeam, y as checkConsoleAccountProject, z as renameConsoleAccount } from "../../../account-
|
|
1
|
+
import { A as linkConsoleGitHub, B as renameConsoleAccountProject, C as deleteConsolePasskey, D as inviteConsoleMember, E as endConsoleSession, F as loadConsoleSignInMethods, G as signInWithGitHub, H as revealConsoleEnvValue, I as loadConsoleSignInState, J as switchConsoleTeam, K as signInWithPasskey, L as loadConsoleTeam, M as listConsolePasskeys, N as listConsoleSignInProviders, O as leaveConsoleTeam, P as loadConsoleEnvStage, R as removeConsoleMember, S as deleteConsoleEnvValue, T as earlyConsoleTeam, U as revokeConsoleApiKey, V as renameConsoleTeam, W as setConsoleEnvValue, Y as unlinkConsoleAccountProject, _ as addConsolePasskey, a as ConsoleAccountTeam, b as createConsoleApiKey, c as ConsoleEnvVariable, d as ConsoleSignInState, f as ConsoleTeamDetails, g as accountAppStatusLabels, h as acceptConsoleInvitation, i as ConsoleAccountProject, j as listConsoleApiKeys, k as linkConsoleAccountProject, l as ConsolePasskey, m as ConsoleTeamMember, n as ConsoleAccountAppStatus, o as ConsoleApiKey, p as ConsoleTeamInvitation, q as signUpWithPasskey, r as ConsoleAccountCheck, s as ConsoleEnvStage, t as ConsoleAccount, u as ConsoleSignInMethods, v as cancelConsoleInvitation, w as earlyConsoleSignInState, x as createConsoleTeam, y as checkConsoleAccountProject, z as renameConsoleAccount } from "../../../account-BnOAU055.js";
|
|
2
2
|
export { ConsoleAccount, ConsoleAccountAppStatus, ConsoleAccountCheck, ConsoleAccountProject, ConsoleAccountTeam, ConsoleApiKey, ConsoleEnvStage, ConsoleEnvVariable, ConsolePasskey, ConsoleSignInMethods, ConsoleSignInState, ConsoleTeamDetails, ConsoleTeamInvitation, ConsoleTeamMember, acceptConsoleInvitation, accountAppStatusLabels, addConsolePasskey, cancelConsoleInvitation, checkConsoleAccountProject, createConsoleApiKey, createConsoleTeam, deleteConsoleEnvValue, deleteConsolePasskey, earlyConsoleSignInState, earlyConsoleTeam, endConsoleSession, inviteConsoleMember, leaveConsoleTeam, linkConsoleAccountProject, linkConsoleGitHub, listConsoleApiKeys, listConsolePasskeys, listConsoleSignInProviders, loadConsoleEnvStage, loadConsoleSignInMethods, loadConsoleSignInState, loadConsoleTeam, removeConsoleMember, renameConsoleAccount, renameConsoleAccountProject, renameConsoleTeam, revealConsoleEnvValue, revokeConsoleApiKey, setConsoleEnvValue, signInWithGitHub, signInWithPasskey, signUpWithPasskey, switchConsoleTeam, unlinkConsoleAccountProject };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as consoleStatusDiagnosticCode, t as consoleDiagnostic } from "../../../diagnostics-
|
|
2
|
-
import { n as consoleProjectBuildOf } from "../../../project-link-
|
|
1
|
+
import { i as consoleStatusDiagnosticCode, t as consoleDiagnostic } from "../../../diagnostics-9U_fYxMy.js";
|
|
2
|
+
import { n as consoleProjectBuildOf } from "../../../project-link-D-6UefhA.js";
|
|
3
3
|
import { createAuthClient, useAuthQuery } from "better-auth/client";
|
|
4
4
|
import { organizationClient } from "better-auth/client/plugins";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@better-auth+core@1.7.15_@better-auth+utils@0.5.1_@better-fetch+fetch@1.3.3_@openteleme_616fd187915fb28e29504b61d755935b/node_modules/@better-auth/core/dist/utils/error-codes.mjs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as ConsoleMediaFile, r as ConsoleMediaClient } from "../../../media-library-
|
|
1
|
+
import { o as ConsoleMediaFile, r as ConsoleMediaClient } from "../../../media-library-D9ThbXqs.js";
|
|
2
2
|
//#region src/console/runtime/client/blob-media.d.ts
|
|
3
3
|
/** One Blob object as the Console Blob route returns it. */
|
|
4
4
|
export interface ConsoleBlobObject {
|