vite-hub 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/dist/{access-BBHk9b5P.js → access-CUFHPi8T.js} +9 -133
- package/dist/{access-policy-CUbJLvlR.d.ts → access-DkBck8Vu.d.ts} +16 -16
- package/dist/{account-CoAO1F8G.d.ts → account-DNr8fHcQ.d.ts} +1 -1
- package/dist/{console/runtime/server → agent/console}/agents.get.d.ts +1 -1
- package/dist/{console/runtime/server → agent/console}/agents.get.js +3 -3
- package/dist/{console/runtime/server → agent/console}/channel-replay.d.ts +2 -2
- package/dist/{console/runtime/server → agent/console}/channel-replay.js +6 -6
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.js +4 -4
- package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.d.ts +3 -3
- package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.js +6 -6
- package/dist/{console/runtime/server → agent/console}/invocation.get.d.ts +4 -4
- package/dist/{console/runtime/server → agent/console}/invocation.get.js +8 -8
- package/dist/{console/runtime/server → agent/console}/invocations.get.js +5 -5
- package/dist/{console/runtime/server/usage.get.d.ts → agent/console/invocations.usage.d.ts} +2 -4
- package/dist/agent/console/invocations.usage.js +51 -0
- package/dist/agent/console/operations.d.ts +6 -0
- package/dist/agent/console/operations.js +247 -0
- package/dist/{console/runtime/server → agent/console}/status.get.d.ts +2 -2
- package/dist/{console/runtime/server → agent/console}/status.get.js +6 -6
- package/dist/{server-DsOEa4_A.js → agent-console-CHsLxKk_.js} +3 -2
- package/dist/agent-console-FmaYpVv-.d.ts +14 -0
- package/dist/{agent-invocations.post-BAC1aHnG.js → agent-invocations.post-CF5anHY6.js} +8 -8
- package/dist/{agents-BClUWOj7.js → agents-DBm_PJie.js} +1 -1
- package/dist/{agents-Cz_uhhov.js → agents-DXLHsE7x.js} +2 -2
- package/dist/auth/console/auth.d.ts +25 -0
- package/dist/{console/runtime/server → auth/console}/auth.js +11 -12
- package/dist/auth/console/operations.d.ts +3 -0
- package/dist/auth/console/operations.js +135 -0
- package/dist/{auth-operations-arLIY2_2.js → auth-operations-BKqoX8Ua.js} +3 -3
- package/dist/{auth-types-B4mq4YhK.d.ts → auth-types-Cotn7406.d.ts} +4 -17
- package/dist/bin.js +3 -3
- package/dist/blob/console/operations.d.ts +3 -0
- package/dist/blob/console/operations.js +44 -0
- package/dist/{blob-eH6j0AQj.js → blob-iw8pWQ6o.js} +2 -2
- package/dist/{blob-_TtxDb-t.d.ts → blob-uNin0_TV.d.ts} +1 -1
- package/dist/cache/operations.js +1 -1
- package/dist/console/auth-types.d.ts +2 -2
- package/dist/console/auth.d.ts +2 -2
- package/dist/console/runtime/auth-operations.d.ts +3 -3
- package/dist/console/runtime/auth-operations.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/auth-management.ts +6 -6
- package/dist/console/runtime/client/blob-media.js +2 -2
- package/dist/console/runtime/client/comment-thread.js +1 -1
- package/dist/console/runtime/client/content-heads.js +1 -1
- package/dist/console/runtime/client/documents.d.ts +1 -1
- package/dist/console/runtime/client/documents.js +1 -1
- package/dist/console/runtime/client/invocation.js +1 -1
- package/dist/console/runtime/client/live.d.ts +1 -1
- package/dist/console/runtime/client/mcp-client.d.ts +4 -4
- package/dist/console/runtime/client/mcp-client.js +4 -6
- package/dist/console/runtime/client/media-library.js +1 -1
- package/dist/console/runtime/client/media-uploads.js +1 -1
- package/dist/console/runtime/client/operation-view.js +1 -1
- package/dist/console/runtime/client/presence.d.ts +1 -1
- package/dist/console/runtime/client/problem.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 +1 -1
- package/dist/console/runtime/client/publish.d.ts +1 -1
- package/dist/console/runtime/client/rate-limit.js +1 -1
- 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.d.ts +2 -2
- package/dist/console/runtime/client/request.js +1 -1
- package/dist/console/runtime/client/schedule-run.js +1 -1
- package/dist/console/runtime/client/sections.d.ts +1 -1
- package/dist/console/runtime/client/sections.js +1 -1
- package/dist/console/runtime/client/site-access.d.ts +48 -9
- package/dist/console/runtime/client/site-access.js +18 -11
- package/dist/console/runtime/client/site-link.d.ts +2 -0
- package/dist/console/runtime/client/site-link.js +1 -0
- package/dist/console/runtime/client/workflow.js +1 -1
- package/dist/console/runtime/components/console-auth-detail.vue +1 -1
- package/dist/console/runtime/components/console-auth-event-list.vue +1 -0
- package/dist/console/runtime/components/console-document-editor.vue +3 -4
- package/dist/console/runtime/components/console-usage.vue +2 -2
- package/dist/console/runtime/diagnostics.ts +14 -56
- package/dist/console/runtime/mcp-client.d.ts +2 -2
- package/dist/console/runtime/mcp-client.js +1 -1
- package/dist/console/runtime/operation-loader.d.ts +1 -0
- package/dist/console/runtime/operation-loader.js +10 -0
- package/dist/console/runtime/page-tool/page-tool.js +2 -2
- package/dist/console/runtime/sections.d.ts +2 -2
- package/dist/console/runtime/sections.js +1 -1
- package/dist/console/runtime/server/access-policy.d.ts +1 -1
- package/dist/console/runtime/server/agent-console.d.ts +2 -0
- package/dist/console/runtime/server/agent-console.js +1 -0
- package/dist/console/runtime/server/blob.d.ts +1 -1
- package/dist/console/runtime/server/blob.js +1 -1
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/definitions.get.d.ts +2 -2
- package/dist/console/runtime/server/definitions.get.js +2 -2
- package/dist/console/runtime/server/definitions.js +1 -1
- package/dist/console/runtime/server/documents.d.ts +2 -2
- package/dist/console/runtime/server/documents.js +2 -2
- package/dist/console/runtime/server/entry-site-access.d.ts +3 -0
- package/dist/console/runtime/server/entry-site-access.js +4 -0
- package/dist/console/runtime/server/entry.d.ts +3 -0
- package/dist/console/runtime/server/entry.js +4 -0
- 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/pill.d.ts +45 -0
- package/dist/console/runtime/server/pill.js +62 -0
- package/dist/console/runtime/server/rpc.d.ts +5 -8
- package/dist/console/runtime/server/rpc.js +13 -20
- package/dist/console/runtime/server/runtime.d.ts +1 -1
- package/dist/console/runtime/server/runtime.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 +4 -4
- package/dist/console/runtime/server/sections.js +3 -3
- package/dist/console/runtime/server/setup.d.ts +4 -4
- package/dist/console/runtime/server/setup.js +3 -3
- package/dist/console/runtime/server/site-access-operation.d.ts +7 -0
- package/dist/console/runtime/server/site-access-operation.js +36 -0
- package/dist/console/runtime/server/site-actions.d.ts +73 -0
- package/dist/console/runtime/server/site-actions.js +105 -0
- package/dist/console/runtime/server/site-entry.d.ts +16 -7
- package/dist/console/runtime/server/site-entry.js +59 -42
- package/dist/console/runtime/server/site-visitor.d.ts +17 -0
- package/dist/console/runtime/server/site-visitor.js +1 -0
- package/dist/console/runtime/server/site.d.ts +27 -0
- package/dist/console/runtime/server/site.js +1 -0
- package/dist/console/server.d.ts +7 -19
- package/dist/console/server.js +6 -6
- package/dist/console-signature--55DIKf2.js +237 -0
- package/dist/content/console/operations.d.ts +3 -0
- package/dist/content/console/operations.js +62 -0
- package/dist/{console/runtime/server → database/console}/database.get.d.ts +1 -1
- package/dist/{console/runtime/server → database/console}/database.get.js +4 -4
- package/dist/database/console/operations.d.ts +3 -0
- package/dist/database/console/operations.js +49 -0
- package/dist/{database-CPjZ3L0g.d.ts → database-yFezh5U1.d.ts} +1 -1
- package/dist/{definitions-M7i2p8SR.js → definitions-DGo2rNQ9.js} +1 -1
- package/dist/{dev-peer-DBq-isgi.js → dev-peer-CRYp01PE.js} +1 -219
- package/dist/dev-peer-CX5C9243.js +1 -0
- package/dist/{diagnostics-B2cqlCSz.js → diagnostics-DLHqjKGe.js} +2 -8
- package/dist/diagnostics-DgGKvWzF.d.ts +7 -0
- package/dist/doctor.js +2 -2
- package/dist/{documents-LtkKCxtu.d.ts → documents-A-7Ho0g0.d.ts} +11 -11
- package/dist/{documents-Ck_iub9w.js → documents-BduuZjm3.js} +3 -2
- package/dist/{documents-DxK0tdjA.d.ts → documents-CApMRd4o.d.ts} +2 -3
- package/dist/{documents-BOYwZ5g4.js → documents-D6ueeoUR.js} +12 -15
- package/dist/durability/operations.js +1 -1
- package/dist/{console/runtime/server → env/console}/env.get.d.ts +2 -2
- package/dist/{console/runtime/server → env/console}/env.get.js +7 -7
- package/dist/env/console/operations.d.ts +3 -0
- package/dist/env/console/operations.js +12 -0
- package/dist/env/vite.d.ts +1 -0
- package/dist/env/vite.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{internal-CKocv79I.d.ts → internal-BRNf11h3.d.ts} +14 -4
- package/dist/{invocation-page-undo-BEi-rO0Q.js → invocation-page-undo-DHbXczWY.js} +6 -4
- package/dist/invocations-B60XWNES.js +45 -0
- package/dist/{console/runtime/server → logs/console}/logs.get.d.ts +3 -3
- package/dist/{console/runtime/server → logs/console}/logs.get.js +7 -7
- package/dist/logs/console/operations.d.ts +3 -0
- package/dist/logs/console/operations.js +23 -0
- package/dist/loopback-Bl9Cvj1k.js +139 -0
- package/dist/mcp/eval.d.ts +1 -0
- package/dist/mcp/eval.js +2 -0
- package/dist/{mcp-client-Q2XbUXuP.d.ts → mcp-client-uXVvS7RL.d.ts} +4 -6
- package/dist/{media-CAKz9yrp.js → media-CNwnh6CG.js} +5 -5
- package/dist/{media-library-BDX89xXA.js → media-library-DTC8TLsZ.js} +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.js +108 -68
- package/dist/{operation-contributions-D10pjkJF.js → operation-contributions-BU10k2QS.js} +7 -6
- package/dist/{operation-contributions-BCcQVlGb.d.ts → operation-contributions-xwjDzj28.d.ts} +5 -4
- package/dist/{operation-definition-DTpNvLd8.js → operation-definition-D04Rdjbe.js} +2 -1
- package/dist/operation-modules-BUXlwjvd.js +1 -0
- package/dist/operation-modules-DHWkPcfS.js +139 -0
- package/dist/operations-D-7ljPqw.js +1 -0
- package/dist/{operations-CD_mu_Ww.js → operations-DksTrRMb.js} +1 -1
- package/dist/operations-byxiZ2R2.js +113 -0
- package/dist/{optional-owners-DAfShdgV.js → optional-owners-Cypch7V3.js} +0 -1
- package/dist/page-tools-BeZrtn4S.js +46 -0
- package/dist/page-tools-Chk8Gm9x.d.ts +23 -0
- package/dist/page-tools-shared-BLPidmCi.js +39 -0
- package/dist/{plugins-BpiTVULl.d.ts → plugins-BmkOoyIh.d.ts} +22 -9
- package/dist/{plugins-H6-MQrsn.js → plugins-DfXcUnzN.js} +248 -310
- package/dist/{project-DKBIHOf4.d.ts → project-B2qWt8on.d.ts} +2 -7
- package/dist/{project-BxyyclTE.js → project-_juMSuAS.js} +5 -7
- package/dist/{project-link-CeS0T8Pr.js → project-link-CJbCkOlC.js} +3 -3
- package/dist/{project-link-isfdRO3Q.d.ts → project-link-Ck3vuq9w.d.ts} +1 -1
- package/dist/{project-session--GN7MduT.js → project-session-8pN7pRo8.js} +4 -4
- package/dist/{request-CQ8TkHLh.js → request-D769eiBL.js} +2 -2
- package/dist/{request-BC_krbEr.d.ts → request-DYmjLTqP.d.ts} +1 -1
- package/dist/{request-CJCPyu2B.d.ts → request-DkoE0b2h.d.ts} +10 -2
- package/dist/{request-Cl68STwT.js → request-XFVx7CGC.js} +24 -2
- package/dist/routes-D02vxUSg.js +26 -0
- package/dist/{runtime-CyPZMiyK.js → runtime-DA7HJe10.js} +1 -1
- package/dist/{runtime-Cf8R1Ztr.d.ts → runtime-DGvimtvc.d.ts} +1 -1
- package/dist/{runtime-feature-guard-DpUn4Oxc.js → runtime-feature-guard-BKAMRZzM.js} +1 -1
- package/dist/search-jgMrZJXR.js +84 -0
- package/dist/{sections-BiCOk9qP.js → sections-AUGy9EkY.js} +1 -6
- package/dist/{sections-BTfWK14a.d.ts → sections-BMkFB3S-.d.ts} +1 -1
- package/dist/{sections-0qrBvGbf.d.ts → sections-DCoCa4nF.d.ts} +1 -4
- package/dist/{sections-DAtgYMVz.d.ts → sections-DjeAUX7o.d.ts} +4 -4
- package/dist/{sections-HLxb9MrG.js → sections-ZFAlI4JW.js} +2 -2
- package/dist/{sections.get-CGmtYmfu.d.ts → sections.get-BY5dClJY.d.ts} +1 -1
- package/dist/{setup-Ca7jtBLS.d.ts → setup-BBnZPziq.d.ts} +4 -7
- package/dist/{setup-DQz_i-ee.js → setup-yc3_WKNG.js} +1 -13
- package/dist/site-CZCIWsUQ.js +169 -0
- package/dist/site-link-Bvo2SxPo.js +58 -0
- package/dist/site-link-Dtw8MNVB.d.ts +18 -0
- package/dist/site-pages-B6J8U2Nq.js +66 -0
- package/dist/site-token-Wa7fhjwg.js +215 -0
- package/dist/site-visitor-BkhE2TA0.js +89 -0
- package/dist/skills/operations.js +2 -2
- package/dist/{skills.get-DAooGWy5.js → skills.get-CW8vc_Hf.js} +3 -3
- package/dist/task/operations.js +1 -1
- package/dist/usage-DBi7aOhx.js +33 -0
- package/dist/{version-CAhBr673.js → version-DUCd7Orc.js} +11 -5
- package/dist/workspace/console/operations.d.ts +3 -0
- package/dist/workspace/console/operations.js +22 -0
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.d.ts +3 -3
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.js +4 -4
- package/package.json +91 -82
- package/dist/auth-CeKxL2xp.d.ts +0 -116
- package/dist/cloudflare-env-lookup-DcN7pGlv.js +0 -15
- package/dist/console/runtime/client/ticket.d.ts +0 -2
- package/dist/console/runtime/client/ticket.js +0 -1
- package/dist/console/runtime/page/loader.js +0 -135
- package/dist/console/runtime/server/auth.d.ts +0 -2
- package/dist/console/runtime/server/mcp-client-operations.d.ts +0 -3
- package/dist/console/runtime/server/mcp-client-operations.js +0 -137
- package/dist/console/runtime/server/page-auth.d.ts +0 -16
- package/dist/console/runtime/server/page-auth.js +0 -43
- package/dist/console/runtime/server/page-tool.d.ts +0 -2
- package/dist/console/runtime/server/page-tool.js +0 -110
- package/dist/console/runtime/server/page-tools-route.d.ts +0 -2
- package/dist/console/runtime/server/page-tools-route.js +0 -4
- package/dist/console/runtime/server/search.get.d.ts +0 -2
- package/dist/console/runtime/server/search.get.js +0 -95
- package/dist/console/runtime/server/site-session.d.ts +0 -79
- package/dist/console/runtime/server/site-session.js +0 -1
- package/dist/console/runtime/server/tickets.d.ts +0 -2
- package/dist/console/runtime/server/tickets.js +0 -1
- package/dist/console/runtime/server/usage.get.js +0 -91
- package/dist/console/runtime/site-access.d.ts +0 -2
- package/dist/console/runtime/site-access.js +0 -1
- package/dist/diagnostics-BXxPggRw.d.ts +0 -9
- package/dist/invocations-8NThe8Bx.js +0 -85
- package/dist/mcp-client-Bkh-khvr.js +0 -9
- package/dist/mcp-client-DiObFpDS.js +0 -1037
- package/dist/operations-D7ENc68Y.js +0 -1
- package/dist/operations-vRLiH7dh.js +0 -852
- package/dist/page-tool-BUnUbuSy.d.ts +0 -67
- package/dist/page-tools-BQzwuAHD.js +0 -460
- package/dist/page-tools-UwsfvH-B.d.ts +0 -21
- package/dist/page-tools-shared-hJcG_xk8.js +0 -125
- package/dist/secret-D2KL_o2h.js +0 -43
- package/dist/site-access-1JIQjY11.js +0 -292
- package/dist/site-access-CUXIbbbR.d.ts +0 -53
- package/dist/site-access-CmaZ-oaL.js +0 -17
- package/dist/site-access-Cvmjb6aw.js +0 -1
- package/dist/site-session-D36fr7Wf.js +0 -297
- package/dist/skills/vitehub/SKILL.md +0 -142
- package/dist/skills/vitehub/agents/openai.yaml +0 -4
- package/dist/skills/vitehub/references/agent-definitions.md +0 -36
- package/dist/skills/vitehub/references/bundle.md +0 -57
- package/dist/skills/vitehub/references/capabilities-authority.md +0 -30
- package/dist/skills/vitehub/references/channels-triggers.md +0 -27
- package/dist/skills/vitehub/references/framework-composition.md +0 -29
- package/dist/skills/vitehub/references/preview-contract.md +0 -44
- package/dist/skills/vitehub/references/primitives/auth.md +0 -14
- package/dist/skills/vitehub/references/primitives/blob.md +0 -13
- package/dist/skills/vitehub/references/primitives/browser.md +0 -17
- package/dist/skills/vitehub/references/primitives/cache.md +0 -13
- package/dist/skills/vitehub/references/primitives/channels.md +0 -11
- package/dist/skills/vitehub/references/primitives/connections.md +0 -14
- package/dist/skills/vitehub/references/primitives/content.md +0 -13
- package/dist/skills/vitehub/references/primitives/database.md +0 -15
- package/dist/skills/vitehub/references/primitives/email.md +0 -11
- package/dist/skills/vitehub/references/primitives/env.md +0 -13
- package/dist/skills/vitehub/references/primitives/kv.md +0 -13
- package/dist/skills/vitehub/references/primitives/markdown-template.md +0 -13
- package/dist/skills/vitehub/references/primitives/queue.md +0 -14
- package/dist/skills/vitehub/references/primitives/rate-limit.md +0 -11
- package/dist/skills/vitehub/references/primitives/realtime.md +0 -19
- package/dist/skills/vitehub/references/primitives/sandbox-task.md +0 -11
- package/dist/skills/vitehub/references/primitives/sandbox.md +0 -13
- package/dist/skills/vitehub/references/primitives/schedule.md +0 -11
- package/dist/skills/vitehub/references/primitives/shell.md +0 -11
- package/dist/skills/vitehub/references/primitives/source.md +0 -11
- package/dist/skills/vitehub/references/primitives/workflow.md +0 -11
- package/dist/skills/vitehub/references/primitives/workspace.md +0 -11
- package/dist/skills/vitehub/references/project-patterns.md +0 -19
- package/dist/skills/vitehub/references/project-shapes.md +0 -81
- package/dist/skills/vitehub/references/proof-recovery.md +0 -31
- package/dist/skills/vitehub/references/sandboxes-hosts.md +0 -26
- package/dist/skills/vitehub/references/schedules-workflows-invocations.md +0 -28
- package/dist/skills/vitehub/references/server-primitives.md +0 -39
- package/dist/skills/vitehub/references/workspaces-sources-access.md +0 -26
- package/dist/ticket-BFWwevWN.d.ts +0 -12
- package/dist/ticket-BwsnryuU.js +0 -30
- package/dist/tickets-Cj9_y3gw.js +0 -356
- package/dist/usage-BduF04ks.d.ts +0 -20
- package/dist/usage-ZV3TBMzE.js +0 -570
- package/dist/usage-index-CR_xTrXO.js +0 -334
- /package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.d.ts +0 -0
- /package/dist/{console/runtime/server → agent/console}/invocations.get.d.ts +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/index.json +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/SKILL.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/agents/openai.yaml +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/agent-definitions.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/bundle.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/capabilities-authority.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/channels-triggers.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/framework-composition.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/preview-contract.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/auth.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/blob.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/browser.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/cache.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/channels.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/connections.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/content.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/database.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/email.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/env.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/kv.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/markdown-template.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/queue.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/rate-limit.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/realtime.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox-task.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/schedule.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/shell.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/source.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workflow.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workspace.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-patterns.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-shapes.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/proof-recovery.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/sandboxes-hosts.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/schedules-workflows-invocations.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/server-primitives.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/workspaces-sources-access.md +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Diagnostic } from "nostics";
|
|
2
|
+
/** What the Console offers as the next step for a failure. */
|
|
3
|
+
type ConsoleDiagnosticAction = "docs" | "reload" | "retry" | "sign-in";
|
|
4
|
+
type ConsoleDiagnosticData = {
|
|
5
|
+
readonly action: ConsoleDiagnosticAction;
|
|
6
|
+
};
|
|
7
|
+
export { ConsoleDiagnosticData as n, ConsoleDiagnosticAction as t };
|
package/dist/doctor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as viteHubServerImportSources } from "./nuxt-server-imports-BdJqiVhT.js";
|
|
2
|
-
import { i as importOptionalOwner } from "./optional-owners-
|
|
3
|
-
import { a as exports, i as dependencies, o as peerDependencies, r as removedViteHubOptions, t as readViteHubVersion } from "./version-
|
|
2
|
+
import { i as importOptionalOwner } from "./optional-owners-Cypch7V3.js";
|
|
3
|
+
import { a as exports, i as dependencies, o as peerDependencies, r as removedViteHubOptions, t as readViteHubVersion } from "./version-DUCd7Orc.js";
|
|
4
4
|
import { basename, dirname, join, posix, relative, resolve } from "node:path";
|
|
5
5
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
6
6
|
import * as v from "valibot";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ConsoleAccessRoute, t as ConsoleAccess } from "./access-DkBck8Vu.js";
|
|
2
2
|
import { a as ConsoleDocumentCollection, c as ConsoleDocumentSetup } from "./definitions-ChvMnA1L.js";
|
|
3
|
-
import { t as ConsoleRequestEvent } from "./request-
|
|
4
|
-
import { s as ConsoleTicket } from "./auth-CeKxL2xp.js";
|
|
3
|
+
import { t as ConsoleRequestEvent } from "./request-DYmjLTqP.js";
|
|
5
4
|
/** Bodies carry a whole Markdown document, so they may exceed the ordinary Console request limit. */
|
|
6
5
|
declare const maximumConsoleDocumentRequestBytes: number;
|
|
7
6
|
/** The document actions that one Console request may call. It mirrors `ViteHubConsoleDocumentActionName`. */
|
|
@@ -30,7 +29,7 @@ interface ConsoleMediaAccess {
|
|
|
30
29
|
}
|
|
31
30
|
/** Loads the owner actions of each document editor section on first use. */
|
|
32
31
|
type ConsoleDocumentEditors = Readonly<Record<string, () => Promise<ConsoleDocumentActions>>>;
|
|
33
|
-
/** What the generated Console
|
|
32
|
+
/** What the generated Console app module installs for one document editor section. */
|
|
34
33
|
interface ConsoleDocumentEditorInstall {
|
|
35
34
|
/** Owner factory that turns the application module into actions. */
|
|
36
35
|
actions: (module: Record<string, unknown>) => ConsoleDocumentActions;
|
|
@@ -67,17 +66,18 @@ declare function consoleDocumentsHandler(event: ConsoleRequestEvent, access: Con
|
|
|
67
66
|
/** Runs one owner document action. The section comes from the request and must be in the access scope. */
|
|
68
67
|
declare const guardedHandler: ConsoleAccessRoute<typeof consoleDocumentsHandler>;
|
|
69
68
|
/**
|
|
70
|
-
* `documents.preview`:
|
|
71
|
-
*
|
|
72
|
-
* owner `preview` action as the person again.
|
|
69
|
+
* `documents.preview`: check that the person may read the document and answer the app path of its page. The owner `get`
|
|
70
|
+
* action gives the page URL, which must be a page of the app. The Console calls it as the member before it signs a
|
|
71
|
+
* `preview` Site access token, and the app's `/_vitehub/site` runs the owner `preview` action as the person again.
|
|
73
72
|
*/
|
|
74
|
-
declare function
|
|
73
|
+
declare function checkConsoleDocumentPreview(context: {
|
|
75
74
|
access: ConsoleAccess;
|
|
76
75
|
request?: Request;
|
|
77
|
-
event?: unknown;
|
|
78
76
|
}, input: {
|
|
79
77
|
collection: string;
|
|
80
78
|
id: string;
|
|
81
79
|
section: string;
|
|
82
|
-
}): Promise<
|
|
83
|
-
|
|
80
|
+
}): Promise<{
|
|
81
|
+
path: string;
|
|
82
|
+
}>;
|
|
83
|
+
export { ConsoleDocumentEditors as a, consoleActionError as c, installConsoleDocuments as d, loadConsoleDocumentActions as f, maximumConsoleDocumentRequestBytes as g, consoleDocumentActionNames as h, ConsoleDocumentEditorInstall as i, consoleDocumentActionContext as l, runConsoleDocumentAction as m, ConsoleDocumentActionName as n, ConsoleMediaAccess as o, readConsoleDocumentSection as p, ConsoleDocumentActions as r, checkConsoleDocumentPreview as s, ConsoleDocumentActionContext as t, guardedHandler as u };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ConsoleRequestError, u as requestConsole } from "./request-XFVx7CGC.js";
|
|
2
2
|
import { t as consoleQueryText } from "./route-query-BWVl6ZO6.js";
|
|
3
3
|
import { p as dayLabel } from "./format-Df-bS4Ly.js";
|
|
4
|
+
import { n as openSiteAction } from "./site-link-Bvo2SxPo.js";
|
|
4
5
|
// src/console/runtime/client/documents.ts
|
|
5
6
|
const consoleDocumentStates = [
|
|
6
7
|
"draft",
|
|
@@ -61,7 +62,7 @@ function createConsoleDocumentsClient(base, section, locale) {
|
|
|
61
62
|
collection,
|
|
62
63
|
id
|
|
63
64
|
}),
|
|
64
|
-
|
|
65
|
+
openPreview: (collection, id) => openSiteAction("preview", {
|
|
65
66
|
collection,
|
|
66
67
|
id,
|
|
67
68
|
section
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { a as ConsoleDocumentCollection, c as ConsoleDocumentSetup } from "./definitions-ChvMnA1L.js";
|
|
2
2
|
import { t as ConsoleFieldIssue } from "./schema-form-Bl79Bdm-.js";
|
|
3
|
-
import { t as ConsoleTicketLink } from "./ticket-BFWwevWN.js";
|
|
4
3
|
type ConsoleDocumentState = "draft" | "published" | "changed" | "deleted";
|
|
5
4
|
declare const consoleDocumentStates: readonly ConsoleDocumentState[];
|
|
6
5
|
/** `overdue`: past its time without a run. `failed`: a draft changed after scheduling, so nothing was published. */
|
|
@@ -256,8 +255,8 @@ interface ConsoleDocumentsClient {
|
|
|
256
255
|
}): Promise<ConsoleDocumentSearchResult[]>;
|
|
257
256
|
/** A short token for the side browser: the page renders the posted documents in place of their drafts. */
|
|
258
257
|
preview(collection: string, id: string): Promise<ConsoleDocumentPreview>;
|
|
259
|
-
/**
|
|
260
|
-
|
|
258
|
+
/** Opens the page of the document with its saved draft on the app origin, in a new browser tab. */
|
|
259
|
+
openPreview(collection: string, id: string): Promise<void>;
|
|
261
260
|
/** Publishes exactly these drafts. A draft saved after review fails with a conflict and nothing is published. */
|
|
262
261
|
publish(collection: string, expect: readonly ConsoleDocumentPublishExpectation[]): Promise<ConsoleDocumentPublished>;
|
|
263
262
|
/** Reads the stored file on the draft, or at an earlier revision, without validating it. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { r as operationRpcPath } from "./operation-rpc-BMdfapja.js";
|
|
1
2
|
import { n as consoleState } from "./internal-0C_CC601.js";
|
|
2
|
-
import { h as withConsoleAccess, p as readConsoleAccessUser } from "./access-
|
|
3
|
-
import { a as
|
|
3
|
+
import { h as withConsoleAccess, p as readConsoleAccessUser } from "./access-CUFHPi8T.js";
|
|
4
|
+
import { a as consoleRequestURL, i as consoleRequestJSON, r as consoleRequestError, t as assertConsoleRequest } from "./request-D769eiBL.js";
|
|
4
5
|
import { r as getConsoleSections } from "./sections-BNTdIEJw.js";
|
|
5
6
|
import { a as parseConsoleDocumentSetup } from "./definitions-BFYqXchw.js";
|
|
6
7
|
import { i as maximumConsoleDocumentRequestBytes, n as consoleDocumentActionNames } from "./limits-BLo31qDR.js";
|
|
@@ -108,11 +109,11 @@ async function consoleDocumentsHandler(event, access) {
|
|
|
108
109
|
/** Runs one owner document action. The section comes from the request and must be in the access scope. */
|
|
109
110
|
const guardedHandler = withConsoleAccess(consoleDocumentsHandler, { section: (event) => consoleRequestURL(event).searchParams.get("section") ?? void 0 });
|
|
110
111
|
/**
|
|
111
|
-
* `documents.preview`:
|
|
112
|
-
*
|
|
113
|
-
* owner `preview` action as the person again.
|
|
112
|
+
* `documents.preview`: check that the person may read the document and answer the app path of its page. The owner `get`
|
|
113
|
+
* action gives the page URL, which must be a page of the app. The Console calls it as the member before it signs a
|
|
114
|
+
* `preview` Site access token, and the app's `/_vitehub/site` runs the owner `preview` action as the person again.
|
|
114
115
|
*/
|
|
115
|
-
async function
|
|
116
|
+
async function checkConsoleDocumentPreview(context, input) {
|
|
116
117
|
const actions = await loadConsoleDocumentActions(input.section);
|
|
117
118
|
const user = await consoleDocumentActionContext(context.access);
|
|
118
119
|
const document = await runConsoleDocumentAction(() => actions.get({
|
|
@@ -123,13 +124,9 @@ async function issueConsoleDocumentPreview(context, input) {
|
|
|
123
124
|
const url = Reflect.get(Object(document), "url");
|
|
124
125
|
if (String(url) !== url || !url) throw consoleRequestError(409, "The document has no page. Set url on its collection to preview its pages.");
|
|
125
126
|
const page = new URL(url, "http://vitehub.invalid");
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
id: input.id,
|
|
131
|
-
path: `${page.pathname}${page.search}`,
|
|
132
|
-
section: input.section
|
|
133
|
-
});
|
|
127
|
+
const rpc = context.request ? new URL(context.request.url) : void 0;
|
|
128
|
+
if (page.origin !== "http://vitehub.invalid" && page.origin !== rpc?.origin) throw consoleRequestError(409, "The page URL of the document is not on this app.");
|
|
129
|
+
const base = rpc?.pathname.endsWith("/_vitehub/rpc") ? rpc.pathname.slice(0, -operationRpcPath.length) : "";
|
|
130
|
+
return { path: `${base && (page.pathname === base || page.pathname.startsWith(`${base}/`)) ? page.pathname.slice(base.length) || "/" : page.pathname}${page.search}` };
|
|
134
131
|
}
|
|
135
|
-
export {
|
|
132
|
+
export { installConsoleDocuments as a, runConsoleDocumentAction as c, guardedHandler as i, consoleActionError as n, loadConsoleDocumentActions as o, consoleDocumentActionContext as r, readConsoleDocumentSection as s, checkConsoleDocumentPreview as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as defineOperation } from "../operation-definition-
|
|
1
|
+
import { t as defineOperation } from "../operation-definition-D04Rdjbe.js";
|
|
2
2
|
import { t as viteHubErrorDiagnostics } from "../error-diagnostics-CBtvqI30.js";
|
|
3
3
|
import * as v from "valibot";
|
|
4
4
|
import { formatDurabilityTable, getDurabilityReport } from "@vite-hub/runtime/durability";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as ConsoleRequestEvent } from "
|
|
1
|
+
import { n as ConsoleAccessRoute } from "../../access-DkBck8Vu.js";
|
|
2
|
+
import { t as ConsoleRequestEvent } from "../../request-DYmjLTqP.js";
|
|
3
3
|
import { ServerEnvDescription } from "@vite-hub/env";
|
|
4
4
|
/** Returns declaration metadata. The `env.inspect` operation of Env returns the status of each value. */
|
|
5
5
|
declare function consoleEnvHandler(event: ConsoleRequestEvent): Promise<ServerEnvDescription>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h as withConsoleAccess } from "
|
|
2
|
-
import { t as assertConsoleRequest } from "
|
|
3
|
-
import { t as consoleHttpError } from "
|
|
4
|
-
import { r as getConsoleSections } from "
|
|
5
|
-
import { t as viteHubErrorDiagnostics } from "
|
|
6
|
-
import { t as getConsoleEnv } from "
|
|
7
|
-
// src/console/
|
|
1
|
+
import { h as withConsoleAccess } from "../../access-CUFHPi8T.js";
|
|
2
|
+
import { t as assertConsoleRequest } from "../../request-D769eiBL.js";
|
|
3
|
+
import { t as consoleHttpError } from "../../http-error-BorAxJYM.js";
|
|
4
|
+
import { r as getConsoleSections } from "../../sections-BNTdIEJw.js";
|
|
5
|
+
import { t as viteHubErrorDiagnostics } from "../../error-diagnostics-CBtvqI30.js";
|
|
6
|
+
import { t as getConsoleEnv } from "../../env-D-wtSupz.js";
|
|
7
|
+
// src/env/console/env.get.ts
|
|
8
8
|
/** Returns declaration metadata. The `env.inspect` operation of Env returns the status of each value. */
|
|
9
9
|
async function consoleEnvHandler(event) {
|
|
10
10
|
assertConsoleRequest(event);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a as legacyEvent, i as defineConsoleOperation } from "../../operations-byxiZ2R2.js";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
/** The Console operation of the Env section that `vite-hub` owns. `@vite-hub/env` contributes the others. */
|
|
4
|
+
const envConsoleOperations = [defineConsoleOperation({
|
|
5
|
+
description: "Read the Server Env declarations. `env.inspect` reads the status of their values.",
|
|
6
|
+
input: v.strictObject({}),
|
|
7
|
+
kind: "read",
|
|
8
|
+
name: "env.get",
|
|
9
|
+
run: async (_input, context) => (await import("./env.get.js")).default(legacyEvent("env", "GET", {}, context)),
|
|
10
|
+
section: "env"
|
|
11
|
+
})];
|
|
12
|
+
export { envConsoleOperations };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@vite-hub/env/vite";
|
package/dist/env/vite.js
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@vite-hub/env/vite";
|
|
2
|
-
import { A as RedirectsOptions, B as ViteHubHost, C as ObservabilityEvlogOptions, D as AgentInvocationsDefault, E as ConsoleOptions, F as DeployOptions, I as HealthOptions, M as SecurityHeaders, N as SecurityOptions, O as AgentInvocationsDefaultJournal, P as SeoOptions, R as DatabaseOptions, S as LogsOptions, T as SystemdOptions, V as detectHost, _ as KVOptions, a as ViteHubDeviceOptions, b as BrowserOptions, c as ViteHubQueueOptions, d as WorkflowOptions, f as WebContainerOptions, g as RateLimitOptions, h as RealtimeOptions, i as EnvOptions, j as SameOriginWritesOptions, k as WorkspaceOptions, l as QueueOptions, m as SandboxTaskOptions, n as CloudflareOptions, o as ViteHubNodeOptions, p as ScheduleOptions, r as ConnectionsOptions, s as ViteHubOptions, t as AgentOptions, u as I18nOptions, v as EmailOptions, w as ObservabilityOptions, x as BlobOptions, y as ChannelsOptions, z as CacheOptions } from "./plugins-
|
|
2
|
+
import { A as RedirectsOptions, B as ViteHubHost, C as ObservabilityEvlogOptions, D as AgentInvocationsDefault, E as ConsoleOptions, F as DeployOptions, I as HealthOptions, M as SecurityHeaders, N as SecurityOptions, O as AgentInvocationsDefaultJournal, P as SeoOptions, R as DatabaseOptions, S as LogsOptions, T as SystemdOptions, V as detectHost, _ as KVOptions, a as ViteHubDeviceOptions, b as BrowserOptions, c as ViteHubQueueOptions, d as WorkflowOptions, f as WebContainerOptions, g as RateLimitOptions, h as RealtimeOptions, i as EnvOptions, j as SameOriginWritesOptions, k as WorkspaceOptions, l as QueueOptions, m as SandboxTaskOptions, n as CloudflareOptions, o as ViteHubNodeOptions, p as ScheduleOptions, r as ConnectionsOptions, s as ViteHubOptions, t as AgentOptions, u as I18nOptions, v as EmailOptions, w as ObservabilityOptions, x as BlobOptions, y as ChannelsOptions, z as CacheOptions } from "./plugins-BmkOoyIh.js";
|
|
3
3
|
import { PluginOption } from "vite";
|
|
4
4
|
declare global {
|
|
5
5
|
namespace ViteHub {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as startPackageChecks } from "./optional-owners-
|
|
1
|
+
import { dt as markIncludedNitroPlugin, pt as withShortInspect, r as viteHubPlugins, ut as isIncludedNitroPlugin } from "./plugins-DfXcUnzN.js";
|
|
2
|
+
import { u as startPackageChecks } from "./optional-owners-Cypch7V3.js";
|
|
3
3
|
import { n as detectHost } from "./deployment-CURATxjG.js";
|
|
4
4
|
import { nitro } from "nitro/vite";
|
|
5
5
|
// ../internal/src/build/included-nitro.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./documents-
|
|
3
|
-
import "./project-
|
|
1
|
+
import { t as ConsoleAccess } from "./access-DkBck8Vu.js";
|
|
2
|
+
import "./documents-A-7Ho0g0.js";
|
|
3
|
+
import "./project-B2qWt8on.js";
|
|
4
4
|
import { AgentInvocations } from "@vite-hub/agent";
|
|
5
5
|
import { BlobStorage, MediaRecord } from "@vite-hub/blob";
|
|
6
6
|
import { RuntimeDatabaseEntry } from "@vite-hub/database";
|
|
@@ -33,6 +33,14 @@ interface ConsoleMediaUploadInput {
|
|
|
33
33
|
}
|
|
34
34
|
/** Stores one uploaded file of the media library of a section. */
|
|
35
35
|
declare function uploadConsoleMedia(input: ConsoleMediaUploadInput, access: ConsoleAccess): Promise<ConsoleMediaUpload>;
|
|
36
|
+
declare global {
|
|
37
|
+
interface ImportMeta {
|
|
38
|
+
viteHubConsoleAgents?: boolean;
|
|
39
|
+
viteHubConsoleAuth?: boolean;
|
|
40
|
+
viteHubConsoleDevelopment?: boolean;
|
|
41
|
+
viteHubConsoleDocuments?: boolean;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
36
44
|
/** The Console reads each database with `db` and lists its tables from `schema`. A Definition is SQLite or Postgres. */
|
|
37
45
|
type ConsoleDatabaseEntry = Pick<RuntimeDatabaseEntry<Record<string, unknown>>, "db" | "schema"> | {
|
|
38
46
|
db: Omit<RuntimeDatabaseEntry<Record<string, unknown>, "postgresql">["db"], "$replica">;
|
|
@@ -52,4 +60,6 @@ interface ConsoleBlobInspection {
|
|
|
52
60
|
/** Loads the media library. Only builds with Blob install it, so other builds ship without it. */
|
|
53
61
|
media?: () => Promise<ConsoleMediaLibrary>;
|
|
54
62
|
}
|
|
55
|
-
|
|
63
|
+
/** Loads the Realtime of the Agent pages. */
|
|
64
|
+
type ConsoleAgentRealtimeLoader = () => Promise<Pick<typeof import("@vite-hub/realtime/agent"), "agentRealtime">>;
|
|
65
|
+
export { ConsoleMediaLibrary as a, ConsoleDatabaseInspection as i, ConsoleBlobInspection as n, ConsoleDatabaseEntry as r, ConsoleAgentRealtimeLoader as t };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { n as consoleState } from "./internal-0C_CC601.js";
|
|
1
2
|
import { t as consoleHttpError } from "./http-error-BorAxJYM.js";
|
|
2
|
-
import { t as getConsoleInvocations } from "./invocations-
|
|
3
|
+
import { t as getConsoleInvocations } from "./invocations-B60XWNES.js";
|
|
3
4
|
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-CBtvqI30.js";
|
|
4
5
|
import { invocationPageChanges } from "@vite-hub/agent";
|
|
5
|
-
// src/console/
|
|
6
|
+
// src/agent/console/invocation-page-undo.ts
|
|
6
7
|
function actionError(statusCode, message) {
|
|
7
8
|
return consoleHttpError(statusCode, viteHubErrorDiagnostics.VITE_HUB_R0046({ message }));
|
|
8
9
|
}
|
|
@@ -17,8 +18,9 @@ async function undoConsolePageChange(input, context) {
|
|
|
17
18
|
if (!record) throw consoleHttpError(404, viteHubErrorDiagnostics.VITE_HUB_R0054({ message: "Invocation not found" }));
|
|
18
19
|
const change = invocationPageChanges(record.observations).pageChanges.find((item) => item.id === input.change);
|
|
19
20
|
if (!change) throw actionError(404, `This Invocation has no page change ${JSON.stringify(input.change)}. Read the change ids with \`vitehub agent invocations get ${input.id}\`.`);
|
|
20
|
-
const
|
|
21
|
-
|
|
21
|
+
const loadRealtime = consoleState().agentRealtime;
|
|
22
|
+
const agentRealtime = loadRealtime ? (await loadRealtime()).agentRealtime : void 0;
|
|
23
|
+
if (!agentRealtime?.available()) throw actionError(409, "This app has no Realtime, so it cannot reach the page.");
|
|
22
24
|
const [error, answer] = await agentRealtime.request("agent-pages", change.page, {
|
|
23
25
|
method: "undo",
|
|
24
26
|
input: { change: change.id }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { i as resolveConsoleInvocations, n as consoleState } from "./internal-0C_CC601.js";
|
|
2
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-CBtvqI30.js";
|
|
3
|
+
import { createMemoryAgentInvocationStore, defineAgentInvocations } from "@vite-hub/agent/server";
|
|
4
|
+
import { defaultAgentInvocationsDatabase } from "@vite-hub/agent/internal/default-invocations-core";
|
|
5
|
+
import { resolveDefaultAgentInvocations } from "@vite-hub/agent/invocations/app";
|
|
6
|
+
// src/console/runtime/server/invocations.ts
|
|
7
|
+
function d1SqlClient(binding) {
|
|
8
|
+
return { async execute(statement) {
|
|
9
|
+
return { rows: (await binding.prepare(statement.sql).bind(...statement.args).all()).results ?? [] };
|
|
10
|
+
} };
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Usage of the default Agent journal, added up by its database in one statement. Undefined for other journals.
|
|
14
|
+
* It reads the journal tables and writes nothing.
|
|
15
|
+
*/
|
|
16
|
+
async function readConsoleJournalUsage(invocations, query, period) {
|
|
17
|
+
const database = defaultAgentInvocationsDatabase(invocations);
|
|
18
|
+
if (!database) return void 0;
|
|
19
|
+
const [{ readAgentUsage }, client] = await Promise.all([import("@vite-hub/agent/usage"), database.driver === "libsql" ? database.open() : database.open().then(d1SqlClient)]);
|
|
20
|
+
return await readAgentUsage(client, query, period);
|
|
21
|
+
}
|
|
22
|
+
function getConsoleInvocations() {
|
|
23
|
+
const invocations = resolveConsoleInvocations();
|
|
24
|
+
if (!invocations) throw viteHubErrorDiagnostics.VITE_HUB_R0063({ message: "[vitehub] This app has no Agent Invocation journal for the Console to read. The Console is off, or the app has no Agent Definition." });
|
|
25
|
+
return invocations;
|
|
26
|
+
}
|
|
27
|
+
const emptyJournals = /* @__PURE__ */ new WeakSet();
|
|
28
|
+
/**
|
|
29
|
+
* Registers the journal that the Console reads: `configuredInvocations`, else the app-wide Agent journal.
|
|
30
|
+
* The Console does not create a durable journal. With `agent.invocations: false`, it reads an empty memory journal.
|
|
31
|
+
* One server bundle serves one project, so the Console keeps one journal in its state, like its sections.
|
|
32
|
+
*/
|
|
33
|
+
function installConsoleInvocations(projectRoot, configuredInvocations) {
|
|
34
|
+
const state = consoleState();
|
|
35
|
+
const installed = state.invocations;
|
|
36
|
+
const target = configuredInvocations ?? resolveDefaultAgentInvocations();
|
|
37
|
+
if (installed && (target ? installed === target : emptyJournals.has(installed))) return installed;
|
|
38
|
+
let invocations = target;
|
|
39
|
+
if (!invocations) {
|
|
40
|
+
invocations = defineAgentInvocations({ store: createMemoryAgentInvocationStore() });
|
|
41
|
+
emptyJournals.add(invocations);
|
|
42
|
+
}
|
|
43
|
+
return state.invocations = invocations;
|
|
44
|
+
}
|
|
45
|
+
export { installConsoleInvocations as n, readConsoleJournalUsage as r, getConsoleInvocations as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ConsoleRoute, t as ConsoleRequestEvent } from "
|
|
3
|
-
import { o as LogSourceInfo, r as LogPage } from "
|
|
1
|
+
import { n as ConsoleAccessRoute } from "../../access-DkBck8Vu.js";
|
|
2
|
+
import { n as ConsoleRoute, t as ConsoleRequestEvent } from "../../request-DYmjLTqP.js";
|
|
3
|
+
import { o as LogSourceInfo, r as LogPage } from "../../source-DemBtwla.js";
|
|
4
4
|
export declare function consoleLogsHandler(event: ConsoleRequestEvent): Promise<{
|
|
5
5
|
source: LogSourceInfo;
|
|
6
6
|
page: LogPage;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as getLogSource } from "
|
|
2
|
-
import { a as logPageSchema, c as parseLogQuery, s as logSourceInfoSchema, t as isLogCursorExpiredError } from "
|
|
3
|
-
import { h as withConsoleAccess } from "
|
|
4
|
-
import {
|
|
5
|
-
import { t as consoleHttpError } from "
|
|
6
|
-
import { t as viteHubErrorDiagnostics } from "
|
|
1
|
+
import { t as getLogSource } from "../../host-DeNPYIeV.js";
|
|
2
|
+
import { a as logPageSchema, c as parseLogQuery, s as logSourceInfoSchema, t as isLogCursorExpiredError } from "../../source-DYFndd0W.js";
|
|
3
|
+
import { h as withConsoleAccess } from "../../access-CUFHPi8T.js";
|
|
4
|
+
import { a as consoleRequestURL, o as consoleRoute, t as assertConsoleRequest } from "../../request-D769eiBL.js";
|
|
5
|
+
import { t as consoleHttpError } from "../../http-error-BorAxJYM.js";
|
|
6
|
+
import { t as viteHubErrorDiagnostics } from "../../error-diagnostics-CBtvqI30.js";
|
|
7
7
|
import * as v from "valibot";
|
|
8
8
|
import { getStandardContext } from "@vite-hub/runtime/internal/h3";
|
|
9
|
-
// src/console/
|
|
9
|
+
// src/logs/console/logs.get.ts
|
|
10
10
|
/** A Logs failure that names its own code, which the route answers with. */
|
|
11
11
|
function isLogsDiagnostic(error) {
|
|
12
12
|
const code = error instanceof Error ? Reflect.get(error, "code") : void 0;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { a as legacyEvent, i as defineConsoleOperation, o as optionalCount, s as optionalText } from "../../operations-byxiZ2R2.js";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
/** The Console operation of the Logs section. The Console registers it only when the app has Logs. */
|
|
4
|
+
const logsConsoleOperations = [defineConsoleOperation({
|
|
5
|
+
description: "Read structured events from the connected log source.",
|
|
6
|
+
input: v.strictObject({
|
|
7
|
+
text: optionalText,
|
|
8
|
+
level: v.optional(v.picklist([
|
|
9
|
+
"debug",
|
|
10
|
+
"info",
|
|
11
|
+
"warn",
|
|
12
|
+
"error"
|
|
13
|
+
])),
|
|
14
|
+
service: optionalText,
|
|
15
|
+
cursor: optionalText,
|
|
16
|
+
limit: optionalCount
|
|
17
|
+
}),
|
|
18
|
+
kind: "read",
|
|
19
|
+
name: "logs.list",
|
|
20
|
+
run: async (input, context) => (await import("./logs.get.js")).readConsoleLogs(legacyEvent("logs", "GET", { query: input }, context)),
|
|
21
|
+
section: "logs"
|
|
22
|
+
})];
|
|
23
|
+
export { logsConsoleOperations };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { r as operationRpcPath } from "./operation-rpc-BMdfapja.js";
|
|
2
|
+
import { r as consoleDiagnosticBody, t as consoleDiagnostic } from "./diagnostics-DLHqjKGe.js";
|
|
3
|
+
import { l as verifyConsoleSignature, s as readConsolePublicKeys } from "./console-signature--55DIKf2.js";
|
|
4
|
+
import { i as isConsoleDevelopmentBuild } from "./development-DD567hhJ.js";
|
|
5
|
+
import { formatDiagnostic } from "nostics";
|
|
6
|
+
import { getStandardContext } from "@vite-hub/runtime/internal/h3";
|
|
7
|
+
import { resolvePublicUrl } from "@vite-hub/runtime";
|
|
8
|
+
// src/console/runtime/server/console-signature.ts
|
|
9
|
+
/** The `401` or `500` of a refused signature, with the Console diagnostic fields. */
|
|
10
|
+
function consoleSignatureRejection(status, code, message) {
|
|
11
|
+
return Response.json({
|
|
12
|
+
...consoleDiagnosticBody(code, message),
|
|
13
|
+
ok: false,
|
|
14
|
+
status
|
|
15
|
+
}, {
|
|
16
|
+
headers: {
|
|
17
|
+
"cache-control": "no-store",
|
|
18
|
+
...status === 401 ? { "www-authenticate": "VitehubSignature realm=\"vitehub-console\"" } : {},
|
|
19
|
+
"x-content-type-options": "nosniff",
|
|
20
|
+
"x-robots-tag": "noindex, nofollow"
|
|
21
|
+
},
|
|
22
|
+
status
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Print a setup failure of the app, such as a malformed `VITEHUB_CONSOLE_KEY_<NAME>`, in the server log, as an
|
|
27
|
+
* unhandled error prints. Only the caller gets the coded `500`, so without this line the host log shows nothing.
|
|
28
|
+
*/
|
|
29
|
+
function logSetupFailure(code, message) {
|
|
30
|
+
globalThis.console.error(formatDiagnostic(consoleDiagnostic(code, message)));
|
|
31
|
+
}
|
|
32
|
+
/** The host environment of this request: the Cloudflare `env`, then `process.env` for the names it does not set. */
|
|
33
|
+
function consoleRequestEnv(event) {
|
|
34
|
+
return {
|
|
35
|
+
...globalThis.process?.env,
|
|
36
|
+
...getStandardContext(event).runtime?.cloudflare?.env
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Whether the host env of this request has no `VITEHUB_CONSOLE_KEY_<NAME>` variable, so no signature can pass. A
|
|
41
|
+
* malformed key counts as a key: the check then answers `CONSOLE_KEY_MALFORMED`.
|
|
42
|
+
*/
|
|
43
|
+
function consoleKeysMissing(event) {
|
|
44
|
+
const keys = readConsolePublicKeys(consoleRequestEnv(event));
|
|
45
|
+
return !(keys instanceof Map) && keys.code === "CONSOLE_KEY_NOT_CONFIGURED";
|
|
46
|
+
}
|
|
47
|
+
/** Whether a path is the Console RPC route, below any application mount. */
|
|
48
|
+
function isConsoleRpcPath(pathname) {
|
|
49
|
+
const route = pathname.indexOf(operationRpcPath);
|
|
50
|
+
return route !== -1 && pathname.slice(route) === "/_vitehub/rpc";
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Check the signature of a request to an app with `console: true`, before its body is read. The public keys come from
|
|
54
|
+
* the `VITEHUB_CONSOLE_KEY_<NAME>` variables of the host env on each request, so a deploy or a Worker secret change
|
|
55
|
+
* takes effect without a build.
|
|
56
|
+
*
|
|
57
|
+
* The signed origin must be the origin of this app: `vitehub({ publicUrl })` when it is set, else the URL of the request
|
|
58
|
+
* as the host routed it. Node adapters build that URL from the caller's Host header, so they require a configured
|
|
59
|
+
* public URL. Forwarding headers never supply the deployment identity.
|
|
60
|
+
*
|
|
61
|
+
* A match carries the signed body digest. The RPC route compares it with the bytes that it reads before it runs a call.
|
|
62
|
+
* Signed requests reach only `POST /_vitehub/rpc`.
|
|
63
|
+
*/
|
|
64
|
+
async function checkConsoleSignature(request, event) {
|
|
65
|
+
const keys = readConsolePublicKeys(consoleRequestEnv(event));
|
|
66
|
+
if (!(keys instanceof Map)) {
|
|
67
|
+
logSetupFailure(keys.code, keys.message);
|
|
68
|
+
return {
|
|
69
|
+
ok: false,
|
|
70
|
+
response: consoleSignatureRejection(keys.status, keys.code, keys.message)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const url = new URL(request.url);
|
|
74
|
+
if (request.method !== "POST" || !isConsoleRpcPath(url.pathname)) return {
|
|
75
|
+
ok: false,
|
|
76
|
+
response: consoleSignatureRejection(401, "CONSOLE_SIGNATURE_INVALID", `Signed requests reach only POST ${operationRpcPath}.`)
|
|
77
|
+
};
|
|
78
|
+
const nodeRequest = "runtime" in request && typeof request.runtime === "object" && request.runtime !== null && "node" in request.runtime;
|
|
79
|
+
const origin = resolvePublicUrl({
|
|
80
|
+
configuredOnly: nodeRequest,
|
|
81
|
+
request
|
|
82
|
+
});
|
|
83
|
+
if (!origin) {
|
|
84
|
+
if (!request.headers.has("x-vitehub-signature")) return {
|
|
85
|
+
ok: false,
|
|
86
|
+
response: consoleSignatureRejection(401, "CONSOLE_SIGNATURE_MISSING", "This request is not signed.")
|
|
87
|
+
};
|
|
88
|
+
const message = "Signed requests on Node require vitehub({ publicUrl }) to identify this deployment. The request Host cannot supply its identity.";
|
|
89
|
+
logSetupFailure("CONSOLE_SIGNATURE_ORIGIN", message);
|
|
90
|
+
return {
|
|
91
|
+
ok: false,
|
|
92
|
+
response: consoleSignatureRejection(500, "CONSOLE_SIGNATURE_ORIGIN", message)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const verified = await verifyConsoleSignature({
|
|
96
|
+
headers: request.headers,
|
|
97
|
+
keys,
|
|
98
|
+
method: request.method,
|
|
99
|
+
origin,
|
|
100
|
+
url
|
|
101
|
+
});
|
|
102
|
+
if (!verified.ok) return {
|
|
103
|
+
ok: false,
|
|
104
|
+
response: consoleSignatureRejection(verified.status, verified.code, verified.message)
|
|
105
|
+
};
|
|
106
|
+
return verified;
|
|
107
|
+
}
|
|
108
|
+
// src/console/runtime/server/loopback.ts
|
|
109
|
+
const loopbackHosts = /* @__PURE__ */ new Set([
|
|
110
|
+
"localhost",
|
|
111
|
+
"127.0.0.1",
|
|
112
|
+
"[::1]",
|
|
113
|
+
"::1"
|
|
114
|
+
]);
|
|
115
|
+
function isLoopbackHost(host) {
|
|
116
|
+
if (!host) return false;
|
|
117
|
+
const name = (host.startsWith("[") ? host.slice(0, host.indexOf("]") + 1) : host.replace(/:\d+$/, "")).toLowerCase();
|
|
118
|
+
return loopbackHosts.has(name) || name.endsWith(".localhost");
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Whether a development Console without sign-in may serve this request. `vite dev` with no sign-in (the `local` or
|
|
122
|
+
* `open` access) trusts anyone who can reach it, so it serves only this machine: a tunnel or a LAN address with a
|
|
123
|
+
* forwarded Host would give the whole app to a stranger. Production builds and other access modes always pass.
|
|
124
|
+
*/
|
|
125
|
+
async function isConsoleLoopbackRequest(request, context) {
|
|
126
|
+
if (!isConsoleDevelopmentBuild()) return true;
|
|
127
|
+
const devPeer = await loadDevPeer();
|
|
128
|
+
if (!devPeer) return true;
|
|
129
|
+
devPeer.readViteHubDevPeerKey();
|
|
130
|
+
if (context.access !== "local" && context.access !== "open") return true;
|
|
131
|
+
const hostHeader = request.headers.get("host") ?? new URL(request.url).host;
|
|
132
|
+
const forwarded = request.headers.get("x-forwarded-host");
|
|
133
|
+
if (!isLoopbackHost(hostHeader) || forwarded && !isLoopbackHost(forwarded)) return false;
|
|
134
|
+
return devPeer.isViteHubLoopbackPeer(request, context.remoteAddress);
|
|
135
|
+
}
|
|
136
|
+
function loadDevPeer() {
|
|
137
|
+
return import.meta.viteHubConsoleDevelopment === false ? Promise.resolve(void 0) : import("./dev-peer-CX5C9243.js");
|
|
138
|
+
}
|
|
139
|
+
export { isConsoleRpcPath as a, consoleRequestEnv as i, checkConsoleSignature as n, consoleKeysMissing as r, isConsoleLoopbackRequest as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@vite-hub/mcp/eval";
|
package/dist/mcp/eval.js
ADDED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The MCP client section of the Console: an MCP client that runs on the
|
|
3
|
-
* HTTP as the person who signed in to the Console, and keeps each grant, token,
|
|
4
|
-
* browser gets only these descriptions.
|
|
2
|
+
* The MCP client section of the Console: an MCP client that runs on the ViteHub Console server, not in the app. It
|
|
3
|
+
* connects to MCP servers over Streamable HTTP as the person who signed in to the Console, and keeps each grant, token,
|
|
4
|
+
* and MCP session on the server. The browser gets only these descriptions.
|
|
5
5
|
*/
|
|
6
|
-
/** Path of the OAuth callback page under the Console mount. Authorization servers redirect the browser here. */
|
|
7
|
-
declare const consoleMcpCallbackPath = "/_vitehub/mcp-client/callback";
|
|
8
6
|
/**
|
|
9
7
|
* How a connection proves who it is:
|
|
10
8
|
* - `oauth`: the MCP authorization flow (RFC 9728 discovery, client registration, PKCE).
|
|
@@ -112,4 +110,4 @@ interface ConsoleMcpOutcome {
|
|
|
112
110
|
};
|
|
113
111
|
result?: Record<string, unknown>;
|
|
114
112
|
}
|
|
115
|
-
export { ConsoleMcpGrant as a, ConsoleMcpOutcome as c, ConsoleMcpServerInfo as d, ConsoleMcpStatus as f, ConsoleMcpConnection as i, ConsoleMcpOverview as l, ConsoleMcpCandidate as n, ConsoleMcpIdentity as o,
|
|
113
|
+
export { ConsoleMcpGrant as a, ConsoleMcpOutcome as c, ConsoleMcpServerInfo as d, ConsoleMcpStatus as f, ConsoleMcpConnection as i, ConsoleMcpOverview as l, ConsoleMcpCandidate as n, ConsoleMcpIdentity as o, ConsoleMcpConnectResult as r, ConsoleMcpListKind as s, ConsoleMcpAuth as t, ConsoleMcpPage as u };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as consoleAccessAllows } from "./access-
|
|
2
|
-
import { t as getConsoleBlob } from "./blob-
|
|
3
|
-
import { c as runConsoleDocumentAction, n as
|
|
4
|
-
import {
|
|
1
|
+
import { r as consoleAccessAllows } from "./access-CUFHPi8T.js";
|
|
2
|
+
import { t as getConsoleBlob } from "./blob-iw8pWQ6o.js";
|
|
3
|
+
import { c as runConsoleDocumentAction, n as consoleActionError, o as loadConsoleDocumentActions, r as consoleDocumentActionContext } from "./documents-D6ueeoUR.js";
|
|
4
|
+
import { r as consoleRequestError } from "./request-D769eiBL.js";
|
|
5
5
|
import { r as getConsoleSections } from "./sections-BNTdIEJw.js";
|
|
6
6
|
import { r as isRecordOrFunction } from "./object-DRSmpe04.js";
|
|
7
7
|
import { a as maximumConsoleMediaRequestBytes, o as maximumConsoleMediaUploadBytes } from "./limits-BLo31qDR.js";
|
|
8
|
-
// src/console/
|
|
8
|
+
// src/blob/console/media.ts
|
|
9
9
|
/** Largest JSON request of a media action, and largest file of one upload. */
|
|
10
10
|
/**
|
|
11
11
|
* The media library of a document editor section. Blob owns storage: every change runs through `blob.media` of the Blob
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as callOperationRpc, r as operationRpcPath } from "./operation-rpc-BMdfapja.js";
|
|
2
|
-
import { t as ConsoleRequestError, u as requestConsole } from "./request-
|
|
2
|
+
import { t as ConsoleRequestError, u as requestConsole } from "./request-XFVx7CGC.js";
|
|
3
3
|
import { a as projectRequest, s as resolveProjectUrl } from "./project-DRC67Uiu.js";
|
|
4
4
|
import { t as consoleRpcHeader } from "./rpc-D3tsx5lZ.js";
|
|
5
5
|
// src/console/runtime/client/media-library.ts
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as DatabaseNuxtIntegrationOptions, s as ViteHubOptions } from "./plugins-
|
|
1
|
+
import { L as DatabaseNuxtIntegrationOptions, s as ViteHubOptions } from "./plugins-BmkOoyIh.js";
|
|
2
2
|
type ViteHubNuxtOptions = Omit<ViteHubOptions, "database"> & {
|
|
3
3
|
database?: boolean | Exclude<DatabaseNuxtIntegrationOptions, false>;
|
|
4
4
|
};
|