vite-hub 0.0.4 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +265 -14
- package/dist/_internal/auth/internal/server.d.ts +1 -0
- package/dist/_internal/auth/internal/server.js +2 -0
- package/dist/_internal/auth/runtime/server.d.ts +1 -0
- package/dist/_internal/auth/runtime/server.js +2 -0
- package/dist/_internal/runtime/browser-errors.d.ts +22 -0
- package/dist/_internal/runtime/browser-errors.js +156 -0
- package/dist/_internal/runtime/internal/h3.d.ts +1 -0
- package/dist/_internal/runtime/internal/h3.js +2 -0
- package/dist/_internal/runtime/redirects.d.ts +37 -0
- package/dist/_internal/runtime/redirects.js +71 -0
- package/dist/_internal/runtime/request-policy.d.ts +43 -0
- package/dist/_internal/runtime/request-policy.js +62 -0
- package/dist/_internal/runtime/security.d.ts +27 -0
- package/dist/_internal/runtime/security.js +104 -0
- package/dist/access-F0YP5D5E.js +439 -0
- package/dist/access-policy-B_DCpZUt.js +73 -0
- package/dist/access-policy-BsB3QVe5.d.ts +109 -0
- package/dist/account-Bsu-LBOF.d.ts +195 -0
- package/dist/agent/capabilities.d.ts +1 -20
- package/dist/agent/capabilities.js +1 -7
- package/dist/agent/invocations/database.d.ts +1 -0
- package/dist/agent/invocations/database.js +2 -0
- package/dist/agent/invocations/drizzle.d.ts +1 -0
- package/dist/agent/invocations/drizzle.js +2 -0
- package/dist/agent/invocations.d.ts +1 -0
- package/dist/agent/invocations.js +2 -0
- package/dist/agent/observability.d.ts +1 -0
- package/dist/agent/observability.js +2 -0
- package/dist/agent/page.d.ts +1 -0
- package/dist/agent/page.js +2 -0
- package/dist/agent/process.d.ts +1 -0
- package/dist/agent/process.js +2 -0
- package/dist/agent/state.d.ts +1 -0
- package/dist/agent/state.js +2 -0
- package/dist/agent/ui/vue.d.ts +1 -0
- package/dist/agent/ui/vue.js +2 -0
- package/dist/agent/ui.d.ts +1 -0
- package/dist/agent/ui.js +2 -0
- package/dist/agent/vite.d.ts +1 -0
- package/dist/agent/vite.js +2 -0
- package/dist/agent-invocations.post-DIm8tJV2.js +423 -0
- package/dist/agent.d.ts +1 -7
- package/dist/agent.js +1 -31
- package/dist/agents-C94A4N9u.d.ts +29 -0
- package/dist/agents-DnHexzTJ.js +123 -0
- package/dist/agents-y5hBFHUQ.js +2 -0
- package/dist/auth/abilities.d.ts +1 -0
- package/dist/auth/abilities.js +2 -0
- package/dist/auth/database.d.ts +1 -0
- package/dist/auth/database.js +2 -0
- package/dist/auth/forward.d.ts +1 -0
- package/dist/auth/forward.js +2 -0
- package/dist/auth/mcp.d.ts +1 -0
- package/dist/auth/mcp.js +2 -0
- package/dist/auth/presets.d.ts +1 -0
- package/dist/auth/presets.js +2 -0
- package/dist/auth/schema.d.ts +1 -0
- package/dist/auth/schema.js +2 -0
- package/dist/auth-BFVHYizM.d.ts +120 -0
- package/dist/auth-operations-GcQk0O0X.js +34 -0
- package/dist/auth-types-DWpTBZvp.d.ts +90 -0
- package/dist/bin.d.ts +1 -1
- package/dist/bin.js +318 -50
- package/dist/blob/client.d.ts +1 -0
- package/dist/blob/client.js +2 -0
- package/dist/blob/media.d.ts +1 -0
- package/dist/blob/media.js +2 -0
- package/dist/blob/nuxt-image.d.ts +3 -0
- package/dist/blob/nuxt-image.js +3 -0
- package/dist/blob/vue.d.ts +1 -0
- package/dist/blob/vue.js +2 -0
- package/dist/blob-BRV6_wZa.js +26 -0
- package/dist/blob-CiUmptIp.d.ts +9 -0
- package/dist/bundle.d.ts +1 -0
- package/dist/bundle.js +2 -0
- package/dist/cache/operations.d.ts +5 -0
- package/dist/cache/operations.js +51 -0
- package/dist/cache.d.ts +28 -0
- package/dist/cache.js +219 -0
- package/dist/cli-DjoDGgT4.js +36 -0
- package/dist/cli-config--rAg6V-a.js +2 -0
- package/dist/cli-config-Bpjjfz5j.js +105 -0
- package/dist/cloudflare-env-lookup-DKXdr4P_.js +16 -0
- package/dist/cloudflare-prerender.mjs +3 -0
- package/dist/cloudflare-workers.d.ts +12 -0
- package/dist/cms/access.d.ts +1 -0
- package/dist/cms/access.js +2 -0
- package/dist/cms/vite.d.ts +1 -0
- package/dist/cms/vite.js +2 -0
- package/dist/cms.d.ts +3 -0
- package/dist/cms.js +3 -0
- package/dist/comments/anchor.d.ts +1 -0
- package/dist/comments/anchor.js +2 -0
- package/dist/comments/client.d.ts +1 -0
- package/dist/comments/client.js +2 -0
- package/dist/comments/database/postgres.d.ts +1 -0
- package/dist/comments/database/postgres.js +2 -0
- package/dist/comments/database.d.ts +1 -0
- package/dist/comments/database.js +2 -0
- package/dist/comments/realtime.d.ts +1 -0
- package/dist/comments/realtime.js +2 -0
- package/dist/comments/rpc.d.ts +1 -0
- package/dist/comments/rpc.js +2 -0
- package/dist/comments/runtime/auth.d.ts +1 -0
- package/dist/comments/runtime/auth.js +2 -0
- package/dist/comments/runtime.d.ts +1 -0
- package/dist/comments/runtime.js +2 -0
- package/dist/comments/server.d.ts +1 -0
- package/dist/comments/server.js +2 -0
- package/dist/comments/testing.d.ts +1 -0
- package/dist/comments/testing.js +2 -0
- package/dist/comments.d.ts +1 -0
- package/dist/comments.js +2 -0
- package/dist/connections/agent.d.ts +1 -0
- package/dist/connections/agent.js +2 -0
- package/dist/connections/chatgpt.d.ts +1 -0
- package/dist/connections/chatgpt.js +2 -0
- package/dist/connections/google.d.ts +1 -0
- package/dist/connections/google.js +2 -0
- package/dist/connections/operations.d.ts +1 -0
- package/dist/connections/operations.js +2 -0
- package/dist/connections/server.d.ts +1 -0
- package/dist/connections/server.js +2 -0
- package/dist/connections.d.ts +1 -0
- package/dist/connections.js +2 -0
- package/dist/console/auth-types.d.ts +2 -0
- package/dist/console/auth-types.js +1 -0
- package/dist/console/auth.d.ts +6 -0
- package/dist/console/auth.js +9 -0
- package/dist/console/runtime/auth-operations.d.ts +35 -0
- package/dist/console/runtime/auth-operations.js +2 -0
- package/dist/console/runtime/client/account-views.d.ts +17 -0
- package/dist/console/runtime/client/account-views.js +8 -0
- package/dist/console/runtime/client/account.d.ts +2 -0
- package/dist/console/runtime/client/account.js +1125 -0
- package/dist/console/runtime/client/add-primitive.ts +59 -0
- package/dist/console/runtime/client/app-identity.ts +44 -0
- package/dist/console/runtime/client/appearance.d.ts +62 -0
- package/dist/console/runtime/client/appearance.js +87 -0
- package/dist/console/runtime/client/auth-management.ts +67 -0
- package/dist/console/runtime/client/blob-media.d.ts +46 -0
- package/dist/console/runtime/client/blob-media.js +257 -0
- package/dist/console/runtime/client/command-search.ts +103 -0
- package/dist/console/runtime/client/comment-thread.d.ts +33 -0
- package/dist/console/runtime/client/comment-thread.js +62 -0
- package/dist/console/runtime/client/document-cache.ts +13 -0
- package/dist/console/runtime/client/documents.d.ts +3 -0
- package/dist/console/runtime/client/documents.js +2 -0
- package/dist/console/runtime/client/editor.d.ts +83 -0
- package/dist/console/runtime/client/editor.js +269 -0
- package/dist/console/runtime/client/env-groups.d.ts +28 -0
- package/dist/console/runtime/client/env-groups.js +39 -0
- package/dist/console/runtime/client/env-status.d.ts +35 -0
- package/dist/console/runtime/client/env-status.js +68 -0
- package/dist/console/runtime/client/format.d.ts +91 -0
- package/dist/console/runtime/client/format.js +2 -0
- package/dist/console/runtime/client/format.ts +267 -0
- package/dist/console/runtime/client/highlight-languages.ts +27 -0
- package/dist/console/runtime/client/invocation-deletion.d.ts +17 -0
- package/dist/console/runtime/client/invocation-deletion.js +25 -0
- package/dist/console/runtime/client/invocation.d.ts +28 -0
- package/dist/console/runtime/client/invocation.js +81 -0
- package/dist/console/runtime/client/live.d.ts +67 -0
- package/dist/console/runtime/client/live.js +158 -0
- package/dist/console/runtime/client/mcp-client.d.ts +58 -0
- package/dist/console/runtime/client/mcp-client.js +125 -0
- package/dist/console/runtime/client/media-library.d.ts +2 -0
- package/dist/console/runtime/client/media-library.js +2 -0
- package/dist/console/runtime/client/media-uploads.d.ts +33 -0
- package/dist/console/runtime/client/media-uploads.js +97 -0
- package/dist/console/runtime/client/media.d.ts +2 -0
- package/dist/console/runtime/client/media.js +13 -0
- package/dist/console/runtime/client/operation-view.d.ts +44 -0
- package/dist/console/runtime/client/operation-view.js +161 -0
- package/dist/console/runtime/client/presence.d.ts +98 -0
- package/dist/console/runtime/client/presence.js +255 -0
- package/dist/console/runtime/client/preview.d.ts +86 -0
- package/dist/console/runtime/client/preview.js +125 -0
- package/dist/console/runtime/client/problem.d.ts +19 -0
- package/dist/console/runtime/client/problem.js +59 -0
- package/dist/console/runtime/client/project-link.d.ts +2 -0
- package/dist/console/runtime/client/project-link.js +2 -0
- package/dist/console/runtime/client/project-session.d.ts +221 -0
- package/dist/console/runtime/client/project-session.js +723 -0
- package/dist/console/runtime/client/project.d.ts +48 -0
- package/dist/console/runtime/client/project.js +2 -0
- package/dist/console/runtime/client/projects.d.ts +2 -0
- package/dist/console/runtime/client/projects.js +2 -0
- package/dist/console/runtime/client/publish.d.ts +12 -0
- package/dist/console/runtime/client/publish.js +18 -0
- package/dist/console/runtime/client/rate-limit.d.ts +36 -0
- package/dist/console/runtime/client/rate-limit.js +96 -0
- package/dist/console/runtime/client/read-only.d.ts +9 -0
- package/dist/console/runtime/client/read-only.js +12 -0
- package/dist/console/runtime/client/request.d.ts +55 -8
- package/dist/console/runtime/client/request.js +2 -133
- package/dist/console/runtime/client/route-query.d.ts +60 -0
- package/dist/console/runtime/client/route-query.js +2 -0
- package/dist/console/runtime/client/schedule-run.d.ts +13 -0
- package/dist/console/runtime/client/schedule-run.js +47 -0
- package/dist/console/runtime/client/schema-form.d.ts +2 -0
- package/dist/console/runtime/client/schema-form.js +296 -0
- package/dist/console/runtime/client/sections.d.ts +2 -12
- package/dist/console/runtime/client/sections.js +2 -41
- package/dist/console/runtime/client/sidebar.ts +84 -0
- package/dist/console/runtime/client/site-access.d.ts +32 -0
- package/dist/console/runtime/client/site-access.js +932 -0
- package/dist/console/runtime/client/stored.d.ts +33 -0
- package/dist/console/runtime/client/stored.js +2 -0
- package/dist/console/runtime/client/ticket.d.ts +2 -0
- package/dist/console/runtime/client/ticket.js +2 -0
- package/dist/console/runtime/client/toast.d.ts +39 -0
- package/dist/console/runtime/client/toast.js +35 -0
- package/dist/console/runtime/client/workflow.d.ts +20 -0
- package/dist/console/runtime/client/workflow.js +79 -0
- package/dist/console/runtime/components/console-account-api-keys.vue +195 -0
- package/dist/console/runtime/components/console-account-env.vue +286 -0
- package/dist/console/runtime/components/console-account-home.vue +427 -0
- package/dist/console/runtime/components/console-account-link.vue +68 -0
- package/dist/console/runtime/components/console-account-menu.vue +126 -0
- package/dist/console/runtime/components/console-account-rename.vue +67 -0
- package/dist/console/runtime/components/console-account-settings.vue +184 -0
- package/dist/console/runtime/components/console-account-setup.vue +82 -0
- package/dist/console/runtime/components/console-account-shell.vue +339 -0
- package/dist/console/runtime/components/console-account-sign-in.vue +152 -0
- package/dist/console/runtime/components/console-account-snippet.vue +89 -0
- package/dist/console/runtime/components/console-account-team-settings.vue +131 -0
- package/dist/console/runtime/components/console-account-team.vue +199 -0
- package/dist/console/runtime/components/console-account-unlink.vue +52 -0
- package/dist/console/runtime/components/console-activity-feed.vue +69 -0
- package/dist/console/runtime/components/console-add-primitive.vue +176 -0
- package/dist/console/runtime/components/console-agent-list.ts +61 -0
- package/dist/console/runtime/components/console-agent-session.vue +301 -0
- package/dist/console/runtime/components/console-app-crumb.vue +52 -0
- package/dist/console/runtime/components/console-app-logo.vue +44 -0
- package/dist/console/runtime/components/console-app-settings.vue +271 -0
- package/dist/console/runtime/components/console-app.vue +894 -669
- package/dist/console/runtime/components/console-auth-action.vue +241 -0
- package/dist/console/runtime/components/console-auth-activity.vue +162 -0
- package/dist/console/runtime/components/console-auth-chart.vue +105 -0
- package/dist/console/runtime/components/console-auth-detail.vue +379 -0
- package/dist/console/runtime/components/console-auth-event-list.vue +79 -0
- package/dist/console/runtime/components/console-auth-event-setup.vue +39 -0
- package/dist/console/runtime/components/console-auth-overview.vue +95 -0
- package/dist/console/runtime/components/console-auth-user-events.vue +62 -0
- package/dist/console/runtime/components/console-auth.vue +651 -0
- package/dist/console/runtime/components/console-blob-detail.vue +83 -0
- package/dist/console/runtime/components/console-blob.vue +160 -300
- package/dist/console/runtime/components/console-cache.vue +358 -0
- package/dist/console/runtime/components/console-code-text.vue +18 -0
- package/dist/console/runtime/components/console-comark-component.vue +146 -0
- package/dist/console/runtime/components/console-comment-thread.vue +320 -0
- package/dist/console/runtime/components/console-confirm.vue +46 -0
- package/dist/console/runtime/components/console-connection-state.vue +40 -0
- package/dist/console/runtime/components/console-connection.ts +18 -0
- package/dist/console/runtime/components/console-database-model.ts +51 -6
- package/dist/console/runtime/components/console-database.vue +310 -380
- package/dist/console/runtime/components/console-definitions.vue +491 -306
- package/dist/console/runtime/components/console-document-dashboard.vue +473 -0
- package/dist/console/runtime/components/console-document-diff.vue +43 -0
- package/dist/console/runtime/components/console-document-editor.vue +2806 -0
- package/dist/console/runtime/components/console-document-history.vue +118 -0
- package/dist/console/runtime/components/console-document-list.vue +575 -0
- package/dist/console/runtime/components/console-document-preview.vue +409 -0
- package/dist/console/runtime/components/console-document-settings.vue +106 -0
- package/dist/console/runtime/components/console-documents.vue +544 -0
- package/dist/console/runtime/components/console-env-details.vue +49 -0
- package/dist/console/runtime/components/console-env.vue +322 -0
- package/dist/console/runtime/components/console-facts.ts +13 -0
- package/dist/console/runtime/components/console-frame.vue +201 -1
- package/dist/console/runtime/components/console-home.vue +575 -155
- package/dist/console/runtime/components/console-icon.vue +19 -0
- package/dist/console/runtime/components/console-invocation-composer.vue +155 -0
- package/dist/console/runtime/components/console-kv.vue +225 -235
- package/dist/console/runtime/components/console-lazy-views.ts +2 -0
- package/dist/console/runtime/components/console-loading.vue +29 -0
- package/dist/console/runtime/components/console-mark.vue +3 -8
- package/dist/console/runtime/components/console-markdown-editor.vue +681 -0
- package/dist/console/runtime/components/console-mcp-callback.vue +76 -0
- package/dist/console/runtime/components/console-mcp-client.vue +255 -0
- package/dist/console/runtime/components/console-mcp-connect.vue +162 -0
- package/dist/console/runtime/components/console-mcp-connection.vue +219 -0
- package/dist/console/runtime/components/console-mcp-content.vue +157 -0
- package/dist/console/runtime/components/console-mcp-items.vue +346 -0
- package/dist/console/runtime/components/console-media-browser.vue +956 -0
- package/dist/console/runtime/components/console-media-crops.vue +168 -0
- package/dist/console/runtime/components/console-media-detail.vue +278 -0
- package/dist/console/runtime/components/console-media-dialog.vue +74 -0
- package/dist/console/runtime/components/console-media-field.vue +161 -0
- package/dist/console/runtime/components/console-media-focal.vue +138 -0
- package/dist/console/runtime/components/console-media-library.vue +132 -0
- package/dist/console/runtime/components/console-media-move.vue +161 -0
- package/dist/console/runtime/components/console-media-picker.vue +196 -0
- package/dist/console/runtime/components/console-media-uploads.vue +75 -0
- package/dist/console/runtime/components/console-new-chat.ts +27 -0
- package/dist/console/runtime/components/console-operation-view.vue +327 -0
- package/dist/console/runtime/components/console-page-changes.vue +207 -0
- package/dist/console/runtime/components/console-page-header.vue +82 -0
- package/dist/console/runtime/components/console-page-toolbar.vue +41 -0
- package/dist/console/runtime/components/console-presence-avatars.vue +74 -0
- package/dist/console/runtime/components/console-project-switcher.vue +212 -0
- package/dist/console/runtime/components/console-property-list.vue +41 -0
- package/dist/console/runtime/components/console-property-row.vue +59 -0
- package/dist/console/runtime/components/console-rail.vue +237 -0
- package/dist/console/runtime/components/console-rate-limit.vue +175 -0
- package/dist/console/runtime/components/console-relative-time.vue +74 -0
- package/dist/console/runtime/components/console-schema-date-input.vue +88 -0
- package/dist/console/runtime/components/console-schema-field.vue +450 -0
- package/dist/console/runtime/components/console-schema-form.vue +76 -0
- package/dist/console/runtime/components/console-schema-list.vue +157 -0
- package/dist/console/runtime/components/console-search-palette.vue +1051 -0
- package/dist/console/runtime/components/console-search.vue +17 -424
- package/dist/console/runtime/components/console-section-icon.vue +18 -0
- package/dist/console/runtime/components/console-section.vue +68 -0
- package/dist/console/runtime/components/console-seo-panel.vue +261 -0
- package/dist/console/runtime/components/console-session-actions.vue +158 -0
- package/dist/console/runtime/components/console-session-bootstrap.ts +0 -26
- package/dist/console/runtime/components/console-session-cancel.vue +89 -0
- package/dist/console/runtime/components/console-session-code-language.ts +32 -0
- package/dist/console/runtime/components/console-session-code-preview.vue +42 -40
- package/dist/console/runtime/components/console-session-copy-link.vue +11 -0
- package/dist/console/runtime/components/console-session-inspector.vue +392 -235
- package/dist/console/runtime/components/console-session-loading.vue +19 -27
- package/dist/console/runtime/components/console-session-navbar.vue +44 -27
- package/dist/console/runtime/components/console-session-trace.vue +30 -84
- package/dist/console/runtime/components/console-session.css +438 -818
- package/dist/console/runtime/components/console-settings-card.vue +76 -0
- package/dist/console/runtime/components/console-settings-value.vue +46 -0
- package/dist/console/runtime/components/console-settings.vue +100 -0
- package/dist/console/runtime/components/console-setup-hint.vue +15 -0
- package/dist/console/runtime/components/console-sidebar-item.vue +62 -0
- package/dist/console/runtime/components/console-sidebar-trigger.vue +34 -0
- package/dist/console/runtime/components/console-sidebar.vue +352 -0
- package/dist/console/runtime/components/console-site.vue +370 -0
- package/dist/console/runtime/components/console-skill-file.vue +73 -0
- package/dist/console/runtime/components/console-skill-tree.vue +62 -0
- package/dist/console/runtime/components/console-skills.vue +193 -0
- package/dist/console/runtime/components/console-stat-grid.vue +64 -0
- package/dist/console/runtime/components/console-state.vue +150 -0
- package/dist/console/runtime/components/console-toaster.vue +75 -0
- package/dist/console/runtime/components/console-usage-chart.vue +210 -0
- package/dist/console/runtime/components/console-usage-model-detail.vue +138 -0
- package/dist/console/runtime/components/console-usage-model.ts +376 -0
- package/dist/console/runtime/components/console-usage-share-bar.vue +48 -0
- package/dist/console/runtime/components/console-usage.vue +1086 -508
- package/dist/console/runtime/components/console-user-menu.vue +42 -0
- package/dist/console/runtime/components/console-value.vue +36 -0
- package/dist/console/runtime/components/console-workflow-actions.vue +174 -0
- package/dist/console/runtime/components/console-workspace-browser.vue +507 -0
- package/dist/console/runtime/components/console-workspace-file.ts +12 -0
- package/dist/console/runtime/components/console-workspace-history.vue +76 -0
- package/dist/console/runtime/components/console-wrap.ts +10 -0
- package/dist/console/runtime/components/invocation/agent-capability-inspector.ts +165 -0
- package/dist/console/runtime/components/invocation/agent-invocation-list.ts +260 -0
- package/dist/console/runtime/components/invocation/agent-invocation-timeline.ts +112 -0
- package/dist/console/runtime/components/invocation/agent-invocation.ts +1991 -0
- package/dist/console/runtime/components/invocation/index.ts +8 -0
- package/dist/console/runtime/components/invocation/internal/brand-icons.ts +65 -0
- package/dist/console/runtime/components/invocation/internal/channel-icon.ts +51 -0
- package/dist/console/runtime/components/invocation/internal/invocation-activity.ts +745 -0
- package/dist/console/runtime/components/invocation/internal/invocation-brand.ts +173 -0
- package/dist/console/runtime/components/invocation/internal/invocation-conversation.ts +167 -0
- package/dist/console/runtime/components/invocation/internal/invocation-page-changes.ts +64 -0
- package/dist/console/runtime/components/invocation/internal/payload-text.ts +27 -0
- package/dist/console/runtime/components/invocation/internal/url.ts +8 -0
- package/dist/console/runtime/components/invocation/invocation-display.ts +56 -0
- package/dist/console/runtime/components/invocation/invocation.css +2789 -0
- package/dist/console/runtime/components/invocation/types.ts +97 -0
- package/dist/console/runtime/console-route.d.ts +15 -9
- package/dist/console/runtime/console-route.js +2 -37
- package/dist/console/runtime/definitions.d.ts +2 -2
- package/dist/console/runtime/definitions.js +2 -15
- package/dist/console/runtime/diagnostics.ts +287 -0
- package/dist/console/runtime/mcp-client.d.ts +2 -0
- package/dist/console/runtime/mcp-client.js +2 -0
- package/dist/console/runtime/page/loader.js +142 -0
- package/dist/console/runtime/page-tool/page-tool.js +10 -0
- package/dist/console/runtime/public/skills/index.json +47 -0
- package/dist/console/runtime/public/skills/vitehub/SKILL.md +99 -0
- package/dist/console/runtime/public/skills/vitehub/agents/openai.yaml +4 -0
- package/dist/console/runtime/public/skills/vitehub/references/agent-definitions.md +36 -0
- package/dist/console/runtime/public/skills/vitehub/references/bundle.md +57 -0
- package/dist/console/runtime/public/skills/vitehub/references/capabilities-authority.md +30 -0
- package/dist/console/runtime/public/skills/vitehub/references/channels-triggers.md +27 -0
- package/dist/console/runtime/public/skills/vitehub/references/framework-composition.md +29 -0
- package/dist/console/runtime/public/skills/vitehub/references/preview-contract.md +36 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/auth.md +14 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/blob.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/browser.md +17 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/cache.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/channels.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/connections.md +14 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/content.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/database.md +15 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/email.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/env.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/kv.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/markdown-template.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/queue.md +14 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/rate-limit.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/realtime.md +19 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/sandbox-task.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/sandbox.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/schedule.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/shell.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/source.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/workflow.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/workspace.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/project-patterns.md +19 -0
- package/dist/console/runtime/public/skills/vitehub/references/project-shapes.md +81 -0
- package/dist/console/runtime/public/skills/vitehub/references/proof-recovery.md +31 -0
- package/dist/console/runtime/public/skills/vitehub/references/sandboxes-hosts.md +26 -0
- package/dist/console/runtime/public/skills/vitehub/references/schedules-workflows-invocations.md +28 -0
- package/dist/console/runtime/public/skills/vitehub/references/server-primitives.md +39 -0
- package/dist/console/runtime/public/skills/vitehub/references/workspaces-sources-access.md +26 -0
- package/dist/console/runtime/rpc.d.ts +2 -35
- package/dist/console/runtime/rpc.js +2 -16
- package/dist/console/runtime/sections.d.ts +2 -2
- package/dist/console/runtime/sections.js +2 -126
- package/dist/console/runtime/server/access-policy.d.ts +2 -0
- package/dist/console/runtime/server/access-policy.js +2 -0
- package/dist/console/runtime/server/agents.get.d.ts +10 -5
- package/dist/console/runtime/server/agents.get.js +18 -10
- package/dist/console/runtime/server/auth.d.ts +2 -0
- package/dist/console/runtime/server/auth.js +81 -0
- package/dist/console/runtime/server/blob.d.ts +2 -2
- package/dist/console/runtime/server/blob.js +2 -18
- package/dist/console/runtime/server/channel-replay.d.ts +23 -0
- package/dist/console/runtime/server/channel-replay.js +52 -0
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/database.get.d.ts +34 -6
- package/dist/console/runtime/server/database.get.js +77 -40
- package/dist/console/runtime/server/database.js +1 -16
- package/dist/console/runtime/server/definitions.d.ts +2 -2
- package/dist/console/runtime/server/definitions.get.d.ts +10 -9
- package/dist/console/runtime/server/definitions.get.js +76 -15
- package/dist/console/runtime/server/definitions.js +2 -22
- package/dist/console/runtime/server/development.d.ts +2 -0
- package/dist/console/runtime/server/development.js +2 -0
- package/dist/console/runtime/server/documents.d.ts +2 -0
- package/dist/console/runtime/server/documents.js +3 -0
- package/dist/console/runtime/server/env.d.ts +6 -0
- package/dist/console/runtime/server/env.get.d.ts +9 -0
- package/dist/console/runtime/server/env.get.js +16 -0
- package/dist/console/runtime/server/env.js +2 -0
- package/dist/console/runtime/server/invocation-capabilities.get.d.ts +6 -5
- package/dist/console/runtime/server/invocation-capabilities.get.js +14 -11
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +8 -0
- package/dist/console/runtime/server/invocation-workspace.get.js +77 -0
- package/dist/console/runtime/server/invocation.get.d.ts +36 -25
- package/dist/console/runtime/server/invocation.get.js +140 -25
- package/dist/console/runtime/server/invocations.get.d.ts +12 -5
- package/dist/console/runtime/server/invocations.get.js +56 -69
- package/dist/console/runtime/server/logs.get.d.ts +16 -0
- package/dist/console/runtime/server/logs.get.js +56 -0
- package/dist/console/runtime/server/mcp-client-operations.d.ts +5 -0
- package/dist/console/runtime/server/mcp-client-operations.js +139 -0
- package/dist/console/runtime/server/operation-contributions.d.ts +2 -0
- package/dist/console/runtime/server/operation-contributions.js +2 -0
- package/dist/console/runtime/server/page-auth.d.ts +18 -0
- package/dist/console/runtime/server/page-auth.js +44 -0
- package/dist/console/runtime/server/page-session.d.ts +2 -0
- package/dist/console/runtime/server/page-session.js +5 -0
- package/dist/console/runtime/server/page-tool.d.ts +2 -0
- package/dist/console/runtime/server/page-tool.js +105 -0
- package/dist/console/runtime/server/rpc.d.ts +27 -0
- package/dist/console/runtime/server/rpc.js +222 -0
- package/dist/console/runtime/server/runtime.d.ts +2 -0
- package/dist/console/runtime/server/runtime.js +2 -0
- package/dist/console/runtime/server/search.get.d.ts +2 -6
- package/dist/console/runtime/server/search.get.js +97 -2
- package/dist/console/runtime/server/sections.d.ts +6 -2
- package/dist/console/runtime/server/sections.get.d.ts +2 -9
- package/dist/console/runtime/server/sections.get.js +47 -9
- package/dist/console/runtime/server/sections.js +7 -16
- package/dist/console/runtime/server/setup.d.ts +5 -0
- package/dist/console/runtime/server/setup.js +5 -0
- package/dist/console/runtime/server/site-entry.d.ts +24 -0
- package/dist/console/runtime/server/site-entry.js +142 -0
- package/dist/console/runtime/server/site-session.d.ts +85 -0
- package/dist/console/runtime/server/site-session.js +2 -0
- package/dist/console/runtime/server/status.get.d.ts +16 -0
- package/dist/console/runtime/server/status.get.js +30 -0
- package/dist/console/runtime/server/tickets.d.ts +2 -0
- package/dist/console/runtime/server/tickets.js +2 -0
- package/dist/console/runtime/server/usage.get.d.ts +7 -3
- package/dist/console/runtime/server/usage.get.js +74 -26
- package/dist/console/runtime/server/workspace-files.get.d.ts +12 -0
- package/dist/console/runtime/server/workspace-files.get.js +55 -0
- package/dist/console/runtime/site-access.d.ts +2 -0
- package/dist/console/runtime/site-access.js +2 -0
- package/dist/console/runtime/skills.d.ts +18 -0
- package/dist/console/runtime/skills.js +17 -0
- package/dist/console/server.d.ts +33 -7
- package/dist/console/server.js +9 -28
- package/dist/console/ui.d.ts +217 -0
- package/dist/console/ui.js +3233 -0
- package/dist/console-lazy-views-DXnIkdyd.js +2 -0
- package/dist/console-route-COvNB_Xj.js +49 -0
- package/dist/console.d.ts +3 -2
- package/dist/content/client.d.ts +1 -0
- package/dist/content/client.js +2 -0
- package/dist/content/collections.d.ts +1 -0
- package/dist/content/collections.js +2 -0
- package/dist/content/database.d.ts +1 -0
- package/dist/content/database.js +2 -0
- package/dist/content/editor.d.ts +1 -0
- package/dist/content/editor.js +2 -0
- package/dist/content/markdown.d.ts +1 -0
- package/dist/content/markdown.js +2 -0
- package/dist/content/preview.d.ts +1 -0
- package/dist/content/preview.js +2 -0
- package/dist/content/realtime.d.ts +1 -0
- package/dist/content/realtime.js +2 -0
- package/dist/content/sqlite.d.ts +1 -0
- package/dist/content/sqlite.js +2 -0
- package/dist/content.d.ts +1 -0
- package/dist/content.js +2 -0
- package/dist/database-BVyhAxq-.d.ts +6 -0
- package/dist/database-J7M0B3ED.js +17 -0
- package/dist/decisions/vue.d.ts +1 -0
- package/dist/decisions/vue.js +2 -0
- package/dist/decisions.d.ts +1 -0
- package/dist/decisions.js +2 -0
- package/dist/definitions-BDRkT5-f.js +336 -0
- package/dist/definitions-CGTWTj67.d.ts +19 -0
- package/dist/definitions-CxDT8D8Y.d.ts +243 -0
- package/dist/definitions-bepsXY5G.js +98 -0
- package/dist/dev-peer-am78OsHH.js +472 -0
- package/dist/development-BzeSHZGH.js +18 -0
- package/dist/development-DgaQ05jw.d.ts +9 -0
- package/dist/device/vue.d.ts +1 -0
- package/dist/device/vue.js +2 -0
- package/dist/device.d.ts +1 -0
- package/dist/device.js +2 -0
- package/dist/diagnostics-CjGiniKb.d.ts +11 -0
- package/dist/diagnostics-D0DefmQj.js +79 -0
- package/dist/docs/assistant.d.ts +1 -0
- package/dist/docs/assistant.js +2 -0
- package/dist/docs/nuxt.d.ts +3 -0
- package/dist/docs/nuxt.js +3 -0
- package/dist/docs/server.d.ts +1 -0
- package/dist/docs/server.js +2 -0
- package/dist/docs.d.ts +1 -0
- package/dist/docs.js +2 -0
- package/dist/doctor.d.ts +13 -0
- package/dist/doctor.js +3096 -0
- package/dist/documents-8US1nUgK.js +547 -0
- package/dist/documents-C97WMaJZ.d.ts +474 -0
- package/dist/documents-DwPfR-fz.js +136 -0
- package/dist/documents-RVHsQKFw.d.ts +87 -0
- package/dist/durability/operations.d.ts +5 -0
- package/dist/durability/operations.js +28 -0
- package/dist/email/test.d.ts +1 -0
- package/dist/email/test.js +2 -0
- package/dist/entries-D48wVEaS.js +142 -0
- package/dist/env/bridge.d.ts +1 -0
- package/dist/env/bridge.js +2 -0
- package/dist/env/database.d.ts +1 -0
- package/dist/env/database.js +2 -0
- package/dist/env/seal.d.ts +1 -0
- package/dist/env/seal.js +2 -0
- package/dist/env-Dg1I_DWr.js +11 -0
- package/dist/error-diagnostics-C2rjmOlX.js +630 -0
- package/dist/error-diagnostics.ts +639 -0
- package/dist/forge.d.ts +1 -0
- package/dist/forge.js +2 -0
- package/dist/format-BOYlanIZ.js +304 -0
- package/dist/forms/client.d.ts +1 -0
- package/dist/forms/client.js +2 -0
- package/dist/forms/database.d.ts +1 -0
- package/dist/forms/database.js +2 -0
- package/dist/forms/formisch.d.ts +1 -0
- package/dist/forms/formisch.js +2 -0
- package/dist/forms/operations.d.ts +1 -0
- package/dist/forms/operations.js +2 -0
- package/dist/forms/runtime.d.ts +1 -0
- package/dist/forms/runtime.js +2 -0
- package/dist/forms/vue.d.ts +1 -0
- package/dist/forms/vue.js +2 -0
- package/dist/forms.d.ts +1 -0
- package/dist/forms.js +2 -0
- package/dist/gateways/ai-sdk.d.ts +1 -0
- package/dist/gateways/ai-sdk.js +2 -0
- package/dist/gateways.d.ts +1 -0
- package/dist/gateways.js +2 -0
- package/dist/host-CkL0jjBq.js +11 -0
- package/dist/http-error-Bs6e8_-8.js +30 -0
- package/dist/i18n/runtime.d.ts +1 -0
- package/dist/i18n/runtime.js +2 -0
- package/dist/i18n/server.d.ts +1 -0
- package/dist/i18n/server.js +2 -0
- package/dist/i18n/vue.d.ts +1 -0
- package/dist/i18n/vue.js +2 -0
- package/dist/i18n.d.ts +1 -0
- package/dist/i18n.js +2 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +39 -3
- package/dist/inspect-CDw7e0vK.js +127 -0
- package/dist/internal/agent-invocations-libsql.d.ts +2 -0
- package/dist/internal/agent-invocations-libsql.js +2 -0
- package/dist/internal/disabled-redis-driver.d.ts +3 -0
- package/dist/internal/disabled-redis-driver.js +7 -0
- package/dist/internal/disabled-upstash-driver.d.ts +3 -0
- package/dist/internal/disabled-upstash-driver.js +7 -0
- package/dist/internal/test-loader.d.ts +8 -0
- package/dist/internal/test-loader.js +75 -0
- package/dist/internal/test-server.d.ts +1 -0
- package/dist/internal/test-server.js +84 -0
- package/dist/internal-BP_O70ic.d.ts +59 -0
- package/dist/internal-BreyUsQ6.js +31 -0
- package/dist/invariant-DolT9EEx.js +22 -0
- package/dist/invocation-page-undo-BkUau8X7.js +54 -0
- package/dist/invocations-CsucCJuq.js +86 -0
- package/dist/limits-BUlwWYQE.js +34 -0
- package/dist/logs/host.d.ts +6 -0
- package/dist/logs/host.js +2 -0
- package/dist/logs/memory.d.ts +2 -0
- package/dist/logs/memory.js +2 -0
- package/dist/logs/source.d.ts +2 -0
- package/dist/logs/source.js +2 -0
- package/dist/logs.d.ts +3 -0
- package/dist/logs.js +3 -0
- package/dist/markdown-template/file.d.ts +1 -0
- package/dist/markdown-template/file.js +2 -0
- package/dist/mcp-client-CTbTbn7d.js +10 -0
- package/dist/mcp-client-C_sEmyQw.d.ts +118 -0
- package/dist/mcp-client-D0mUt18v.js +1024 -0
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +2 -0
- package/dist/media-library-BChf8XOd.js +279 -0
- package/dist/media-library-CEo-Ye2B.d.ts +212 -0
- package/dist/media-uKX4Wy-c.d.ts +74 -0
- package/dist/media-wZMY6f2M.js +478 -0
- package/dist/memory-2bbl4hcV.d.ts +19 -0
- package/dist/memory-DhirB6SA.js +86 -0
- package/dist/nuxt-server-imports-Lnaf5Fe-.js +97 -0
- package/dist/nuxt.d.ts +14 -60
- package/dist/nuxt.js +966 -374
- package/dist/object-D8pRdprI.js +15 -0
- package/dist/operation-contributions-DflAv5AC.js +50 -0
- package/dist/operation-contributions-fZyVo662.d.ts +21 -0
- package/dist/operation-definition-Bn8V2hab.js +430 -0
- package/dist/operation-registry-BogGwk_I.js +22 -0
- package/dist/operation-rpc-DI9txNxK.js +158 -0
- package/dist/operations-B6N-ja8x.js +863 -0
- package/dist/operations-DX9EkHwb.d.ts +153 -0
- package/dist/operations-Dj_cp-UK.js +235 -0
- package/dist/operations-H9q0QB2C.js +2 -0
- package/dist/operations.d.ts +1 -0
- package/dist/operations.js +2 -0
- package/dist/optional-owners-Crm6kVS5.js +889 -0
- package/dist/owned-paths-BnjT0FhU.js +15 -0
- package/dist/page/pill.iife.js +70 -0
- package/dist/page-tool-BCRyx3pM.d.ts +68 -0
- package/dist/page-tools-BkSSBFoi.js +444 -0
- package/dist/page-tools-shared-D3fFoEV2.js +122 -0
- package/dist/page-tools-sw4I-Nqx.d.ts +23 -0
- package/dist/plugins-5uDXr9Km.d.ts +2124 -0
- package/dist/plugins-DQ8pF-38.js +11325 -0
- package/dist/presets/babysitter/server.d.ts +1 -0
- package/dist/presets/babysitter/server.js +2 -0
- package/dist/presets/babysitter.d.ts +1 -0
- package/dist/presets/babysitter.js +2 -0
- package/dist/presets/labeller.d.ts +1 -0
- package/dist/presets/labeller.js +2 -0
- package/dist/presets/workspace.d.ts +3 -0
- package/dist/presets/workspace.js +3 -0
- package/dist/project-5EN7JaXI.d.ts +26 -0
- package/dist/project-C2dnB9Kf.js +30 -0
- package/dist/project-DOeM0zg3.js +57 -0
- package/dist/project-link-D_XQvBOC.d.ts +94 -0
- package/dist/project-link-Qi7nltHM.js +149 -0
- package/dist/project-root-v6ba4tn7.js +12 -0
- package/dist/projects-CAcXztf4.js +154 -0
- package/dist/projects-Ddvl9EJp.d.ts +66 -0
- package/dist/rate-limit/drivers/cloudflare.d.ts +1 -0
- package/dist/rate-limit/drivers/cloudflare.js +2 -0
- package/dist/rate-limit/drivers/kv.d.ts +1 -0
- package/dist/rate-limit/drivers/kv.js +2 -0
- package/dist/rate-limit/drivers/memory.d.ts +1 -0
- package/dist/rate-limit/drivers/memory.js +2 -0
- package/dist/realtime/agent.d.ts +1 -0
- package/dist/realtime/agent.js +2 -0
- package/dist/realtime/bus.d.ts +1 -0
- package/dist/realtime/bus.js +2 -0
- package/dist/realtime/client.d.ts +1 -0
- package/dist/realtime/client.js +2 -0
- package/dist/registry-CDKLACCZ.js +16 -0
- package/dist/registry-zw6aE2N9.js +18 -0
- package/dist/request-BUYAlAJl.js +162 -0
- package/dist/request-D7h3SQ92.d.ts +21 -0
- package/dist/request-origin-Bq7mDQG9.js +23 -0
- package/dist/request-yCybBeqT.js +468 -0
- package/dist/route-query-CRVWXIrc.js +222 -0
- package/dist/rpc-7nlHSv3y.d.ts +37 -0
- package/dist/rpc-DIUA61pv.js +4 -0
- package/dist/runtime/durability.d.ts +1 -0
- package/dist/runtime/durability.js +2 -0
- package/dist/runtime-B_btezs1.d.ts +7 -0
- package/dist/runtime-DG34DLXc.js +55 -0
- package/dist/runtime-DM8Z6KLT.js +10 -0
- package/dist/runtime-DxfJOfCd.js +25 -0
- package/dist/runtime-YLWfdrtO.js +65 -0
- package/dist/runtime-feature-guard-rpZz1eMF.js +55 -0
- package/dist/sandbox/ssh.d.ts +1 -0
- package/dist/sandbox/ssh.js +2 -0
- package/dist/sandbox/task.d.ts +1 -0
- package/dist/sandbox/task.js +2 -0
- package/dist/scan-module-BTeOuZsp.js +2 -0
- package/dist/scan-module-DlHQ8a0X.js +148 -0
- package/dist/schedule/os.d.ts +1 -0
- package/dist/schedule/os.js +2 -0
- package/dist/schedule/runtime/kv.d.ts +1 -0
- package/dist/schedule/runtime/kv.js +2 -0
- package/dist/schema-form-C-fy3xaU.d.ts +79 -0
- package/dist/secret-AZLhaNyr.js +44 -0
- package/dist/sections-4xyBoiar.d.ts +159 -0
- package/dist/sections-ACHVTCWn.d.ts +10 -0
- package/dist/sections-BriKrBgN.d.ts +57 -0
- package/dist/sections-C83x0slv.js +13 -0
- package/dist/sections-CUJyQA9d.js +122 -0
- package/dist/sections-D6AM5Gy5.js +369 -0
- package/dist/sections.get-1lHjyKCI.d.ts +20 -0
- package/dist/seo/runtime.d.ts +64 -0
- package/dist/seo/runtime.js +123 -0
- package/dist/seo-CtLywyRx.d.ts +24 -0
- package/dist/seo.d.ts +2 -0
- package/dist/seo.js +17 -0
- package/dist/server-DbjFYSeU.js +18 -0
- package/dist/setup-C-5nB7aY.js +22 -0
- package/dist/setup-DLZFzuLv.d.ts +12 -0
- package/dist/site-access-Bhsty_v4.js +2 -0
- package/dist/site-access-BycrwM2v.js +18 -0
- package/dist/site-access-CyRtc0gZ.js +292 -0
- package/dist/site-access-DxfdOel1.d.ts +55 -0
- package/dist/site-session-Jf21TVw8.js +272 -0
- package/dist/skills/operations.d.ts +17 -0
- package/dist/skills/operations.js +51 -0
- package/dist/skills-DdpSMiCI.js +500 -0
- package/dist/skills.d.ts +197 -0
- package/dist/skills.get-CHQMzSD_.js +48 -0
- package/dist/skills.js +2 -0
- package/dist/source/drizzle.d.ts +1 -0
- package/dist/source/drizzle.js +2 -0
- package/dist/source/server.d.ts +1 -24
- package/dist/source/server.js +1 -24
- package/dist/source/vite.d.ts +1 -8
- package/dist/source/vite.js +2 -18
- package/dist/source-S-LChQvw.d.ts +59 -0
- package/dist/source-w9BHUwyO.js +60 -0
- package/dist/source.d.ts +1 -66
- package/dist/source.js +1 -103
- package/dist/stored-Dhv2qsQv.js +40 -0
- package/dist/sync/client.d.ts +1 -0
- package/dist/sync/client.js +2 -0
- package/dist/sync/database.d.ts +1 -0
- package/dist/sync/database.js +2 -0
- package/dist/sync/operations.d.ts +1 -0
- package/dist/sync/operations.js +2 -0
- package/dist/sync/runtime.d.ts +1 -0
- package/dist/sync/runtime.js +2 -0
- package/dist/sync/vue.d.ts +1 -0
- package/dist/sync/vue.js +2 -0
- package/dist/sync.d.ts +1 -0
- package/dist/sync.js +2 -0
- package/dist/task/operations.d.ts +22 -0
- package/dist/task/operations.js +36 -0
- package/dist/test/register.d.ts +1 -0
- package/dist/test/register.js +68 -0
- package/dist/test.d.ts +175 -0
- package/dist/test.js +49 -0
- package/dist/ticket-Pr_8ZtXW.d.ts +14 -0
- package/dist/ticket-RKQF6Wy9.js +31 -0
- package/dist/tickets-CfJhT7d0.js +358 -0
- package/dist/ui/markdown-editor.d.ts +1 -0
- package/dist/ui/markdown-editor.js +2 -0
- package/dist/ui/playground.d.ts +1 -0
- package/dist/ui/playground.js +2 -0
- package/dist/ui/styles.css +2 -2562
- package/dist/ui/theme.css +2 -0
- package/dist/ui/theme.d.ts +1 -0
- package/dist/ui/theme.js +2 -0
- package/dist/ui/workspace.d.ts +1 -0
- package/dist/ui/workspace.js +2 -0
- package/dist/usage-Bc0YY_ka.js +569 -0
- package/dist/usage-CoQXs5nW.d.ts +22 -0
- package/dist/usage-index-CMMT4cXQ.js +335 -0
- package/dist/version-DDRL_OYz.js +1080 -0
- package/dist/vue-router-C68IU1jM.d.ts +1914 -0
- package/dist/web-container/connect.d.ts +1 -0
- package/dist/web-container/connect.js +2 -0
- package/dist/web-container/env.d.ts +1 -0
- package/dist/web-container/env.js +2 -0
- package/dist/web-container/snapshot.d.ts +1 -0
- package/dist/web-container/snapshot.js +2 -0
- package/dist/web-container.d.ts +1 -0
- package/dist/web-container.js +2 -0
- package/dist/webhooks/database.d.ts +1 -0
- package/dist/webhooks/database.js +2 -0
- package/dist/webhooks/operations.d.ts +1 -0
- package/dist/webhooks/operations.js +2 -0
- package/dist/webhooks/runtime.d.ts +1 -0
- package/dist/webhooks/runtime.js +2 -0
- package/dist/webhooks.d.ts +1 -0
- package/dist/webhooks.js +2 -0
- package/dist/workflow/openworkflow.d.ts +1 -0
- package/dist/workflow/openworkflow.js +2 -0
- package/dist/workspace/blob-database.d.ts +1 -0
- package/dist/workspace/blob-database.js +2 -0
- package/dist/workspace/checkout.d.ts +1 -0
- package/dist/workspace/checkout.js +2 -0
- package/dist/workspace/files.d.ts +1 -0
- package/dist/workspace/files.js +2 -0
- package/dist/workspace/lineage.d.ts +1 -0
- package/dist/workspace/lineage.js +2 -0
- package/dist/workspace-history-CeVwBB6Q.d.ts +52 -0
- package/dist/workspace-history-l47NPVSy.js +248 -0
- package/package.json +1320 -207
- package/dist/_internal/agent/cloudflare/state.d.ts +0 -1
- package/dist/_internal/agent/cloudflare/state.js +0 -2
- package/dist/_internal/agent/cloudflare.d.ts +0 -1
- package/dist/_internal/agent/cloudflare.js +0 -2
- package/dist/_internal/agent/eve.d.ts +0 -1
- package/dist/_internal/agent/eve.js +0 -2
- package/dist/_internal/agent/runtime/workflow.d.ts +0 -1
- package/dist/_internal/agent/runtime/workflow.js +0 -2
- package/dist/_internal/agent/server/internal.d.ts +0 -1
- package/dist/_internal/agent/server/internal.js +0 -2
- package/dist/_internal/agent/server/workspace.d.ts +0 -1
- package/dist/_internal/agent/server/workspace.js +0 -2
- package/dist/_internal/agent/server.d.ts +0 -1
- package/dist/_internal/agent/server.js +0 -2
- package/dist/_internal/agent/state/sqlite.d.ts +0 -1
- package/dist/_internal/agent/state/sqlite.js +0 -2
- package/dist/_internal/agent.d.ts +0 -1
- package/dist/_internal/agent.js +0 -2
- package/dist/_internal/blob/runtime/state.d.ts +0 -1
- package/dist/_internal/blob/runtime/state.js +0 -2
- package/dist/_internal/blob.d.ts +0 -1
- package/dist/_internal/blob.js +0 -2
- package/dist/_internal/database/runtime/state.d.ts +0 -4
- package/dist/_internal/database/runtime/state.js +0 -5
- package/dist/_internal/kv/runtime/disabled-upstash.d.ts +0 -4
- package/dist/_internal/kv/runtime/disabled-upstash.js +0 -6
- package/dist/_internal/kv.d.ts +0 -1
- package/dist/_internal/kv.js +0 -2
- package/dist/_internal/markdown-template.d.ts +0 -2
- package/dist/_internal/markdown-template.js +0 -2
- package/dist/_internal/rate-limit/runtime.d.ts +0 -1
- package/dist/_internal/rate-limit/runtime.js +0 -2
- package/dist/_internal/sandbox/runtime/state.d.ts +0 -1
- package/dist/_internal/sandbox/runtime/state.js +0 -2
- package/dist/_internal/schedule/runtime/driver.d.ts +0 -1
- package/dist/_internal/schedule/runtime/driver.js +0 -2
- package/dist/_internal/schedule/runtime/process.d.ts +0 -1
- package/dist/_internal/schedule/runtime/process.js +0 -2
- package/dist/_internal/schedule/runtime/static.d.ts +0 -1
- package/dist/_internal/schedule/runtime/static.js +0 -2
- package/dist/_internal/schedule/runtime.d.ts +0 -1
- package/dist/_internal/schedule/runtime.js +0 -2
- package/dist/_internal/schedule.d.ts +0 -1
- package/dist/_internal/schedule.js +0 -2
- package/dist/_internal/workflow/runtime/cloudflare-runner.d.ts +0 -1
- package/dist/_internal/workflow/runtime/cloudflare-runner.js +0 -2
- package/dist/_internal/workflow/runtime/cloudflare-vite.d.ts +0 -1
- package/dist/_internal/workflow/runtime/cloudflare-vite.js +0 -2
- package/dist/_internal/workflow/runtime/execute.d.ts +0 -1
- package/dist/_internal/workflow/runtime/execute.js +0 -2
- package/dist/_internal/workflow/runtime/state.d.ts +0 -1
- package/dist/_internal/workflow/runtime/state.js +0 -2
- package/dist/_internal/workflow/runtime/vercel-vite.d.ts +0 -1
- package/dist/_internal/workflow/runtime/vercel-vite.js +0 -2
- package/dist/_internal/workflow.d.ts +0 -1
- package/dist/_internal/workflow.js +0 -2
- package/dist/_internal/workspace/internal/runtime/hosted-vercel-blob.d.ts +0 -1
- package/dist/_internal/workspace/internal/runtime/hosted-vercel-blob.js +0 -2
- package/dist/_internal/workspace/internal/runtime/hosted.d.ts +0 -1
- package/dist/_internal/workspace/internal/runtime/hosted.js +0 -2
- package/dist/_internal/workspace/internal/runtime/state.d.ts +0 -1
- package/dist/_internal/workspace/internal/runtime/state.js +0 -2
- package/dist/_internal/workspace/runtime.d.ts +0 -1
- package/dist/_internal/workspace/runtime.js +0 -2
- package/dist/_internal/workspace.d.ts +0 -1
- package/dist/_internal/workspace.js +0 -2
- package/dist/agent/invocations/sqlite.d.ts +0 -1
- package/dist/agent/invocations/sqlite.js +0 -2
- package/dist/agent/runtime/process.d.ts +0 -1
- package/dist/agent/runtime/process.js +0 -2
- package/dist/agent/state/sqlite.d.ts +0 -1
- package/dist/agent/state/sqlite.js +0 -2
- package/dist/agents-DGL-2SS3.js +0 -53
- package/dist/blob/content-type.d.ts +0 -1
- package/dist/blob/content-type.js +0 -2
- package/dist/blob-_CeYUuZh.d.ts +0 -8
- package/dist/box.d.ts +0 -1
- package/dist/box.js +0 -2
- package/dist/browser/actions.d.ts +0 -1
- package/dist/browser/actions.js +0 -2
- package/dist/console/runtime/client/time.d.ts +0 -4
- package/dist/console/runtime/client/time.js +0 -8
- package/dist/console/runtime/components/console-brand.vue +0 -37
- package/dist/console/runtime/components/console-health-model.ts +0 -54
- package/dist/console/runtime/components/console-health.vue +0 -236
- package/dist/console/runtime/components/console-primitive-switcher.vue +0 -69
- package/dist/console/runtime/components/console-provider.vue +0 -12
- package/dist/console/runtime/pages/agents.vue +0 -58
- package/dist/console/runtime/pages/blob.vue +0 -30
- package/dist/console/runtime/pages/databases.vue +0 -67
- package/dist/console/runtime/pages/index.vue +0 -29
- package/dist/console/runtime/pages/kv.vue +0 -68
- package/dist/console/runtime/pages/queues.vue +0 -30
- package/dist/console/runtime/pages/rate-limits.vue +0 -30
- package/dist/console/runtime/pages/sandboxes.vue +0 -27
- package/dist/console/runtime/pages/schedules.vue +0 -30
- package/dist/console/runtime/pages/workflows.vue +0 -30
- package/dist/console/runtime/pages/workspaces.vue +0 -30
- package/dist/console/runtime/public/console/chunks/ChatMessage-CVruGJWM.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatPrompt-BmTjPf5_.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatPromptSubmit-DcxguvaS.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatReasoning-DIMO2K2F.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatShimmer-C613EbHI.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatTool-DDmc-ZK6.js +0 -1
- package/dist/console/runtime/public/console/chunks/Collapsible-C0CXnWpw.js +0 -1
- package/dist/console/runtime/public/console/chunks/CollapsibleTrigger-CmJucLnT.js +0 -1
- package/dist/console/runtime/public/console/chunks/Icon-D-AnqCok.js +0 -1
- package/dist/console/runtime/public/console/chunks/abap-LtYK6g-v-CLvhMVsD.js +0 -1
- package/dist/console/runtime/public/console/chunks/actionscript-3-Czo0lKSf--17pq3dv.js +0 -1
- package/dist/console/runtime/public/console/chunks/ada-twHwrVWN-C5qYipkI.js +0 -1
- package/dist/console/runtime/public/console/chunks/andromeeda-DnSv6o6l-vGVdxbeo.js +0 -1
- package/dist/console/runtime/public/console/chunks/andromeeda-vGVdxbeo.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-html-Ct-40ew8-D8X9MCxo.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-html-DTyieMYv.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-ts-D3gV1N-x.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-ts-D6akBVit-CAEqTior.js +0 -1
- package/dist/console/runtime/public/console/chunks/apache-BIl2qPOf-U0d_L8uA.js +0 -1
- package/dist/console/runtime/public/console/chunks/apex-BkQQFAhi-VAyPSnFM.js +0 -1
- package/dist/console/runtime/public/console/chunks/apl-Cxjn4xYu-QUZjoXcb.js +0 -1
- package/dist/console/runtime/public/console/chunks/applescript-CJ80B5XJ-CCn79oCD.js +0 -1
- package/dist/console/runtime/public/console/chunks/ara-IxnQjO6j-4CJ0cIlV.js +0 -1
- package/dist/console/runtime/public/console/chunks/asciidoc-Dsw6zvwf-DE70LPWp.js +0 -1
- package/dist/console/runtime/public/console/chunks/asm-wBDSgBbA-Cmm7eHzH.js +0 -1
- package/dist/console/runtime/public/console/chunks/astro-BPVTb8uX-BMHg0UsI.js +0 -1
- package/dist/console/runtime/public/console/chunks/astro-CLAWI0Fn.js +0 -1
- package/dist/console/runtime/public/console/chunks/aurora-x-CDeNXAV0.js +0 -1
- package/dist/console/runtime/public/console/chunks/aurora-x-XJ5I8rFc-CDeNXAV0.js +0 -1
- package/dist/console/runtime/public/console/chunks/awk-D6dA05Ye-BWXHIvNe.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-dark-CBRGL64--DluEY0Gj.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-dark-DluEY0Gj.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-light-BlrCS3Ih-C3h-C4tm.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-light-C3h-C4tm.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-mirage-Bqwy1Gya.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-mirage-CqpTmLcF-Bqwy1Gya.js +0 -1
- package/dist/console/runtime/public/console/chunks/ballerina-DIdXD2KH-B7ZEbQpA.js +0 -1
- package/dist/console/runtime/public/console/chunks/bat-hQslfzu--Bo4NYOV-.js +0 -1
- package/dist/console/runtime/public/console/chunks/beancount-CXtOQ8oS-D-usSTwE.js +0 -1
- package/dist/console/runtime/public/console/chunks/berry-CgA2ea0_-DKpUyyne.js +0 -1
- package/dist/console/runtime/public/console/chunks/bibtex-BzgdqG3s-Ci_nEsc7.js +0 -1
- package/dist/console/runtime/public/console/chunks/bicep-CZ338dSk-CUHmPFLl.js +0 -1
- package/dist/console/runtime/public/console/chunks/bird2-GLyzhwkD-C6vDhewU.js +0 -1
- package/dist/console/runtime/public/console/chunks/blade-0LMawyyw-CZBPwR53.js +0 -1
- package/dist/console/runtime/public/console/chunks/blade-CP_mgflB.js +0 -1
- package/dist/console/runtime/public/console/chunks/bsl-0NWGiiFE-mk7PqslV.js +0 -1
- package/dist/console/runtime/public/console/chunks/bundle-web-DTJmdyvB.js +0 -13
- package/dist/console/runtime/public/console/chunks/c-BhmuwSav.js +0 -1
- package/dist/console/runtime/public/console/chunks/c-Dc0_AVM6-CjS7AEt5.js +0 -1
- package/dist/console/runtime/public/console/chunks/c3-BLXk7BLN-BFHwR3_K.js +0 -1
- package/dist/console/runtime/public/console/chunks/cadence-B1ELWULD-CQ2zXKGN.js +0 -1
- package/dist/console/runtime/public/console/chunks/cairo-DjG4M3vq-xb-J0v0e.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-frappe-3VR1Za6u.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-frappe-COUg_LSX-3VR1Za6u.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-latte-DwIHMF0Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-latte-r30LFfsa-DwIHMF0Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-macchiato-D-EwZyPh-DYnBP6_5.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-macchiato-DYnBP6_5.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-mocha-C6RD5yh3-DYhrFGRu.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-mocha-DYhrFGRu.js +0 -1
- package/dist/console/runtime/public/console/chunks/chunk-DK3Fl9T5.js +0 -1
- package/dist/console/runtime/public/console/chunks/clarity-2iIoRiLx-SemFz856.js +0 -1
- package/dist/console/runtime/public/console/chunks/clojure-DDsQ0FaV-DqKBuwfJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/cmake-DPsCB_V6-Bj61d0ZC.js +0 -1
- package/dist/console/runtime/public/console/chunks/cobol-CocL1RYn-DoHa8rFw.js +0 -1
- package/dist/console/runtime/public/console/chunks/codeowners-CxEKPWu0-C8r90Shi.js +0 -1
- package/dist/console/runtime/public/console/chunks/codeql-BwdvwJnv-oeQT6MSM.js +0 -1
- package/dist/console/runtime/public/console/chunks/coffee-DtqnQNu5-Ca3s2Keu.js +0 -1
- package/dist/console/runtime/public/console/chunks/coffee-PUiKoj8Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/common-lisp-DJtwvW4V-Cv5bFMCO.js +0 -1
- package/dist/console/runtime/public/console/chunks/coq-Ds6Ye5el-BrsZFFmf.js +0 -1
- package/dist/console/runtime/public/console/chunks/cpp-CxycoGSa.js +0 -1
- package/dist/console/runtime/public/console/chunks/cpp-Mb4ikSI3-tLY9dtiu.js +0 -1
- package/dist/console/runtime/public/console/chunks/crystal-D4OMbAh_-C9omPlZ-.js +0 -1
- package/dist/console/runtime/public/console/chunks/csharp-CFKaLbHg-oqKa8noW.js +0 -1
- package/dist/console/runtime/public/console/chunks/css-DLlZbWMi.js +0 -1
- package/dist/console/runtime/public/console/chunks/css-DTzmO9U0-CbxoEllx.js +0 -1
- package/dist/console/runtime/public/console/chunks/csv-DqIVFkK7-Dx-8-gkx.js +0 -1
- package/dist/console/runtime/public/console/chunks/csv-Dx-8-gkx.js +0 -1
- package/dist/console/runtime/public/console/chunks/cue-B5KneM5p-CE9AQfxI.js +0 -1
- package/dist/console/runtime/public/console/chunks/cypher-D8Bb8Cq2-ClKdZ_lG.js +0 -1
- package/dist/console/runtime/public/console/chunks/d-BQY8TDgQ-qD-0Kul2.js +0 -1
- package/dist/console/runtime/public/console/chunks/dark-plus-BCxGtnt0-Cs2F2srj.js +0 -1
- package/dist/console/runtime/public/console/chunks/dark-plus-Cs2F2srj.js +0 -1
- package/dist/console/runtime/public/console/chunks/dart-C6DUdjib-CnvKMtbv.js +0 -1
- package/dist/console/runtime/public/console/chunks/dax-S-Noo-ku-BkyTk9wS.js +0 -1
- package/dist/console/runtime/public/console/chunks/desktop-BgOb7Aj4-Dlh5hvp9.js +0 -1
- package/dist/console/runtime/public/console/chunks/diff-Blb4MjsC-woXpYk--.js +0 -1
- package/dist/console/runtime/public/console/chunks/docker-PC1tuYpa-IyjqRm3v.js +0 -1
- package/dist/console/runtime/public/console/chunks/dotenv-Dkdv7Sm2-_5a1GRtc.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-BHWKrbxM.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-fPErIccy-BHWKrbxM.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-soft-5eyTD99u.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-soft-BrQbqXs8-5eyTD99u.js +0 -1
- package/dist/console/runtime/public/console/chunks/dream-maker-CngiPd8U-DW3nJb8Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/edge-DrFNu-N9-BY3pzybO.js +0 -1
- package/dist/console/runtime/public/console/chunks/elixir-OpZyQ8Ht-CwWfuiQ1.js +0 -1
- package/dist/console/runtime/public/console/chunks/elm-CjX_545P-Dn-DqM39.js +0 -1
- package/dist/console/runtime/public/console/chunks/emacs-lisp-DxhFFVu_-B4R74twV.js +0 -1
- package/dist/console/runtime/public/console/chunks/erb-trZRdc47-DRBdWH-D.js +0 -1
- package/dist/console/runtime/public/console/chunks/erlang-BJeTH9QH-BfDtvnHZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-dark-gTeBQCos-sB-x3p7T.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-dark-sB-x3p7T.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-light-DUjxsp-2-Df2xbC6M.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-light-Df2xbC6M.js +0 -1
- package/dist/console/runtime/public/console/chunks/fennel-B3wtZRne-DQxkIbk2.js +0 -1
- package/dist/console/runtime/public/console/chunks/fish-D7qAeWQz-BJitypiv.js +0 -1
- package/dist/console/runtime/public/console/chunks/fluent-BjfpB34g-C03EYrpw.js +0 -1
- package/dist/console/runtime/public/console/chunks/fortran-fixed-form-B_eBTsj9-C2-rkbip.js +0 -1
- package/dist/console/runtime/public/console/chunks/fortran-free-form-yxJ7igsv-CYNrtFtB.js +0 -1
- package/dist/console/runtime/public/console/chunks/fsharp-UvrT6oWG-LCdvSpj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/gdresource-Dl9wvKCd-C3MGX-jo.js +0 -1
- package/dist/console/runtime/public/console/chunks/gdscript-jjgTGGzd-Cp2uCuqX.js +0 -1
- package/dist/console/runtime/public/console/chunks/gdshader-D7JfdFV3-CBce3t8t.js +0 -1
- package/dist/console/runtime/public/console/chunks/genie-DnK2KWIP-CV2tkWYe.js +0 -1
- package/dist/console/runtime/public/console/chunks/gherkin-D6Lr12YQ-DExj1W_8.js +0 -1
- package/dist/console/runtime/public/console/chunks/git-commit-2LMniMoO-CfgJCLX7.js +0 -1
- package/dist/console/runtime/public/console/chunks/git-rebase-DUOURRPN-DbPsFIae.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-C-LZuMrd.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-Dg1hl_QD-C-LZuMrd.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-default-DXG-b-1a.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-default-Dym2P842-DXG-b-1a.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-dimmed-7iDMx266-Bx1FflLF.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-dimmed-Bx1FflLF.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-high-contrast-B_tTalzw.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-high-contrast-DkV2fyPG-B_tTalzw.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-BQKYgor9-EUqPIrTm.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-EUqPIrTm.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-default-BXViO-2h.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-default-BZhIfzqQ-BXViO-2h.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-high-contrast-B68TUdTA.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-high-contrast-C7zHfx4C-B68TUdTA.js +0 -1
- package/dist/console/runtime/public/console/chunks/gleam-CTllUdfC-CSRkHgEL.js +0 -1
- package/dist/console/runtime/public/console/chunks/glimmer-js-D_32hFh8-Dv_1Q6fk.js +0 -1
- package/dist/console/runtime/public/console/chunks/glimmer-ts-CVt002zd-PmMLyqBp.js +0 -1
- package/dist/console/runtime/public/console/chunks/glsl-8MDrjpMp.js +0 -1
- package/dist/console/runtime/public/console/chunks/glsl-pHhzolba-D3h1XPFw.js +0 -1
- package/dist/console/runtime/public/console/chunks/gn-DDjbVPF4-ilITqXS6.js +0 -1
- package/dist/console/runtime/public/console/chunks/gnuplot-DgWvVXI8-7GGW24-e.js +0 -1
- package/dist/console/runtime/public/console/chunks/go-aXtTCanQ-rLFTqkRN.js +0 -1
- package/dist/console/runtime/public/console/chunks/graphql-BjqekQIR-CtUxCAnJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/graphql-C4iAGs1_.js +0 -1
- package/dist/console/runtime/public/console/chunks/groovy-Bw2Ku4bU-CacY0gHj.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-hard-C820rvS2.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-hard-CQiwpF03-C820rvS2.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-medium-BKe6XKBS-BPjhmG05.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-medium-BPjhmG05.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-soft-Cz6U6pa4-MrdJrrXF.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-soft-MrdJrrXF.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-hard-BC_s9l72.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-hard-DgU_i19B-BC_s9l72.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-medium-BAWPOn9u.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-medium-D64I06ER-BAWPOn9u.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-soft-B-YxAs1L-BSMLrYjP.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-soft-BSMLrYjP.js +0 -1
- package/dist/console/runtime/public/console/chunks/hack-BITNGzgt-BwY4KWmq.js +0 -1
- package/dist/console/runtime/public/console/chunks/haml-BJGeH8A5.js +0 -1
- package/dist/console/runtime/public/console/chunks/haml-DVwRP8W9-C4Ue42xj.js +0 -1
- package/dist/console/runtime/public/console/chunks/handlebars-OC1LcHwO.js +0 -1
- package/dist/console/runtime/public/console/chunks/handlebars-T3TJj8Il-BLQCwuJT.js +0 -1
- package/dist/console/runtime/public/console/chunks/haskell-CfGsE1Cf-D8IpX4py.js +0 -1
- package/dist/console/runtime/public/console/chunks/haxe-B0odltAZ-OTjmBuCE.js +0 -1
- package/dist/console/runtime/public/console/chunks/hcl-DHg_Osgo-Dh228itO.js +0 -1
- package/dist/console/runtime/public/console/chunks/hjson-Cuaphql8-CxZEssPk.js +0 -1
- package/dist/console/runtime/public/console/chunks/hlsl-BJLUNfne-Cvrh5tZx.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-CE9ld1lL.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-DYoumREk-CE9ld1lL.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-bright-CPyV7XIA-DSNQnXHK.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-bright-DSNQnXHK.js +0 -1
- package/dist/console/runtime/public/console/chunks/houston-B3NWfq0V-CsvMBhTu.js +0 -1
- package/dist/console/runtime/public/console/chunks/houston-CsvMBhTu.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-CamevgpM-BbT95zHF.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-Cs160JwT.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-derivative-GiQ9zDJU.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-derivative-jMOJf6rB-Kh3SdD3S.js +0 -1
- package/dist/console/runtime/public/console/chunks/http-BEHztmFP-BxphIJE7.js +0 -1
- package/dist/console/runtime/public/console/chunks/http-Cgwuv9UR.js +0 -1
- package/dist/console/runtime/public/console/chunks/hurl-DMKCZZMv.js +0 -1
- package/dist/console/runtime/public/console/chunks/hurl-LmFBxrwm-CGo4dqUD.js +0 -1
- package/dist/console/runtime/public/console/chunks/hxml-BQ4V4Tez-BaHUc7lX.js +0 -1
- package/dist/console/runtime/public/console/chunks/hy-CJKxDzbh-CZbG8q4J.js +0 -1
- package/dist/console/runtime/public/console/chunks/imba-96qKoJCa-DsUTQ-LC.js +0 -1
- package/dist/console/runtime/public/console/chunks/imba-DsUTQ-LC.js +0 -1
- package/dist/console/runtime/public/console/chunks/ini-C24lZfdM-B5eOa1yu.js +0 -1
- package/dist/console/runtime/public/console/chunks/java-CUcXVav_.js +0 -1
- package/dist/console/runtime/public/console/chunks/java-Cfowl-Ex-BnGnzH2k.js +0 -1
- package/dist/console/runtime/public/console/chunks/javascript-C4sF7sej-B29qPxDa.js +0 -1
- package/dist/console/runtime/public/console/chunks/javascript-DrVpc-sp.js +0 -1
- package/dist/console/runtime/public/console/chunks/jinja-C17UUgXU.js +0 -1
- package/dist/console/runtime/public/console/chunks/jinja-CCAEwzP4-PaInFpq5.js +0 -1
- package/dist/console/runtime/public/console/chunks/jison-BKCoBkyT-BRL7eVgb.js +0 -1
- package/dist/console/runtime/public/console/chunks/jison-ByjIV4zh.js +0 -1
- package/dist/console/runtime/public/console/chunks/json-E4f3l6hr-DuNL0Aj9.js +0 -1
- package/dist/console/runtime/public/console/chunks/json-qhed-kSA.js +0 -1
- package/dist/console/runtime/public/console/chunks/json5-BR5RXkoi.js +0 -1
- package/dist/console/runtime/public/console/chunks/json5-xULSgPQI-BR5RXkoi.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonc-CYpm1nAK.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonc-Cu6rqcrJ-CYpm1nAK.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonl-Bp0qqr10-CmCQp5Yx.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonl-CmCQp5Yx.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonnet-BafgE6cE-CJTPZ8u_.js +0 -1
- package/dist/console/runtime/public/console/chunks/jssm-Dx5A5sBR-DXw9l8Rf.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsx-BZjOirBP-Dga5sQe3.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsx-C-HlKHLe.js +0 -1
- package/dist/console/runtime/public/console/chunks/julia-Ca_tGyZB.js +0 -1
- package/dist/console/runtime/public/console/chunks/julia-nEdJo0dp-CJRta6ZT.js +0 -1
- package/dist/console/runtime/public/console/chunks/just-Brtw3q7S-DmytbepJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-dragon-CXtmUGW6.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-dragon-DExkuQAs-CXtmUGW6.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-lotus-BN08jTvb.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-lotus-qdYh7_RY-BN08jTvb.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-wave-CSW_hADG-CTweb8Dz.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-wave-CTweb8Dz.js +0 -1
- package/dist/console/runtime/public/console/chunks/kdl-DkTyxPcj-CsD5j6eV.js +0 -1
- package/dist/console/runtime/public/console/chunks/kotlin-BHE8CoV9-DhhofPvG.js +0 -1
- package/dist/console/runtime/public/console/chunks/kusto-6FdaWTzR-C7mF5XQf.js +0 -1
- package/dist/console/runtime/public/console/chunks/laserwave-C_8bwKvT.js +0 -1
- package/dist/console/runtime/public/console/chunks/laserwave-DkfjiLxA-C_8bwKvT.js +0 -1
- package/dist/console/runtime/public/console/chunks/latex-QHQNiZDD-fcyJN6QK.js +0 -1
- package/dist/console/runtime/public/console/chunks/lean-BwOKScIt-CewbzKMR.js +0 -1
- package/dist/console/runtime/public/console/chunks/less-BzbdhFUi-DVTAwKKz.js +0 -1
- package/dist/console/runtime/public/console/chunks/less-DVTAwKKz.js +0 -1
- package/dist/console/runtime/public/console/chunks/light-plus-DVQuIRkW.js +0 -1
- package/dist/console/runtime/public/console/chunks/light-plus-DuO6rXxZ-DVQuIRkW.js +0 -1
- package/dist/console/runtime/public/console/chunks/liquid-DYQ7uW5u-JGNMHTpg.js +0 -1
- package/dist/console/runtime/public/console/chunks/llvm-uY68ROGz-Cm23YOpf.js +0 -1
- package/dist/console/runtime/public/console/chunks/log-Dad54gsi-BNLmms1o.js +0 -1
- package/dist/console/runtime/public/console/chunks/logo-DTXV8SKw-Cluzi2Zq.js +0 -1
- package/dist/console/runtime/public/console/chunks/lua-BhkUWs1q-CVcL4bwV.js +0 -1
- package/dist/console/runtime/public/console/chunks/luau-YC4aaMmR-FMPmPwt6.js +0 -1
- package/dist/console/runtime/public/console/chunks/make-B2ukzWs3-Dixweg8N.js +0 -1
- package/dist/console/runtime/public/console/chunks/markdown-BYOwaDjH.js +0 -1
- package/dist/console/runtime/public/console/chunks/markdown-CkmxmzqY-BYOwaDjH.js +0 -1
- package/dist/console/runtime/public/console/chunks/marko-BHWvxp04-U7nYXRKW.js +0 -1
- package/dist/console/runtime/public/console/chunks/marko-DmV4Eg2F.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-Bm3Qr25_.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-C_YrwKEa-Bm3Qr25_.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-darker-2IIEA8gg.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-darker-DB3YVCla-2IIEA8gg.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-lighter-D2fgNrBK-uhdI0v04.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-lighter-uhdI0v04.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-ocean-CHQ94UKr.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-ocean-DVy172Rs-CHQ94UKr.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-palenight-B5W6OYN7.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-palenight-uMMwIfpG-B5W6OYN7.js +0 -1
- package/dist/console/runtime/public/console/chunks/matlab-CfRK6IMC-D7qyCx1q.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdc-BVkdQPZX.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdc-Dg7VPYLa-CshLRYP7.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdx-BK9ZufRc-DQZ5AkYe.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdx-DQZ5AkYe.js +0 -1
- package/dist/console/runtime/public/console/chunks/mermaid-r7OoIYpE-Bk4SNUv9.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-dark-BSWPekZh.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-dark-C7Ec8I_2-BSWPekZh.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-light-Be6foA7m-DDpmG2fV.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-light-DDpmG2fV.js +0 -1
- package/dist/console/runtime/public/console/chunks/mipsasm-EL46Y4Xg-BMqwQI7S.js +0 -1
- package/dist/console/runtime/public/console/chunks/mojo-YCzvCoMT-BgCJLMeH.js +0 -1
- package/dist/console/runtime/public/console/chunks/monokai-CREPpJ3k-CdkpiU2Y.js +0 -1
- package/dist/console/runtime/public/console/chunks/monokai-CdkpiU2Y.js +0 -1
- package/dist/console/runtime/public/console/chunks/moonbit-B_9L5rST-CaWjb8XO.js +0 -1
- package/dist/console/runtime/public/console/chunks/move-Dqi5fhOb-B1IS1UjX.js +0 -1
- package/dist/console/runtime/public/console/chunks/narrat-D9rrR0H5-_X_XdTYD.js +0 -1
- package/dist/console/runtime/public/console/chunks/nextflow-CgUAk9iA-CTMUe4Ca.js +0 -1
- package/dist/console/runtime/public/console/chunks/nextflow-groovy-CdFFX-gF-DJMQeKeT.js +0 -1
- package/dist/console/runtime/public/console/chunks/nginx-Q-E8IJvs-DiQO9reH.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-CqqbiLON-DhmEMT88.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-DhmEMT88.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-light-B9vYgGRt-eJ-hLW7d.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-light-eJ-hLW7d.js +0 -1
- package/dist/console/runtime/public/console/chunks/nim-CNcTuF14-W9Ucwkhx.js +0 -1
- package/dist/console/runtime/public/console/chunks/nix-Bm1Ax-Z3-IvuFDN5E.js +0 -1
- package/dist/console/runtime/public/console/chunks/nord-BZ9DVmcN-Cb4Vim4T.js +0 -1
- package/dist/console/runtime/public/console/chunks/nord-Cb4Vim4T.js +0 -1
- package/dist/console/runtime/public/console/chunks/nushell-r7hBzeS_-DcLAeLz5.js +0 -1
- package/dist/console/runtime/public/console/chunks/objective-c-6dJF64Dt-D1A_Heim.js +0 -1
- package/dist/console/runtime/public/console/chunks/objective-cpp-_ooRQ-PY-BsSzOQcm.js +0 -1
- package/dist/console/runtime/public/console/chunks/ocaml-vm1Y8An6-O90oeIOV.js +0 -1
- package/dist/console/runtime/public/console/chunks/odin-vjOJSyfV-B1RWQWA5.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-dark-pro-CLwyXe_n.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-dark-pro-Ev8UPkf4-CLwyXe_n.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-light-CzxBC38_-D7Lr4KcI.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-light-D7Lr4KcI.js +0 -1
- package/dist/console/runtime/public/console/chunks/openscad-jn-f1Ocl-BUDT5pXO.js +0 -1
- package/dist/console/runtime/public/console/chunks/pascal-D8-gNZ2I-4ZHwLPI5.js +0 -1
- package/dist/console/runtime/public/console/chunks/perl-Bbgb6Twx-CHGXAzGq.js +0 -1
- package/dist/console/runtime/public/console/chunks/php-CBOR45_G-D5pyod9R.js +0 -1
- package/dist/console/runtime/public/console/chunks/php-J5BBb-PR.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-code-view-DYpF5M8R-BiohFcCD.js +0 -1511
- package/dist/console/runtime/public/console/chunks/pierre-dark-DDWDl8g6-CpLgRqie.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-protanopia-deuteranopia-C35UMuvO-B35FxJx-.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-soft-Bb-4-biO-kZQmAZld.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-tritanopia-CIJISGWF-CpjhbsIL.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-vibrant-8oZzB3gw-CpQYzh95.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-CWhW4NrH-CoaEpmwp.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-protanopia-deuteranopia-u0U7N4Hn-0fSaH845.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-soft-BCU6fuhO-lWLdNTOI.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-tritanopia-3c8Yx3co-CEbqgOJL.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-vibrant-Cwh332o_-D80Fkn33.js +0 -1
- package/dist/console/runtime/public/console/chunks/pkl-C7lWzykI-ot-7Btpt.js +0 -1
- package/dist/console/runtime/public/console/chunks/plastic-BGkJ2das-DQwYfKfQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/plastic-DQwYfKfQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/plsql-DCNXypXO-DGHpHOYJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/po-IjpR1yHO-BiJDBrnU.js +0 -1
- package/dist/console/runtime/public/console/chunks/poimandres-CpnMgZuc-DRFjx7u4.js +0 -1
- package/dist/console/runtime/public/console/chunks/poimandres-DRFjx7u4.js +0 -1
- package/dist/console/runtime/public/console/chunks/polar-4pN1JrJ8-C7UOKdEL.js +0 -1
- package/dist/console/runtime/public/console/chunks/postcss-BXeXVLqQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/postcss-D1gKt4z_-BXeXVLqQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/powerquery-SrvS_NBM-DNMTfnFr.js +0 -1
- package/dist/console/runtime/public/console/chunks/powershell-CpTLv_ai-DshXNtvi.js +0 -1
- package/dist/console/runtime/public/console/chunks/prisma-BWfa4-tI-BsRQq5mF.js +0 -1
- package/dist/console/runtime/public/console/chunks/prolog-Bacii3Ue-iXnhIJG7.js +0 -1
- package/dist/console/runtime/public/console/chunks/proto-ClkOcAW0-DB4EqR-F.js +0 -1
- package/dist/console/runtime/public/console/chunks/pug-CfJcGJfh.js +0 -1
- package/dist/console/runtime/public/console/chunks/pug-Cn_U_o_I-Cw4zFEpZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/puppet-CQlPp728-CDv2pdJW.js +0 -1
- package/dist/console/runtime/public/console/chunks/purescript-CLpaGMbw-9MfHhQsQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/python-BjnOIxPe-gzcpVVnB.js +0 -1
- package/dist/console/runtime/public/console/chunks/python-gzcpVVnB.js +0 -1
- package/dist/console/runtime/public/console/chunks/qml-DNlrbxJT-B_IzAFFX.js +0 -1
- package/dist/console/runtime/public/console/chunks/qmldir-Dz8ttxjf-DCQb3MpD.js +0 -1
- package/dist/console/runtime/public/console/chunks/qss-Iltvkn1C-Fe1Jh2GI.js +0 -1
- package/dist/console/runtime/public/console/chunks/r-Dzep-lPg.js +0 -1
- package/dist/console/runtime/public/console/chunks/r-VqTZMNY_-EnO4GoeC.js +0 -1
- package/dist/console/runtime/public/console/chunks/racket-DRv7j6nv-DcIDlBhZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/raku-DI9yGpeW-B3gFvitq.js +0 -1
- package/dist/console/runtime/public/console/chunks/razor-Bw2un3e8-CtGvw0jo.js +0 -1
- package/dist/console/runtime/public/console/chunks/red-CJ3rzSJv.js +0 -1
- package/dist/console/runtime/public/console/chunks/red-EHiRGXSv-CJ3rzSJv.js +0 -1
- package/dist/console/runtime/public/console/chunks/reg-DpJf71oO-CRGYupPL.js +0 -1
- package/dist/console/runtime/public/console/chunks/regexp-5HbFqwky-C3xQXL6t.js +0 -1
- package/dist/console/runtime/public/console/chunks/regexp-R83qIIH_.js +0 -1
- package/dist/console/runtime/public/console/chunks/rel-BT0iIKKw-BtDbiS_P.js +0 -1
- package/dist/console/runtime/public/console/chunks/riscv-CvzikGLb-Ckw8ddFX.js +0 -1
- package/dist/console/runtime/public/console/chunks/ron-DzAo6FTJ-VUp2lXgN.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-BthvhNj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-DTI-z1Qp-BthvhNj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-dawn-BIiGXpWs-Dg85fqjY.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-dawn-Dg85fqjY.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-moon-DU4wt90U-hon4tzzS.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-moon-hon4tzzS.js +0 -1
- package/dist/console/runtime/public/console/chunks/rosmsg-CyYq6XdT-CAekHB0j.js +0 -1
- package/dist/console/runtime/public/console/chunks/rst-BZPDb03W-BDIwqmQR.js +0 -1
- package/dist/console/runtime/public/console/chunks/ruby-BbVp0_gQ-BUOn3oxT.js +0 -1
- package/dist/console/runtime/public/console/chunks/rust-COBzcmTx-Cfkwpbl8.js +0 -1
- package/dist/console/runtime/public/console/chunks/sas-DSkdG4wF-BE4zxtJ7.js +0 -1
- package/dist/console/runtime/public/console/chunks/sass-DI2zJwx7-DXrisJhu.js +0 -1
- package/dist/console/runtime/public/console/chunks/sass-DXrisJhu.js +0 -1
- package/dist/console/runtime/public/console/chunks/scala-CtSYTRYT-DKOlJaKm.js +0 -1
- package/dist/console/runtime/public/console/chunks/scheme-D3A2QBtM-DQCgrYNe.js +0 -1
- package/dist/console/runtime/public/console/chunks/scss-BQ7uffpQ-D2aPazKS.js +0 -1
- package/dist/console/runtime/public/console/chunks/scss-DTeHeodw.js +0 -1
- package/dist/console/runtime/public/console/chunks/sdbl-CdQg5gu1-bTVj8UrX.js +0 -1
- package/dist/console/runtime/public/console/chunks/shaderlab-CWP9wBCf-C6U2tjWC.js +0 -1
- package/dist/console/runtime/public/console/chunks/shellscript-B42c0JAn-D5OxpxEd.js +0 -1
- package/dist/console/runtime/public/console/chunks/shellscript-CLZ0U2zV.js +0 -1
- package/dist/console/runtime/public/console/chunks/shellsession-Oc9-NqAv-C1K_F4Is.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-dark-BS2AOOdo-DnToyrRv.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-dark-DnToyrRv.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-ochin-B2OO5cIa.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-ochin-Nc7Cucwk-B2OO5cIa.js +0 -1
- package/dist/console/runtime/public/console/chunks/smalltalk-BEQkVl4K-B16xEiuN.js +0 -1
- package/dist/console/runtime/public/console/chunks/snazzy-light-4G7pJPwS.js +0 -1
- package/dist/console/runtime/public/console/chunks/snazzy-light-C2ghKZXY-4G7pJPwS.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-dark-DV17i1UV.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-dark-UHgjRWhr-DV17i1UV.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-light-B-Zcwve2-DSh2HLQt.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-light-DSh2HLQt.js +0 -1
- package/dist/console/runtime/public/console/chunks/solidity-lB9VjfB9-CKzVLygQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/soy-tgh9u9aW-Cm_LtJoW.js +0 -1
- package/dist/console/runtime/public/console/chunks/sparql-B4t0ZbEe-CXgkFCv7.js +0 -1
- package/dist/console/runtime/public/console/chunks/splunk-xP_ZjUH2-BC2Px7Mm.js +0 -1
- package/dist/console/runtime/public/console/chunks/sql-C7n9abzK.js +0 -1
- package/dist/console/runtime/public/console/chunks/sql-CrPlEQn4-COghB3-E.js +0 -1
- package/dist/console/runtime/public/console/chunks/ssh-config-DXFPABYp-BgfXC-Er.js +0 -1
- package/dist/console/runtime/public/console/chunks/stata-D_KqT8cj-oQQpG6t_.js +0 -1
- package/dist/console/runtime/public/console/chunks/stylus-B6D30XZt.js +0 -1
- package/dist/console/runtime/public/console/chunks/stylus-ZZDn1yUO-B6D30XZt.js +0 -1
- package/dist/console/runtime/public/console/chunks/surrealql-C0KhgoyZ-DqXNFH_A.js +0 -1
- package/dist/console/runtime/public/console/chunks/svelte-CRpWSJAY.js +0 -1
- package/dist/console/runtime/public/console/chunks/svelte-DuHT0xxw-Bs0TxuUS.js +0 -1
- package/dist/console/runtime/public/console/chunks/swift-BTPQlRLK-DonLKvLd.js +0 -1
- package/dist/console/runtime/public/console/chunks/synthwave-84-CPtGYwOz-nFMaYfgc.js +0 -1
- package/dist/console/runtime/public/console/chunks/synthwave-84-nFMaYfgc.js +0 -1
- package/dist/console/runtime/public/console/chunks/system-verilog-BEoxaBuU-DJ5XKQeo.js +0 -1
- package/dist/console/runtime/public/console/chunks/systemd-DFbUltlW-BxMlprV5.js +0 -1
- package/dist/console/runtime/public/console/chunks/talonscript-CLxaFu-b-CohzipZa.js +0 -1
- package/dist/console/runtime/public/console/chunks/tasl-_AAbKiWM-DMoTqEGO.js +0 -1
- package/dist/console/runtime/public/console/chunks/tcl-DLe0Tsfm-CZd0xW_V.js +0 -1
- package/dist/console/runtime/public/console/chunks/templ-DF54artD-BPb_zNLV.js +0 -1
- package/dist/console/runtime/public/console/chunks/terraform-v0KN9QQh-DswuEJGm.js +0 -1
- package/dist/console/runtime/public/console/chunks/tex-Bbhb8xAP-9R8lE_en.js +0 -1
- package/dist/console/runtime/public/console/chunks/tokyo-night-BKYoawWu-oM2G3aXe.js +0 -1
- package/dist/console/runtime/public/console/chunks/tokyo-night-oM2G3aXe.js +0 -1
- package/dist/console/runtime/public/console/chunks/toml-B7BHZIqX-CcmNWLt0.js +0 -1
- package/dist/console/runtime/public/console/chunks/ts-tags-DH1AB-Ri-CgEe3BFX.js +0 -1
- package/dist/console/runtime/public/console/chunks/ts-tags-DJjZLMnt.js +0 -1
- package/dist/console/runtime/public/console/chunks/tsv-BorGVq2Z-sltzmVWM.js +0 -1
- package/dist/console/runtime/public/console/chunks/tsx-B7QamQLF.js +0 -1
- package/dist/console/runtime/public/console/chunks/tsx-BR8s1Lhs-DiW36VFk.js +0 -1
- package/dist/console/runtime/public/console/chunks/turtle-BEG5g_eT-ByJddavk.js +0 -1
- package/dist/console/runtime/public/console/chunks/tv-WsfYJXat.js +0 -1
- package/dist/console/runtime/public/console/chunks/twig-DziFF7iU-DLOFbR4k.js +0 -1
- package/dist/console/runtime/public/console/chunks/typescript-D8TR6ff2-CCKRkaRI.js +0 -1
- package/dist/console/runtime/public/console/chunks/typescript-DzLO-qqB.js +0 -1
- package/dist/console/runtime/public/console/chunks/typespec-C_R5TbvO-BRdr0IET.js +0 -1
- package/dist/console/runtime/public/console/chunks/typst-BV9w0z8--DI99ib-x.js +0 -1
- package/dist/console/runtime/public/console/chunks/v-DfbeXLo8-DETTlOr0.js +0 -1
- package/dist/console/runtime/public/console/chunks/vala-BnnASFsX-zf12oZj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/vb-DU29mvss-Djn5o6TS.js +0 -1
- package/dist/console/runtime/public/console/chunks/verilog-BW5U03XW-CiiDBU1e.js +0 -1
- package/dist/console/runtime/public/console/chunks/vesper-ClvmKzqD-DdrHHSXu.js +0 -1
- package/dist/console/runtime/public/console/chunks/vesper-DdrHHSXu.js +0 -1
- package/dist/console/runtime/public/console/chunks/vhdl-Co2XFKY7-BroJfC0k.js +0 -1
- package/dist/console/runtime/public/console/chunks/viml-BReTXeDA-DvXPmvsu.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-black-BY6Qtyq--fwtXNY1n.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-black-fwtXNY1n.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-dark-BT-v_EgR-BZCL-v6S.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-dark-BZCL-v6S.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-light-Box8ZFz6-VbXTXTou.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-light-VbXTXTou.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-BRy8iDCZ-CL7P9CNz.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-CQQ6_PvN.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-html-B24bjO_3-BY2skbNe.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-html-Ce5SCNOK.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-vine-DKH1_YEZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-vine-l7O7Mg81-CFWzX3HC.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue.runtime.esm-bundler-COh-O3z7.js +0 -3
- package/dist/console/runtime/public/console/chunks/vyper-C6KGx0YU-CgoNMtux.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-BRCjOXGL-BnjxR4X6.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-BnjxR4X6.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-ByWQv1Qj.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-gNIKwGlD-ByWQv1Qj.js +0 -1
- package/dist/console/runtime/public/console/chunks/wenyan-BeysbCrW-C8pVoKbM.js +0 -1
- package/dist/console/runtime/public/console/chunks/wgsl-1s5rV5xS-BsKzXJz4.js +0 -1
- package/dist/console/runtime/public/console/chunks/wgsl-BsKzXJz4.js +0 -1
- package/dist/console/runtime/public/console/chunks/wikitext-wjhjmmzD-ClFFjSW2.js +0 -1
- package/dist/console/runtime/public/console/chunks/wit-CeQiCbz_-DdvCle-K.js +0 -1
- package/dist/console/runtime/public/console/chunks/wit-DdvCle-K.js +0 -1
- package/dist/console/runtime/public/console/chunks/wolfram-CcZPfnLd-DLL8P-h_.js +0 -1
- package/dist/console/runtime/public/console/chunks/xml-CduVPlYa-BZCwbgEk.js +0 -1
- package/dist/console/runtime/public/console/chunks/xml-G-voesMw.js +0 -1
- package/dist/console/runtime/public/console/chunks/xsl-BeH_vLTK-DeKk-5KU.js +0 -1
- package/dist/console/runtime/public/console/chunks/yaml-Cb0uRU1q-CkSC4c4u.js +0 -1
- package/dist/console/runtime/public/console/chunks/yaml-rwi0_p6S.js +0 -1
- package/dist/console/runtime/public/console/chunks/zenscript-BoijL7rl-BnlCZFoB.js +0 -1
- package/dist/console/runtime/public/console/chunks/zig-lTQvxhLD-CMLA9XwU.js +0 -1
- package/dist/console/runtime/public/console/console-Bwq3z75a.css +0 -3
- package/dist/console/runtime/public/console/console-Cl-xrMah.js +0 -1371
- package/dist/console/runtime/server/blob.get.d.ts +0 -25
- package/dist/console/runtime/server/blob.get.js +0 -74
- package/dist/console/runtime/server/devframe.d.ts +0 -13
- package/dist/console/runtime/server/devframe.js +0 -133
- package/dist/console/runtime/server/kv.d.ts +0 -2
- package/dist/console/runtime/server/kv.get.d.ts +0 -24
- package/dist/console/runtime/server/kv.get.js +0 -236
- package/dist/console/runtime/server/kv.js +0 -18
- package/dist/console/runtime/server/page.get.d.ts +0 -6
- package/dist/console/runtime/server/page.get.js +0 -33
- package/dist/database/drizzle.d.ts +0 -16
- package/dist/database/drizzle.js +0 -9
- package/dist/database-CW-WjW4u.d.ts +0 -8
- package/dist/definitions-BHmB22eM.d.ts +0 -7
- package/dist/definitions-CfSmoS5G.d.ts +0 -17
- package/dist/email/server.d.ts +0 -1
- package/dist/email/server.js +0 -2
- package/dist/env/presets.d.ts +0 -1
- package/dist/env/presets.js +0 -2
- package/dist/env/provider.d.ts +0 -1
- package/dist/env/provider.js +0 -2
- package/dist/env/schema.d.ts +0 -1
- package/dist/env/schema.js +0 -2
- package/dist/env/secret.d.ts +0 -1
- package/dist/env/secret.js +0 -2
- package/dist/index-B072hyCd.d.ts +0 -59
- package/dist/internal-12r-XCbk.d.ts +0 -20
- package/dist/internal-DzLLx0iR.js +0 -304
- package/dist/invocations-qwMRTSy7.js +0 -364
- package/dist/kv-DLGscNQ_.d.ts +0 -8
- package/dist/request-DxBwxGnk.js +0 -72
- package/dist/request-NErg_P5m.d.ts +0 -43
- package/dist/runtime/node.d.ts +0 -1
- package/dist/runtime/node.js +0 -2
- package/dist/schedule/runtime/driver.d.ts +0 -1
- package/dist/schedule/runtime/driver.js +0 -2
- package/dist/search.get-ClTCn-mh.js +0 -100
- package/dist/sections-7HoMOIGH.d.ts +0 -9
- package/dist/sections-DVsqeLAF.d.ts +0 -100
- package/dist/server-BFxDhCzA.d.ts +0 -78
- package/dist/shell/providers/cloudflare.d.ts +0 -1
- package/dist/shell/providers/cloudflare.js +0 -2
- package/dist/source/content/client.d.ts +0 -1
- package/dist/source/content/client.js +0 -2
- package/dist/source/content.d.ts +0 -1
- package/dist/source/content.js +0 -2
- package/dist/source/file.d.ts +0 -1
- package/dist/source/file.js +0 -2
- package/dist/source/github.d.ts +0 -1
- package/dist/source/github.js +0 -2
- package/dist/source/glob.d.ts +0 -1
- package/dist/source/glob.js +0 -2
- package/dist/source/markdown.d.ts +0 -1
- package/dist/source/markdown.js +0 -2
- package/dist/src-XEJGHDr9.js +0 -5247
- package/dist/types-BucGTJnk.js +0 -168
- package/dist/ui/nuxt.d.ts +0 -3
- package/dist/ui/nuxt.js +0 -3
- package/dist/usage-CoZa_8fx.js +0 -361
- package/dist/workspace/collections/client.d.ts +0 -1
- package/dist/workspace/collections/client.js +0 -2
- package/dist/workspace/collections.d.ts +0 -1
- package/dist/workspace/collections.js +0 -2
- package/dist/workspace/publish.d.ts +0 -1
- package/dist/workspace/publish.js +0 -2
|
@@ -0,0 +1,1024 @@
|
|
|
1
|
+
import { n as isRecord } from "./object-D8pRdprI.js";
|
|
2
|
+
import { t as consoleDiagnostic } from "./diagnostics-D0DefmQj.js";
|
|
3
|
+
import { m as readConsoleOperationUser } from "./access-F0YP5D5E.js";
|
|
4
|
+
import { i as consoleRequestError, r as consolePublicURL } from "./request-BUYAlAJl.js";
|
|
5
|
+
import { r as consoleMountBase } from "./console-route-COvNB_Xj.js";
|
|
6
|
+
import { r as getConsoleSections } from "./sections-C83x0slv.js";
|
|
7
|
+
import { t as consoleMcpCallbackPath } from "./mcp-client-CTbTbn7d.js";
|
|
8
|
+
import { n as getActiveCloudflareEnv } from "./cloudflare-env-lookup-DKXdr4P_.js";
|
|
9
|
+
import * as v from "valibot";
|
|
10
|
+
import { importSealKey, sealWithKey, unsealWithKey } from "@vite-hub/env/seal";
|
|
11
|
+
import { UnauthorizedError, auth, discoverOAuthServerInfo, extractWWWAuthenticateParams } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
12
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
13
|
+
import { StreamableHTTPClientTransport, StreamableHTTPError } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
14
|
+
import { McpError, ResultSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
15
|
+
import { OAuthClientInformationSchema, OAuthTokensSchema } from "@modelcontextprotocol/sdk/shared/auth.js";
|
|
16
|
+
//#region src/console/runtime/server/mcp-client-store.ts
|
|
17
|
+
const stateKey = Symbol.for("vitehub.console.mcp-client");
|
|
18
|
+
const scope = globalThis;
|
|
19
|
+
function memoryRecords() {
|
|
20
|
+
const state = scope[stateKey] ??= {
|
|
21
|
+
clients: /* @__PURE__ */ new Map(),
|
|
22
|
+
connections: /* @__PURE__ */ new Map()
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
durable: false,
|
|
26
|
+
client: async (key) => state.clients.get(key),
|
|
27
|
+
connection: async (owner, id) => {
|
|
28
|
+
const connection = state.connections.get(id);
|
|
29
|
+
return connection?.owner === owner ? connection : void 0;
|
|
30
|
+
},
|
|
31
|
+
connections: async (owner) => [...state.connections.values()].filter((connection) => connection.owner === owner),
|
|
32
|
+
remove: async (connection) => {
|
|
33
|
+
state.connections.delete(connection.id);
|
|
34
|
+
},
|
|
35
|
+
removeClient: async (key) => {
|
|
36
|
+
state.clients.delete(key);
|
|
37
|
+
},
|
|
38
|
+
save: async (connection) => {
|
|
39
|
+
state.connections.set(connection.id, connection);
|
|
40
|
+
},
|
|
41
|
+
saveClient: async (key, client) => {
|
|
42
|
+
state.clients.set(key, client);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const optionalText = v.optional(v.string());
|
|
47
|
+
const clientSchema = v.custom((value) => OAuthClientInformationSchema.safeParse(value).success);
|
|
48
|
+
const connectionSchema = v.object({
|
|
49
|
+
auth: v.picklist([
|
|
50
|
+
"bearer",
|
|
51
|
+
"console",
|
|
52
|
+
"none",
|
|
53
|
+
"oauth"
|
|
54
|
+
]),
|
|
55
|
+
bearer: optionalText,
|
|
56
|
+
consoleOrigin: v.string(),
|
|
57
|
+
createdAt: v.number(),
|
|
58
|
+
error: optionalText,
|
|
59
|
+
id: v.string(),
|
|
60
|
+
identity: v.optional(v.object({
|
|
61
|
+
email: optionalText,
|
|
62
|
+
name: optionalText,
|
|
63
|
+
picture: optionalText,
|
|
64
|
+
subject: optionalText
|
|
65
|
+
})),
|
|
66
|
+
label: v.string(),
|
|
67
|
+
labelled: v.boolean(),
|
|
68
|
+
oauth: v.optional(v.object({
|
|
69
|
+
client: v.optional(clientSchema),
|
|
70
|
+
discovery: v.optional(v.custom((value) => isRecord(value) && typeof value.authorizationServerUrl === "string")),
|
|
71
|
+
pending: v.optional(v.object({
|
|
72
|
+
expiresAt: v.number(),
|
|
73
|
+
prompt: v.optional(v.literal("login")),
|
|
74
|
+
state: v.string(),
|
|
75
|
+
url: optionalText,
|
|
76
|
+
verifier: optionalText
|
|
77
|
+
})),
|
|
78
|
+
receivedAt: v.optional(v.number()),
|
|
79
|
+
redirectUrl: v.string(),
|
|
80
|
+
tokens: v.optional(v.custom((value) => OAuthTokensSchema.safeParse(value).success))
|
|
81
|
+
})),
|
|
82
|
+
owner: v.string(),
|
|
83
|
+
protocolVersion: optionalText,
|
|
84
|
+
sameOrigin: v.boolean(),
|
|
85
|
+
server: v.optional(v.custom((value) => isRecord(value) && typeof value.name === "string" && isRecord(value.capabilities))),
|
|
86
|
+
sessionId: optionalText,
|
|
87
|
+
status: v.picklist([
|
|
88
|
+
"authorizing",
|
|
89
|
+
"connected",
|
|
90
|
+
"failed",
|
|
91
|
+
"signed-out"
|
|
92
|
+
]),
|
|
93
|
+
url: v.string(),
|
|
94
|
+
usedAt: v.optional(v.number())
|
|
95
|
+
});
|
|
96
|
+
const keyVariable = "VITEHUB_CONSOLE_MCP_KEY";
|
|
97
|
+
const prefix = "vitehub:console:mcp-client";
|
|
98
|
+
function decodeKey(value) {
|
|
99
|
+
if (/^[a-f0-9]{64}$/i.test(value)) return Uint8Array.from(value.match(/../g), (byte) => Number.parseInt(byte, 16));
|
|
100
|
+
if (!/^[\w+/-]+={0,2}$/.test(value)) return void 0;
|
|
101
|
+
try {
|
|
102
|
+
return Uint8Array.from(atob(value.replace(/=+$/, "").replaceAll("-", "+").replaceAll("_", "/")), (character) => character.charCodeAt(0));
|
|
103
|
+
} catch {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function configuredKey() {
|
|
108
|
+
const value = globalThis.process?.env?.[keyVariable] ?? getActiveCloudflareEnv()?.[keyVariable];
|
|
109
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
110
|
+
}
|
|
111
|
+
/** A short hash, so KV key names do not show who owns a connection, such as a Cloudflare Access email. */
|
|
112
|
+
async function hashed(value) {
|
|
113
|
+
const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value)));
|
|
114
|
+
return Array.from(digest.slice(0, 16), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
115
|
+
}
|
|
116
|
+
function unwrap([error, value]) {
|
|
117
|
+
if (error) throw error;
|
|
118
|
+
return value;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Records in KV, one sealed value per connection and per client registration. Each value is bound to its key, so a
|
|
122
|
+
* record copied under another owner does not open. Two requests that change the same connection at once keep the
|
|
123
|
+
* last write.
|
|
124
|
+
*/
|
|
125
|
+
function kvConsoleMcpRecords(kv, key) {
|
|
126
|
+
const encoder = new TextEncoder();
|
|
127
|
+
async function read(name, schema) {
|
|
128
|
+
const stored = unwrap(await kv.get(name));
|
|
129
|
+
const sealed = isRecord(stored) && typeof stored.sealed === "string" ? stored.sealed : void 0;
|
|
130
|
+
if (!sealed) return void 0;
|
|
131
|
+
let value;
|
|
132
|
+
try {
|
|
133
|
+
value = JSON.parse(await unsealWithKey(key, encoder.encode(name), sealed));
|
|
134
|
+
} catch {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const parsed = v.safeParse(schema, value);
|
|
138
|
+
return parsed.success ? parsed.output : void 0;
|
|
139
|
+
}
|
|
140
|
+
async function write(name, value) {
|
|
141
|
+
unwrap(await kv.set(name, { sealed: await sealWithKey(key, encoder.encode(name), JSON.stringify(value)) }));
|
|
142
|
+
}
|
|
143
|
+
const connectionKey = async (owner, id) => `${prefix}:connections:${await hashed(owner)}:${id}`;
|
|
144
|
+
const clientKey = async (name) => `${prefix}:clients:${await hashed(name)}`;
|
|
145
|
+
return {
|
|
146
|
+
durable: true,
|
|
147
|
+
client: async (name) => read(await clientKey(name), clientSchema),
|
|
148
|
+
connection: async (owner, id) => {
|
|
149
|
+
const connection = await read(await connectionKey(owner, id), connectionSchema);
|
|
150
|
+
return connection?.owner === owner ? connection : void 0;
|
|
151
|
+
},
|
|
152
|
+
connections: async (owner) => {
|
|
153
|
+
const base = `${prefix}:connections:${await hashed(owner)}`;
|
|
154
|
+
const names = (unwrap(await kv.keys(base)) ?? []).map((name) => name.replaceAll("/", ":")).filter((name) => name.startsWith(`${base}:`));
|
|
155
|
+
return (await Promise.all(names.map((name) => read(name, connectionSchema)))).filter((connection) => connection?.owner === owner);
|
|
156
|
+
},
|
|
157
|
+
remove: async (connection) => {
|
|
158
|
+
unwrap(await kv.delete(await connectionKey(connection.owner, connection.id)));
|
|
159
|
+
},
|
|
160
|
+
removeClient: async (name) => {
|
|
161
|
+
unwrap(await kv.delete(await clientKey(name)));
|
|
162
|
+
},
|
|
163
|
+
save: async (connection) => write(await connectionKey(connection.owner, connection.id), connection),
|
|
164
|
+
saveClient: async (name, client) => write(await clientKey(name), client)
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
let durable;
|
|
168
|
+
/** The records of this process: in KV with `VITEHUB_CONSOLE_MCP_KEY`, else in memory. */
|
|
169
|
+
async function consoleMcpRecords() {
|
|
170
|
+
const value = configuredKey();
|
|
171
|
+
if (!value) return memoryRecords();
|
|
172
|
+
const bytes = decodeKey(value);
|
|
173
|
+
if (bytes?.byteLength !== 32) throw consoleRequestError(500, `${keyVariable} must be 32 random bytes as base64 or hex. Create one with \`openssl rand -base64 32\`.`, "CONSOLE_MCP_KEY_INVALID");
|
|
174
|
+
if (!getConsoleSections().includes("kv")) throw consoleRequestError(500, `${keyVariable} requires the app's default KV store. Set kv: true in vitehub(), or configure a default KV store.`, "CONSOLE_MCP_KV_REQUIRED");
|
|
175
|
+
if (durable?.value !== value) durable = {
|
|
176
|
+
records: Promise.all([import("@vite-hub/kv"), importSealKey(bytes)]).then(([{ kv }, sealKey]) => kvConsoleMcpRecords(kv, sealKey)),
|
|
177
|
+
value
|
|
178
|
+
};
|
|
179
|
+
return durable.records;
|
|
180
|
+
}
|
|
181
|
+
/** Forget every connection kept in memory. Tests use it. */
|
|
182
|
+
function resetConsoleMcpRecords() {
|
|
183
|
+
delete scope[stateKey];
|
|
184
|
+
durable = void 0;
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/console/runtime/server/mcp-client.ts
|
|
188
|
+
/** The MCP servers that each origin announced, for a minute. */
|
|
189
|
+
const discovered = /* @__PURE__ */ new Map();
|
|
190
|
+
const connectionRuntimes = /* @__PURE__ */ new Map();
|
|
191
|
+
const completingAuthorizations = /* @__PURE__ */ new Set();
|
|
192
|
+
const pendingLifetimeMs = 6e5;
|
|
193
|
+
const discoveryLifetimeMs = 6e4;
|
|
194
|
+
const requestTimeoutMs = 3e4;
|
|
195
|
+
const callTimeoutMs = 12e4;
|
|
196
|
+
const maximumConnections = 20;
|
|
197
|
+
const clientInfo = {
|
|
198
|
+
name: "vitehub-console",
|
|
199
|
+
title: "ViteHub Console",
|
|
200
|
+
version: "1.0.0"
|
|
201
|
+
};
|
|
202
|
+
/** Every person keeps their own connections. A Console without accounts shares one owner per access mode. */
|
|
203
|
+
async function ownerOf(caller) {
|
|
204
|
+
const user = await readConsoleOperationUser(caller.access);
|
|
205
|
+
return user?.id ? `user:${user.id}` : caller.access.mode;
|
|
206
|
+
}
|
|
207
|
+
/** The origin and Console mount that the browser sees, from the RPC request. */
|
|
208
|
+
function consolePage(caller) {
|
|
209
|
+
if (!caller.request) throw consoleRequestError(400, "MCP connections need the Console page that calls them.");
|
|
210
|
+
const url = consolePublicURL(caller.request);
|
|
211
|
+
return {
|
|
212
|
+
mount: consoleMountBase(url.pathname),
|
|
213
|
+
origin: url.origin
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const loopbackHosts = /* @__PURE__ */ new Set([
|
|
217
|
+
"localhost",
|
|
218
|
+
"127.0.0.1",
|
|
219
|
+
"[::1]"
|
|
220
|
+
]);
|
|
221
|
+
/** Resolve a URL or a path such as `/mcp` against the Console origin. Plain HTTP works only on this origin and on loopback hosts. */
|
|
222
|
+
function serverUrl(value, origin) {
|
|
223
|
+
let url;
|
|
224
|
+
try {
|
|
225
|
+
url = new URL(value.trim(), origin);
|
|
226
|
+
} catch {
|
|
227
|
+
throw consoleRequestError(400, "Enter the URL of an MCP endpoint, such as https://example.com/mcp, or a path on this app, such as /mcp.");
|
|
228
|
+
}
|
|
229
|
+
const loopback = loopbackHosts.has(url.hostname) || url.hostname.endsWith(".localhost");
|
|
230
|
+
if (url.protocol !== "https:" && !(url.protocol === "http:" && (url.origin === origin || loopback))) throw consoleRequestError(400, "Use an HTTPS URL. Plain HTTP works only for this app and for localhost.");
|
|
231
|
+
if (url.username || url.password || url.hash) throw consoleRequestError(400, "The MCP URL cannot contain credentials or a fragment.");
|
|
232
|
+
return url;
|
|
233
|
+
}
|
|
234
|
+
const redirectStatuses = /* @__PURE__ */ new Set([
|
|
235
|
+
301,
|
|
236
|
+
302,
|
|
237
|
+
303,
|
|
238
|
+
307,
|
|
239
|
+
308
|
|
240
|
+
]);
|
|
241
|
+
function withTimeout(timeoutMs, origin) {
|
|
242
|
+
return async (input, init) => {
|
|
243
|
+
let request = new Request(input, init);
|
|
244
|
+
const signal = AbortSignal.any([request.signal, AbortSignal.timeout(timeoutMs)]);
|
|
245
|
+
for (let redirects = 0;; redirects++) {
|
|
246
|
+
signal.throwIfAborted();
|
|
247
|
+
serverUrl(request.url, origin);
|
|
248
|
+
const response = await fetch(request.clone(), {
|
|
249
|
+
redirect: "manual",
|
|
250
|
+
signal
|
|
251
|
+
});
|
|
252
|
+
const location = response.headers.get("location");
|
|
253
|
+
if (!redirectStatuses.has(response.status) || location === null || request.redirect === "manual") return response;
|
|
254
|
+
await response.body?.cancel();
|
|
255
|
+
if (request.redirect === "error") throw consoleRequestError(502, "The server returned a redirect.");
|
|
256
|
+
if (redirects >= 20) throw consoleRequestError(502, "Too many redirects from the MCP or OAuth server.");
|
|
257
|
+
const target = serverUrl(new URL(location, request.url).href, origin);
|
|
258
|
+
const headers = new Headers(request.headers);
|
|
259
|
+
if (target.origin !== new URL(request.url).origin) for (const name of [
|
|
260
|
+
"authorization",
|
|
261
|
+
"proxy-authorization",
|
|
262
|
+
"cookie"
|
|
263
|
+
]) headers.delete(name);
|
|
264
|
+
if ((response.status === 301 || response.status === 302) && request.method === "POST" || response.status === 303 && request.method !== "GET" && request.method !== "HEAD") {
|
|
265
|
+
for (const name of [
|
|
266
|
+
"content-encoding",
|
|
267
|
+
"content-language",
|
|
268
|
+
"content-location",
|
|
269
|
+
"content-type"
|
|
270
|
+
]) headers.delete(name);
|
|
271
|
+
request = new Request(target, {
|
|
272
|
+
headers,
|
|
273
|
+
method: "GET",
|
|
274
|
+
redirect: request.redirect,
|
|
275
|
+
signal
|
|
276
|
+
});
|
|
277
|
+
} else request = new Request(new Request(target, request), { headers });
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function randomId(bytes = 16) {
|
|
282
|
+
const values = crypto.getRandomValues(new Uint8Array(bytes));
|
|
283
|
+
return btoa(String.fromCharCode(...values)).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/, "");
|
|
284
|
+
}
|
|
285
|
+
function text(value) {
|
|
286
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
287
|
+
}
|
|
288
|
+
/** The claims of a JWT, without checking its signature. The token came straight from the token endpoint. */
|
|
289
|
+
function jwtClaims(token) {
|
|
290
|
+
const payload = token?.split(".")[1];
|
|
291
|
+
if (!payload) return void 0;
|
|
292
|
+
try {
|
|
293
|
+
const binary = atob(payload.replaceAll("-", "+").replaceAll("_", "/"));
|
|
294
|
+
const claims = JSON.parse(new TextDecoder().decode(Uint8Array.from(binary, (character) => character.charCodeAt(0))));
|
|
295
|
+
return isRecord(claims) ? claims : void 0;
|
|
296
|
+
} catch {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function identityFrom(claims) {
|
|
301
|
+
if (!claims) return void 0;
|
|
302
|
+
const identity = {};
|
|
303
|
+
const subject = text(claims.sub);
|
|
304
|
+
const name = text(claims.name) ?? text(claims.preferred_username);
|
|
305
|
+
const email = text(claims.email);
|
|
306
|
+
const picture = text(claims.picture);
|
|
307
|
+
if (subject) identity.subject = subject;
|
|
308
|
+
if (name) identity.name = name;
|
|
309
|
+
if (email) identity.email = email;
|
|
310
|
+
if (picture?.startsWith("https://")) identity.picture = picture;
|
|
311
|
+
return Object.keys(identity).length ? identity : void 0;
|
|
312
|
+
}
|
|
313
|
+
/** Who the grant belongs to: the ID token, then the userinfo endpoint, then the access token. */
|
|
314
|
+
async function readIdentity(connection) {
|
|
315
|
+
const tokens = connection.oauth?.tokens;
|
|
316
|
+
if (!tokens) return void 0;
|
|
317
|
+
const fromIdToken = identityFrom(jwtClaims(tokens.id_token));
|
|
318
|
+
if (fromIdToken?.name || fromIdToken?.email) return fromIdToken;
|
|
319
|
+
const userinfo = text(connection.oauth?.discovery?.authorizationServerMetadata?.userinfo_endpoint);
|
|
320
|
+
if (userinfo) try {
|
|
321
|
+
const response = await withTimeout(requestTimeoutMs, connection.consoleOrigin)(userinfo, { headers: {
|
|
322
|
+
accept: "application/json",
|
|
323
|
+
authorization: `Bearer ${tokens.access_token}`
|
|
324
|
+
} });
|
|
325
|
+
const claims = response.ok ? await response.json() : void 0;
|
|
326
|
+
const identity = identityFrom(isRecord(claims) ? claims : void 0);
|
|
327
|
+
if (identity) return {
|
|
328
|
+
...fromIdToken,
|
|
329
|
+
...identity
|
|
330
|
+
};
|
|
331
|
+
} catch {}
|
|
332
|
+
return fromIdToken ?? identityFrom(jwtClaims(tokens.access_token));
|
|
333
|
+
}
|
|
334
|
+
function clientKey(connection) {
|
|
335
|
+
const oauth = connection.oauth;
|
|
336
|
+
return `${oauth.discovery?.authorizationServerUrl ?? new URL(connection.url).origin}\n${oauth.redirectUrl}\n${connection.url}`;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* The OAuth client of one connection for the MCP SDK. Everything it saves stays on the server: the registration, the
|
|
340
|
+
* PKCE verifier, the discovery result, and the tokens. The operation saves the connection when it ends.
|
|
341
|
+
* `redirectToAuthorization()` only records the URL; the Console page opens it.
|
|
342
|
+
*/
|
|
343
|
+
function oauthProvider(connection, onAuthorize) {
|
|
344
|
+
const oauth = connection.oauth;
|
|
345
|
+
const pending = () => oauth.pending ??= {
|
|
346
|
+
expiresAt: Date.now() + pendingLifetimeMs,
|
|
347
|
+
state: randomId()
|
|
348
|
+
};
|
|
349
|
+
const metadata = {
|
|
350
|
+
client_name: "ViteHub Console",
|
|
351
|
+
client_uri: "https://vitehub.dev/docs/development/console",
|
|
352
|
+
grant_types: ["authorization_code", "refresh_token"],
|
|
353
|
+
redirect_uris: [oauth.redirectUrl],
|
|
354
|
+
response_types: ["code"],
|
|
355
|
+
token_endpoint_auth_method: "none"
|
|
356
|
+
};
|
|
357
|
+
return {
|
|
358
|
+
get clientMetadata() {
|
|
359
|
+
return metadata;
|
|
360
|
+
},
|
|
361
|
+
get redirectUrl() {
|
|
362
|
+
return oauth.redirectUrl;
|
|
363
|
+
},
|
|
364
|
+
clientInformation: async () => oauth.client ??= await (await consoleMcpRecords()).client(clientKey(connection)),
|
|
365
|
+
codeVerifier: () => {
|
|
366
|
+
const verifier = oauth.pending?.verifier;
|
|
367
|
+
if (!verifier) throw consoleRequestError(409, "This sign-in has no PKCE verifier. Start it again.", "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
368
|
+
return verifier;
|
|
369
|
+
},
|
|
370
|
+
discoveryState: () => {
|
|
371
|
+
onAuthorize?.();
|
|
372
|
+
return oauth.discovery;
|
|
373
|
+
},
|
|
374
|
+
invalidateCredentials: async (credentials) => {
|
|
375
|
+
if (credentials === "all" || credentials === "client") {
|
|
376
|
+
const records = await consoleMcpRecords();
|
|
377
|
+
const registered = await records.client(clientKey(connection));
|
|
378
|
+
if (registered?.client_id === oauth.client?.client_id && registered?.client_secret === oauth.client?.client_secret) await records.removeClient(clientKey(connection));
|
|
379
|
+
delete oauth.client;
|
|
380
|
+
}
|
|
381
|
+
if (credentials === "all" || credentials === "tokens") oauth.tokens = void 0;
|
|
382
|
+
if (credentials === "all" || credentials === "verifier") delete pending().verifier;
|
|
383
|
+
if (credentials === "all" || credentials === "discovery") oauth.discovery = void 0;
|
|
384
|
+
},
|
|
385
|
+
redirectToAuthorization: (url) => {
|
|
386
|
+
const validated = serverUrl(url.href, connection.consoleOrigin);
|
|
387
|
+
const current = pending();
|
|
388
|
+
if (current.prompt) validated.searchParams.set("prompt", [current.prompt, ...validated.searchParams.get("prompt")?.split(" ") ?? []].filter((value, index, all) => all.indexOf(value) === index).join(" "));
|
|
389
|
+
current.url = validated.href;
|
|
390
|
+
},
|
|
391
|
+
saveClientInformation: async (information) => {
|
|
392
|
+
oauth.client = information;
|
|
393
|
+
await (await consoleMcpRecords()).saveClient(clientKey(connection), information);
|
|
394
|
+
},
|
|
395
|
+
saveCodeVerifier: (verifier) => {
|
|
396
|
+
pending().verifier = verifier;
|
|
397
|
+
},
|
|
398
|
+
saveDiscoveryState: (state) => {
|
|
399
|
+
oauth.discovery = state;
|
|
400
|
+
},
|
|
401
|
+
saveTokens: (tokens) => {
|
|
402
|
+
oauth.tokens = tokens;
|
|
403
|
+
oauth.receivedAt = Date.now();
|
|
404
|
+
},
|
|
405
|
+
state: () => pending().state,
|
|
406
|
+
tokens: () => oauth.tokens
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
function serverInfo(client, protocolVersion) {
|
|
410
|
+
const version = client.getServerVersion();
|
|
411
|
+
if (!version) return void 0;
|
|
412
|
+
const capabilities = client.getServerCapabilities() ?? {};
|
|
413
|
+
const details = version;
|
|
414
|
+
const icon = (Array.isArray(details.icons) ? details.icons : []).map((entry) => isRecord(entry) ? text(entry.src) : void 0).find((source) => source?.startsWith("https://") || source?.startsWith("http://") || source?.startsWith("data:image/"));
|
|
415
|
+
const info = {
|
|
416
|
+
capabilities: {
|
|
417
|
+
completions: Boolean(capabilities.completions),
|
|
418
|
+
logging: Boolean(capabilities.logging),
|
|
419
|
+
prompts: Boolean(capabilities.prompts),
|
|
420
|
+
resources: Boolean(capabilities.resources),
|
|
421
|
+
tools: Boolean(capabilities.tools)
|
|
422
|
+
},
|
|
423
|
+
name: version.name
|
|
424
|
+
};
|
|
425
|
+
const optional = {
|
|
426
|
+
description: text(details.description),
|
|
427
|
+
icon,
|
|
428
|
+
instructions: text(client.getInstructions()),
|
|
429
|
+
protocolVersion,
|
|
430
|
+
title: text(version.title),
|
|
431
|
+
version: text(version.version),
|
|
432
|
+
websiteUrl: text(details.websiteUrl)
|
|
433
|
+
};
|
|
434
|
+
for (const [key, value] of Object.entries(optional)) if (value) Object.assign(info, { [key]: value });
|
|
435
|
+
return info;
|
|
436
|
+
}
|
|
437
|
+
/** `CONSOLE_MCP_SIGNED_OUT`, with the `401` challenge that a new sign-in starts from. */
|
|
438
|
+
function signedOutError(message, challenge) {
|
|
439
|
+
return Object.assign(consoleRequestError(409, message, "CONSOLE_MCP_SIGNED_OUT"), { challenge });
|
|
440
|
+
}
|
|
441
|
+
function isSignedOut(error) {
|
|
442
|
+
return error instanceof Error && Reflect.get(error, "code") === "CONSOLE_MCP_SIGNED_OUT";
|
|
443
|
+
}
|
|
444
|
+
function connectionKey(owner, id) {
|
|
445
|
+
return JSON.stringify([owner, id]);
|
|
446
|
+
}
|
|
447
|
+
function runtimeOf(key) {
|
|
448
|
+
let runtime = connectionRuntimes.get(key);
|
|
449
|
+
if (!runtime) connectionRuntimes.set(key, runtime = {});
|
|
450
|
+
return runtime;
|
|
451
|
+
}
|
|
452
|
+
function releaseRuntime(key, runtime) {
|
|
453
|
+
if (!runtime.closing && !runtime.operation && !runtime.clientOperation && connectionRuntimes.get(key) === runtime) connectionRuntimes.delete(key);
|
|
454
|
+
}
|
|
455
|
+
function assertOpen(runtime) {
|
|
456
|
+
if (runtime?.closing) throw consoleRequestError(404, "This MCP connection was disconnected.");
|
|
457
|
+
}
|
|
458
|
+
/** Serialize grant and session work, including callbacks and work left running after a browser abort. */
|
|
459
|
+
function withClientOperation(connection, run) {
|
|
460
|
+
const key = connectionKey(connection.owner, connection.id);
|
|
461
|
+
const runtime = runtimeOf(key);
|
|
462
|
+
const operation = (runtime.clientOperation ?? Promise.resolve()).then(async () => {
|
|
463
|
+
assertOpen(runtime);
|
|
464
|
+
runtime.connection = connection;
|
|
465
|
+
const value = await run();
|
|
466
|
+
assertOpen(runtime);
|
|
467
|
+
return value;
|
|
468
|
+
});
|
|
469
|
+
const settled = operation.then(() => {}, () => {});
|
|
470
|
+
runtime.clientOperation = settled;
|
|
471
|
+
settled.then(() => {
|
|
472
|
+
if (runtime.clientOperation === settled) delete runtime.clientOperation;
|
|
473
|
+
releaseRuntime(key, runtime);
|
|
474
|
+
});
|
|
475
|
+
return operation;
|
|
476
|
+
}
|
|
477
|
+
function withClient(caller, connection, run, options = {}) {
|
|
478
|
+
return withClientOperation(connection, () => runClient(caller, connection, run, options));
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Run `run` with an MCP client of the connection. The client reuses the MCP session of the connection when the server
|
|
482
|
+
* gave one, and starts a new session when the server forgot it. A grant that the server rejects marks the connection
|
|
483
|
+
* signed out.
|
|
484
|
+
*/
|
|
485
|
+
async function runClient(caller, connection, run, options) {
|
|
486
|
+
let authorizing = false;
|
|
487
|
+
let challenge;
|
|
488
|
+
const fetchWithTimeout = withTimeout(options.timeoutMs ?? requestTimeoutMs, connection.consoleOrigin);
|
|
489
|
+
const headers = connection.bearer ? { authorization: `Bearer ${connection.bearer}` } : {};
|
|
490
|
+
const attempt = async (sessionId) => {
|
|
491
|
+
const transport = new StreamableHTTPClientTransport(new URL(connection.url), {
|
|
492
|
+
...connection.auth === "oauth" ? { authProvider: oauthProvider(connection, () => {
|
|
493
|
+
authorizing = true;
|
|
494
|
+
}) } : {},
|
|
495
|
+
...Object.keys(headers).length ? { requestInit: { headers } } : {},
|
|
496
|
+
fetch: async (input, init) => {
|
|
497
|
+
const response = await fetchWithTimeout(input, connection.auth === "console" ? {
|
|
498
|
+
...init,
|
|
499
|
+
redirect: "error"
|
|
500
|
+
} : init);
|
|
501
|
+
if (response.status === 401) challenge = extractWWWAuthenticateParams(response);
|
|
502
|
+
return response;
|
|
503
|
+
},
|
|
504
|
+
...sessionId ? { sessionId } : {}
|
|
505
|
+
});
|
|
506
|
+
if (sessionId && connection.protocolVersion) transport.setProtocolVersion(connection.protocolVersion);
|
|
507
|
+
const client = new Client(clientInfo, {
|
|
508
|
+
capabilities: {},
|
|
509
|
+
jsonSchemaValidator: { getValidator: () => (input) => ({
|
|
510
|
+
data: input,
|
|
511
|
+
errorMessage: void 0,
|
|
512
|
+
valid: true
|
|
513
|
+
}) }
|
|
514
|
+
});
|
|
515
|
+
try {
|
|
516
|
+
await client.connect(transport, { timeout: requestTimeoutMs });
|
|
517
|
+
if (!sessionId) {
|
|
518
|
+
connection.protocolVersion = transport.protocolVersion;
|
|
519
|
+
connection.server = serverInfo(client, transport.protocolVersion) ?? connection.server;
|
|
520
|
+
}
|
|
521
|
+
connection.sessionId = transport.sessionId;
|
|
522
|
+
const value = await run(client);
|
|
523
|
+
connection.status = "connected";
|
|
524
|
+
delete connection.error;
|
|
525
|
+
connection.usedAt = Date.now();
|
|
526
|
+
return value;
|
|
527
|
+
} finally {
|
|
528
|
+
await transport.close().catch(() => {});
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
try {
|
|
532
|
+
const sessionId = options.fresh ? void 0 : connection.sessionId;
|
|
533
|
+
try {
|
|
534
|
+
return await attempt(sessionId);
|
|
535
|
+
} catch (error) {
|
|
536
|
+
if (!sessionId || !(error instanceof StreamableHTTPError) || error.code !== 404) throw error;
|
|
537
|
+
delete connection.sessionId;
|
|
538
|
+
return await attempt(void 0);
|
|
539
|
+
}
|
|
540
|
+
} catch (error) {
|
|
541
|
+
if (error instanceof UnauthorizedError || error instanceof StreamableHTTPError && error.code === 401) {
|
|
542
|
+
if (connection.oauth?.pending) delete connection.oauth.pending;
|
|
543
|
+
connection.status = "signed-out";
|
|
544
|
+
connection.error = {
|
|
545
|
+
bearer: "The server rejected this token.",
|
|
546
|
+
console: "ViteHub MCP did not accept your Console session.",
|
|
547
|
+
none: "The server asks for credentials.",
|
|
548
|
+
oauth: "The server rejected the grant. Sign in again."
|
|
549
|
+
}[connection.auth];
|
|
550
|
+
delete connection.sessionId;
|
|
551
|
+
throw signedOutError(connection.error, challenge);
|
|
552
|
+
}
|
|
553
|
+
if (error instanceof McpError) throw error;
|
|
554
|
+
connection.status = "failed";
|
|
555
|
+
if (authorizing) {
|
|
556
|
+
if (connection.oauth?.pending && !connection.oauth.pending.url) delete connection.oauth.pending;
|
|
557
|
+
connection.error = `OAuth sign-in could not start: ${failureMessage(error)}`;
|
|
558
|
+
throw consoleRequestError(502, connection.error, "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
559
|
+
}
|
|
560
|
+
connection.error = failureMessage(error);
|
|
561
|
+
throw consoleRequestError(502, connection.error, "CONSOLE_MCP_UNREACHABLE");
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
function failureMessage(error) {
|
|
565
|
+
if (error instanceof StreamableHTTPError) return error.code === 404 ? "The URL does not serve MCP. Check the endpoint path, such as /mcp." : `The server answered HTTP ${error.code ?? "error"}.`;
|
|
566
|
+
if (error instanceof Error && (error.name === "TimeoutError" || error.name === "AbortError")) return "The server did not answer in time.";
|
|
567
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
568
|
+
if (/fetch failed|ECONNREFUSED|ENOTFOUND|EAI_AGAIN/i.test(message)) return "The server cannot be reached.";
|
|
569
|
+
return message.slice(0, 300) || "The MCP handshake failed.";
|
|
570
|
+
}
|
|
571
|
+
function describe(connection) {
|
|
572
|
+
const tokens = connection.oauth?.tokens;
|
|
573
|
+
const described = {
|
|
574
|
+
auth: connection.auth,
|
|
575
|
+
createdAt: new Date(connection.createdAt).toISOString(),
|
|
576
|
+
id: connection.id,
|
|
577
|
+
label: connection.label,
|
|
578
|
+
sameOrigin: connection.sameOrigin,
|
|
579
|
+
status: connection.status,
|
|
580
|
+
url: connection.url
|
|
581
|
+
};
|
|
582
|
+
if (connection.error) described.error = connection.error;
|
|
583
|
+
if (connection.identity) described.identity = connection.identity;
|
|
584
|
+
if (connection.server) described.server = connection.server;
|
|
585
|
+
if (connection.sessionId) described.session = connection.sessionId.slice(-8);
|
|
586
|
+
if (connection.usedAt) described.usedAt = new Date(connection.usedAt).toISOString();
|
|
587
|
+
if (connection.bearer) described.grant = {
|
|
588
|
+
hint: connection.bearer.slice(-4),
|
|
589
|
+
refreshable: false,
|
|
590
|
+
scopes: []
|
|
591
|
+
};
|
|
592
|
+
if (tokens) {
|
|
593
|
+
const issuer = text(connection.oauth?.discovery?.authorizationServerMetadata?.issuer) ?? text(connection.oauth?.discovery?.authorizationServerUrl);
|
|
594
|
+
described.grant = {
|
|
595
|
+
...tokens.expires_in && connection.oauth?.receivedAt ? { expiresAt: new Date(connection.oauth.receivedAt + tokens.expires_in * 1e3).toISOString() } : {},
|
|
596
|
+
...issuer ? { issuer } : {},
|
|
597
|
+
refreshable: Boolean(tokens.refresh_token),
|
|
598
|
+
scopes: tokens.scope?.split(" ").filter(Boolean) ?? []
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
return described;
|
|
602
|
+
}
|
|
603
|
+
/** End a sign-in that did not finish in time. Returns whether the connection changed. */
|
|
604
|
+
function prune(connection, now = Date.now()) {
|
|
605
|
+
const pending = connection.oauth?.pending;
|
|
606
|
+
if (!pending || pending.expiresAt > now) return false;
|
|
607
|
+
delete connection.oauth.pending;
|
|
608
|
+
if (connection.status === "authorizing") {
|
|
609
|
+
connection.status = connection.oauth?.tokens ? "signed-out" : "failed";
|
|
610
|
+
connection.error = "The sign-in did not finish in time. Start it again.";
|
|
611
|
+
}
|
|
612
|
+
return true;
|
|
613
|
+
}
|
|
614
|
+
async function save(connection) {
|
|
615
|
+
const records = await consoleMcpRecords();
|
|
616
|
+
if (!connectionRuntimes.get(connectionKey(connection.owner, connection.id))?.closing) await records.save(connection);
|
|
617
|
+
}
|
|
618
|
+
/** The connections of one person, oldest first. */
|
|
619
|
+
async function owned(owner) {
|
|
620
|
+
const connections = await (await consoleMcpRecords()).connections(owner);
|
|
621
|
+
await Promise.all(connections.filter((connection) => prune(connection)).map(save));
|
|
622
|
+
return connections.sort((left, right) => left.createdAt - right.createdAt);
|
|
623
|
+
}
|
|
624
|
+
async function connectionOf(caller, id) {
|
|
625
|
+
const records = await consoleMcpRecords();
|
|
626
|
+
const connection = await records.connection(await ownerOf(caller), id);
|
|
627
|
+
if (!connection) throw consoleRequestError(404, records.durable ? "This MCP connection does not exist. It was disconnected." : "This MCP connection does not exist. It ends when the server restarts.");
|
|
628
|
+
assertOpen(connectionRuntimes.get(connectionKey(connection.owner, connection.id)));
|
|
629
|
+
if (prune(connection)) await save(connection);
|
|
630
|
+
return connection;
|
|
631
|
+
}
|
|
632
|
+
/** Serialize this process's load/change/save operations so a waiting request reads any rotated tokens. */
|
|
633
|
+
async function withConnection(caller, id, change) {
|
|
634
|
+
const key = connectionKey(await ownerOf(caller), id);
|
|
635
|
+
const runtime = runtimeOf(key);
|
|
636
|
+
const operation = (runtime.operation ?? Promise.resolve()).then(async () => {
|
|
637
|
+
assertOpen(runtime);
|
|
638
|
+
const connection = await connectionOf(caller, id);
|
|
639
|
+
runtime.connection = connection;
|
|
640
|
+
try {
|
|
641
|
+
const value = await change(connection);
|
|
642
|
+
assertOpen(runtime);
|
|
643
|
+
return value;
|
|
644
|
+
} finally {
|
|
645
|
+
await save(connection);
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
const settled = operation.then(() => {}, () => {});
|
|
649
|
+
runtime.operation = settled;
|
|
650
|
+
settled.then(() => {
|
|
651
|
+
if (runtime.operation === settled) delete runtime.operation;
|
|
652
|
+
releaseRuntime(key, runtime);
|
|
653
|
+
});
|
|
654
|
+
return operation;
|
|
655
|
+
}
|
|
656
|
+
/** MCP servers that the app announces on its own origin, from RFC 9728 protected resource metadata. */
|
|
657
|
+
async function discoverAppServers(origin) {
|
|
658
|
+
const cached = discovered.get(origin);
|
|
659
|
+
if (cached && Date.now() - cached.at < discoveryLifetimeMs) return cached.servers;
|
|
660
|
+
const servers = [];
|
|
661
|
+
try {
|
|
662
|
+
const response = await withTimeout(5e3, origin)(`${origin}/.well-known/oauth-protected-resource`, { headers: { accept: "application/json" } });
|
|
663
|
+
const metadata = response.ok ? await response.json() : void 0;
|
|
664
|
+
if (isRecord(metadata)) {
|
|
665
|
+
const resource = text(metadata.resource);
|
|
666
|
+
const url = resource && URL.canParse(resource) ? new URL(resource) : void 0;
|
|
667
|
+
if (url && url.origin === origin) {
|
|
668
|
+
const authorizationServer = text((Array.isArray(metadata.authorization_servers) ? metadata.authorization_servers : [])[0]);
|
|
669
|
+
servers.push({
|
|
670
|
+
label: text(metadata.resource_name) ?? "This app",
|
|
671
|
+
url: url.href,
|
|
672
|
+
...authorizationServer ? { authorizationServer } : {}
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
} catch {}
|
|
677
|
+
discovered.set(origin, {
|
|
678
|
+
at: Date.now(),
|
|
679
|
+
servers
|
|
680
|
+
});
|
|
681
|
+
return servers;
|
|
682
|
+
}
|
|
683
|
+
async function listConsoleMcp(caller, options) {
|
|
684
|
+
const owner = await ownerOf(caller);
|
|
685
|
+
const { origin } = consolePage(caller);
|
|
686
|
+
return {
|
|
687
|
+
connections: (await owned(owner)).map(describe),
|
|
688
|
+
servers: await discoverAppServers(origin),
|
|
689
|
+
sharedSession: options.sharedSession
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* The scope of a sign-in: the one that the server asked for, else the one in its resource metadata, as the MCP SDK
|
|
694
|
+
* picks it. When the authorization server offers `offline_access`, the Console adds it (SEP-2207), so the server can
|
|
695
|
+
* issue a refresh token.
|
|
696
|
+
*/
|
|
697
|
+
function signInScope(discovery, requested) {
|
|
698
|
+
const scope = requested || discovery.resourceMetadata?.scopes_supported?.join(" ");
|
|
699
|
+
if (scope?.split(" ").includes("offline_access") || !discovery.authorizationServerMetadata?.scopes_supported?.includes("offline_access")) return scope;
|
|
700
|
+
return scope ? `${scope} offline_access` : "offline_access";
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Start the authorization code flow of an OAuth connection. Returns the URL that the browser opens. `challenge` is the
|
|
704
|
+
* `WWW-Authenticate` of the `401` that asked for the sign-in.
|
|
705
|
+
*/
|
|
706
|
+
async function startAuthorization(connection, prompt, challenge) {
|
|
707
|
+
return withClientOperation(connection, () => authorize(connection, prompt, challenge));
|
|
708
|
+
}
|
|
709
|
+
async function authorize(connection, prompt, challenge) {
|
|
710
|
+
const oauth = connection.oauth;
|
|
711
|
+
oauth.pending = {
|
|
712
|
+
expiresAt: Date.now() + pendingLifetimeMs,
|
|
713
|
+
state: randomId(),
|
|
714
|
+
...prompt ? { prompt } : {}
|
|
715
|
+
};
|
|
716
|
+
oauth.tokens = void 0;
|
|
717
|
+
delete connection.sessionId;
|
|
718
|
+
const fetchFn = withTimeout(requestTimeoutMs, connection.consoleOrigin);
|
|
719
|
+
try {
|
|
720
|
+
const known = oauth.discovery?.resourceMetadataUrl;
|
|
721
|
+
const resourceMetadataUrl = challenge?.resourceMetadataUrl ?? (known ? new URL(known) : void 0);
|
|
722
|
+
oauth.discovery = {
|
|
723
|
+
...await discoverOAuthServerInfo(connection.url, {
|
|
724
|
+
fetchFn,
|
|
725
|
+
...resourceMetadataUrl ? { resourceMetadataUrl } : {}
|
|
726
|
+
}),
|
|
727
|
+
...resourceMetadataUrl ? { resourceMetadataUrl: resourceMetadataUrl.href } : {}
|
|
728
|
+
};
|
|
729
|
+
const scope = signInScope(oauth.discovery, challenge?.scope);
|
|
730
|
+
if (await auth(oauthProvider(connection), {
|
|
731
|
+
fetchFn,
|
|
732
|
+
serverUrl: connection.url,
|
|
733
|
+
...resourceMetadataUrl ? { resourceMetadataUrl } : {},
|
|
734
|
+
...scope ? { scope } : {}
|
|
735
|
+
}) === "REDIRECT" && oauth.pending.url) {
|
|
736
|
+
connection.status = "authorizing";
|
|
737
|
+
delete connection.error;
|
|
738
|
+
return oauth.pending.url;
|
|
739
|
+
}
|
|
740
|
+
throw consoleDiagnostic("CONSOLE_MCP_AUTHORIZATION_FAILED", "The authorization server did not start a sign-in.");
|
|
741
|
+
} catch (error) {
|
|
742
|
+
delete oauth.pending;
|
|
743
|
+
connection.status = "failed";
|
|
744
|
+
connection.error = `OAuth sign-in could not start: ${failureMessage(error)}`;
|
|
745
|
+
throw consoleRequestError(502, connection.error, "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Connect to an MCP server. A pasted `token` is sent as a bearer token. Without one, the Console first connects
|
|
750
|
+
* without credentials; a server that answers `401` starts the MCP authorization flow, and the result names the URL
|
|
751
|
+
* to open. `prompt: "login"` asks the authorization server to show its sign-in even when someone is signed in.
|
|
752
|
+
*/
|
|
753
|
+
async function connectConsoleMcp(caller, input) {
|
|
754
|
+
const owner = await ownerOf(caller);
|
|
755
|
+
const { mount, origin } = consolePage(caller);
|
|
756
|
+
const url = serverUrl(input.server, origin);
|
|
757
|
+
const token = text(input.token);
|
|
758
|
+
if ((await owned(owner)).length >= maximumConnections) throw consoleRequestError(409, `The Console keeps ${maximumConnections} MCP connections per person. Disconnect one first.`);
|
|
759
|
+
const connection = {
|
|
760
|
+
auth: token ? "bearer" : "none",
|
|
761
|
+
...token ? { bearer: token } : {},
|
|
762
|
+
consoleOrigin: origin,
|
|
763
|
+
createdAt: Date.now(),
|
|
764
|
+
id: `mcp_${randomId(12)}`,
|
|
765
|
+
label: text(input.label)?.slice(0, 80) ?? url.host + (url.pathname === "/" ? "" : url.pathname),
|
|
766
|
+
labelled: Boolean(text(input.label)),
|
|
767
|
+
owner,
|
|
768
|
+
sameOrigin: url.origin === origin,
|
|
769
|
+
status: "failed",
|
|
770
|
+
url: url.href
|
|
771
|
+
};
|
|
772
|
+
try {
|
|
773
|
+
await withClient(caller, connection, async () => {}, { fresh: true });
|
|
774
|
+
await save(connection);
|
|
775
|
+
return { connection: describe(connection) };
|
|
776
|
+
} catch (error) {
|
|
777
|
+
if (!isSignedOut(error) || connection.auth !== "none") throw error;
|
|
778
|
+
connection.auth = "oauth";
|
|
779
|
+
connection.oauth = { redirectUrl: `${origin}${mount}${consoleMcpCallbackPath}` };
|
|
780
|
+
try {
|
|
781
|
+
return {
|
|
782
|
+
authorizationUrl: await startAuthorization(connection, input.prompt, error.challenge),
|
|
783
|
+
connection: describe(connection)
|
|
784
|
+
};
|
|
785
|
+
} finally {
|
|
786
|
+
await save(connection);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
/** Finish the sign-in that the authorization server redirected back from. */
|
|
791
|
+
async function completeConsoleMcp(caller, input) {
|
|
792
|
+
const connection = (await owned(await ownerOf(caller))).find((candidate) => candidate.oauth?.pending?.state === input.state);
|
|
793
|
+
if (!connection?.oauth?.pending || completingAuthorizations.has(input.state)) throw consoleRequestError(404, "This sign-in is not known. It expired, finished already, or was started by someone else. Start it again.", "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
794
|
+
completingAuthorizations.add(input.state);
|
|
795
|
+
try {
|
|
796
|
+
return await withConnection(caller, connection.id, async (current) => {
|
|
797
|
+
if (current.oauth?.pending?.state !== input.state) throw consoleRequestError(404, "This sign-in is not known. Start it again.", "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
798
|
+
return finishSignIn(caller, current, input);
|
|
799
|
+
});
|
|
800
|
+
} finally {
|
|
801
|
+
completingAuthorizations.delete(input.state);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
async function finishSignIn(caller, connection, input) {
|
|
805
|
+
const oauth = connection.oauth;
|
|
806
|
+
const pending = oauth.pending;
|
|
807
|
+
if (input.error || !input.code) {
|
|
808
|
+
delete oauth.pending;
|
|
809
|
+
connection.status = oauth.tokens ? "signed-out" : "failed";
|
|
810
|
+
connection.error = input.error === "access_denied" ? "The sign-in was denied." : `The authorization server returned ${text(input.error) ?? "no code"}${input.errorDescription ? `: ${input.errorDescription.slice(0, 200)}` : "."}`;
|
|
811
|
+
throw consoleRequestError(400, connection.error, "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
812
|
+
}
|
|
813
|
+
const metadata = { ...oauth.discovery?.authorizationServerMetadata };
|
|
814
|
+
const missingIssuer = metadata?.authorization_response_iss_parameter_supported === true && !input.iss;
|
|
815
|
+
if (missingIssuer || input.iss !== void 0 && input.iss !== metadata?.issuer) {
|
|
816
|
+
delete oauth.pending;
|
|
817
|
+
connection.status = "failed";
|
|
818
|
+
connection.error = missingIssuer ? "The authorization server did not return its issuer." : "The sign-in came back from another authorization server.";
|
|
819
|
+
throw consoleRequestError(400, connection.error, "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
820
|
+
}
|
|
821
|
+
return withClientOperation(connection, async () => {
|
|
822
|
+
try {
|
|
823
|
+
if (await auth(oauthProvider(connection), {
|
|
824
|
+
authorizationCode: input.code,
|
|
825
|
+
fetchFn: withTimeout(requestTimeoutMs, connection.consoleOrigin),
|
|
826
|
+
serverUrl: connection.url
|
|
827
|
+
}) !== "AUTHORIZED") throw consoleDiagnostic("CONSOLE_MCP_AUTHORIZATION_FAILED", "The authorization server did not issue a token.");
|
|
828
|
+
} catch (error) {
|
|
829
|
+
delete oauth.pending;
|
|
830
|
+
connection.status = "failed";
|
|
831
|
+
connection.error = `The token exchange failed: ${failureMessage(error)}`;
|
|
832
|
+
throw consoleRequestError(502, connection.error, "CONSOLE_MCP_AUTHORIZATION_FAILED");
|
|
833
|
+
}
|
|
834
|
+
if (pending === oauth.pending) delete oauth.pending;
|
|
835
|
+
connection.identity = await readIdentity(connection);
|
|
836
|
+
if (!connection.labelled) connection.label = connection.identity?.name ?? connection.identity?.email ?? connection.label;
|
|
837
|
+
await runClient(caller, connection, async () => {}, { fresh: true });
|
|
838
|
+
return describe(connection);
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
/** Sign in again, or open a new MCP session. OAuth connections return the URL to open. */
|
|
842
|
+
async function reconnectConsoleMcp(caller, input) {
|
|
843
|
+
return withConnection(caller, input.id, async (connection) => {
|
|
844
|
+
if (connection.auth === "oauth" && (input.prompt || connection.status === "signed-out" || connection.status === "authorizing" || !connection.oauth?.tokens)) return {
|
|
845
|
+
authorizationUrl: await startAuthorization(connection, input.prompt),
|
|
846
|
+
connection: describe(connection)
|
|
847
|
+
};
|
|
848
|
+
try {
|
|
849
|
+
await withClient(caller, connection, async () => {}, { fresh: true });
|
|
850
|
+
} catch (error) {
|
|
851
|
+
if (!isSignedOut(error) || connection.auth !== "oauth") throw error;
|
|
852
|
+
return {
|
|
853
|
+
authorizationUrl: await startAuthorization(connection, input.prompt, error.challenge),
|
|
854
|
+
connection: describe(connection)
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
return { connection: describe(connection) };
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
/** RFC 7009: ask the authorization server to forget a token. Returns whether it confirmed. */
|
|
861
|
+
async function revoke(connection) {
|
|
862
|
+
const oauth = connection.oauth;
|
|
863
|
+
const endpoint = text({ ...oauth?.discovery?.authorizationServerMetadata }.revocation_endpoint);
|
|
864
|
+
const client = oauth?.client ?? (oauth ? await (await consoleMcpRecords()).client(clientKey(connection)) : void 0);
|
|
865
|
+
if (!oauth?.tokens || !endpoint || !client) return false;
|
|
866
|
+
const tokens = [[oauth.tokens.refresh_token, "refresh_token"], [oauth.tokens.access_token, "access_token"]];
|
|
867
|
+
let revoked = false;
|
|
868
|
+
for (const [token, hint] of tokens) {
|
|
869
|
+
if (!token) continue;
|
|
870
|
+
const body = new URLSearchParams({
|
|
871
|
+
client_id: client.client_id,
|
|
872
|
+
token,
|
|
873
|
+
token_type_hint: hint
|
|
874
|
+
});
|
|
875
|
+
if (client.client_secret) body.set("client_secret", client.client_secret);
|
|
876
|
+
try {
|
|
877
|
+
const response = await withTimeout(requestTimeoutMs, connection.consoleOrigin)(endpoint, {
|
|
878
|
+
body,
|
|
879
|
+
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
880
|
+
method: "POST"
|
|
881
|
+
});
|
|
882
|
+
revoked ||= response.ok;
|
|
883
|
+
} catch {}
|
|
884
|
+
}
|
|
885
|
+
return revoked;
|
|
886
|
+
}
|
|
887
|
+
/** End the MCP session, revoke the OAuth tokens, and forget the connection. */
|
|
888
|
+
async function disconnectConsoleMcp(caller, input) {
|
|
889
|
+
let connection = await connectionOf(caller, input.id);
|
|
890
|
+
const key = connectionKey(connection.owner, connection.id);
|
|
891
|
+
const runtime = runtimeOf(key);
|
|
892
|
+
runtime.closing = true;
|
|
893
|
+
const records = await consoleMcpRecords();
|
|
894
|
+
try {
|
|
895
|
+
await records.remove(connection);
|
|
896
|
+
await runtime.operation;
|
|
897
|
+
await runtime.clientOperation;
|
|
898
|
+
connection = runtime.connection ?? connection;
|
|
899
|
+
await records.remove(connection);
|
|
900
|
+
let sessionEnded = false;
|
|
901
|
+
if (connection.sessionId) try {
|
|
902
|
+
const headers = { "mcp-session-id": connection.sessionId };
|
|
903
|
+
const bearer = connection.bearer ?? connection.oauth?.tokens?.access_token;
|
|
904
|
+
if (bearer) headers.authorization = `Bearer ${bearer}`;
|
|
905
|
+
if (connection.protocolVersion) headers["mcp-protocol-version"] = connection.protocolVersion;
|
|
906
|
+
sessionEnded = (await withTimeout(requestTimeoutMs, connection.consoleOrigin)(connection.url, {
|
|
907
|
+
headers,
|
|
908
|
+
method: "DELETE"
|
|
909
|
+
})).ok;
|
|
910
|
+
} catch {}
|
|
911
|
+
return {
|
|
912
|
+
revoked: await revoke(connection),
|
|
913
|
+
sessionEnded
|
|
914
|
+
};
|
|
915
|
+
} finally {
|
|
916
|
+
connectionRuntimes.delete(key);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
const listMethods = {
|
|
920
|
+
"prompts": {
|
|
921
|
+
field: "prompts",
|
|
922
|
+
method: "prompts/list"
|
|
923
|
+
},
|
|
924
|
+
"resource-templates": {
|
|
925
|
+
field: "resourceTemplates",
|
|
926
|
+
method: "resources/templates/list"
|
|
927
|
+
},
|
|
928
|
+
"resources": {
|
|
929
|
+
field: "resources",
|
|
930
|
+
method: "resources/list"
|
|
931
|
+
},
|
|
932
|
+
"tools": {
|
|
933
|
+
field: "tools",
|
|
934
|
+
method: "tools/list"
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
/** One page of tools, resources, resource templates, or prompts. */
|
|
938
|
+
async function listConsoleMcpItems(caller, input) {
|
|
939
|
+
return withConnection(caller, input.id, async (connection) => {
|
|
940
|
+
const { field, method } = listMethods[input.kind];
|
|
941
|
+
try {
|
|
942
|
+
const result = await withClient(caller, connection, (client) => client.request({
|
|
943
|
+
method,
|
|
944
|
+
params: input.cursor ? { cursor: input.cursor } : {}
|
|
945
|
+
}, ResultSchema, { timeout: requestTimeoutMs }));
|
|
946
|
+
const values = Reflect.get(result, field);
|
|
947
|
+
const items = Array.isArray(values) ? values.filter(isRecord) : [];
|
|
948
|
+
const nextCursor = text(Reflect.get(result, "nextCursor"));
|
|
949
|
+
return {
|
|
950
|
+
connection: describe(connection),
|
|
951
|
+
items,
|
|
952
|
+
...nextCursor ? { nextCursor } : {}
|
|
953
|
+
};
|
|
954
|
+
} catch (error) {
|
|
955
|
+
if (error instanceof McpError && error.code === -32601) return {
|
|
956
|
+
connection: describe(connection),
|
|
957
|
+
items: []
|
|
958
|
+
};
|
|
959
|
+
throw error;
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
/** Send one request and return the result or the JSON-RPC error of the server, with the time it took. */
|
|
964
|
+
async function outcome(caller, id, request, timeoutMs) {
|
|
965
|
+
return withConnection(caller, id, async (connection) => {
|
|
966
|
+
const startedAt = performance.now();
|
|
967
|
+
try {
|
|
968
|
+
const result = await withClient(caller, connection, (client) => client.request(request, ResultSchema, {
|
|
969
|
+
maxTotalTimeout: timeoutMs,
|
|
970
|
+
timeout: timeoutMs
|
|
971
|
+
}), { timeoutMs });
|
|
972
|
+
return {
|
|
973
|
+
connection: describe(connection),
|
|
974
|
+
durationMs: Math.round(performance.now() - startedAt),
|
|
975
|
+
result
|
|
976
|
+
};
|
|
977
|
+
} catch (error) {
|
|
978
|
+
if (!(error instanceof McpError)) throw error;
|
|
979
|
+
connection.status = "connected";
|
|
980
|
+
return {
|
|
981
|
+
connection: describe(connection),
|
|
982
|
+
durationMs: Math.round(performance.now() - startedAt),
|
|
983
|
+
error: {
|
|
984
|
+
code: error.code,
|
|
985
|
+
message: error.message.replace(/^(?:MCP error -?\d+: )+/, ""),
|
|
986
|
+
...error.data === void 0 ? {} : { data: error.data }
|
|
987
|
+
}
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
function callConsoleMcpTool(caller, input) {
|
|
993
|
+
return outcome(caller, input.id, {
|
|
994
|
+
method: "tools/call",
|
|
995
|
+
params: {
|
|
996
|
+
arguments: input.arguments ?? {},
|
|
997
|
+
name: input.tool
|
|
998
|
+
}
|
|
999
|
+
}, callTimeoutMs);
|
|
1000
|
+
}
|
|
1001
|
+
function readConsoleMcpResource(caller, input) {
|
|
1002
|
+
return outcome(caller, input.id, {
|
|
1003
|
+
method: "resources/read",
|
|
1004
|
+
params: { uri: input.uri }
|
|
1005
|
+
}, requestTimeoutMs);
|
|
1006
|
+
}
|
|
1007
|
+
function getConsoleMcpPrompt(caller, input) {
|
|
1008
|
+
return outcome(caller, input.id, {
|
|
1009
|
+
method: "prompts/get",
|
|
1010
|
+
params: {
|
|
1011
|
+
arguments: input.arguments ?? {},
|
|
1012
|
+
name: input.name
|
|
1013
|
+
}
|
|
1014
|
+
}, requestTimeoutMs);
|
|
1015
|
+
}
|
|
1016
|
+
/** Forget every connection of this process. Tests use it. */
|
|
1017
|
+
function resetConsoleMcp() {
|
|
1018
|
+
connectionRuntimes.clear();
|
|
1019
|
+
completingAuthorizations.clear();
|
|
1020
|
+
resetConsoleMcpRecords();
|
|
1021
|
+
discovered.clear();
|
|
1022
|
+
}
|
|
1023
|
+
//#endregion
|
|
1024
|
+
export { callConsoleMcpTool, completeConsoleMcp, connectConsoleMcp, disconnectConsoleMcp, getConsoleMcpPrompt, listConsoleMcp, listConsoleMcpItems, readConsoleMcpResource, reconnectConsoleMcp, resetConsoleMcp };
|