vite-hub 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/dist/_internal/runtime/browser-errors.d.ts +0 -2
- package/dist/_internal/runtime/browser-errors.js +3 -4
- package/dist/_internal/runtime/redirects.d.ts +1 -2
- package/dist/_internal/runtime/redirects.js +2 -3
- package/dist/_internal/runtime/request-policy.d.ts +1 -2
- package/dist/_internal/runtime/request-policy.js +2 -3
- package/dist/_internal/runtime/security.d.ts +1 -2
- package/dist/_internal/runtime/security.js +1 -2
- package/dist/{access-BC9HtX_M.js → access-CUFHPi8T.js} +13 -140
- package/dist/{access-policy-DhsEACna.d.ts → access-DkBck8Vu.d.ts} +17 -21
- package/dist/{access-policy-CVZg9LPR.js → access-policy-BM48XstY.js} +5 -6
- package/dist/{account-Cjj-tYzo.d.ts → account-DNr8fHcQ.d.ts} +5 -7
- package/dist/{console/runtime/server → agent/console}/agents.get.d.ts +2 -3
- package/dist/{console/runtime/server → agent/console}/agents.get.js +3 -4
- package/dist/{console/runtime/server → agent/console}/channel-replay.d.ts +3 -5
- package/dist/{console/runtime/server → agent/console}/channel-replay.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.d.ts +1 -3
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.js +4 -5
- package/dist/agent/console/invocation-workspace.get.d.ts +6 -0
- package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation.get.d.ts +4 -6
- package/dist/{console/runtime/server → agent/console}/invocation.get.js +8 -9
- package/dist/{console/runtime/server → agent/console}/invocations.get.d.ts +1 -2
- package/dist/{console/runtime/server → agent/console}/invocations.get.js +5 -6
- package/dist/agent/console/invocations.usage.d.ts +6 -0
- 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 -4
- package/dist/{console/runtime/server → agent/console}/status.get.js +6 -7
- package/dist/{server-W0c79AYZ.js → agent-console-CHsLxKk_.js} +4 -4
- package/dist/agent-console-FmaYpVv-.d.ts +14 -0
- package/dist/{agent-invocations.post-C3Onl2yH.js → agent-invocations.post-CF5anHY6.js} +14 -17
- package/dist/agents-DBm_PJie.js +1 -0
- package/dist/{agents-B76RICcy.js → agents-DXLHsE7x.js} +5 -6
- package/dist/{agents-C94A4N9u.d.ts → agents-Gyw4VKPt.d.ts} +0 -2
- package/dist/auth/console/auth.d.ts +25 -0
- package/dist/{console/runtime/server → auth/console}/auth.js +11 -13
- package/dist/auth/console/operations.d.ts +3 -0
- package/dist/auth/console/operations.js +135 -0
- package/dist/auth/server.js +1 -2
- package/dist/{auth-operations-GcQk0O0X.js → auth-operations-BKqoX8Ua.js} +4 -5
- package/dist/{auth-types-D3ugQ8xM.d.ts → auth-types-Cotn7406.d.ts} +4 -21
- package/dist/bin.js +8 -11
- package/dist/blob/console/operations.d.ts +3 -0
- package/dist/blob/console/operations.js +44 -0
- package/dist/blob/nuxt-image.js +1 -2
- package/dist/{blob-BcgsZtqM.js → blob-iw8pWQ6o.js} +5 -6
- package/dist/{blob-iVewd7KQ.d.ts → blob-uNin0_TV.d.ts} +1 -3
- package/dist/{browser-error-limits-CToqAD-O.js → browser-error-limits-B0yS95zt.js} +2 -4
- package/dist/cache/operations.d.ts +2 -4
- package/dist/cache/operations.js +3 -4
- package/dist/cache.d.ts +1 -3
- package/dist/cache.js +2 -3
- package/dist/{cli-config-FPHk1nbC.js → cli-config-BX8H4ZCo.js} +2 -3
- package/dist/cli-config-DgpmE_7z.js +1 -0
- package/dist/cms.js +1 -2
- package/dist/console/auth-types.d.ts +2 -2
- package/dist/console/auth.d.ts +2 -4
- package/dist/console/auth.js +2 -3
- package/dist/console/runtime/auth-operations.d.ts +4 -6
- package/dist/console/runtime/auth-operations.js +1 -2
- package/dist/console/runtime/client/account-views.d.ts +1 -3
- package/dist/console/runtime/client/account-views.js +1 -2
- package/dist/console/runtime/client/account.d.ts +1 -1
- package/dist/console/runtime/client/account.js +29 -45
- package/dist/console/runtime/client/appearance.d.ts +1 -2
- package/dist/console/runtime/client/appearance.js +1 -2
- package/dist/console/runtime/client/auth-management.ts +6 -6
- package/dist/console/runtime/client/blob-media.d.ts +2 -4
- package/dist/console/runtime/client/blob-media.js +5 -6
- package/dist/console/runtime/client/comment-thread.d.ts +1 -3
- package/dist/console/runtime/client/comment-thread.js +3 -4
- package/dist/console/runtime/client/content-heads.d.ts +1 -2
- package/dist/console/runtime/client/content-heads.js +2 -3
- package/dist/console/runtime/client/documents.d.ts +2 -2
- package/dist/console/runtime/client/documents.js +1 -2
- package/dist/console/runtime/client/editor.d.ts +3 -5
- package/dist/console/runtime/client/editor.js +1 -2
- package/dist/console/runtime/client/env-groups.d.ts +1 -3
- package/dist/console/runtime/client/env-groups.js +1 -2
- package/dist/console/runtime/client/env-status.d.ts +1 -3
- package/dist/console/runtime/client/env-status.js +1 -2
- package/dist/console/runtime/client/format.d.ts +1 -3
- package/dist/console/runtime/client/format.js +1 -2
- package/dist/console/runtime/client/invocation-deletion.d.ts +1 -2
- package/dist/console/runtime/client/invocation-deletion.js +1 -2
- package/dist/console/runtime/client/invocation.d.ts +1 -2
- package/dist/console/runtime/client/invocation.js +4 -5
- package/dist/console/runtime/client/live.d.ts +2 -4
- package/dist/console/runtime/client/live.js +1 -2
- package/dist/console/runtime/client/mcp-client.d.ts +7 -5
- package/dist/console/runtime/client/mcp-client.js +10 -5
- package/dist/console/runtime/client/media-library.d.ts +1 -1
- package/dist/console/runtime/client/media-library.js +1 -2
- package/dist/console/runtime/client/media-uploads.d.ts +2 -4
- package/dist/console/runtime/client/media-uploads.js +2 -3
- package/dist/console/runtime/client/media.d.ts +1 -1
- package/dist/console/runtime/client/media.js +1 -2
- package/dist/console/runtime/client/operation-view.d.ts +2 -4
- package/dist/console/runtime/client/operation-view.js +4 -5
- package/dist/console/runtime/client/presence.d.ts +2 -4
- package/dist/console/runtime/client/presence.js +1 -2
- package/dist/console/runtime/client/preview.d.ts +1 -3
- package/dist/console/runtime/client/preview.js +1 -2
- package/dist/console/runtime/client/problem.d.ts +2 -4
- package/dist/console/runtime/client/problem.js +3 -4
- package/dist/console/runtime/client/project-link.d.ts +1 -1
- package/dist/console/runtime/client/project-link.js +1 -2
- package/dist/console/runtime/client/project-session.d.ts +19 -10
- package/dist/console/runtime/client/project-session.js +1 -723
- package/dist/console/runtime/client/project.d.ts +1 -3
- package/dist/console/runtime/client/project.js +1 -2
- package/dist/console/runtime/client/projects.d.ts +1 -1
- package/dist/console/runtime/client/projects.js +1 -2
- package/dist/console/runtime/client/publish.d.ts +2 -4
- package/dist/console/runtime/client/publish.js +1 -2
- package/dist/console/runtime/client/rate-limit.d.ts +1 -3
- package/dist/console/runtime/client/rate-limit.js +3 -4
- package/dist/console/runtime/client/read-only.d.ts +2 -4
- package/dist/console/runtime/client/read-only.js +2 -3
- package/dist/console/runtime/client/request.d.ts +2 -2
- package/dist/console/runtime/client/request.js +1 -2
- package/dist/console/runtime/client/route-query.d.ts +4 -5
- package/dist/console/runtime/client/route-query.js +1 -2
- package/dist/console/runtime/client/schedule-run.d.ts +1 -3
- package/dist/console/runtime/client/schedule-run.js +3 -4
- package/dist/console/runtime/client/schema-form.d.ts +1 -1
- package/dist/console/runtime/client/schema-form.js +1 -2
- package/dist/console/runtime/client/sections.d.ts +1 -1
- package/dist/console/runtime/client/sections.js +1 -2
- package/dist/console/runtime/client/site-access.d.ts +83 -16
- package/dist/console/runtime/client/site-access.js +159 -32
- 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/stored.d.ts +1 -3
- package/dist/console/runtime/client/stored.js +1 -2
- package/dist/console/runtime/client/toast.d.ts +1 -3
- package/dist/console/runtime/client/toast.js +1 -2
- package/dist/console/runtime/client/workflow.d.ts +1 -3
- package/dist/console/runtime/client/workflow.js +3 -4
- package/dist/console/runtime/components/console-account-home.vue +9 -7
- package/dist/console/runtime/components/console-account-link.vue +8 -5
- package/dist/console/runtime/components/console-account-setup.vue +10 -7
- package/dist/console/runtime/components/console-account-shell.vue +7 -2
- package/dist/console/runtime/components/console-account-unlink.vue +2 -3
- package/dist/console/runtime/components/console-app-settings.vue +8 -2
- 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-hosted-comments-embed.vue +106 -0
- package/dist/console/runtime/components/console-mcp-callback.vue +6 -1
- package/dist/console/runtime/components/console-mcp-items.vue +3 -16
- package/dist/console/runtime/components/console-site.vue +10 -8
- package/dist/console/runtime/components/console-usage.vue +2 -2
- package/dist/console/runtime/console-route.d.ts +1 -3
- package/dist/console/runtime/console-route.js +1 -2
- package/dist/console/runtime/definitions.d.ts +1 -1
- package/dist/console/runtime/definitions.js +1 -2
- package/dist/console/runtime/diagnostics.ts +14 -49
- package/dist/console/runtime/mcp-client.d.ts +2 -2
- package/dist/console/runtime/mcp-client.js +1 -2
- 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/account.js +26 -0
- package/dist/console/runtime/page-tool/page-tool.js +2 -2
- package/dist/console/runtime/rpc.d.ts +1 -1
- package/dist/console/runtime/rpc.js +1 -2
- package/dist/console/runtime/sections.d.ts +2 -2
- package/dist/console/runtime/sections.js +1 -2
- package/dist/console/runtime/server/access-policy.d.ts +1 -1
- package/dist/console/runtime/server/access-policy.js +1 -2
- 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 -2
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/database.js +1 -2
- package/dist/console/runtime/server/definitions.d.ts +1 -1
- package/dist/console/runtime/server/definitions.get.d.ts +4 -6
- package/dist/console/runtime/server/definitions.get.js +5 -6
- package/dist/console/runtime/server/definitions.js +1 -2
- package/dist/console/runtime/server/development.d.ts +1 -1
- package/dist/console/runtime/server/development.js +1 -2
- package/dist/console/runtime/server/documents.d.ts +2 -2
- package/dist/console/runtime/server/documents.js +3 -3
- 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/env.d.ts +1 -3
- package/dist/console/runtime/server/env.js +1 -2
- package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
- package/dist/console/runtime/server/operation-contributions.js +1 -2
- 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 -10
- package/dist/console/runtime/server/rpc.js +19 -27
- package/dist/console/runtime/server/runtime.d.ts +1 -1
- package/dist/console/runtime/server/runtime.js +1 -2
- package/dist/console/runtime/server/sections.d.ts +5 -5
- package/dist/console/runtime/server/sections.get.d.ts +1 -1
- package/dist/console/runtime/server/sections.get.js +8 -9
- package/dist/console/runtime/server/sections.js +6 -6
- package/dist/console/runtime/server/setup.d.ts +5 -5
- package/dist/console/runtime/server/setup.js +5 -5
- 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 -9
- package/dist/console/runtime/server/site-entry.js +62 -46
- 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/runtime/skills.d.ts +1 -3
- package/dist/console/runtime/skills.js +1 -2
- package/dist/console/server.d.ts +9 -25
- package/dist/console/server.js +8 -8
- package/dist/console/ui.d.ts +0 -10
- package/dist/console/ui.js +14 -27
- package/dist/console-lazy-views-VEjcbL4Q.js +1 -0
- package/dist/{console-route-CM2G5hiC.js → console-route-DbdnLkkF.js} +2 -3
- package/dist/console-signature--55DIKf2.js +237 -0
- package/dist/console.d.ts +1 -3
- package/dist/console.js +1 -2
- 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 +2 -3
- package/dist/{console/runtime/server → database/console}/database.get.js +4 -5
- package/dist/database/console/operations.d.ts +3 -0
- package/dist/database/console/operations.js +49 -0
- package/dist/{database-UMJgnU2z.js → database-CrgBUdIx.js} +3 -4
- package/dist/{database-DC67Ipm-.d.ts → database-yFezh5U1.d.ts} +1 -3
- package/dist/{definition-catalog-BUcclwSH.js → definition-catalog-1xPPtzOx.js} +3 -4
- package/dist/definition-catalog-M5ua7JRS.js +1 -0
- package/dist/{definitions-BW6SvmMM.js → definitions-BFYqXchw.js} +1 -2
- package/dist/{definitions-DB4LbZ7T.d.ts → definitions-ChvMnA1L.d.ts} +0 -2
- package/dist/{definitions-DTytrw42.js → definitions-DGo2rNQ9.js} +5 -6
- package/dist/{definitions-Dbgxfz3I.d.ts → definitions-DRkgHKmk.d.ts} +1 -3
- package/dist/{deployment-BUshgN5Q.js → deployment-CURATxjG.js} +2 -3
- package/dist/deployment-l7RuKdEp.js +1 -0
- package/dist/{dev-peer-CHjyHYG6.js → dev-peer-CRYp01PE.js} +2 -222
- package/dist/dev-peer-CX5C9243.js +1 -0
- package/dist/{development-zLxOp-AO.js → development-DD567hhJ.js} +2 -3
- package/dist/{development-RnopiRwK.d.ts → development-I40mfD7B.d.ts} +1 -3
- package/dist/{diagnostics-DtR0TAmq.js → diagnostics-DLHqjKGe.js} +3 -9
- package/dist/diagnostics-DgGKvWzF.d.ts +7 -0
- package/dist/docs/nuxt.js +1 -2
- package/dist/doctor.d.ts +0 -6
- package/dist/doctor.js +11492 -12152
- package/dist/{documents-BDR0AkYR.d.ts → documents-A-7Ho0g0.d.ts} +12 -16
- package/dist/{documents-B4R4JSfH.js → documents-BduuZjm3.js} +6 -6
- package/dist/{documents-BASIRZ91.d.ts → documents-CApMRd4o.d.ts} +4 -7
- package/dist/{documents-BewAPY61.js → documents-D6ueeoUR.js} +17 -21
- package/dist/durability/operations.d.ts +2 -4
- package/dist/durability/operations.js +3 -4
- package/dist/{entries-DbyNPLC9.js → entries-UFs9n1MB.js} +2 -3
- package/dist/{console/runtime/server → env/console}/env.get.d.ts +2 -4
- package/dist/env/console/env.get.js +15 -0
- 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/{env-Dg1I_DWr.js → env-D-wtSupz.js} +2 -3
- package/dist/{error-diagnostics-B1yAIaSn.js → error-diagnostics-CBtvqI30.js} +2 -7
- package/dist/{error-diagnostics-C0KyI408.js → error-diagnostics-kKXseq8d.js} +5 -2
- package/dist/error-diagnostics.ts +1 -7
- package/dist/{features-CC5OcZqJ.js → features-BXRKlmtN.js} +5 -6
- package/dist/features-CD5i5I8V.js +1 -0
- package/dist/{format-BOYlanIZ.js → format-Df-bS4Ly.js} +1 -2
- package/dist/{github-login-Bi3bfjRX.js → github-login-W-vaahWP.js} +1 -2
- package/dist/{host-CkL0jjBq.js → host-DeNPYIeV.js} +1 -2
- package/dist/{http-error-Bs6e8_-8.js → http-error-BorAxJYM.js} +1 -2
- package/dist/index.d.ts +1 -7
- package/dist/index.js +5 -7
- package/dist/{inspect-DbZuP_7b.js → inspect-CWwAuL-B.js} +2 -3
- package/dist/internal/agent-invocations-libsql.js +1 -2
- package/dist/internal/disabled-redis-driver.d.ts +1 -3
- package/dist/internal/disabled-redis-driver.js +2 -3
- package/dist/internal/disabled-upstash-driver.d.ts +1 -3
- package/dist/internal/disabled-upstash-driver.js +2 -3
- package/dist/internal/test-loader.d.ts +1 -3
- package/dist/internal/test-loader.js +2 -3
- package/dist/internal/test-server.js +2 -3
- package/dist/{internal-BreyUsQ6.js → internal-0C_CC601.js} +1 -2
- package/dist/{internal-Cc9N0shU.d.ts → internal-BRNf11h3.d.ts} +14 -8
- package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
- package/dist/{invocation-page-undo-DqYcPlkQ.js → invocation-page-undo-DHbXczWY.js} +8 -7
- package/dist/invocations-B60XWNES.js +45 -0
- package/dist/{limits-BUlwWYQE.js → limits-BLo31qDR.js} +1 -2
- package/dist/logs/client.d.ts +1 -3
- package/dist/logs/client.js +1 -2
- package/dist/{console/runtime/server → logs/console}/logs.get.d.ts +3 -5
- package/dist/{console/runtime/server → logs/console}/logs.get.js +7 -8
- package/dist/logs/console/operations.d.ts +3 -0
- package/dist/logs/console/operations.js +23 -0
- package/dist/logs/host.d.ts +2 -4
- package/dist/logs/host.js +1 -2
- package/dist/logs/memory.d.ts +1 -1
- package/dist/logs/memory.js +1 -2
- package/dist/logs/source.d.ts +1 -1
- package/dist/logs/source.js +1 -2
- package/dist/logs.d.ts +2 -2
- package/dist/logs.js +2 -2
- 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-C_sEmyQw.d.ts → mcp-client-uXVvS7RL.d.ts} +5 -10
- package/dist/{media-uKX4Wy-c.d.ts → media-C79RB1oH.d.ts} +0 -2
- package/dist/{media-D3OfyKni.js → media-CNwnh6CG.js} +8 -9
- package/dist/{media-library-o8RRsnn_.js → media-library-DTC8TLsZ.js} +5 -6
- package/dist/{media-library-D9ThbXqs.d.ts → media-library-DxGu6w9z.d.ts} +0 -2
- package/dist/{memory-C54SDH_l.js → memory-D3EJS_Bp.js} +3 -4
- package/dist/{memory-2bbl4hcV.d.ts → memory-GK5ZGWrp.d.ts} +1 -3
- package/dist/{nuxt-server-auto-imports-cfTZYvgy.js → nuxt-server-auto-imports-4aT5BD4u.js} +1 -2
- package/dist/{nuxt-server-imports-75bWMeXc.js → nuxt-server-imports-BdJqiVhT.js} +1 -2
- package/dist/nuxt.d.ts +1 -3
- package/dist/nuxt.js +276 -182
- package/dist/{object-D8pRdprI.js → object-DRSmpe04.js} +1 -2
- package/dist/{operation-contributions-C3lwePQu.js → operation-contributions-BU10k2QS.js} +9 -9
- package/dist/{operation-contributions-CrdmqtJW.d.ts → operation-contributions-xwjDzj28.d.ts} +6 -7
- package/dist/{operation-definition-DxjKcCGm.js → operation-definition-D04Rdjbe.js} +7 -9
- package/dist/operation-modules-BUXlwjvd.js +1 -0
- package/dist/operation-modules-DHWkPcfS.js +139 -0
- package/dist/{operation-registry-BogGwk_I.js → operation-registry-DfQbL7vE.js} +1 -2
- package/dist/{operation-rpc-DI9txNxK.js → operation-rpc-BMdfapja.js} +3 -4
- package/dist/operations-D-7ljPqw.js +1 -0
- package/dist/{operations-TTjL_7Zc.d.ts → operations-DgFhA1WE.d.ts} +0 -4
- package/dist/{operations-CFYGXqLm.js → operations-DksTrRMb.js} +4 -5
- package/dist/operations-byxiZ2R2.js +113 -0
- package/dist/{optional-owners-O6sj4uoj.js → optional-owners-Cypch7V3.js} +4 -6
- package/dist/{out-fRNaVslw.js → out-Cw5Tvr92.js} +2933 -2301
- package/dist/{owned-paths-BnjT0FhU.js → owned-paths-MjjDftBn.js} +1 -2
- package/dist/page/pill.iife.js +2 -2
- 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/{pathe.M-eThtNZ-J4gfe1m9.js → pathe.M-eThtNZ-D4EC7Wue.js} +1 -2
- package/dist/{plugins-DoXnU6-s.d.ts → plugins-BmkOoyIh.d.ts} +25 -110
- package/dist/{plugins-BTZQaFtZ.js → plugins-DfXcUnzN.js} +1779 -1384
- package/dist/presets/workspace.js +1 -2
- package/dist/{project-Dgyq1F1V.d.ts → project-B2qWt8on.d.ts} +3 -12
- package/dist/{project-DlWTGB7h.js → project-DRC67Uiu.js} +1 -2
- package/dist/{project-DXZRZEPX.js → project-_juMSuAS.js} +8 -11
- package/dist/{project-link-DT99MoyU.js → project-link-CJbCkOlC.js} +7 -8
- package/dist/{project-link-bNS-KROO.d.ts → project-link-Ck3vuq9w.d.ts} +2 -4
- package/dist/{project-root-v6ba4tn7.js → project-root-mAVQGZTX.js} +1 -2
- package/dist/project-session-8pN7pRo8.js +764 -0
- package/dist/{projects-CAcXztf4.js → projects-BRp0iseV.js} +1 -2
- package/dist/{projects-Ddvl9EJp.d.ts → projects-mgPxrKZr.d.ts} +0 -2
- package/dist/{registry-zw6aE2N9.js → registry-B8JE5NY-.js} +1 -2
- package/dist/{registry-CDKLACCZ.js → registry-CnPC-gNu.js} +1 -2
- package/dist/{request-CMA2UKKq.js → request-D769eiBL.js} +5 -6
- package/dist/{request-D7h3SQ92.d.ts → request-DYmjLTqP.d.ts} +2 -4
- package/dist/{request-SBLxvpyr.d.ts → request-DkoE0b2h.d.ts} +11 -4
- package/dist/{request-Cs0FqxEL.js → request-XFVx7CGC.js} +30 -9
- package/dist/{request-origin-COUkgHd6.js → request-origin-pzWr9UUu.js} +1 -2
- package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
- package/dist/{route-query-CRVWXIrc.js → route-query-BWVl6ZO6.js} +4 -5
- package/dist/routes-D02vxUSg.js +26 -0
- package/dist/{rpc-DIUA61pv.js → rpc-D3tsx5lZ.js} +1 -2
- package/dist/{rpc-7nlHSv3y.d.ts → rpc-oijgKQtD.d.ts} +0 -2
- package/dist/{runtime-YLWfdrtO.js → runtime-CAbuQGMP.js} +3 -4
- package/dist/{runtime-B-46Bawt.js → runtime-CRJsqVTa.js} +2 -3
- package/dist/{runtime-DxfJOfCd.js → runtime-DA7HJe10.js} +3 -4
- package/dist/runtime-DGvimtvc.d.ts +5 -0
- package/dist/{runtime-CX_l_78I.js → runtime-F0CTqBFx.js} +5 -6
- package/dist/{runtime-feature-guard-CuyPVGj9.js → runtime-feature-guard-BKAMRZzM.js} +6 -7
- package/dist/scan-module-B1A24jqP.js +1 -0
- package/dist/{scan-module-Df58L_6T.js → scan-module-BfZvDBxb.js} +2 -4
- package/dist/{schema-form-C-fy3xaU.d.ts → schema-form-Bl79Bdm-.d.ts} +0 -2
- package/dist/search-jgMrZJXR.js +84 -0
- package/dist/{sections-DumoLKQN.js → sections-AUGy9EkY.js} +2 -8
- package/dist/{sections-BogiCmtz.d.ts → sections-BMkFB3S-.d.ts} +4 -6
- package/dist/{sections-C83x0slv.js → sections-BNTdIEJw.js} +2 -3
- package/dist/{sections-Do7X4Nwt.d.ts → sections-DCoCa4nF.d.ts} +1 -8
- package/dist/sections-DjeAUX7o.d.ts +8 -0
- package/dist/{sections-BKUReack.js → sections-ZFAlI4JW.js} +14 -7
- package/dist/{sections.get-H46e2urg.d.ts → sections.get-BY5dClJY.d.ts} +2 -4
- package/dist/seo/runtime.d.ts +2 -5
- package/dist/seo/runtime.js +3 -5
- package/dist/{seo-CtLywyRx.d.ts → seo-CgW5uI9L.d.ts} +0 -2
- package/dist/seo.d.ts +1 -1
- package/dist/seo.js +1 -2
- package/dist/{setup-BC0P3eZy.d.ts → setup-BBnZPziq.d.ts} +5 -10
- package/dist/{setup-DNGzawFn.js → setup-yc3_WKNG.js} +4 -17
- 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.d.ts +1 -5
- package/dist/skills/operations.js +4 -5
- package/dist/{skills-DdpSMiCI.js → skills-C1MaGEbO.js} +1 -2
- package/dist/skills.d.ts +1 -2
- package/dist/{skills.get-CRd06TTb.js → skills.get-CW8vc_Hf.js} +3 -4
- package/dist/skills.js +1 -2
- package/dist/{source-Cw3iYvJF.js → source-DYFndd0W.js} +2 -3
- package/dist/{source-S-LChQvw.d.ts → source-DemBtwla.d.ts} +0 -2
- package/dist/{stored-Dhv2qsQv.js → stored-J3TetMKf.js} +1 -2
- package/dist/task/operations.d.ts +1 -5
- package/dist/task/operations.js +3 -4
- package/dist/test/register.js +2 -3
- package/dist/test.d.ts +0 -4
- package/dist/test.js +1 -2
- package/dist/ui/vite.js +1 -2
- package/dist/usage-DBi7aOhx.js +33 -0
- package/dist/{version-dkga9imp.js → version-DUCd7Orc.js} +24 -21
- package/dist/{vite-stage-D7fe614I.js → vite-stage-Dmo4RgnK.js} +3 -5
- package/dist/{vue-router-C68IU1jM.d.ts → vue-router-plZJLlpm.d.ts} +120 -182
- 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 -5
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.js +4 -5
- package/dist/{workspace-history-B95Q-kGI.js → workspace-history-B52xib2J.js} +3 -4
- package/dist/{workspace-history-CeVwBB6Q.d.ts → workspace-history-WuxgLsi4.d.ts} +0 -2
- package/package.json +158 -149
- package/dist/agents-BhFggA26.js +0 -2
- package/dist/auth-GFIN6xSJ.d.ts +0 -120
- package/dist/cli-config-g_mbWdjT.js +0 -2
- package/dist/cloudflare-env-lookup-DKXdr4P_.js +0 -16
- package/dist/console/runtime/client/ticket.d.ts +0 -2
- package/dist/console/runtime/client/ticket.js +0 -2
- package/dist/console/runtime/page/loader.js +0 -134
- package/dist/console/runtime/server/auth.d.ts +0 -2
- package/dist/console/runtime/server/env.get.js +0 -16
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +0 -8
- package/dist/console/runtime/server/mcp-client-operations.d.ts +0 -5
- package/dist/console/runtime/server/mcp-client-operations.js +0 -139
- package/dist/console/runtime/server/page-auth.d.ts +0 -18
- package/dist/console/runtime/server/page-auth.js +0 -44
- 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 -5
- package/dist/console/runtime/server/search.get.d.ts +0 -4
- package/dist/console/runtime/server/search.get.js +0 -97
- package/dist/console/runtime/server/site-session.d.ts +0 -80
- package/dist/console/runtime/server/site-session.js +0 -2
- package/dist/console/runtime/server/tickets.d.ts +0 -2
- package/dist/console/runtime/server/tickets.js +0 -2
- package/dist/console/runtime/server/usage.get.d.ts +0 -10
- package/dist/console/runtime/server/usage.get.js +0 -92
- package/dist/console/runtime/site-access.d.ts +0 -2
- package/dist/console/runtime/site-access.js +0 -2
- package/dist/console-lazy-views-DXnIkdyd.js +0 -2
- package/dist/definition-catalog-og_1razf.js +0 -2
- package/dist/deployment-C2B0hBBj.js +0 -2
- package/dist/diagnostics-CjGiniKb.d.ts +0 -11
- package/dist/features-ujWsvlEH.js +0 -2
- package/dist/invocations-6jxqLkGY.js +0 -86
- package/dist/mcp-client-C91h8Taa.js +0 -1024
- package/dist/mcp-client-CTbTbn7d.js +0 -10
- package/dist/operations-5Lwd1xEI.js +0 -2
- package/dist/operations-ChEXk2ij.js +0 -853
- package/dist/page-tool-PmxH65gt.d.ts +0 -69
- package/dist/page-tools-ClgqElu-.js +0 -462
- package/dist/page-tools-DcCCtDKi.d.ts +0 -23
- package/dist/page-tools-shared-aNC9YtoI.js +0 -125
- package/dist/runtime-B_btezs1.d.ts +0 -7
- package/dist/scan-module-D_3X08mj.js +0 -2
- package/dist/secret-DELGKpCJ.js +0 -44
- package/dist/sections-CFiMNsqu.d.ts +0 -10
- package/dist/site-access-BycrwM2v.js +0 -18
- package/dist/site-access-CAiWyKOD.js +0 -2
- package/dist/site-access-DxfdOel1.d.ts +0 -55
- package/dist/site-access-L1qbvKt6.js +0 -293
- package/dist/site-session-CRwgKtTF.js +0 -300
- 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-DtBAstEU.js +0 -31
- package/dist/ticket-Pr_8ZtXW.d.ts +0 -14
- package/dist/tickets-DahBmKDT.js +0 -357
- package/dist/usage-CoQXs5nW.d.ts +0 -22
- package/dist/usage-index-VJAZ7a0p.js +0 -335
- package/dist/usage-jKtAgJZ0.js +0 -571
- /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
|
@@ -3,7 +3,7 @@ import { pathToFileURL } from "node:url";
|
|
|
3
3
|
import { randomBytes } from "node:crypto";
|
|
4
4
|
import { createServer } from "node:http";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
|
-
|
|
6
|
+
// src/internal/test-server.ts
|
|
7
7
|
/**
|
|
8
8
|
* The Vite server of `vite-hub/test/register`. It runs one Vite server of the app, as Vitest does, and answers the
|
|
9
9
|
* module hooks of the test processes over a local port. It runs outside the test's main thread because Node blocks
|
|
@@ -20,7 +20,7 @@ const [root, addressFile, runner] = parentPort ? [workerData.root] : [
|
|
|
20
20
|
];
|
|
21
21
|
async function startVite() {
|
|
22
22
|
process.env.VITEST ??= "true";
|
|
23
|
-
const [{ createServer }, { loadViteHubCliConfig }] = await Promise.all([import("vite"), import("../cli-config-
|
|
23
|
+
const [{ createServer }, { loadViteHubCliConfig }] = await Promise.all([import("vite"), import("../cli-config-DgpmE_7z.js")]);
|
|
24
24
|
let created;
|
|
25
25
|
await loadViteHubCliConfig(root, "serve", "test", { async resolveViteConfig(inlineConfig, _command, mode) {
|
|
26
26
|
created = await createServer({
|
|
@@ -80,5 +80,4 @@ http.listen(0, "127.0.0.1", () => {
|
|
|
80
80
|
}
|
|
81
81
|
}, 1e3);
|
|
82
82
|
});
|
|
83
|
-
//#endregion
|
|
84
83
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/console/internal.ts
|
|
2
2
|
const consoleStateKey = Symbol.for("vitehub.console.state");
|
|
3
3
|
/** `@vite-hub/schedule` reads the Schedules that the Console may run from this slot of the global object. */
|
|
4
4
|
const consoleSchedulesKey = Symbol.for("vitehub.console.schedules");
|
|
@@ -27,5 +27,4 @@ function resolveConsoleSuppliedInvocations() {
|
|
|
27
27
|
const invocations = resolveConsoleInvocations();
|
|
28
28
|
return invocations && Reflect.get(invocations, consoleSuppliedInvocationsKey) === true ? invocations : void 0;
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { resolveConsoleSuppliedInvocations as a, resolveConsoleInvocations as i, consoleState as n, markConsoleSuppliedInvocations as r, consoleSchedulesKey as t };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
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";
|
|
7
7
|
import { ServerEnvDescription } from "@vite-hub/env";
|
|
8
|
-
//#region src/console/runtime/server/media.d.ts
|
|
9
8
|
/** One file as the media library shows it. It mirrors `MediaRecord` without the provider ETag and hash. */
|
|
10
9
|
interface ConsoleMediaFile extends Omit<MediaRecord, "etag" | "hash"> {
|
|
11
10
|
/** File name without the folder. */
|
|
@@ -34,8 +33,14 @@ interface ConsoleMediaUploadInput {
|
|
|
34
33
|
}
|
|
35
34
|
/** Stores one uploaded file of the media library of a section. */
|
|
36
35
|
declare function uploadConsoleMedia(input: ConsoleMediaUploadInput, access: ConsoleAccess): Promise<ConsoleMediaUpload>;
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
declare global {
|
|
37
|
+
interface ImportMeta {
|
|
38
|
+
viteHubConsoleAgents?: boolean;
|
|
39
|
+
viteHubConsoleAuth?: boolean;
|
|
40
|
+
viteHubConsoleDevelopment?: boolean;
|
|
41
|
+
viteHubConsoleDocuments?: boolean;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
39
44
|
/** The Console reads each database with `db` and lists its tables from `schema`. A Definition is SQLite or Postgres. */
|
|
40
45
|
type ConsoleDatabaseEntry = Pick<RuntimeDatabaseEntry<Record<string, unknown>>, "db" | "schema"> | {
|
|
41
46
|
db: Omit<RuntimeDatabaseEntry<Record<string, unknown>, "postgresql">["db"], "$replica">;
|
|
@@ -55,5 +60,6 @@ interface ConsoleBlobInspection {
|
|
|
55
60
|
/** Loads the media library. Only builds with Blob install it, so other builds ship without it. */
|
|
56
61
|
media?: () => Promise<ConsoleMediaLibrary>;
|
|
57
62
|
}
|
|
58
|
-
|
|
59
|
-
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { defineDiagnostics } from "nostics";
|
|
2
|
-
|
|
2
|
+
// ../internal/src/invariant.ts
|
|
3
3
|
const invariantDiagnostics = /*#__PURE__*/ defineDiagnostics({
|
|
4
4
|
docsBase: "https://vitehub.dev/docs/development/diagnostics",
|
|
5
5
|
codes: { INTERNAL_INVARIANT_FAILED: {
|
|
@@ -18,5 +18,4 @@ function invariantError(what) {
|
|
|
18
18
|
function invariant(condition, what) {
|
|
19
19
|
if (!condition) throw invariantError(what);
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { invariantError as n, invariant as t };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as consoleHttpError } from "./http-error-
|
|
3
|
-
import { t as getConsoleInvocations } from "./invocations-
|
|
1
|
+
import { n as consoleState } from "./internal-0C_CC601.js";
|
|
2
|
+
import { t as consoleHttpError } from "./http-error-BorAxJYM.js";
|
|
3
|
+
import { t as getConsoleInvocations } from "./invocations-B60XWNES.js";
|
|
4
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-CBtvqI30.js";
|
|
4
5
|
import { invocationPageChanges } from "@vite-hub/agent";
|
|
5
|
-
|
|
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 }
|
|
@@ -50,5 +52,4 @@ async function undoConsolePageChange(input, context) {
|
|
|
50
52
|
} : !restored && "error" in page && typeof page.error === "string" ? { error: page.error } : {}
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
|
-
//#endregion
|
|
54
55
|
export { undoConsolePageChange };
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/console/runtime/server/limits.ts
|
|
2
2
|
/** Request limits and action names that the Console operations declare without loading their handlers. */
|
|
3
3
|
const maximumConsoleRpcRequestBytes = 65536;
|
|
4
4
|
/** Bodies carry a whole Markdown document, so they may exceed the ordinary Console request limit. */
|
|
@@ -30,5 +30,4 @@ const consoleDocumentActionNames = [
|
|
|
30
30
|
"sessions",
|
|
31
31
|
"unschedule"
|
|
32
32
|
];
|
|
33
|
-
//#endregion
|
|
34
33
|
export { maximumConsoleMediaRequestBytes as a, maximumConsoleDocumentRequestBytes as i, consoleDocumentActionNames as n, maximumConsoleMediaUploadBytes as o, consoleMediaUploadRequestBytes as r, maximumConsoleRpcRequestBytes as s, consoleAttachmentRequestBytes as t };
|
package/dist/logs/client.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/logs/client.d.ts
|
|
2
1
|
/** A value in `fields`. An object or an array is dropped, and the event counts it in `browserError.droppedFields`. */
|
|
3
2
|
export type BrowserReportField = string | number | boolean | null;
|
|
4
3
|
export interface BrowserReportOptions {
|
|
@@ -17,5 +16,4 @@ export interface BrowserReportOptions {
|
|
|
17
16
|
* route, the limit of 10 reports a page, and the one report a message rule of the uncaught errors. It never throws. On
|
|
18
17
|
* the server, or when `browserErrors` is off, it does nothing.
|
|
19
18
|
*/
|
|
20
|
-
export declare function reportBrowserError(error: unknown, options?: BrowserReportOptions): void;
|
|
21
|
-
//#endregion
|
|
19
|
+
export declare function reportBrowserError(error: unknown, options?: BrowserReportOptions): void;
|
package/dist/logs/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/logs/client.ts
|
|
2
2
|
/**
|
|
3
3
|
* Send an error that the page caught, or a warning, to the server logs, with `observability.browserErrors`. It uses the
|
|
4
4
|
* route, the limit of 10 reports a page, and the one report a message rule of the uncaught errors. It never throws. On
|
|
@@ -8,5 +8,4 @@ function reportBrowserError(error, options = {}) {
|
|
|
8
8
|
const report = Reflect.get(globalThis, Symbol.for("vite-hub.browserErrors"));
|
|
9
9
|
if (typeof report === "function") report("handled", error, options);
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { reportBrowserError };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import { o as LogSourceInfo, r as LogPage } from "
|
|
4
|
-
//#region src/console/runtime/server/logs.get.d.ts
|
|
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";
|
|
5
4
|
export declare function consoleLogsHandler(event: ConsoleRequestEvent): Promise<{
|
|
6
5
|
source: LogSourceInfo;
|
|
7
6
|
page: LogPage;
|
|
@@ -12,5 +11,4 @@ export declare function consoleLogsHandler(event: ConsoleRequestEvent): Promise<
|
|
|
12
11
|
export declare const readConsoleLogs: ConsoleAccessRoute<typeof consoleLogsHandler>;
|
|
13
12
|
/** `GET <base>/_vitehub/console/logs` */
|
|
14
13
|
declare const consoleLogsRoute: ConsoleRoute;
|
|
15
|
-
//#endregion
|
|
16
14
|
export { consoleLogsRoute as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
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
|
-
|
|
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;
|
|
@@ -52,5 +52,4 @@ async function consoleLogsHandler(event) {
|
|
|
52
52
|
const readConsoleLogs = withConsoleAccess(consoleLogsHandler, { section: "logs" });
|
|
53
53
|
/** `GET <base>/_vitehub/console/logs` */
|
|
54
54
|
const consoleLogsRoute = consoleRoute(readConsoleLogs);
|
|
55
|
-
//#endregion
|
|
56
55
|
export { consoleLogsHandler, consoleLogsRoute as default, readConsoleLogs };
|
|
@@ -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 };
|
package/dist/logs/host.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { a as LogSource } from "../source-
|
|
2
|
-
//#region src/logs/host.d.ts
|
|
1
|
+
import { a as LogSource } from "../source-DemBtwla.js";
|
|
3
2
|
/** The host connects a source. It remains the owner of capture and provider setup. */
|
|
4
3
|
export declare function installLogSource(projectRoot: string, source: LogSource): void;
|
|
5
|
-
export declare function getLogSource(): LogSource | undefined;
|
|
6
|
-
//#endregion
|
|
4
|
+
export declare function getLogSource(): LogSource | undefined;
|
package/dist/logs/host.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { getLogSource, installLogSource };
|
|
1
|
+
export { t as getLogSource, n as installLogSource } from "../host-DeNPYIeV.js";
|
package/dist/logs/memory.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createLogBuffer, t as LogBuffer } from "../memory-
|
|
1
|
+
import { n as createLogBuffer, t as LogBuffer } from "../memory-GK5ZGWrp.js";
|
|
2
2
|
export { LogBuffer, createLogBuffer };
|
package/dist/logs/memory.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createLogBuffer };
|
|
1
|
+
export { t as createLogBuffer } from "../memory-D3EJS_Bp.js";
|
package/dist/logs/source.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LogSource, c as logCursorExpiredError, d as logPageSchema, f as logQuerySchema, i as LogQuery, l as logEntrySchema, m as parseLogQuery, n as LogLevel, o as LogSourceInfo, p as logSourceInfoSchema, r as LogPage, s as isLogCursorExpiredError, t as LogEntry, u as logLevelSchema } from "../source-
|
|
1
|
+
import { a as LogSource, c as logCursorExpiredError, d as logPageSchema, f as logQuerySchema, i as LogQuery, l as logEntrySchema, m as parseLogQuery, n as LogLevel, o as LogSourceInfo, p as logSourceInfoSchema, r as LogPage, s as isLogCursorExpiredError, t as LogEntry, u as logLevelSchema } from "../source-DemBtwla.js";
|
|
2
2
|
export { LogEntry, LogLevel, LogPage, LogQuery, LogSource, LogSourceInfo, isLogCursorExpiredError, logCursorExpiredError, logEntrySchema, logLevelSchema, logPageSchema, logQuerySchema, logSourceInfoSchema, parseLogQuery };
|
package/dist/logs/source.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { isLogCursorExpiredError, logCursorExpiredError, logEntrySchema, logLevelSchema, logPageSchema, logQuerySchema, logSourceInfoSchema, parseLogQuery };
|
|
1
|
+
export { t as isLogCursorExpiredError, n as logCursorExpiredError, r as logEntrySchema, i as logLevelSchema, a as logPageSchema, o as logQuerySchema, s as logSourceInfoSchema, c as parseLogQuery } from "../source-DYFndd0W.js";
|
package/dist/logs.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
1
|
+
import { n as createLogBuffer, t as LogBuffer } from "./memory-GK5ZGWrp.js";
|
|
2
|
+
import { a as LogSource, c as logCursorExpiredError, i as LogQuery, m as parseLogQuery, n as LogLevel, o as LogSourceInfo, r as LogPage, t as LogEntry } from "./source-DemBtwla.js";
|
|
3
3
|
export { type LogBuffer, type LogEntry, type LogLevel, type LogPage, type LogQuery, type LogSource, type LogSourceInfo, createLogBuffer, logCursorExpiredError, parseLogQuery };
|
package/dist/logs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as createLogBuffer } from "./memory-D3EJS_Bp.js";
|
|
2
|
+
import { c as parseLogQuery, n as logCursorExpiredError } from "./source-DYFndd0W.js";
|
|
3
3
|
export { createLogBuffer, logCursorExpiredError, parseLogQuery };
|
|
@@ -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,11 +1,8 @@
|
|
|
1
|
-
//#region src/console/runtime/mcp-client.d.ts
|
|
2
1
|
/**
|
|
3
|
-
* The MCP client section of the Console: an MCP client that runs on the
|
|
4
|
-
* HTTP as the person who signed in to the Console, and keeps each grant, token,
|
|
5
|
-
* 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.
|
|
6
5
|
*/
|
|
7
|
-
/** Path of the OAuth callback page under the Console mount. Authorization servers redirect the browser here. */
|
|
8
|
-
declare const consoleMcpCallbackPath = "/_vitehub/mcp-client/callback";
|
|
9
6
|
/**
|
|
10
7
|
* How a connection proves who it is:
|
|
11
8
|
* - `oauth`: the MCP authorization flow (RFC 9728 discovery, client registration, PKCE).
|
|
@@ -98,10 +95,9 @@ interface ConsoleMcpConnectResult {
|
|
|
98
95
|
authorizationUrl?: string;
|
|
99
96
|
connection: ConsoleMcpConnection;
|
|
100
97
|
}
|
|
101
|
-
/**
|
|
98
|
+
/** All items of a list that an MCP server returns, from all its pages. The items are as the server sent them. */
|
|
102
99
|
interface ConsoleMcpPage {
|
|
103
100
|
items: Record<string, unknown>[];
|
|
104
|
-
nextCursor?: string;
|
|
105
101
|
}
|
|
106
102
|
type ConsoleMcpListKind = "prompts" | "resource-templates" | "resources" | "tools";
|
|
107
103
|
/** The answer of one request: the result, or the JSON-RPC error that the server returned instead. */
|
|
@@ -114,5 +110,4 @@ interface ConsoleMcpOutcome {
|
|
|
114
110
|
};
|
|
115
111
|
result?: Record<string, unknown>;
|
|
116
112
|
}
|
|
117
|
-
|
|
118
|
-
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, consoleMcpCallbackPath as p, ConsoleMcpConnectResult as r, ConsoleMcpListKind as s, ConsoleMcpAuth as t, ConsoleMcpPage as u };
|
|
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,4 +1,3 @@
|
|
|
1
|
-
//#region src/console/runtime/client/media.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Media for the document editor. The editor asks a picker for media when someone chooses **Image…** in the `/` menu,
|
|
4
3
|
* pastes or drops image files into the body, or chooses a file for a Blob reference field such as `image()`. Provide a
|
|
@@ -70,5 +69,4 @@ interface ConsoleMediaPicker {
|
|
|
70
69
|
declare function provideConsoleMediaPicker(picker: ConsoleMediaPicker): void;
|
|
71
70
|
/** The media picker that a parent provided, or undefined when the editor should use its own. */
|
|
72
71
|
declare function useConsoleMediaPicker(): ConsoleMediaPicker | undefined;
|
|
73
|
-
//#endregion
|
|
74
72
|
export { ConsoleMediaRequest as a, ConsoleMediaReference as i, ConsoleMediaItem as n, provideConsoleMediaPicker as o, ConsoleMediaPicker as r, useConsoleMediaPicker as s, ConsoleMediaDetails as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
+
import { r as getConsoleSections } from "./sections-BNTdIEJw.js";
|
|
6
|
+
import { r as isRecordOrFunction } from "./object-DRSmpe04.js";
|
|
7
|
+
import { a as maximumConsoleMediaRequestBytes, o as maximumConsoleMediaUploadBytes } from "./limits-BLo31qDR.js";
|
|
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
|
|
@@ -474,5 +474,4 @@ async function uploadConsoleMedia(input, access) {
|
|
|
474
474
|
};
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
|
-
//#endregion
|
|
478
477
|
export { consoleMediaActionNames, consoleMediaName, consoleMediaType, maximumConsoleMediaRequestBytes, maximumConsoleMediaUploadBytes, runConsoleMediaAction, uploadConsoleMedia };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as callOperationRpc, r as operationRpcPath } from "./operation-rpc-
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as projectRequest, s as resolveProjectUrl } from "./project-
|
|
4
|
-
import { t as
|
|
5
|
-
|
|
1
|
+
import { n as callOperationRpc, r as operationRpcPath } from "./operation-rpc-BMdfapja.js";
|
|
2
|
+
import { t as ConsoleRequestError, u as requestConsole } from "./request-XFVx7CGC.js";
|
|
3
|
+
import { a as projectRequest, s as resolveProjectUrl } from "./project-DRC67Uiu.js";
|
|
4
|
+
import { t as consoleRpcHeader } from "./rpc-D3tsx5lZ.js";
|
|
5
|
+
// src/console/runtime/client/media-library.ts
|
|
6
6
|
/** Every media type, for the type filter. */
|
|
7
7
|
const consoleMediaTypes = [
|
|
8
8
|
"image",
|
|
@@ -275,5 +275,4 @@ function rememberConsoleMediaFolder(section, folder) {
|
|
|
275
275
|
globalThis.localStorage?.setItem(`${folderKey}:${section}`, folder);
|
|
276
276
|
} catch {}
|
|
277
277
|
}
|
|
278
|
-
//#endregion
|
|
279
278
|
export { rememberedConsoleMediaFolder as S, consoleMediaUrl as _, consoleFolderName as a, isConsoleMediaPathname as b, consoleMediaAspects as c, consoleMediaFileUrl as d, consoleMediaFormat as f, consoleMediaTypes as g, consoleMediaTypeIcons as h, consoleFocalPosition as i, consoleMediaBase as l, consoleMediaType as m, consoleCropName as n, consoleFolderTrail as o, consoleMediaTransformable as p, consoleFocalCropPosition as r, consoleMediaAccepts as s, consoleAspectRatio as t, consoleMediaDate as u, consoleMediaVariantUrl as v, rememberConsoleMediaFolder as x, createConsoleMediaClient as y };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/console/runtime/client/media-library.d.ts
|
|
2
1
|
interface ConsoleMediaFocal {
|
|
3
2
|
x: number;
|
|
4
3
|
y: number;
|
|
@@ -208,5 +207,4 @@ declare function consoleMediaAccepts(accept: readonly string[] | undefined, cont
|
|
|
208
207
|
/** The folder that uploads from the editor go to: the last folder someone opened in the library. */
|
|
209
208
|
declare function rememberedConsoleMediaFolder(section: string): string;
|
|
210
209
|
declare function rememberConsoleMediaFolder(section: string, folder: string): void;
|
|
211
|
-
//#endregion
|
|
212
210
|
export { consoleMediaTypeIcons as A, consoleMediaAspects as C, consoleMediaFormat as D, consoleMediaFileUrl as E, isConsoleMediaPathname as F, rememberConsoleMediaFolder as I, rememberedConsoleMediaFolder as L, consoleMediaUrl as M, consoleMediaVariantUrl as N, consoleMediaTransformable as O, createConsoleMediaClient as P, consoleMediaAccepts as S, consoleMediaDate as T, consoleCropName as _, ConsoleMediaCropReplacement as a, consoleFolderName as b, ConsoleMediaInfo as c, ConsoleMediaReferenceDocument as d, ConsoleMediaType as f, consoleAspectRatio as g, ConsoleMediaVariant as h, ConsoleMediaCrop as i, consoleMediaTypes as j, consoleMediaType as k, ConsoleMediaListQuery as l, ConsoleMediaUploadResult as m, ConsoleMediaBulkResult as n, ConsoleMediaFile as o, ConsoleMediaUploadOptions as p, ConsoleMediaClient as r, ConsoleMediaFocal as s, ConsoleMediaAccess as t, ConsoleMediaListing as u, consoleFocalCropPosition as v, consoleMediaBase as w, consoleFolderTrail as x, consoleFocalPosition as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as parseLogQuery, n as logCursorExpiredError, r as logEntrySchema } from "./source-DYFndd0W.js";
|
|
2
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-CBtvqI30.js";
|
|
3
3
|
import * as v from "valibot";
|
|
4
|
-
|
|
4
|
+
// src/logs/memory.ts
|
|
5
5
|
function createLogBuffer(options = {}) {
|
|
6
6
|
const maxEntries = options.maxEntries ?? 256;
|
|
7
7
|
const maxEntryBytes = options.maxEntryBytes ?? 16384;
|
|
@@ -94,5 +94,4 @@ function createLogBuffer(options = {}) {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
//#endregion
|
|
98
97
|
export { createLogBuffer as t };
|