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 @@
|
|
|
1
|
+
export { t as openConsoleLink, n as openSiteAction } from "../../../site-link-Bvo2SxPo.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as requestConsole } from "../../../request-
|
|
1
|
+
import { u as requestConsole } from "../../../request-XFVx7CGC.js";
|
|
2
2
|
import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-CBtvqI30.js";
|
|
3
3
|
// src/console/runtime/client/workflow.ts
|
|
4
4
|
function record(value) {
|
|
@@ -135,7 +135,7 @@ const impersonation = computed(() => {
|
|
|
135
135
|
});
|
|
136
136
|
const stopping = ref(false);
|
|
137
137
|
const stopError = ref("");
|
|
138
|
-
/** Opens a
|
|
138
|
+
/** Opens the app in a new tab, where a token that the Console signs ends the impersonation and restores your own app session. */
|
|
139
139
|
async function stopImpersonating() {
|
|
140
140
|
stopping.value = true;
|
|
141
141
|
stopError.value = "";
|
|
@@ -9,6 +9,7 @@ const labels: Record<AuthConsoleEvent["type"], string> = {
|
|
|
9
9
|
"user.signed_out": "Signed out",
|
|
10
10
|
"sign_in.failed": "Sign-in failed",
|
|
11
11
|
"session.revoked": "Session revoked",
|
|
12
|
+
"session.expired": "Session expired",
|
|
12
13
|
"user.banned": "User banned",
|
|
13
14
|
"user.unbanned": "User unbanned",
|
|
14
15
|
"user.role_changed": "Role changed",
|
|
@@ -47,7 +47,6 @@ import { isRemoteProject } from "../client/project";
|
|
|
47
47
|
import { consoleLiveDefinition, consoleLiveLabel, consoleLiveUnavailable, consoleTabSession, useConsoleDocumentPresence } from "../client/presence";
|
|
48
48
|
import { clearConsoleLocalDraft, consolePreviewUrl, consolePreviewWidth, consolePublishPreviewUrl, readConsoleLocalDraft, writeConsoleLocalDraft } from "../client/preview";
|
|
49
49
|
import { useConsoleToast } from "../client/toast";
|
|
50
|
-
import { openConsoleTicket } from "../client/ticket";
|
|
51
50
|
import ConsoleDocumentDiff from "./console-document-diff.vue";
|
|
52
51
|
import ConsoleDocumentHistory from "./console-document-history.vue";
|
|
53
52
|
import ConsoleDocumentPreview from "./console-document-preview.vue";
|
|
@@ -1804,14 +1803,14 @@ function onTitleKeydown(event: KeyboardEvent): void {
|
|
|
1804
1803
|
const previewUrl = computed(() => (props.locale || remote ? undefined : consolePreviewUrl(base.value?.url, window.location.origin)));
|
|
1805
1804
|
const openingPreview = ref(false);
|
|
1806
1805
|
/**
|
|
1807
|
-
* A Console on another origin cannot frame the page. It opens the page with its saved draft in a new tab,
|
|
1808
|
-
*
|
|
1806
|
+
* A Console on another origin cannot frame the page. It opens the page with its saved draft in a new tab, through the
|
|
1807
|
+
* app's `/_vitehub/site` with a `preview` token. Edits that are not saved yet do not show there.
|
|
1809
1808
|
*/
|
|
1810
1809
|
async function openPreviewTab(): Promise<void> {
|
|
1811
1810
|
if (!props.documentId || openingPreview.value) return;
|
|
1812
1811
|
openingPreview.value = true;
|
|
1813
1812
|
try {
|
|
1814
|
-
await
|
|
1813
|
+
await props.client.openPreview(props.collection.name, props.documentId!);
|
|
1815
1814
|
}
|
|
1816
1815
|
catch (error) {
|
|
1817
1816
|
toast.error(consoleErrorMessage(error, "The Console could not open the preview."));
|
|
@@ -6,7 +6,7 @@ import * as v from "valibot";
|
|
|
6
6
|
|
|
7
7
|
import { useRoute, useRouter } from "vue-router";
|
|
8
8
|
import { encodeAgentRouteParam, resolveConsoleRouteName } from "../console-route";
|
|
9
|
-
import { requestConsole } from "../client/request";
|
|
9
|
+
import { requestConsole, requestConsoleUsage } from "../client/request";
|
|
10
10
|
import ConsolePageHeader from "./console-page-header.vue";
|
|
11
11
|
import ConsoleState from "./console-state.vue";
|
|
12
12
|
import ConsoleUsageChart from "./console-usage-chart.vue";
|
|
@@ -448,7 +448,7 @@ async function loadPage(page: { cursor: string | undefined; previous: Array<stri
|
|
|
448
448
|
try {
|
|
449
449
|
const result = v.parse(
|
|
450
450
|
usageSummarySchema,
|
|
451
|
-
await
|
|
451
|
+
await requestConsoleUsage(props.base, {
|
|
452
452
|
query: {
|
|
453
453
|
window: requestedWindow,
|
|
454
454
|
...(agent.value ? { agent: agent.value } : {}),
|
|
@@ -16,9 +16,6 @@ export type ConsoleDiagnosticCode =
|
|
|
16
16
|
| "CONSOLE_KEY_UNKNOWN"
|
|
17
17
|
| "CONSOLE_LOOPBACK_ONLY"
|
|
18
18
|
| "CONSOLE_MCP_AUTHORIZATION_FAILED"
|
|
19
|
-
| "CONSOLE_MCP_KEY_INVALID"
|
|
20
|
-
| "CONSOLE_MCP_KV_REQUIRED"
|
|
21
|
-
| "CONSOLE_MCP_LIST_INCOMPLETE"
|
|
22
19
|
| "CONSOLE_MCP_SIGNED_OUT"
|
|
23
20
|
| "CONSOLE_MCP_UNREACHABLE"
|
|
24
21
|
| "CONSOLE_NOT_FOUND"
|
|
@@ -31,11 +28,8 @@ export type ConsoleDiagnosticCode =
|
|
|
31
28
|
| "CONSOLE_SIGNATURE_MISSING"
|
|
32
29
|
| "CONSOLE_SIGNATURE_ORIGIN"
|
|
33
30
|
| "CONSOLE_SIGNATURE_STALE"
|
|
34
|
-
| "
|
|
35
|
-
| "
|
|
36
|
-
| "CONSOLE_TICKET_MISMATCH"
|
|
37
|
-
| "CONSOLE_TICKET_NO_PERSON"
|
|
38
|
-
| "CONSOLE_TICKET_STORE_MISSING"
|
|
31
|
+
| "CONSOLE_SITE_ACCOUNT_MISMATCH"
|
|
32
|
+
| "CONSOLE_SITE_TOKEN_REFUSED"
|
|
39
33
|
| "CONSOLE_UNAVAILABLE"
|
|
40
34
|
|
|
41
35
|
export type ConsoleDiagnosticData = {
|
|
@@ -146,36 +140,6 @@ const consoleDiagnostics = /*#__PURE__*/ defineDiagnostics({
|
|
|
146
140
|
`${consoleGuide}/signed-requests`,
|
|
147
141
|
"docs",
|
|
148
142
|
),
|
|
149
|
-
CONSOLE_SITE_SECRET_MISSING: code(
|
|
150
|
-
"Site access without Auth seals the browser's cookie with VITEHUB_SECRET, and the app has none.",
|
|
151
|
-
"Set VITEHUB_SECRET on the server. Generate one with `openssl rand -base64 32`, then restart or deploy.",
|
|
152
|
-
`${consoleGuide}/site-access#site-access-without-auth`,
|
|
153
|
-
"docs",
|
|
154
|
-
),
|
|
155
|
-
CONSOLE_TICKET_INVALID: code(
|
|
156
|
-
"This one-time link expired, was used, or was changed.",
|
|
157
|
-
"Open the page again from the ViteHub Console. Each link works once, within 60 seconds.",
|
|
158
|
-
`${consoleGuide}/site-access#one-time-links`,
|
|
159
|
-
"docs",
|
|
160
|
-
),
|
|
161
|
-
CONSOLE_TICKET_MISMATCH: code(
|
|
162
|
-
"This one-time link was made for another person or another app.",
|
|
163
|
-
"Open the page from the ViteHub Console in the browser where you are signed in to the app with the email of your Console account.",
|
|
164
|
-
`${consoleGuide}/site-access#one-time-links`,
|
|
165
|
-
"docs",
|
|
166
|
-
),
|
|
167
|
-
CONSOLE_TICKET_NO_PERSON: code(
|
|
168
|
-
"A one-time link opens the app as the person who asks for it, and this call names no person. A `vitehub` command signs its calls with a key, not as a person.",
|
|
169
|
-
"Make the link in the ViteHub Console, where you are signed in. On a development server, which the Console cannot reach, invite the browser as a guest: `vitehub site invite <name> --grants <role>`.",
|
|
170
|
-
`${consoleGuide}/site-access#site-access-from-the-terminal`,
|
|
171
|
-
"docs",
|
|
172
|
-
),
|
|
173
|
-
CONSOLE_TICKET_STORE_MISSING: code(
|
|
174
|
-
"One-time links need a store that every instance of the app shares, and the app has none.",
|
|
175
|
-
"Add app Auth with a Database, such as `defineAuth({ database: authDatabase() })`, then run `vitehub database migrate`. Its verification table keeps each link until it is used. Without Auth, add a Database: when the default KV store cannot take a key out once, such as Cloudflare KV, the links go in its `vitehub_console_site` table. Or use a default KV store on Redis, Upstash, or the `database` driver.",
|
|
176
|
-
`${consoleGuide}/site-access#one-time-links`,
|
|
177
|
-
"docs",
|
|
178
|
-
),
|
|
179
143
|
CONSOLE_LOOPBACK_ONLY: code(
|
|
180
144
|
"The development Console without signed calls accepts only requests from this machine.",
|
|
181
145
|
"Call it from this machine, such as with `vitehub` commands, or remove console.auth so the app takes calls that the ViteHub Console and the CLI sign.",
|
|
@@ -200,24 +164,6 @@ const consoleDiagnostics = /*#__PURE__*/ defineDiagnostics({
|
|
|
200
164
|
`${consoleGuide}/mcp-client`,
|
|
201
165
|
"docs",
|
|
202
166
|
),
|
|
203
|
-
CONSOLE_MCP_KEY_INVALID: code(
|
|
204
|
-
"VITEHUB_CONSOLE_MCP_KEY is not 32 random bytes, so the Console cannot seal MCP connections.",
|
|
205
|
-
"Set VITEHUB_CONSOLE_MCP_KEY to 32 random bytes as base64 or hex, such as the output of openssl rand -base64 32.",
|
|
206
|
-
`${consoleGuide}/mcp-client#keep-connections-across-restarts`,
|
|
207
|
-
"docs",
|
|
208
|
-
),
|
|
209
|
-
CONSOLE_MCP_KV_REQUIRED: code(
|
|
210
|
-
"VITEHUB_CONSOLE_MCP_KEY is set, but the app has no configured default KV store for MCP connections.",
|
|
211
|
-
"Set kv: true in vitehub(), or configure a default KV store, then rebuild the app.",
|
|
212
|
-
`${consoleGuide}/mcp-client#keep-connections-across-restarts`,
|
|
213
|
-
"docs",
|
|
214
|
-
),
|
|
215
|
-
CONSOLE_MCP_LIST_INCOMPLETE: code(
|
|
216
|
-
"The MCP server sent a list of more than 20 pages, so the Console did not show it.",
|
|
217
|
-
"Make the MCP server send its tools, resources, resource templates, or prompts in 20 pages or fewer, such as with more items in each page.",
|
|
218
|
-
`${consoleGuide}/mcp-client`,
|
|
219
|
-
"docs",
|
|
220
|
-
),
|
|
221
167
|
CONSOLE_REQUEST_INVALID: code(
|
|
222
168
|
"The server cannot read this Console request.",
|
|
223
169
|
"Reload the Console. If this continues, deploy the Console and the server from the same build.",
|
|
@@ -236,6 +182,18 @@ const consoleDiagnostics = /*#__PURE__*/ defineDiagnostics({
|
|
|
236
182
|
`${consoleGuide}/limits-and-errors#fix-common-failures`,
|
|
237
183
|
"reload",
|
|
238
184
|
),
|
|
185
|
+
CONSOLE_SITE_ACCOUNT_MISMATCH: code(
|
|
186
|
+
"Impersonation uses the app session of this browser, and it belongs to another person than your Console account, or it has no session.",
|
|
187
|
+
"Sign in to the app in this browser with the email of your ViteHub Console account, then start the impersonation again from the Console. Stop an impersonation in the browser that started it.",
|
|
188
|
+
`${consoleGuide}/site-access#impersonation-and-content-preview`,
|
|
189
|
+
"docs",
|
|
190
|
+
),
|
|
191
|
+
CONSOLE_SITE_TOKEN_REFUSED: code(
|
|
192
|
+
"The app refused the Site access token that the ViteHub Console sent.",
|
|
193
|
+
"Open the site again from the ViteHub Console, in the same browser. Check that the app has the `VITEHUB_CONSOLE_KEY_<NAME>` of its link and that `vitehub({ publicUrl })` is the URL that you open.",
|
|
194
|
+
`${consoleGuide}/site-access#how-the-app-checks-a-visit`,
|
|
195
|
+
"docs",
|
|
196
|
+
),
|
|
239
197
|
CONSOLE_UNAVAILABLE: code(
|
|
240
198
|
"The server did not answer. It can be restarting, offline, or rate limited.",
|
|
241
199
|
"Wait a moment, then try again.",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ConsoleMcpGrant, c as ConsoleMcpOutcome, d as ConsoleMcpServerInfo, f as ConsoleMcpStatus, i as ConsoleMcpConnection, l as ConsoleMcpOverview, n as ConsoleMcpCandidate, o as ConsoleMcpIdentity,
|
|
2
|
-
export { ConsoleMcpAuth, ConsoleMcpCandidate, ConsoleMcpConnectResult, ConsoleMcpConnection, ConsoleMcpGrant, ConsoleMcpIdentity, ConsoleMcpListKind, ConsoleMcpOutcome, ConsoleMcpOverview, ConsoleMcpPage, ConsoleMcpServerInfo, ConsoleMcpStatus
|
|
1
|
+
import { a as ConsoleMcpGrant, c as ConsoleMcpOutcome, d as ConsoleMcpServerInfo, f as ConsoleMcpStatus, i as ConsoleMcpConnection, l as ConsoleMcpOverview, n as ConsoleMcpCandidate, o as ConsoleMcpIdentity, r as ConsoleMcpConnectResult, s as ConsoleMcpListKind, t as ConsoleMcpAuth, u as ConsoleMcpPage } from "../../mcp-client-uXVvS7RL.js";
|
|
2
|
+
export { ConsoleMcpAuth, ConsoleMcpCandidate, ConsoleMcpConnectResult, ConsoleMcpConnection, ConsoleMcpGrant, ConsoleMcpIdentity, ConsoleMcpListKind, ConsoleMcpOutcome, ConsoleMcpOverview, ConsoleMcpPage, ConsoleMcpServerInfo, ConsoleMcpStatus };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function viteHubConsoleOperationLoader(): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { n as installOperationRegistryLoader } from "../../operation-registry-DfQbL7vE.js";
|
|
2
|
+
// src/console/runtime/operation-loader.ts
|
|
3
|
+
function viteHubConsoleOperationLoader() {
|
|
4
|
+
installOperationRegistryLoader(async () => {
|
|
5
|
+
await import("#vitehub/console/app");
|
|
6
|
+
const { loadConsoleRuntime } = await import("./server/runtime.js");
|
|
7
|
+
await loadConsoleRuntime();
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export { viteHubConsoleOperationLoader as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function e(e,...t){return typeof e==`function`?e(...t):e}const t=Error.captureStackTrace;var n=class e extends Error{get why(){return this.message}constructor(n,r=e){super(n.why,{cause:n.cause}),this.code=this.name=n.code,this.docs=n.docs,this.fix=n.fix,this.sources=n.sources,this.data=n.data,t?.(this,r)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function r(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}const i=e=>t=>t instanceof n&&e in t;/* @__NO_SIDE_EFFECTS__ */
|
|
2
|
-
function a(t){let a=t.reporters??[],o=Symbol(),s=Object.defineProperty({},"is",{value:i(o)}),{docsBase:c}=t;for(let i of Object.keys(t.codes)){let l=t.codes[i],u=l.docs===!1?void 0:l.docs||r(c,i),d=(t={},r={})=>{let s=new n({code:i,why:e(l.why,t),fix:e(l.fix,t),docs:u,cause:t.cause,sources:t.sources,data:e(l.data,t)},d);s[o]=1;for(let e of a)e(s,r);return s};d.is=e=>s.is(e)&&e.code===i,s[i]=d}return s}const o=/^[A-Za-z_$][\w$-]*$/,s=/^[\w$-]+(?:\.[\w$-]+)*$/;function c(e){let t=e.lastIndexOf(`#`);if(t<=0)return;let n=e.slice(t+1),r=e.slice(0,t),i=r.indexOf(`:`),a=i===-1?r:r.slice(0,i),c=i===-1?void 0:r.slice(i+1);if(o.test(a)&&s.test(n)&&c!==``)return c===void 0?{collection:a,field:n}:{collection:a,id:c,field:n}}const l={why:({message:e})=>e===void 0?``:String(e)},u=/*#__PURE__*/ a({docsBase:`https://vitehub.dev/docs/runtime/diagnostics`,codes:{RUNTIME_R0001:{...l,fix:"Pass `maxDepth` to `normalizeRuntimeDiagnosticError()` as an integer of 0 or more, or remove it to use the default."},RUNTIME_R0002:{...l,fix:"Pass `maxErrors` to `normalizeRuntimeDiagnosticError()` as an integer of 1 or more, or remove it to use the default."},RUNTIME_R0003:{...l,fix:"Pass `maxStringLength` to `normalizeRuntimeDiagnosticError()` as an integer of 64 or more, or remove it to use the default."},RUNTIME_R0004:{...l,fix:"Read the logs of the process that `vitehub drain` waited for to find why its drain failed, then fix that failure and run `vitehub drain` again."},RUNTIME_R0005:{...l,fix:"Read the logs of the process that the message names to find why it stopped, then start it again before you run `vitehub drain`."},RUNTIME_R0006:{...l,fix:"Pass `new ViteHubError()` a nonempty `code` and `message` string within the length limits, and plain JSON `details`."},RUNTIME_R0007:{...l,fix:"Give the execution authority a valid value for each of `credentials`, `environment`, `filesystem.access`, `filesystem.scope`, `isolation`, `network`, and `processes`."},RUNTIME_R0009:{...l,fix:"Set `intervalMs` of the process reconciler to a number of milliseconds from 1 to 2147483647."},RUNTIME_R0010:{...l,fix:"Give the process reconciler a `signal` other than `SIGKILL` or `SIGSTOP`, or set `signal: false`."},RUNTIME_R0011:{...l,fix:"Call `drain()` of the process reconciler after its callback returns, not from inside the callback."},RUNTIME_R0015:{...l,fix:"Pass the `Request` of a Fetchable handler, or the event of an H3 or Nitro route, to `getStandardContext()`."},RUNTIME_R0016:{...l,fix:"Return the body or a `Response` from the handler, in place of setting `~standard.res.body`."},RUNTIME_R0017:l,RUNTIME_R0018:l,RUNTIME_CONSOLE_PATH_INVALID:{why:({value:e})=>`${e} is not a Console path. Use a path that starts with one /, such as /agents/<agent>.`,fix:"Pass `hostedConsoleUrl()` a Console path that starts with one `/`, such as `/kv` or `/agents/<agent>/invocations/<id>`."},RUNTIME_CONSOLE_PROJECT_URL_INVALID:{why:({value:e})=>`${e} is not a project URL. Use the https:// origin of the app, with its base path if it has one.`,fix:"Pass `hostedConsoleUrl()` the `https://` origin of the app, or `http://localhost` in development, with its base path and without a user name or password."},RUNTIME_DURATION_INVALID:{why:({option:e,value:t})=>`${e?`\`${e}\``:`The value`} is ${t}, which is not a duration. A duration is a string with a number of 0 or more and a unit, such as "30s", "5m", or "1 day".`,fix:({suggestion:e,unit:t=`milliseconds`,value:n})=>e?`Write the time as a string with a unit: ${n} ${t} is ${e}.`:'Write a number of 0 or more and one unit: `ms`, `s`, `m`, `h`, `d`, or `w`, or a long name such as `minutes` or `days`. For example `"30s"`, `"5m"`, or `"1 day"`.'},RUNTIME_EXECUTION_BUDGET_AMOUNT_INVALID:{why:({counter:e})=>`[vitehub] Execution budget ${e} amount must be a finite non-negative number.`,fix:"Pass `consume()` and the `record*()` methods of the execution budget a finite number of 0 or more."},RUNTIME_EXECUTION_BUDGET_EXCEEDED:{why:({counter:e})=>`[vitehub] Execution budget exhausted for ${e}.`,fix:"Raise the `executionBudget` limit that `error.counter` names, such as `maxToolCalls`, `maxRetries`, `maxInputBytes`, or `maxOutputBytes`, or give the run less work."},RUNTIME_EXECUTION_BUDGET_LIMIT_INVALID:{why:()=>`[vitehub] Execution budget limits must be finite non-negative numbers.`,fix:"Set each limit of `executionBudget`, such as `maxToolCalls` or `maxOutputBytes`, to a finite number of 0 or more, or remove it."},RUNTIME_HIDDEN_ERROR:{why:()=>`The server failed. The error is not a ViteHub error, so its message and stack stay on the server.`,fix:"Read the server logs for the error. To send a code, a why, and a fix to the client, return a `ResultError` from `defineErrors()` and pass it to `toResponse()`."},RUNTIME_SERIALIZED_RESPONSE_INVALID:{why:()=>`Invalid serialized Response`,fix:"Pass `deserializeResponse()` the record that `serializeResponse()` returned, unchanged. Check it first with `isSerializedResponse()`."}}})
|
|
2
|
+
function a(t){let a=t.reporters??[],o=Symbol(),s=Object.defineProperty({},"is",{value:i(o)}),{docsBase:c}=t;for(let i of Object.keys(t.codes)){let l=t.codes[i],u=l.docs===!1?void 0:l.docs||r(c,i),d=(t={},r={})=>{let s=new n({code:i,why:e(l.why,t),fix:e(l.fix,t),docs:u,cause:t.cause,sources:t.sources,data:e(l.data,t)},d);s[o]=1;for(let e of a)e(s,r);return s};d.is=e=>s.is(e)&&e.code===i,s[i]=d}return s}const o=/^[A-Za-z_$][\w$-]*$/,s=/^[\w$-]+(?:\.[\w$-]+)*$/;function c(e){let t=e.lastIndexOf(`#`);if(t<=0)return;let n=e.slice(t+1),r=e.slice(0,t),i=r.indexOf(`:`),a=i===-1?r:r.slice(0,i),c=i===-1?void 0:r.slice(i+1);if(o.test(a)&&s.test(n)&&c!==``)return c===void 0?{collection:a,field:n}:{collection:a,id:c,field:n}}const l={why:({message:e})=>e===void 0?``:String(e)},u=/*#__PURE__*/ a({docsBase:`https://vitehub.dev/docs/runtime/diagnostics`,codes:{RUNTIME_R0001:{...l,fix:"Pass `maxDepth` to `normalizeRuntimeDiagnosticError()` as an integer of 0 or more, or remove it to use the default."},RUNTIME_R0002:{...l,fix:"Pass `maxErrors` to `normalizeRuntimeDiagnosticError()` as an integer of 1 or more, or remove it to use the default."},RUNTIME_R0003:{...l,fix:"Pass `maxStringLength` to `normalizeRuntimeDiagnosticError()` as an integer of 64 or more, or remove it to use the default."},RUNTIME_R0004:{...l,fix:"Read the logs of the process that `vitehub drain` waited for to find why its drain failed, then fix that failure and run `vitehub drain` again."},RUNTIME_R0005:{...l,fix:"Read the logs of the process that the message names to find why it stopped, then start it again before you run `vitehub drain`."},RUNTIME_R0006:{...l,fix:"Pass `new ViteHubError()` a nonempty `code` and `message` string within the length limits, and plain JSON `details`."},RUNTIME_R0007:{...l,fix:"Give the execution authority a valid value for each of `credentials`, `environment`, `filesystem.access`, `filesystem.scope`, `isolation`, `network`, and `processes`."},RUNTIME_R0009:{...l,fix:"Set `intervalMs` of the process reconciler to a number of milliseconds from 1 to 2147483647."},RUNTIME_R0010:{...l,fix:"Give the process reconciler a `signal` other than `SIGKILL` or `SIGSTOP`, or set `signal: false`."},RUNTIME_R0011:{...l,fix:"Call `drain()` of the process reconciler after its callback returns, not from inside the callback."},RUNTIME_R0015:{...l,fix:"Pass the `Request` of a Fetchable handler, or the event of an H3 or Nitro route, to `getStandardContext()`."},RUNTIME_R0016:{...l,fix:"Return the body or a `Response` from the handler, in place of setting `~standard.res.body`."},RUNTIME_R0017:l,RUNTIME_R0018:l,RUNTIME_CONSOLE_PATH_INVALID:{why:({value:e})=>`${e} is not a Console path. Use a path that starts with one /, such as /agents/<agent>.`,fix:"Pass `hostedConsoleUrl()` a Console path that starts with one `/`, such as `/kv` or `/agents/<agent>/invocations/<id>`."},RUNTIME_CONSOLE_PROJECT_URL_INVALID:{why:({value:e})=>`${e} is not a project URL. Use the https:// origin of the app, with its base path if it has one.`,fix:"Pass `hostedConsoleUrl()` the `https://` origin of the app, or `http://localhost` in development, with its base path and without a user name or password."},RUNTIME_DURATION_INVALID:{why:({option:e,value:t})=>`${e?`\`${e}\``:`The value`} is ${t}, which is not a duration. A duration is a string with a number of 0 or more and a unit, such as "30s", "5m", or "1 day".`,fix:({suggestion:e,unit:t=`milliseconds`,value:n})=>e?`Write the time as a string with a unit: ${n} ${t} is ${e}.`:'Write a number of 0 or more and one unit: `ms`, `s`, `m`, `h`, `d`, or `w`, or a long name such as `minutes` or `days`. For example `"30s"`, `"5m"`, or `"1 day"`.'},RUNTIME_EXECUTION_BUDGET_AMOUNT_INVALID:{why:({counter:e})=>`[vitehub] Execution budget ${e} amount must be a finite non-negative number.`,fix:"Pass `consume()` and the `record*()` methods of the execution budget a finite number of 0 or more."},RUNTIME_EXECUTION_BUDGET_EXCEEDED:{why:({counter:e})=>`[vitehub] Execution budget exhausted for ${e}.`,fix:"Raise the `executionBudget` limit that `error.counter` names, such as `maxToolCalls`, `maxRetries`, `maxInputBytes`, or `maxOutputBytes`, or give the run less work."},RUNTIME_EXECUTION_BUDGET_LIMIT_INVALID:{why:()=>`[vitehub] Execution budget limits must be finite non-negative numbers.`,fix:"Set each limit of `executionBudget`, such as `maxToolCalls` or `maxOutputBytes`, to a finite number of 0 or more, or remove it."},RUNTIME_HIDDEN_ERROR:{why:()=>`The server failed. The error is not a ViteHub error, so its message and stack stay on the server.`,fix:"Read the server logs for the error. To send a code, a why, and a fix to the client, return a `ResultError` from `defineErrors()` and pass it to `toResponse()`."},RUNTIME_SERIALIZED_RESPONSE_INVALID:{why:()=>`Invalid serialized Response`,fix:"Pass `deserializeResponse()` the record that `serializeResponse()` returned, unchanged. Check it first with `isSerializedResponse()`."}}});function d(){return typeof __VITEHUB_CONSOLE_URL__==`string`?__VITEHUB_CONSOLE_URL__:`https://console.vitehub.dev`}const f=/* @__PURE__ */ new Set([`localhost`,`127.0.0.1`,`[::1]`]),p=`https://console.invalid`;function m(e){if(!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`))return;let t;try{t=new URL(e,p)}catch{return}if(t.origin!==p)return;let n=t.pathname.replace(/^\/_vitehub(?=\/|$)/,``)||`/`;if(!n.startsWith(`//`))return`${n}${t.search}${t.hash}`}function h(e){let t;try{t=new URL(e)}catch{return}if(t.username||t.password||t.protocol!==`https:`&&!(t.protocol===`http:`&&f.has(t.hostname)))return;let n=t.pathname.search(/\/_vitehub(?=\/|$)/),r=(n===-1?t.pathname:t.pathname.slice(0,n)).replace(/\/+$/,``);return`${t.origin}${r}`}function g(e,t,n=d()){let r=h(e);if(!r)throw u.RUNTIME_CONSOLE_PROJECT_URL_INVALID({value:e});let i=m(t);if(!i)throw u.RUNTIME_CONSOLE_PATH_INVALID({value:t});let a=new URL(`/open`,n);return a.search=new URLSearchParams({project:r,path:i}).toString(),a.href}const _=/^(?:\/(?!\.\.?(?:\/|$))[^/?#\\]+)*$/;function v(e){let t=new URL(e),n=t.searchParams.get(`base`)??``;return{base:_.test(n)?n:``,consoleOrigin:t.origin}}function y(e){let t=/* @__PURE__ */ new Map;for(let n of e){let e=c(n);e&&t.set(`${e.collection}\0${e.id??``}`,{collection:e.collection,id:e.id})}let n=[...t.values()],r=n.filter(e=>e.id!==void 0),i=n.length===1?n[0]:r.length===1?r[0]:void 0;return i?`/content/${[i.collection,...i.id?.split(`/`)??[]].map(encodeURIComponent).join(`/`)}`:`/`}function b(e,t,n=[],r){try{return g(`${e}${t}`,y(n),r)}catch{return}}const x=({bar:e,tool:t,onOpen:n})=>{let{base:r,consoleOrigin:i}=v(import.meta.url);if(!b(location.origin,r,[],i))return;let a=e.attachShadow({mode:`open`}),o=document.createElement(`style`);o.textContent=`button{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:var(--vitehub-pill-justify,center);gap:4px;min-width:28px;height:28px;padding:0 8px;border-radius:8px;font:inherit;white-space:nowrap;color:var(--vitehub-pill-text);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition-property:background-color,color;transition-duration:150ms;transition-timing-function:cubic-bezier(.23,1,.32,1)}
|
|
3
3
|
@media(hover:hover){button:where(:not(:disabled):hover){background:var(--vitehub-pill-hover);color:var(--vitehub-pill-strong)}}
|
|
4
4
|
button[aria-pressed=true],button[aria-expanded=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text)}
|
|
5
5
|
:host([aria-busy=true]) button,button[aria-busy=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text);cursor:progress}
|
|
6
6
|
button:focus-visible{outline:2px solid var(--vitehub-pill-on);outline-offset:1px}
|
|
7
7
|
button svg{width:14px;height:14px;flex:none}
|
|
8
8
|
@media(any-pointer:coarse){button{min-width:44px;height:44px}}
|
|
9
|
-
@media(prefers-reduced-motion:reduce){button{transition:none}}`;let s=document.createElement(`button`);s.type=`button`,s.title=`Open this app in the ViteHub Console, in a new tab`,s.textContent=t.label,s.insertAdjacentHTML(`beforeend`,`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 7h10v10M7 17 17 7"/></svg>`);let c=()=>{let e=[...document.querySelectorAll(`[data-content-field]`)].map(e=>e.getAttribute(`data-content-field`)??``),t=
|
|
9
|
+
@media(prefers-reduced-motion:reduce){button{transition:none}}`;let s=document.createElement(`button`);s.type=`button`,s.title=`Open this app in the ViteHub Console, in a new tab`,s.textContent=t.label,s.insertAdjacentHTML(`beforeend`,`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 7h10v10M7 17 17 7"/></svg>`);let c=()=>{let e=[...document.querySelectorAll(`[data-content-field]`)].map(e=>e.getAttribute(`data-content-field`)??``),t=b(location.origin,r,e,i);t&&window.open(t,`_blank`,`noopener`)};s.addEventListener(`click`,c),n(c),a.append(o,s)};export{x as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { ConsoleBuiltinSectionId, ConsolePrimitive, ConsoleSectionDetails, ConsoleSectionGroupId, ConsoleSectionId, ConsoleSectionRoute, consoleBuiltinSectionIds, consoleDocsBase, consoleGoToKey, consoleGuide, consoleOverviewShortcut, consolePrimitives, consoleSectionDetails, consoleSectionGroupIds, consoleSectionGroupLabels, consoleSectionPageRouteName, consoleSectionPageSegment, consoleSectionRouteName, consoleSectionShortcut, consoleSectionShortcutKeys, consoleToolSectionIds, describeConsoleSectionRoutes, groupConsoleSections, insertConsoleSection, isConsoleBuiltinSectionId,
|
|
1
|
+
import { A as resolveConsoleSectionDocs, C as groupConsoleSections, D as prioritizeConsoleSectionIds, E as isConsoleSectionId, M as resolveConsoleSectionIds, O as readLastConsoleSection, S as describeConsoleSectionRoutes, T as isConsoleBuiltinSectionId, _ as consoleSectionPageSegment, a as ConsoleSectionId, b as consoleSectionShortcutKeys, c as consoleDocsBase, d as consoleOverviewShortcut, f as consolePrimitives, g as consoleSectionPageRouteName, h as consoleSectionGroupLabels, i as ConsoleSectionGroupId, j as resolveConsoleSectionGroup, k as rememberConsoleSection, l as consoleGoToKey, m as consoleSectionGroupIds, n as ConsolePrimitive, o as ConsoleSectionRoute, p as consoleSectionDetails, r as ConsoleSectionDetails, s as consoleBuiltinSectionIds, t as ConsoleBuiltinSectionId, u as consoleGuide, v as consoleSectionRouteName, w as insertConsoleSection, x as consoleToolSectionIds, y as consoleSectionShortcut } from "../../sections-DCoCa4nF.js";
|
|
2
|
+
export { ConsoleBuiltinSectionId, ConsolePrimitive, ConsoleSectionDetails, ConsoleSectionGroupId, ConsoleSectionId, ConsoleSectionRoute, consoleBuiltinSectionIds, consoleDocsBase, consoleGoToKey, consoleGuide, consoleOverviewShortcut, consolePrimitives, consoleSectionDetails, consoleSectionGroupIds, consoleSectionGroupLabels, consoleSectionPageRouteName, consoleSectionPageSegment, consoleSectionRouteName, consoleSectionShortcut, consoleSectionShortcutKeys, consoleToolSectionIds, describeConsoleSectionRoutes, groupConsoleSections, insertConsoleSection, isConsoleBuiltinSectionId, isConsoleSectionId, prioritizeConsoleSectionIds, readLastConsoleSection, rememberConsoleSection, resolveConsoleSectionDocs, resolveConsoleSectionGroup, resolveConsoleSectionIds };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as consoleBuiltinSectionIds, n as consoleDocsBase, r as consoleGoToKey, i as consoleGuide, a as consoleOverviewShortcut, o as consolePrimitives, s as consoleSectionDetails, c as consoleSectionGroupIds, l as consoleSectionGroupLabels, u as consoleSectionPageRouteName, d as consoleSectionPageSegment, f as consoleSectionRouteName, p as consoleSectionShortcut, m as consoleSectionShortcutKeys, h as consoleToolSectionIds, g as describeConsoleSectionRoutes, _ as groupConsoleSections, v as insertConsoleSection, y as isConsoleBuiltinSectionId, b as
|
|
1
|
+
export { t as consoleBuiltinSectionIds, n as consoleDocsBase, r as consoleGoToKey, i as consoleGuide, a as consoleOverviewShortcut, o as consolePrimitives, s as consoleSectionDetails, c as consoleSectionGroupIds, l as consoleSectionGroupLabels, u as consoleSectionPageRouteName, d as consoleSectionPageSegment, f as consoleSectionRouteName, p as consoleSectionShortcut, m as consoleSectionShortcutKeys, h as consoleToolSectionIds, g as describeConsoleSectionRoutes, _ as groupConsoleSections, v as insertConsoleSection, y as isConsoleBuiltinSectionId, b as isConsoleSectionId, x as prioritizeConsoleSectionIds, S as readLastConsoleSection, C as rememberConsoleSection, w as resolveConsoleSectionDocs, T as resolveConsoleSectionGroup, E as resolveConsoleSectionIds } from "../../sections-AUGy9EkY.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as consoleOpenAccessWarning, l as installConsoleAccess, o as consoleAuthorizedGrants, s as consoleAuthorizedSections, u as installedConsoleAccessPolicy } from "../../../access-DkBck8Vu.js";
|
|
2
2
|
export { consoleAuthorizedGrants, consoleAuthorizedSections, consoleOpenAccessWarning, installConsoleAccess, installedConsoleAccessPolicy };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as agentConsole } from "../../../agent-console-CHsLxKk_.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-
|
|
1
|
+
import { n as installConsoleBlob, r as loadConsoleMedia, t as getConsoleBlob } from "../../../blob-uNin0_TV.js";
|
|
2
2
|
export { getConsoleBlob, installConsoleBlob, loadConsoleMedia };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as getConsoleBlob, n as installConsoleBlob, r as loadConsoleMedia } from "../../../blob-
|
|
1
|
+
export { t as getConsoleBlob, n as installConsoleBlob, r as loadConsoleMedia } from "../../../blob-iw8pWQ6o.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-
|
|
1
|
+
import { n as installConsoleDatabase, t as getConsoleDatabase } from "../../../database-yFezh5U1.js";
|
|
2
2
|
export { getConsoleDatabase, installConsoleDatabase };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ConsoleAccess } from "../../../access-DkBck8Vu.js";
|
|
2
2
|
import { y as ConsoleSectionContent } from "../../../definitions-ChvMnA1L.js";
|
|
3
|
-
import { a as ConsoleSectionId } from "../../../sections-
|
|
3
|
+
import { a as ConsoleSectionId } from "../../../sections-DCoCa4nF.js";
|
|
4
4
|
/** The definitions of one Console section, for the `definitions.list` operation. */
|
|
5
5
|
export declare function listConsoleDefinitions(input: {
|
|
6
6
|
section: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as consoleHttpError } from "../../../http-error-BorAxJYM.js";
|
|
2
|
-
import { i as getConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-
|
|
3
|
-
import {
|
|
2
|
+
import { i as getConsoleSchedules, r as getConsoleDefinitions, t as copyConsoleRecords } from "../../../definitions-DGo2rNQ9.js";
|
|
3
|
+
import { b as isConsoleSectionId } from "../../../sections-AUGy9EkY.js";
|
|
4
4
|
import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-CBtvqI30.js";
|
|
5
5
|
// src/console/runtime/server/definitions.get.ts
|
|
6
6
|
function requestError(statusCode, statusMessage) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as copyConsoleRecords, n as getConsoleContributedSections, r as getConsoleDefinitions, i as getConsoleSchedules, a as installConsoleDefinitions, o as installConsoleSchedules } from "../../../definitions-
|
|
1
|
+
export { t as copyConsoleRecords, n as getConsoleContributedSections, r as getConsoleDefinitions, i as getConsoleSchedules, a as installConsoleDefinitions, o as installConsoleSchedules } from "../../../definitions-DGo2rNQ9.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ConsoleDocumentEditors, c as
|
|
2
|
-
export { ConsoleDocumentActionContext, ConsoleDocumentActionName, ConsoleDocumentActions, ConsoleDocumentEditorInstall, ConsoleDocumentEditors, ConsoleMediaAccess, consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments,
|
|
1
|
+
import { a as ConsoleDocumentEditors, c as consoleActionError, d as installConsoleDocuments, f as loadConsoleDocumentActions, g as maximumConsoleDocumentRequestBytes, h as consoleDocumentActionNames, i as ConsoleDocumentEditorInstall, l as consoleDocumentActionContext, m as runConsoleDocumentAction, n as ConsoleDocumentActionName, o as ConsoleMediaAccess, p as readConsoleDocumentSection, r as ConsoleDocumentActions, s as checkConsoleDocumentPreview, t as ConsoleDocumentActionContext, u as guardedHandler } from "../../../documents-A-7Ho0g0.js";
|
|
2
|
+
export { ConsoleDocumentActionContext, ConsoleDocumentActionName, ConsoleDocumentActions, ConsoleDocumentEditorInstall, ConsoleDocumentEditors, ConsoleMediaAccess, checkConsoleDocumentPreview, consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as maximumConsoleDocumentRequestBytes, n as consoleDocumentActionNames } from "../../../limits-BLo31qDR.js";
|
|
2
|
-
import { a as
|
|
3
|
-
export { consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments,
|
|
2
|
+
import { a as installConsoleDocuments, c as runConsoleDocumentAction, i as guardedHandler, n as consoleActionError, o as loadConsoleDocumentActions, r as consoleDocumentActionContext, s as readConsoleDocumentSection, t as checkConsoleDocumentPreview } from "../../../documents-D6ueeoUR.js";
|
|
3
|
+
export { checkConsoleDocumentPreview, consoleActionError, consoleDocumentActionContext, consoleDocumentActionNames, guardedHandler as default, installConsoleDocuments, loadConsoleDocumentActions, maximumConsoleDocumentRequestBytes, readConsoleDocumentSection, runConsoleDocumentAction };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as isHeldBackConsoleOperation, n as consoleOperationRegistry, r as installConsoleOperations, t as ConsoleOperationContribution } from "../../../operation-contributions-
|
|
1
|
+
import { i as isHeldBackConsoleOperation, n as consoleOperationRegistry, r as installConsoleOperations, t as ConsoleOperationContribution } from "../../../operation-contributions-xwjDzj28.js";
|
|
2
2
|
export { ConsoleOperationContribution, consoleOperationRegistry, installConsoleOperations, isHeldBackConsoleOperation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as consoleOperationRegistry, n as installConsoleOperations, r as isHeldBackConsoleOperation } from "../../../operation-contributions-
|
|
1
|
+
export { t as consoleOperationRegistry, n as installConsoleOperations, r as isHeldBackConsoleOperation } from "../../../operation-contributions-BU10k2QS.js";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as ViteHubSiteVisitor } from "../../../page-tools-Chk8Gm9x.js";
|
|
2
|
+
/**
|
|
3
|
+
* The person who is signed in to the app, as the session route returns it. The pill shows them with a menu that signs
|
|
4
|
+
* them out. The route sends it only to a signed-in visitor who gets at least one tool.
|
|
5
|
+
*/
|
|
6
|
+
interface ViteHubPageAccount {
|
|
7
|
+
/** The display name, such as `Ada Lovelace`. */
|
|
8
|
+
name: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
/** An `https:` or `http:` URL of the person's picture. Without it, the pill shows their initials. */
|
|
11
|
+
image?: string;
|
|
12
|
+
/** `console` when the ViteHub Console signed this browser in, through Site access. */
|
|
13
|
+
via?: "console";
|
|
14
|
+
/** The path that ends the app session with a `POST`, such as `/api/auth/sign-out`. It ends no other session. */
|
|
15
|
+
signOut: string;
|
|
16
|
+
/** A guest of Site access, whose one-time invite cannot sign them in again, so the exit button never signs them out. */
|
|
17
|
+
guest?: true;
|
|
18
|
+
}
|
|
19
|
+
/** What the Comments pill passes to each segment that it loads. */
|
|
20
|
+
export interface ConsolePillOptions {
|
|
21
|
+
/** The app base, such as `/portal/`. Default: the root. */
|
|
22
|
+
base?: string;
|
|
23
|
+
/** Whether a development server runs the app. It shows the Console segment to every visitor. */
|
|
24
|
+
development?: boolean;
|
|
25
|
+
/** The `vite-hub` version of the app. The Console serves the segment script of this version. */
|
|
26
|
+
version: string;
|
|
27
|
+
useCurrentGrants?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** What the account menu of the pill shows for a Site access person. `signOut` is the app's `/_vitehub/site`. */
|
|
30
|
+
export declare function consolePageAccount(visitor: ViteHubSiteVisitor, signOut: string): ViteHubPageAccount;
|
|
31
|
+
/**
|
|
32
|
+
* The URL of the Console segment script on the ViteHub Console, such as
|
|
33
|
+
* `https://console.vitehub.dev/page/0.4.0/page-tool.js?base=/portal`, or the same path on the Console of
|
|
34
|
+
* `vitehub({ console: { url } })`. The script reads the app base from `base`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function consolePillScript(version: string, base?: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Adds the **Console** segment to the Comments pill. The ViteHub Console serves its script, so the page needs a
|
|
39
|
+
* Content Security Policy that allows scripts from the Console origin. The segment shows to a Site access person with
|
|
40
|
+
* the `console` role, a member of the Console team, and on a development server to every visitor. The Console checks
|
|
41
|
+
* the person and the team itself, so the segment gives no access. It also installs the reader of the Site access
|
|
42
|
+
* cookie, which Comments reads, and the account of the pill: the Site access person and a sign-out of Site access.
|
|
43
|
+
*/
|
|
44
|
+
export declare function installConsolePill(nitroApp: unknown, options: ConsolePillOptions): void;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { i as viteHubPageGrants, n as registerViteHubPageAccount, r as registerViteHubPageTool, t as installViteHubSiteVisitor } from "../../../page-tools-BeZrtn4S.js";
|
|
2
|
+
import { installRequestStandardContext } from "@vite-hub/runtime/internal/h3";
|
|
3
|
+
import { configuredConsoleOrigin } from "@vite-hub/runtime/internal/console";
|
|
4
|
+
// src/console/runtime/server/pill.ts
|
|
5
|
+
const siteSignOutPath = "/_vitehub/site";
|
|
6
|
+
/** What the account menu of the pill shows for a Site access person. `signOut` is the app's `/_vitehub/site`. */
|
|
7
|
+
function consolePageAccount(visitor, signOut) {
|
|
8
|
+
return {
|
|
9
|
+
name: visitor.name,
|
|
10
|
+
...visitor.kind === "member" && visitor.email ? { email: visitor.email } : {},
|
|
11
|
+
...visitor.image ? { image: visitor.image } : {},
|
|
12
|
+
via: "console",
|
|
13
|
+
...visitor.kind === "guest" ? { guest: true } : {},
|
|
14
|
+
signOut
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The URL of the Console segment script on the ViteHub Console, such as
|
|
19
|
+
* `https://console.vitehub.dev/page/0.4.0/page-tool.js?base=/portal`, or the same path on the Console of
|
|
20
|
+
* `vitehub({ console: { url } })`. The script reads the app base from `base`.
|
|
21
|
+
*/
|
|
22
|
+
function consolePillScript(version, base = "/") {
|
|
23
|
+
return `${configuredConsoleOrigin()}/page/${encodeURIComponent(version)}/page-tool.js?${new URLSearchParams({ base: base.replace(/\/+$/, "") })}`;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Adds the **Console** segment to the Comments pill. The ViteHub Console serves its script, so the page needs a
|
|
27
|
+
* Content Security Policy that allows scripts from the Console origin. The segment shows to a Site access person with
|
|
28
|
+
* the `console` role, a member of the Console team, and on a development server to every visitor. The Console checks
|
|
29
|
+
* the person and the team itself, so the segment gives no access. It also installs the reader of the Site access
|
|
30
|
+
* cookie, which Comments reads, and the account of the pill: the Site access person and a sign-out of Site access.
|
|
31
|
+
*/
|
|
32
|
+
function installConsolePill(nitroApp, options) {
|
|
33
|
+
const base = options.base || "/";
|
|
34
|
+
const development = options.development === true;
|
|
35
|
+
const site = async (request) => {
|
|
36
|
+
const visitor = await (await import("./site-visitor.js")).readConsoleSiteVisitor(request, base, development);
|
|
37
|
+
if (visitor?.kind !== "member" || !options.useCurrentGrants) return visitor;
|
|
38
|
+
return {
|
|
39
|
+
...visitor,
|
|
40
|
+
roles: [.../* @__PURE__ */ new Set([...visitor.roles, ...viteHubPageGrants(request).map((grant) => grant.id)])]
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
installViteHubSiteVisitor(site);
|
|
44
|
+
const signOut = `${base.replace(/\/+$/, "")}${siteSignOutPath}`;
|
|
45
|
+
registerViteHubPageAccount(nitroApp, async ({ request }) => {
|
|
46
|
+
installRequestStandardContext(request);
|
|
47
|
+
const visitor = await site(request);
|
|
48
|
+
return visitor && consolePageAccount(visitor, signOut);
|
|
49
|
+
});
|
|
50
|
+
registerViteHubPageTool(nitroApp, {
|
|
51
|
+
id: "console",
|
|
52
|
+
label: "Console",
|
|
53
|
+
icon: "i-lucide-square-terminal",
|
|
54
|
+
script: consolePillScript(options.version, base),
|
|
55
|
+
async allowed({ request }) {
|
|
56
|
+
if (development) return true;
|
|
57
|
+
installRequestStandardContext(request);
|
|
58
|
+
return (await site(request))?.roles.includes("console") === true;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export { consolePageAccount, consolePillScript, installConsolePill };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as consoleOperationRegistry } from "../../../operation-contributions-
|
|
3
|
-
import { n as ConsoleRoute } from "../../../request-
|
|
1
|
+
import { t as ConsoleAccess } from "../../../access-DkBck8Vu.js";
|
|
2
|
+
import { n as consoleOperationRegistry } from "../../../operation-contributions-xwjDzj28.js";
|
|
3
|
+
import { n as ConsoleRoute } from "../../../request-DYmjLTqP.js";
|
|
4
|
+
import "#vitehub/console/app";
|
|
4
5
|
interface ConsoleRpcContext {
|
|
5
6
|
/** The checked access of the RPC request. Each operation runs with it. */
|
|
6
7
|
access: ConsoleAccess;
|
|
@@ -16,10 +17,6 @@ export declare function consoleRpcOperationSection(name: string, input?: unknown
|
|
|
16
17
|
* the failure, or the success status that the operation set, such as 202.
|
|
17
18
|
*/
|
|
18
19
|
export declare function handleConsoleRpcRequest(request: Request, context: ConsoleRpcContext): Promise<Response>;
|
|
19
|
-
/**
|
|
20
|
-
* `<base>/_vitehub/rpc`: one Console operation for each signed `POST`. Each operation checks its own section. A browser
|
|
21
|
-
* that opens `GET <base>/_vitehub/rpc?ticket=<ticket>` redeems a one-time ticket that an operation made, such as for
|
|
22
|
-
* impersonation. The ticket is the only proof that a `GET` needs. See `tickets.ts`.
|
|
23
|
-
*/
|
|
20
|
+
/** `<base>/_vitehub/rpc`: one Console operation for each signed `POST`. Each operation checks its own section. */
|
|
24
21
|
declare const consoleRpcRoute: ConsoleRoute;
|
|
25
22
|
export { consoleOperationRegistry, consoleRpcRoute as default };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as consoleBodySha256 } from "../../../console-signature--55DIKf2.js";
|
|
2
2
|
import { a as readOperationRpcCall, i as operationRpcRefusal, t as answerOperationRpc } from "../../../operation-rpc-BMdfapja.js";
|
|
3
|
-
import { c as operationCall, d as operationSection, h as projectRootHash, m as parseOperationInput, n as assertOperationConfirmed, o as operationAccessAllows, r as assertOperationProject, s as operationAccessDenial, t as assertOperationConfirmation, u as operationRootHeader } from "../../../operations-
|
|
3
|
+
import { c as operationCall, d as operationSection, h as projectRootHash, m as parseOperationInput, n as assertOperationConfirmed, o as operationAccessAllows, r as assertOperationProject, s as operationAccessDenial, t as assertOperationConfirmation, u as operationRootHeader } from "../../../operations-DksTrRMb.js";
|
|
4
4
|
import { t as consoleRpcHeader } from "../../../rpc-D3tsx5lZ.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { h as withConsoleAccess, m as readConsoleOperationUser, r as consoleAccessAllows } from "../../../access-CUFHPi8T.js";
|
|
6
|
+
import { a as isConsoleRpcPath } from "../../../loopback-Bl9Cvj1k.js";
|
|
7
|
+
import { r as isHeldBackConsoleOperation, t as consoleOperationRegistry } from "../../../operation-contributions-BU10k2QS.js";
|
|
7
8
|
import { n as installedConsoleProjectRoot } from "../../../project-root-mAVQGZTX.js";
|
|
8
9
|
import { t as consoleDevelopmentContext } from "../../../development-DD567hhJ.js";
|
|
9
|
-
import { t as consoleDiagnostic } from "../../../diagnostics-
|
|
10
|
+
import { t as consoleDiagnostic } from "../../../diagnostics-DLHqjKGe.js";
|
|
10
11
|
import { t as consoleHttpError } from "../../../http-error-BorAxJYM.js";
|
|
11
|
-
import {
|
|
12
|
+
import { n as consoleErrorResult, o as consoleRoute, r as consoleRequestError } from "../../../request-D769eiBL.js";
|
|
12
13
|
import * as v from "valibot";
|
|
13
14
|
import { getStandardContext } from "@vite-hub/runtime/internal/h3";
|
|
15
|
+
import "#vitehub/console/app";
|
|
14
16
|
// src/console/runtime/server/rpc.ts
|
|
15
17
|
const maximumConsoleRpcRequestBytes = 65536;
|
|
16
18
|
const responseHeaders = {
|
|
@@ -134,8 +136,7 @@ async function readConsoleCall(request, access) {
|
|
|
134
136
|
}
|
|
135
137
|
async function runConsoleOperation(operation, rawInput, request, context) {
|
|
136
138
|
if (Array.isArray(rawInput)) throw consoleRequestError(400, "Invalid Console input.");
|
|
137
|
-
|
|
138
|
-
if (mcp && operation.mcp === false) throw consoleRequestError(403, `${operation.name} is not open to MCP clients. Use it from the Console.`, "CONSOLE_ACCESS_DENIED");
|
|
139
|
+
if (context.access.surface === "mcp" && operation.mcp === false) throw consoleRequestError(403, `${operation.name} is not open to MCP clients. Use it from the Console.`, "CONSOLE_ACCESS_DENIED");
|
|
139
140
|
const input = await parseOperationInput(operation, rawInput);
|
|
140
141
|
const section = operationSection(operation, input);
|
|
141
142
|
if (section !== false && !consoleAccessAllows(context.access, section)) {
|
|
@@ -146,14 +147,14 @@ async function runConsoleOperation(operation, rawInput, request, context) {
|
|
|
146
147
|
if (section !== false && !operationAccessAllows(context.access, section, classification)) throw consoleRequestError(403, `This Console access to the "${section}" section is read-only, and ${operation.name} is a ${operation.kind} operation.`, "CONSOLE_ACCESS_DENIED");
|
|
147
148
|
if (context.access.readOnly && classification.kind !== "read" && !classification.readOnly) throw consoleRequestError(403, `${operation.name} is a ${classification.kind} operation, and this caller may only read.`, "CONSOLE_ACCESS_DENIED");
|
|
148
149
|
assertOperationConfirmation(request, classification);
|
|
149
|
-
if (
|
|
150
|
+
if (context.access.surface) assertOperationConfirmed(classification, context.access.confirmed === true);
|
|
150
151
|
const user = operation.user === false ? void 0 : await readConsoleOperationUser(context.access);
|
|
151
152
|
const operationContext = {
|
|
152
153
|
access: context.access,
|
|
153
154
|
...consoleDevelopmentContext(),
|
|
154
155
|
request,
|
|
155
156
|
response: context.response,
|
|
156
|
-
surface:
|
|
157
|
+
surface: context.access.surface ?? context.access.via ?? (request.headers.get("x-vitehub-surface") === "cli" ? "cli" : "console"),
|
|
157
158
|
user: user ? user : null,
|
|
158
159
|
...context.env ? { env: context.env } : {},
|
|
159
160
|
...context.event ? { event: context.event } : {},
|
|
@@ -208,14 +209,6 @@ const guardedRpc = withConsoleAccess((event, access) => {
|
|
|
208
209
|
waitUntil
|
|
209
210
|
});
|
|
210
211
|
}, { anySection: true });
|
|
211
|
-
/**
|
|
212
|
-
|
|
213
|
-
* that opens `GET <base>/_vitehub/rpc?ticket=<ticket>` redeems a one-time ticket that an operation made, such as for
|
|
214
|
-
* impersonation. The ticket is the only proof that a `GET` needs. See `tickets.ts`.
|
|
215
|
-
*/
|
|
216
|
-
const consoleRpcRoute = consoleRoute(async (event) => {
|
|
217
|
-
const request = getStandardContext(event).req;
|
|
218
|
-
if (request.method === "GET" && new URL(request.url).searchParams.has("ticket")) return (await import("./tickets.js")).redeemConsoleTicket(event);
|
|
219
|
-
return guardedRpc(event);
|
|
220
|
-
});
|
|
212
|
+
/** `<base>/_vitehub/rpc`: one Console operation for each signed `POST`. Each operation checks its own section. */
|
|
213
|
+
const consoleRpcRoute = consoleRoute(guardedRpc);
|
|
221
214
|
export { consoleOperationRegistry, consoleRpcOperationSection, consoleRpcRoute as default, handleConsoleRpcRequest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as loadConsoleRuntime, t as installConsoleRuntime } from "../../../runtime-
|
|
1
|
+
import { n as loadConsoleRuntime, t as installConsoleRuntime } from "../../../runtime-DGvimtvc.js";
|
|
2
2
|
export { installConsoleRuntime, loadConsoleRuntime };
|