vite-hub 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/dist/_internal/runtime/browser-errors.d.ts +0 -2
- package/dist/_internal/runtime/browser-errors.js +3 -4
- package/dist/_internal/runtime/redirects.d.ts +1 -2
- package/dist/_internal/runtime/redirects.js +2 -3
- package/dist/_internal/runtime/request-policy.d.ts +1 -2
- package/dist/_internal/runtime/request-policy.js +2 -3
- package/dist/_internal/runtime/security.d.ts +1 -2
- package/dist/_internal/runtime/security.js +1 -2
- package/dist/{access-BC9HtX_M.js → access-CUFHPi8T.js} +13 -140
- package/dist/{access-policy-DhsEACna.d.ts → access-DkBck8Vu.d.ts} +17 -21
- package/dist/{access-policy-CVZg9LPR.js → access-policy-BM48XstY.js} +5 -6
- package/dist/{account-Cjj-tYzo.d.ts → account-DNr8fHcQ.d.ts} +5 -7
- package/dist/{console/runtime/server → agent/console}/agents.get.d.ts +2 -3
- package/dist/{console/runtime/server → agent/console}/agents.get.js +3 -4
- package/dist/{console/runtime/server → agent/console}/channel-replay.d.ts +3 -5
- package/dist/{console/runtime/server → agent/console}/channel-replay.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.d.ts +1 -3
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.js +4 -5
- package/dist/agent/console/invocation-workspace.get.d.ts +6 -0
- package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation.get.d.ts +4 -6
- package/dist/{console/runtime/server → agent/console}/invocation.get.js +8 -9
- package/dist/{console/runtime/server → agent/console}/invocations.get.d.ts +1 -2
- package/dist/{console/runtime/server → agent/console}/invocations.get.js +5 -6
- package/dist/agent/console/invocations.usage.d.ts +6 -0
- package/dist/agent/console/invocations.usage.js +51 -0
- package/dist/agent/console/operations.d.ts +6 -0
- package/dist/agent/console/operations.js +247 -0
- package/dist/{console/runtime/server → agent/console}/status.get.d.ts +2 -4
- package/dist/{console/runtime/server → agent/console}/status.get.js +6 -7
- package/dist/{server-W0c79AYZ.js → agent-console-CHsLxKk_.js} +4 -4
- package/dist/agent-console-FmaYpVv-.d.ts +14 -0
- package/dist/{agent-invocations.post-C3Onl2yH.js → agent-invocations.post-CF5anHY6.js} +14 -17
- package/dist/agents-DBm_PJie.js +1 -0
- package/dist/{agents-B76RICcy.js → agents-DXLHsE7x.js} +5 -6
- package/dist/{agents-C94A4N9u.d.ts → agents-Gyw4VKPt.d.ts} +0 -2
- package/dist/auth/console/auth.d.ts +25 -0
- package/dist/{console/runtime/server → auth/console}/auth.js +11 -13
- package/dist/auth/console/operations.d.ts +3 -0
- package/dist/auth/console/operations.js +135 -0
- package/dist/auth/server.js +1 -2
- package/dist/{auth-operations-GcQk0O0X.js → auth-operations-BKqoX8Ua.js} +4 -5
- package/dist/{auth-types-D3ugQ8xM.d.ts → auth-types-Cotn7406.d.ts} +4 -21
- package/dist/bin.js +8 -11
- package/dist/blob/console/operations.d.ts +3 -0
- package/dist/blob/console/operations.js +44 -0
- package/dist/blob/nuxt-image.js +1 -2
- package/dist/{blob-BcgsZtqM.js → blob-iw8pWQ6o.js} +5 -6
- package/dist/{blob-iVewd7KQ.d.ts → blob-uNin0_TV.d.ts} +1 -3
- package/dist/{browser-error-limits-CToqAD-O.js → browser-error-limits-B0yS95zt.js} +2 -4
- package/dist/cache/operations.d.ts +2 -4
- package/dist/cache/operations.js +3 -4
- package/dist/cache.d.ts +1 -3
- package/dist/cache.js +2 -3
- package/dist/{cli-config-FPHk1nbC.js → cli-config-BX8H4ZCo.js} +2 -3
- package/dist/cli-config-DgpmE_7z.js +1 -0
- package/dist/cms.js +1 -2
- package/dist/console/auth-types.d.ts +2 -2
- package/dist/console/auth.d.ts +2 -4
- package/dist/console/auth.js +2 -3
- package/dist/console/runtime/auth-operations.d.ts +4 -6
- package/dist/console/runtime/auth-operations.js +1 -2
- package/dist/console/runtime/client/account-views.d.ts +1 -3
- package/dist/console/runtime/client/account-views.js +1 -2
- package/dist/console/runtime/client/account.d.ts +1 -1
- package/dist/console/runtime/client/account.js +29 -45
- package/dist/console/runtime/client/appearance.d.ts +1 -2
- package/dist/console/runtime/client/appearance.js +1 -2
- package/dist/console/runtime/client/auth-management.ts +6 -6
- package/dist/console/runtime/client/blob-media.d.ts +2 -4
- package/dist/console/runtime/client/blob-media.js +5 -6
- package/dist/console/runtime/client/comment-thread.d.ts +1 -3
- package/dist/console/runtime/client/comment-thread.js +3 -4
- package/dist/console/runtime/client/content-heads.d.ts +1 -2
- package/dist/console/runtime/client/content-heads.js +2 -3
- package/dist/console/runtime/client/documents.d.ts +2 -2
- package/dist/console/runtime/client/documents.js +1 -2
- package/dist/console/runtime/client/editor.d.ts +3 -5
- package/dist/console/runtime/client/editor.js +1 -2
- package/dist/console/runtime/client/env-groups.d.ts +1 -3
- package/dist/console/runtime/client/env-groups.js +1 -2
- package/dist/console/runtime/client/env-status.d.ts +1 -3
- package/dist/console/runtime/client/env-status.js +1 -2
- package/dist/console/runtime/client/format.d.ts +1 -3
- package/dist/console/runtime/client/format.js +1 -2
- package/dist/console/runtime/client/invocation-deletion.d.ts +1 -2
- package/dist/console/runtime/client/invocation-deletion.js +1 -2
- package/dist/console/runtime/client/invocation.d.ts +1 -2
- package/dist/console/runtime/client/invocation.js +4 -5
- package/dist/console/runtime/client/live.d.ts +2 -4
- package/dist/console/runtime/client/live.js +1 -2
- package/dist/console/runtime/client/mcp-client.d.ts +7 -5
- package/dist/console/runtime/client/mcp-client.js +10 -5
- package/dist/console/runtime/client/media-library.d.ts +1 -1
- package/dist/console/runtime/client/media-library.js +1 -2
- package/dist/console/runtime/client/media-uploads.d.ts +2 -4
- package/dist/console/runtime/client/media-uploads.js +2 -3
- package/dist/console/runtime/client/media.d.ts +1 -1
- package/dist/console/runtime/client/media.js +1 -2
- package/dist/console/runtime/client/operation-view.d.ts +2 -4
- package/dist/console/runtime/client/operation-view.js +4 -5
- package/dist/console/runtime/client/presence.d.ts +2 -4
- package/dist/console/runtime/client/presence.js +1 -2
- package/dist/console/runtime/client/preview.d.ts +1 -3
- package/dist/console/runtime/client/preview.js +1 -2
- package/dist/console/runtime/client/problem.d.ts +2 -4
- package/dist/console/runtime/client/problem.js +3 -4
- package/dist/console/runtime/client/project-link.d.ts +1 -1
- package/dist/console/runtime/client/project-link.js +1 -2
- package/dist/console/runtime/client/project-session.d.ts +19 -10
- package/dist/console/runtime/client/project-session.js +1 -723
- package/dist/console/runtime/client/project.d.ts +1 -3
- package/dist/console/runtime/client/project.js +1 -2
- package/dist/console/runtime/client/projects.d.ts +1 -1
- package/dist/console/runtime/client/projects.js +1 -2
- package/dist/console/runtime/client/publish.d.ts +2 -4
- package/dist/console/runtime/client/publish.js +1 -2
- package/dist/console/runtime/client/rate-limit.d.ts +1 -3
- package/dist/console/runtime/client/rate-limit.js +3 -4
- package/dist/console/runtime/client/read-only.d.ts +2 -4
- package/dist/console/runtime/client/read-only.js +2 -3
- package/dist/console/runtime/client/request.d.ts +2 -2
- package/dist/console/runtime/client/request.js +1 -2
- package/dist/console/runtime/client/route-query.d.ts +4 -5
- package/dist/console/runtime/client/route-query.js +1 -2
- package/dist/console/runtime/client/schedule-run.d.ts +1 -3
- package/dist/console/runtime/client/schedule-run.js +3 -4
- package/dist/console/runtime/client/schema-form.d.ts +1 -1
- package/dist/console/runtime/client/schema-form.js +1 -2
- package/dist/console/runtime/client/sections.d.ts +1 -1
- package/dist/console/runtime/client/sections.js +1 -2
- package/dist/console/runtime/client/site-access.d.ts +83 -16
- package/dist/console/runtime/client/site-access.js +159 -32
- package/dist/console/runtime/client/site-link.d.ts +2 -0
- package/dist/console/runtime/client/site-link.js +1 -0
- package/dist/console/runtime/client/stored.d.ts +1 -3
- package/dist/console/runtime/client/stored.js +1 -2
- package/dist/console/runtime/client/toast.d.ts +1 -3
- package/dist/console/runtime/client/toast.js +1 -2
- package/dist/console/runtime/client/workflow.d.ts +1 -3
- package/dist/console/runtime/client/workflow.js +3 -4
- package/dist/console/runtime/components/console-account-home.vue +9 -7
- package/dist/console/runtime/components/console-account-link.vue +8 -5
- package/dist/console/runtime/components/console-account-setup.vue +10 -7
- package/dist/console/runtime/components/console-account-shell.vue +7 -2
- package/dist/console/runtime/components/console-account-unlink.vue +2 -3
- package/dist/console/runtime/components/console-app-settings.vue +8 -2
- package/dist/console/runtime/components/console-auth-detail.vue +1 -1
- package/dist/console/runtime/components/console-auth-event-list.vue +1 -0
- package/dist/console/runtime/components/console-document-editor.vue +3 -4
- package/dist/console/runtime/components/console-hosted-comments-embed.vue +106 -0
- package/dist/console/runtime/components/console-mcp-callback.vue +6 -1
- package/dist/console/runtime/components/console-mcp-items.vue +3 -16
- package/dist/console/runtime/components/console-site.vue +10 -8
- package/dist/console/runtime/components/console-usage.vue +2 -2
- package/dist/console/runtime/console-route.d.ts +1 -3
- package/dist/console/runtime/console-route.js +1 -2
- package/dist/console/runtime/definitions.d.ts +1 -1
- package/dist/console/runtime/definitions.js +1 -2
- package/dist/console/runtime/diagnostics.ts +14 -49
- package/dist/console/runtime/mcp-client.d.ts +2 -2
- package/dist/console/runtime/mcp-client.js +1 -2
- package/dist/console/runtime/operation-loader.d.ts +1 -0
- package/dist/console/runtime/operation-loader.js +10 -0
- package/dist/console/runtime/page-tool/account.js +26 -0
- package/dist/console/runtime/page-tool/page-tool.js +2 -2
- package/dist/console/runtime/rpc.d.ts +1 -1
- package/dist/console/runtime/rpc.js +1 -2
- package/dist/console/runtime/sections.d.ts +2 -2
- package/dist/console/runtime/sections.js +1 -2
- package/dist/console/runtime/server/access-policy.d.ts +1 -1
- package/dist/console/runtime/server/access-policy.js +1 -2
- package/dist/console/runtime/server/agent-console.d.ts +2 -0
- package/dist/console/runtime/server/agent-console.js +1 -0
- package/dist/console/runtime/server/blob.d.ts +1 -1
- package/dist/console/runtime/server/blob.js +1 -2
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/database.js +1 -2
- package/dist/console/runtime/server/definitions.d.ts +1 -1
- package/dist/console/runtime/server/definitions.get.d.ts +4 -6
- package/dist/console/runtime/server/definitions.get.js +5 -6
- package/dist/console/runtime/server/definitions.js +1 -2
- package/dist/console/runtime/server/development.d.ts +1 -1
- package/dist/console/runtime/server/development.js +1 -2
- package/dist/console/runtime/server/documents.d.ts +2 -2
- package/dist/console/runtime/server/documents.js +3 -3
- package/dist/console/runtime/server/entry-site-access.d.ts +3 -0
- package/dist/console/runtime/server/entry-site-access.js +4 -0
- package/dist/console/runtime/server/entry.d.ts +3 -0
- package/dist/console/runtime/server/entry.js +4 -0
- package/dist/console/runtime/server/env.d.ts +1 -3
- package/dist/console/runtime/server/env.js +1 -2
- package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
- package/dist/console/runtime/server/operation-contributions.js +1 -2
- package/dist/console/runtime/server/pill.d.ts +45 -0
- package/dist/console/runtime/server/pill.js +62 -0
- package/dist/console/runtime/server/rpc.d.ts +5 -10
- package/dist/console/runtime/server/rpc.js +19 -27
- package/dist/console/runtime/server/runtime.d.ts +1 -1
- package/dist/console/runtime/server/runtime.js +1 -2
- package/dist/console/runtime/server/sections.d.ts +5 -5
- package/dist/console/runtime/server/sections.get.d.ts +1 -1
- package/dist/console/runtime/server/sections.get.js +8 -9
- package/dist/console/runtime/server/sections.js +6 -6
- package/dist/console/runtime/server/setup.d.ts +5 -5
- package/dist/console/runtime/server/setup.js +5 -5
- package/dist/console/runtime/server/site-access-operation.d.ts +7 -0
- package/dist/console/runtime/server/site-access-operation.js +36 -0
- package/dist/console/runtime/server/site-actions.d.ts +73 -0
- package/dist/console/runtime/server/site-actions.js +105 -0
- package/dist/console/runtime/server/site-entry.d.ts +16 -9
- package/dist/console/runtime/server/site-entry.js +62 -46
- package/dist/console/runtime/server/site-visitor.d.ts +17 -0
- package/dist/console/runtime/server/site-visitor.js +1 -0
- package/dist/console/runtime/server/site.d.ts +27 -0
- package/dist/console/runtime/server/site.js +1 -0
- package/dist/console/runtime/skills.d.ts +1 -3
- package/dist/console/runtime/skills.js +1 -2
- package/dist/console/server.d.ts +9 -25
- package/dist/console/server.js +8 -8
- package/dist/console/ui.d.ts +0 -10
- package/dist/console/ui.js +14 -27
- package/dist/console-lazy-views-VEjcbL4Q.js +1 -0
- package/dist/{console-route-CM2G5hiC.js → console-route-DbdnLkkF.js} +2 -3
- package/dist/console-signature--55DIKf2.js +237 -0
- package/dist/console.d.ts +1 -3
- package/dist/console.js +1 -2
- package/dist/content/console/operations.d.ts +3 -0
- package/dist/content/console/operations.js +62 -0
- package/dist/{console/runtime/server → database/console}/database.get.d.ts +2 -3
- package/dist/{console/runtime/server → database/console}/database.get.js +4 -5
- package/dist/database/console/operations.d.ts +3 -0
- package/dist/database/console/operations.js +49 -0
- package/dist/{database-UMJgnU2z.js → database-CrgBUdIx.js} +3 -4
- package/dist/{database-DC67Ipm-.d.ts → database-yFezh5U1.d.ts} +1 -3
- package/dist/{definition-catalog-BUcclwSH.js → definition-catalog-1xPPtzOx.js} +3 -4
- package/dist/definition-catalog-M5ua7JRS.js +1 -0
- package/dist/{definitions-BW6SvmMM.js → definitions-BFYqXchw.js} +1 -2
- package/dist/{definitions-DB4LbZ7T.d.ts → definitions-ChvMnA1L.d.ts} +0 -2
- package/dist/{definitions-DTytrw42.js → definitions-DGo2rNQ9.js} +5 -6
- package/dist/{definitions-Dbgxfz3I.d.ts → definitions-DRkgHKmk.d.ts} +1 -3
- package/dist/{deployment-BUshgN5Q.js → deployment-CURATxjG.js} +2 -3
- package/dist/deployment-l7RuKdEp.js +1 -0
- package/dist/{dev-peer-CHjyHYG6.js → dev-peer-CRYp01PE.js} +2 -222
- package/dist/dev-peer-CX5C9243.js +1 -0
- package/dist/{development-zLxOp-AO.js → development-DD567hhJ.js} +2 -3
- package/dist/{development-RnopiRwK.d.ts → development-I40mfD7B.d.ts} +1 -3
- package/dist/{diagnostics-DtR0TAmq.js → diagnostics-DLHqjKGe.js} +3 -9
- package/dist/diagnostics-DgGKvWzF.d.ts +7 -0
- package/dist/docs/nuxt.js +1 -2
- package/dist/doctor.d.ts +0 -6
- package/dist/doctor.js +11492 -12152
- package/dist/{documents-BDR0AkYR.d.ts → documents-A-7Ho0g0.d.ts} +12 -16
- package/dist/{documents-B4R4JSfH.js → documents-BduuZjm3.js} +6 -6
- package/dist/{documents-BASIRZ91.d.ts → documents-CApMRd4o.d.ts} +4 -7
- package/dist/{documents-BewAPY61.js → documents-D6ueeoUR.js} +17 -21
- package/dist/durability/operations.d.ts +2 -4
- package/dist/durability/operations.js +3 -4
- package/dist/{entries-DbyNPLC9.js → entries-UFs9n1MB.js} +2 -3
- package/dist/{console/runtime/server → env/console}/env.get.d.ts +2 -4
- package/dist/env/console/env.get.js +15 -0
- package/dist/env/console/operations.d.ts +3 -0
- package/dist/env/console/operations.js +12 -0
- package/dist/env/vite.d.ts +1 -0
- package/dist/env/vite.js +2 -0
- package/dist/{env-Dg1I_DWr.js → env-D-wtSupz.js} +2 -3
- package/dist/{error-diagnostics-B1yAIaSn.js → error-diagnostics-CBtvqI30.js} +2 -7
- package/dist/{error-diagnostics-C0KyI408.js → error-diagnostics-kKXseq8d.js} +5 -2
- package/dist/error-diagnostics.ts +1 -7
- package/dist/{features-CC5OcZqJ.js → features-BXRKlmtN.js} +5 -6
- package/dist/features-CD5i5I8V.js +1 -0
- package/dist/{format-BOYlanIZ.js → format-Df-bS4Ly.js} +1 -2
- package/dist/{github-login-Bi3bfjRX.js → github-login-W-vaahWP.js} +1 -2
- package/dist/{host-CkL0jjBq.js → host-DeNPYIeV.js} +1 -2
- package/dist/{http-error-Bs6e8_-8.js → http-error-BorAxJYM.js} +1 -2
- package/dist/index.d.ts +1 -7
- package/dist/index.js +5 -7
- package/dist/{inspect-DbZuP_7b.js → inspect-CWwAuL-B.js} +2 -3
- package/dist/internal/agent-invocations-libsql.js +1 -2
- package/dist/internal/disabled-redis-driver.d.ts +1 -3
- package/dist/internal/disabled-redis-driver.js +2 -3
- package/dist/internal/disabled-upstash-driver.d.ts +1 -3
- package/dist/internal/disabled-upstash-driver.js +2 -3
- package/dist/internal/test-loader.d.ts +1 -3
- package/dist/internal/test-loader.js +2 -3
- package/dist/internal/test-server.js +2 -3
- package/dist/{internal-BreyUsQ6.js → internal-0C_CC601.js} +1 -2
- package/dist/{internal-Cc9N0shU.d.ts → internal-BRNf11h3.d.ts} +14 -8
- package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
- package/dist/{invocation-page-undo-DqYcPlkQ.js → invocation-page-undo-DHbXczWY.js} +8 -7
- package/dist/invocations-B60XWNES.js +45 -0
- package/dist/{limits-BUlwWYQE.js → limits-BLo31qDR.js} +1 -2
- package/dist/logs/client.d.ts +1 -3
- package/dist/logs/client.js +1 -2
- package/dist/{console/runtime/server → logs/console}/logs.get.d.ts +3 -5
- package/dist/{console/runtime/server → logs/console}/logs.get.js +7 -8
- package/dist/logs/console/operations.d.ts +3 -0
- package/dist/logs/console/operations.js +23 -0
- package/dist/logs/host.d.ts +2 -4
- package/dist/logs/host.js +1 -2
- package/dist/logs/memory.d.ts +1 -1
- package/dist/logs/memory.js +1 -2
- package/dist/logs/source.d.ts +1 -1
- package/dist/logs/source.js +1 -2
- package/dist/logs.d.ts +2 -2
- package/dist/logs.js +2 -2
- package/dist/loopback-Bl9Cvj1k.js +139 -0
- package/dist/mcp/eval.d.ts +1 -0
- package/dist/mcp/eval.js +2 -0
- package/dist/{mcp-client-C_sEmyQw.d.ts → mcp-client-uXVvS7RL.d.ts} +5 -10
- package/dist/{media-uKX4Wy-c.d.ts → media-C79RB1oH.d.ts} +0 -2
- package/dist/{media-D3OfyKni.js → media-CNwnh6CG.js} +8 -9
- package/dist/{media-library-o8RRsnn_.js → media-library-DTC8TLsZ.js} +5 -6
- package/dist/{media-library-D9ThbXqs.d.ts → media-library-DxGu6w9z.d.ts} +0 -2
- package/dist/{memory-C54SDH_l.js → memory-D3EJS_Bp.js} +3 -4
- package/dist/{memory-2bbl4hcV.d.ts → memory-GK5ZGWrp.d.ts} +1 -3
- package/dist/{nuxt-server-auto-imports-cfTZYvgy.js → nuxt-server-auto-imports-4aT5BD4u.js} +1 -2
- package/dist/{nuxt-server-imports-75bWMeXc.js → nuxt-server-imports-BdJqiVhT.js} +1 -2
- package/dist/nuxt.d.ts +1 -3
- package/dist/nuxt.js +276 -182
- package/dist/{object-D8pRdprI.js → object-DRSmpe04.js} +1 -2
- package/dist/{operation-contributions-C3lwePQu.js → operation-contributions-BU10k2QS.js} +9 -9
- package/dist/{operation-contributions-CrdmqtJW.d.ts → operation-contributions-xwjDzj28.d.ts} +6 -7
- package/dist/{operation-definition-DxjKcCGm.js → operation-definition-D04Rdjbe.js} +7 -9
- package/dist/operation-modules-BUXlwjvd.js +1 -0
- package/dist/operation-modules-DHWkPcfS.js +139 -0
- package/dist/{operation-registry-BogGwk_I.js → operation-registry-DfQbL7vE.js} +1 -2
- package/dist/{operation-rpc-DI9txNxK.js → operation-rpc-BMdfapja.js} +3 -4
- package/dist/operations-D-7ljPqw.js +1 -0
- package/dist/{operations-TTjL_7Zc.d.ts → operations-DgFhA1WE.d.ts} +0 -4
- package/dist/{operations-CFYGXqLm.js → operations-DksTrRMb.js} +4 -5
- package/dist/operations-byxiZ2R2.js +113 -0
- package/dist/{optional-owners-O6sj4uoj.js → optional-owners-Cypch7V3.js} +4 -6
- package/dist/{out-fRNaVslw.js → out-Cw5Tvr92.js} +2933 -2301
- package/dist/{owned-paths-BnjT0FhU.js → owned-paths-MjjDftBn.js} +1 -2
- package/dist/page/pill.iife.js +2 -2
- package/dist/page-tools-BeZrtn4S.js +46 -0
- package/dist/page-tools-Chk8Gm9x.d.ts +23 -0
- package/dist/page-tools-shared-BLPidmCi.js +39 -0
- package/dist/{pathe.M-eThtNZ-J4gfe1m9.js → pathe.M-eThtNZ-D4EC7Wue.js} +1 -2
- package/dist/{plugins-DoXnU6-s.d.ts → plugins-BmkOoyIh.d.ts} +25 -110
- package/dist/{plugins-BTZQaFtZ.js → plugins-DfXcUnzN.js} +1779 -1384
- package/dist/presets/workspace.js +1 -2
- package/dist/{project-Dgyq1F1V.d.ts → project-B2qWt8on.d.ts} +3 -12
- package/dist/{project-DlWTGB7h.js → project-DRC67Uiu.js} +1 -2
- package/dist/{project-DXZRZEPX.js → project-_juMSuAS.js} +8 -11
- package/dist/{project-link-DT99MoyU.js → project-link-CJbCkOlC.js} +7 -8
- package/dist/{project-link-bNS-KROO.d.ts → project-link-Ck3vuq9w.d.ts} +2 -4
- package/dist/{project-root-v6ba4tn7.js → project-root-mAVQGZTX.js} +1 -2
- package/dist/project-session-8pN7pRo8.js +764 -0
- package/dist/{projects-CAcXztf4.js → projects-BRp0iseV.js} +1 -2
- package/dist/{projects-Ddvl9EJp.d.ts → projects-mgPxrKZr.d.ts} +0 -2
- package/dist/{registry-zw6aE2N9.js → registry-B8JE5NY-.js} +1 -2
- package/dist/{registry-CDKLACCZ.js → registry-CnPC-gNu.js} +1 -2
- package/dist/{request-CMA2UKKq.js → request-D769eiBL.js} +5 -6
- package/dist/{request-D7h3SQ92.d.ts → request-DYmjLTqP.d.ts} +2 -4
- package/dist/{request-SBLxvpyr.d.ts → request-DkoE0b2h.d.ts} +11 -4
- package/dist/{request-Cs0FqxEL.js → request-XFVx7CGC.js} +30 -9
- package/dist/{request-origin-COUkgHd6.js → request-origin-pzWr9UUu.js} +1 -2
- package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
- package/dist/{route-query-CRVWXIrc.js → route-query-BWVl6ZO6.js} +4 -5
- package/dist/routes-D02vxUSg.js +26 -0
- package/dist/{rpc-DIUA61pv.js → rpc-D3tsx5lZ.js} +1 -2
- package/dist/{rpc-7nlHSv3y.d.ts → rpc-oijgKQtD.d.ts} +0 -2
- package/dist/{runtime-YLWfdrtO.js → runtime-CAbuQGMP.js} +3 -4
- package/dist/{runtime-B-46Bawt.js → runtime-CRJsqVTa.js} +2 -3
- package/dist/{runtime-DxfJOfCd.js → runtime-DA7HJe10.js} +3 -4
- package/dist/runtime-DGvimtvc.d.ts +5 -0
- package/dist/{runtime-CX_l_78I.js → runtime-F0CTqBFx.js} +5 -6
- package/dist/{runtime-feature-guard-CuyPVGj9.js → runtime-feature-guard-BKAMRZzM.js} +6 -7
- package/dist/scan-module-B1A24jqP.js +1 -0
- package/dist/{scan-module-Df58L_6T.js → scan-module-BfZvDBxb.js} +2 -4
- package/dist/{schema-form-C-fy3xaU.d.ts → schema-form-Bl79Bdm-.d.ts} +0 -2
- package/dist/search-jgMrZJXR.js +84 -0
- package/dist/{sections-DumoLKQN.js → sections-AUGy9EkY.js} +2 -8
- package/dist/{sections-BogiCmtz.d.ts → sections-BMkFB3S-.d.ts} +4 -6
- package/dist/{sections-C83x0slv.js → sections-BNTdIEJw.js} +2 -3
- package/dist/{sections-Do7X4Nwt.d.ts → sections-DCoCa4nF.d.ts} +1 -8
- package/dist/sections-DjeAUX7o.d.ts +8 -0
- package/dist/{sections-BKUReack.js → sections-ZFAlI4JW.js} +14 -7
- package/dist/{sections.get-H46e2urg.d.ts → sections.get-BY5dClJY.d.ts} +2 -4
- package/dist/seo/runtime.d.ts +2 -5
- package/dist/seo/runtime.js +3 -5
- package/dist/{seo-CtLywyRx.d.ts → seo-CgW5uI9L.d.ts} +0 -2
- package/dist/seo.d.ts +1 -1
- package/dist/seo.js +1 -2
- package/dist/{setup-BC0P3eZy.d.ts → setup-BBnZPziq.d.ts} +5 -10
- package/dist/{setup-DNGzawFn.js → setup-yc3_WKNG.js} +4 -17
- package/dist/site-CZCIWsUQ.js +169 -0
- package/dist/site-link-Bvo2SxPo.js +58 -0
- package/dist/site-link-Dtw8MNVB.d.ts +18 -0
- package/dist/site-pages-B6J8U2Nq.js +66 -0
- package/dist/site-token-Wa7fhjwg.js +215 -0
- package/dist/site-visitor-BkhE2TA0.js +89 -0
- package/dist/skills/operations.d.ts +1 -5
- package/dist/skills/operations.js +4 -5
- package/dist/{skills-DdpSMiCI.js → skills-C1MaGEbO.js} +1 -2
- package/dist/skills.d.ts +1 -2
- package/dist/{skills.get-CRd06TTb.js → skills.get-CW8vc_Hf.js} +3 -4
- package/dist/skills.js +1 -2
- package/dist/{source-Cw3iYvJF.js → source-DYFndd0W.js} +2 -3
- package/dist/{source-S-LChQvw.d.ts → source-DemBtwla.d.ts} +0 -2
- package/dist/{stored-Dhv2qsQv.js → stored-J3TetMKf.js} +1 -2
- package/dist/task/operations.d.ts +1 -5
- package/dist/task/operations.js +3 -4
- package/dist/test/register.js +2 -3
- package/dist/test.d.ts +0 -4
- package/dist/test.js +1 -2
- package/dist/ui/vite.js +1 -2
- package/dist/usage-DBi7aOhx.js +33 -0
- package/dist/{version-dkga9imp.js → version-DUCd7Orc.js} +24 -21
- package/dist/{vite-stage-D7fe614I.js → vite-stage-Dmo4RgnK.js} +3 -5
- package/dist/{vue-router-C68IU1jM.d.ts → vue-router-plZJLlpm.d.ts} +120 -182
- package/dist/workspace/console/operations.d.ts +3 -0
- package/dist/workspace/console/operations.js +22 -0
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.d.ts +3 -5
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.js +4 -5
- package/dist/{workspace-history-B95Q-kGI.js → workspace-history-B52xib2J.js} +3 -4
- package/dist/{workspace-history-CeVwBB6Q.d.ts → workspace-history-WuxgLsi4.d.ts} +0 -2
- package/package.json +158 -149
- package/dist/agents-BhFggA26.js +0 -2
- package/dist/auth-GFIN6xSJ.d.ts +0 -120
- package/dist/cli-config-g_mbWdjT.js +0 -2
- package/dist/cloudflare-env-lookup-DKXdr4P_.js +0 -16
- package/dist/console/runtime/client/ticket.d.ts +0 -2
- package/dist/console/runtime/client/ticket.js +0 -2
- package/dist/console/runtime/page/loader.js +0 -134
- package/dist/console/runtime/server/auth.d.ts +0 -2
- package/dist/console/runtime/server/env.get.js +0 -16
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +0 -8
- package/dist/console/runtime/server/mcp-client-operations.d.ts +0 -5
- package/dist/console/runtime/server/mcp-client-operations.js +0 -139
- package/dist/console/runtime/server/page-auth.d.ts +0 -18
- package/dist/console/runtime/server/page-auth.js +0 -44
- package/dist/console/runtime/server/page-tool.d.ts +0 -2
- package/dist/console/runtime/server/page-tool.js +0 -110
- package/dist/console/runtime/server/page-tools-route.d.ts +0 -2
- package/dist/console/runtime/server/page-tools-route.js +0 -5
- package/dist/console/runtime/server/search.get.d.ts +0 -4
- package/dist/console/runtime/server/search.get.js +0 -97
- package/dist/console/runtime/server/site-session.d.ts +0 -80
- package/dist/console/runtime/server/site-session.js +0 -2
- package/dist/console/runtime/server/tickets.d.ts +0 -2
- package/dist/console/runtime/server/tickets.js +0 -2
- package/dist/console/runtime/server/usage.get.d.ts +0 -10
- package/dist/console/runtime/server/usage.get.js +0 -92
- package/dist/console/runtime/site-access.d.ts +0 -2
- package/dist/console/runtime/site-access.js +0 -2
- package/dist/console-lazy-views-DXnIkdyd.js +0 -2
- package/dist/definition-catalog-og_1razf.js +0 -2
- package/dist/deployment-C2B0hBBj.js +0 -2
- package/dist/diagnostics-CjGiniKb.d.ts +0 -11
- package/dist/features-ujWsvlEH.js +0 -2
- package/dist/invocations-6jxqLkGY.js +0 -86
- package/dist/mcp-client-C91h8Taa.js +0 -1024
- package/dist/mcp-client-CTbTbn7d.js +0 -10
- package/dist/operations-5Lwd1xEI.js +0 -2
- package/dist/operations-ChEXk2ij.js +0 -853
- package/dist/page-tool-PmxH65gt.d.ts +0 -69
- package/dist/page-tools-ClgqElu-.js +0 -462
- package/dist/page-tools-DcCCtDKi.d.ts +0 -23
- package/dist/page-tools-shared-aNC9YtoI.js +0 -125
- package/dist/runtime-B_btezs1.d.ts +0 -7
- package/dist/scan-module-D_3X08mj.js +0 -2
- package/dist/secret-DELGKpCJ.js +0 -44
- package/dist/sections-CFiMNsqu.d.ts +0 -10
- package/dist/site-access-BycrwM2v.js +0 -18
- package/dist/site-access-CAiWyKOD.js +0 -2
- package/dist/site-access-DxfdOel1.d.ts +0 -55
- package/dist/site-access-L1qbvKt6.js +0 -293
- package/dist/site-session-CRwgKtTF.js +0 -300
- package/dist/skills/vitehub/SKILL.md +0 -142
- package/dist/skills/vitehub/agents/openai.yaml +0 -4
- package/dist/skills/vitehub/references/agent-definitions.md +0 -36
- package/dist/skills/vitehub/references/bundle.md +0 -57
- package/dist/skills/vitehub/references/capabilities-authority.md +0 -30
- package/dist/skills/vitehub/references/channels-triggers.md +0 -27
- package/dist/skills/vitehub/references/framework-composition.md +0 -29
- package/dist/skills/vitehub/references/preview-contract.md +0 -44
- package/dist/skills/vitehub/references/primitives/auth.md +0 -14
- package/dist/skills/vitehub/references/primitives/blob.md +0 -13
- package/dist/skills/vitehub/references/primitives/browser.md +0 -17
- package/dist/skills/vitehub/references/primitives/cache.md +0 -13
- package/dist/skills/vitehub/references/primitives/channels.md +0 -11
- package/dist/skills/vitehub/references/primitives/connections.md +0 -14
- package/dist/skills/vitehub/references/primitives/content.md +0 -13
- package/dist/skills/vitehub/references/primitives/database.md +0 -15
- package/dist/skills/vitehub/references/primitives/email.md +0 -11
- package/dist/skills/vitehub/references/primitives/env.md +0 -13
- package/dist/skills/vitehub/references/primitives/kv.md +0 -13
- package/dist/skills/vitehub/references/primitives/markdown-template.md +0 -13
- package/dist/skills/vitehub/references/primitives/queue.md +0 -14
- package/dist/skills/vitehub/references/primitives/rate-limit.md +0 -11
- package/dist/skills/vitehub/references/primitives/realtime.md +0 -19
- package/dist/skills/vitehub/references/primitives/sandbox-task.md +0 -11
- package/dist/skills/vitehub/references/primitives/sandbox.md +0 -13
- package/dist/skills/vitehub/references/primitives/schedule.md +0 -11
- package/dist/skills/vitehub/references/primitives/shell.md +0 -11
- package/dist/skills/vitehub/references/primitives/source.md +0 -11
- package/dist/skills/vitehub/references/primitives/workflow.md +0 -11
- package/dist/skills/vitehub/references/primitives/workspace.md +0 -11
- package/dist/skills/vitehub/references/project-patterns.md +0 -19
- package/dist/skills/vitehub/references/project-shapes.md +0 -81
- package/dist/skills/vitehub/references/proof-recovery.md +0 -31
- package/dist/skills/vitehub/references/sandboxes-hosts.md +0 -26
- package/dist/skills/vitehub/references/schedules-workflows-invocations.md +0 -28
- package/dist/skills/vitehub/references/server-primitives.md +0 -39
- package/dist/skills/vitehub/references/workspaces-sources-access.md +0 -26
- package/dist/ticket-DtBAstEU.js +0 -31
- package/dist/ticket-Pr_8ZtXW.d.ts +0 -14
- package/dist/tickets-DahBmKDT.js +0 -357
- package/dist/usage-CoQXs5nW.d.ts +0 -22
- package/dist/usage-index-VJAZ7a0p.js +0 -335
- package/dist/usage-jKtAgJZ0.js +0 -571
- /package/dist/{console/runtime/public/skills → console-skills}/index.json +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/SKILL.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/agents/openai.yaml +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/agent-definitions.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/bundle.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/capabilities-authority.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/channels-triggers.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/framework-composition.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/preview-contract.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/auth.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/blob.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/browser.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/cache.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/channels.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/connections.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/content.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/database.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/email.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/env.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/kv.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/markdown-template.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/queue.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/rate-limit.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/realtime.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox-task.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/schedule.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/shell.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/source.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workflow.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workspace.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-patterns.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-shapes.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/proof-recovery.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/sandboxes-hosts.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/schedules-workflows-invocations.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/server-primitives.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/workspaces-sources-access.md +0 -0
|
@@ -1,853 +0,0 @@
|
|
|
1
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-B1yAIaSn.js";
|
|
2
|
-
import { t as defineOperation } from "./operation-definition-DxjKcCGm.js";
|
|
3
|
-
import { _ as table, c as operationCall, d as operationSection, o as operationAccessAllows } from "./operations-CFYGXqLm.js";
|
|
4
|
-
import { n as bindConsoleAccess, s as consoleOperationAccess } from "./access-BC9HtX_M.js";
|
|
5
|
-
import { i as consoleRequestError } from "./request-CMA2UKKq.js";
|
|
6
|
-
import { n as loadConsoleRuntime } from "./runtime-DxfJOfCd.js";
|
|
7
|
-
import { r as loadConsoleMedia } from "./blob-BcgsZtqM.js";
|
|
8
|
-
import { a as maximumConsoleMediaRequestBytes, i as maximumConsoleDocumentRequestBytes, n as consoleDocumentActionNames, r as consoleMediaUploadRequestBytes, s as maximumConsoleRpcRequestBytes, t as consoleAttachmentRequestBytes } from "./limits-BUlwWYQE.js";
|
|
9
|
-
import { n as authConsoleImpersonationOperations, r as authConsoleReadOperations, t as authConsoleActionOperations } from "./auth-operations-GcQk0O0X.js";
|
|
10
|
-
import * as v from "valibot";
|
|
11
|
-
//#region src/console/runtime/server/operations.ts
|
|
12
|
-
function disabledConsoleFeature(feature) {
|
|
13
|
-
return Promise.reject(consoleRequestError(404, `The Console ${feature} section is disabled.`));
|
|
14
|
-
}
|
|
15
|
-
/** Document actions that only read. A read-only section grant keeps them. */
|
|
16
|
-
const consoleDocumentReadActions = /* @__PURE__ */ new Set([
|
|
17
|
-
"get",
|
|
18
|
-
"list",
|
|
19
|
-
"overview",
|
|
20
|
-
"raw",
|
|
21
|
-
"references",
|
|
22
|
-
"resolve",
|
|
23
|
-
"revisions",
|
|
24
|
-
"search",
|
|
25
|
-
"sessions"
|
|
26
|
-
]);
|
|
27
|
-
/** Media actions that only read. */
|
|
28
|
-
const consoleMediaReadActions = /* @__PURE__ */ new Set([
|
|
29
|
-
"get",
|
|
30
|
-
"info",
|
|
31
|
-
"list",
|
|
32
|
-
"usage"
|
|
33
|
-
]);
|
|
34
|
-
function legacyEvent(route, method, request, context) {
|
|
35
|
-
const id = request.id ? `/${encodeURIComponent(request.id)}` : "";
|
|
36
|
-
const url = new URL(`/_vitehub/api/${route}${id}`, "http://vitehub.local");
|
|
37
|
-
for (const [key, value] of Object.entries(request.query ?? {})) {
|
|
38
|
-
if (value === void 0) continue;
|
|
39
|
-
if (Array.isArray(value)) value.forEach((entry) => url.searchParams.append(key, entry));
|
|
40
|
-
else url.searchParams.set(key, String(value));
|
|
41
|
-
}
|
|
42
|
-
const params = {};
|
|
43
|
-
if (request.agent) params.agent = request.agent;
|
|
44
|
-
if (request.id) params.id = request.id;
|
|
45
|
-
const body = method === "POST" && request.body !== void 0 ? JSON.stringify(request.body) : void 0;
|
|
46
|
-
const event = {
|
|
47
|
-
context: Object.keys(params).length ? { params } : void 0,
|
|
48
|
-
"~standard": {
|
|
49
|
-
vendor: "vitehub-console",
|
|
50
|
-
req: new Request(url, {
|
|
51
|
-
body,
|
|
52
|
-
headers: context.request?.headers,
|
|
53
|
-
method,
|
|
54
|
-
signal: context.request?.signal
|
|
55
|
-
}),
|
|
56
|
-
res: context.response ?? {},
|
|
57
|
-
runtime: context.env ? { cloudflare: { env: context.env } } : {},
|
|
58
|
-
...context.waitUntil ? { waitUntil: context.waitUntil } : {}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
return bindConsoleAccess(context.access, event);
|
|
62
|
-
}
|
|
63
|
-
const text = v.string();
|
|
64
|
-
const optionalText = v.optional(v.string());
|
|
65
|
-
const optionalCount = v.optional(v.pipe(v.number(), v.integer()));
|
|
66
|
-
const record = v.record(v.string(), v.unknown());
|
|
67
|
-
function selectionError() {
|
|
68
|
-
return consoleRequestError(400, "A valid definition section is required.");
|
|
69
|
-
}
|
|
70
|
-
function actionResult(result) {
|
|
71
|
-
if (result instanceof Response) throw consoleRequestError(result.status, "This Console access does not include this section.");
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
/** Large calls put the operation name first in the envelope, so the RPC can classify them within 64 KiB. */
|
|
75
|
-
const consoleOperationRequestBytes = {
|
|
76
|
-
"agents.invoke": consoleAttachmentRequestBytes + maximumConsoleRpcRequestBytes,
|
|
77
|
-
"documents.action": maximumConsoleDocumentRequestBytes + maximumConsoleRpcRequestBytes,
|
|
78
|
-
"media.action": maximumConsoleMediaRequestBytes + maximumConsoleRpcRequestBytes,
|
|
79
|
-
"media.upload": consoleMediaUploadRequestBytes
|
|
80
|
-
};
|
|
81
|
-
function defineConsoleOperation(definition) {
|
|
82
|
-
return defineOperation({
|
|
83
|
-
...definition,
|
|
84
|
-
user: false,
|
|
85
|
-
async run(input, context) {
|
|
86
|
-
const access = await consoleOperationAccess(context);
|
|
87
|
-
if (!operationAccessAllows(access, operationSection(definition, input), operationCall(definition, input))) throw consoleRequestError(403, "This Console access does not include this operation.");
|
|
88
|
-
await loadConsoleRuntime();
|
|
89
|
-
return definition.run(input, {
|
|
90
|
-
...context,
|
|
91
|
-
access
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
const agentsList = defineConsoleOperation({
|
|
97
|
-
cli: {
|
|
98
|
-
command: "list",
|
|
99
|
-
namespace: "agent"
|
|
100
|
-
},
|
|
101
|
-
description: "List the Agents of the app.",
|
|
102
|
-
input: v.strictObject({}),
|
|
103
|
-
kind: "read",
|
|
104
|
-
name: "agents.list",
|
|
105
|
-
run: async () => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/agents.get.js"))).listConsoleAgents(),
|
|
106
|
-
section: "agents"
|
|
107
|
-
});
|
|
108
|
-
const agentsInvoke = defineConsoleOperation({
|
|
109
|
-
cli: {
|
|
110
|
-
command: "invoke",
|
|
111
|
-
namespace: "agent",
|
|
112
|
-
positional: ["agent"]
|
|
113
|
-
},
|
|
114
|
-
description: "Start an Agent Invocation with a prompt.",
|
|
115
|
-
input: v.strictObject({
|
|
116
|
-
agent: v.pipe(text, v.minLength(1)),
|
|
117
|
-
agentRoute: v.optional(v.literal("encoded")),
|
|
118
|
-
attachments: v.optional(v.array(v.object({
|
|
119
|
-
id: text,
|
|
120
|
-
name: text
|
|
121
|
-
}))),
|
|
122
|
-
files: v.optional(v.array(v.object({
|
|
123
|
-
filename: optionalText,
|
|
124
|
-
url: text
|
|
125
|
-
}))),
|
|
126
|
-
invokerProfileId: optionalText,
|
|
127
|
-
messages: v.optional(v.array(record)),
|
|
128
|
-
prompt: text
|
|
129
|
-
}),
|
|
130
|
-
kind: "write",
|
|
131
|
-
maxRequestBytes: consoleOperationRequestBytes["agents.invoke"],
|
|
132
|
-
name: "agents.invoke",
|
|
133
|
-
run: async ({ agent, agentRoute, ...body }, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./agent-invocations.post-C3Onl2yH.js"))).default(legacyEvent(`agents/${agent}/invocations`, "POST", {
|
|
134
|
-
agent,
|
|
135
|
-
body,
|
|
136
|
-
query: { agentRoute }
|
|
137
|
-
}, context)),
|
|
138
|
-
section: "agents"
|
|
139
|
-
});
|
|
140
|
-
const channelsReplay = defineConsoleOperation({
|
|
141
|
-
cli: {
|
|
142
|
-
command: "replay",
|
|
143
|
-
namespace: "channels"
|
|
144
|
-
},
|
|
145
|
-
description: "Replay one page of a Channel's history through its trigger, or describe its history query with describe: true.",
|
|
146
|
-
input: v.strictObject({
|
|
147
|
-
agent: v.pipe(text, v.minLength(1)),
|
|
148
|
-
channel: v.pipe(text, v.minLength(1)),
|
|
149
|
-
cursor: optionalText,
|
|
150
|
-
describe: v.optional(v.boolean()),
|
|
151
|
-
dryRun: v.optional(v.boolean()),
|
|
152
|
-
force: v.optional(v.boolean()),
|
|
153
|
-
label: v.optional(v.pipe(text, v.check((label) => label.trim() !== "", "Use a label with text."), v.maxLength(512))),
|
|
154
|
-
limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1))),
|
|
155
|
-
query: v.optional(v.record(v.string(), v.union([text, v.array(text)])))
|
|
156
|
-
}),
|
|
157
|
-
kind: "write",
|
|
158
|
-
mcp: false,
|
|
159
|
-
name: "channels.replay",
|
|
160
|
-
readOnlyWhen: (input) => input.describe === true,
|
|
161
|
-
run: async (input, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/channel-replay.js"))).replayConsoleChannel(input, context),
|
|
162
|
-
section: "agents"
|
|
163
|
-
});
|
|
164
|
-
const authId = v.pipe(text, v.minLength(1), v.maxLength(512));
|
|
165
|
-
const authQuery = {
|
|
166
|
-
filter: v.optional(v.picklist([
|
|
167
|
-
"all",
|
|
168
|
-
"admins",
|
|
169
|
-
"banned",
|
|
170
|
-
"agents"
|
|
171
|
-
])),
|
|
172
|
-
limit: v.optional(v.number()),
|
|
173
|
-
offset: v.optional(v.number()),
|
|
174
|
-
search: v.optional(v.pipe(text, v.maxLength(200))),
|
|
175
|
-
userId: v.optional(authId)
|
|
176
|
-
};
|
|
177
|
-
const authValue = v.union([
|
|
178
|
-
text,
|
|
179
|
-
v.number(),
|
|
180
|
-
v.boolean(),
|
|
181
|
-
v.null(),
|
|
182
|
-
v.array(text),
|
|
183
|
-
v.array(v.number())
|
|
184
|
-
]);
|
|
185
|
-
/** One read of the Auth section. The Auth Console of `@vite-hub/auth` loads on the first call. */
|
|
186
|
-
function authRead(name, description, input, read) {
|
|
187
|
-
return defineConsoleOperation({
|
|
188
|
-
description,
|
|
189
|
-
input,
|
|
190
|
-
kind: "read",
|
|
191
|
-
mcp: false,
|
|
192
|
-
name: authConsoleReadOperations[name],
|
|
193
|
-
run: async (value, context) => (await (import.meta.viteHubConsoleAuth === false ? disabledConsoleFeature("Auth") : import("./console/runtime/server/auth.js"))).runAuthConsoleRead(context, (api, request) => read(api, request, value)),
|
|
194
|
-
section: "auth"
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
/** One action of the Auth section. Impersonation has its own operations, which return a one-time link. */
|
|
198
|
-
function authAction(action, description, kind, input, mutation, positional) {
|
|
199
|
-
return defineConsoleOperation({
|
|
200
|
-
cli: { positional: [positional] },
|
|
201
|
-
description,
|
|
202
|
-
input,
|
|
203
|
-
kind,
|
|
204
|
-
mcp: false,
|
|
205
|
-
name: authConsoleActionOperations[action],
|
|
206
|
-
run: async (value, context) => (await (import.meta.viteHubConsoleAuth === false ? disabledConsoleFeature("Auth") : import("./console/runtime/server/auth.js"))).runAuthConsoleAction(context, mutation(value)),
|
|
207
|
-
section: "auth"
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
const authOperations = [
|
|
211
|
-
authRead("describe", "Describe the Auth of the app: its pages, user fields, and the actions that this access may run.", v.strictObject({}), (api, request) => api.describe(request)),
|
|
212
|
-
authRead("overview", "Count the users, new users, active sessions, and approved Agents of the app, with its recent Auth events.", v.strictObject({}), (api) => api.overview()),
|
|
213
|
-
authRead("activity", "List recent Auth events, newest first, one page at a time.", v.strictObject({
|
|
214
|
-
cursor: v.optional(v.pipe(text, v.maxLength(2048))),
|
|
215
|
-
group: v.optional(v.picklist([
|
|
216
|
-
"sign-in",
|
|
217
|
-
"admin",
|
|
218
|
-
"agents",
|
|
219
|
-
"organizations"
|
|
220
|
-
])),
|
|
221
|
-
limit: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(200))),
|
|
222
|
-
userId: v.optional(authId)
|
|
223
|
-
}), (api, _request, input) => api.activity(input)),
|
|
224
|
-
authRead("users", "List the users of the app, one page at a time.", v.strictObject(authQuery), (api, _request, input) => api.users(input)),
|
|
225
|
-
authRead("user", "Read one user with its sessions, accounts, Agent clients, and organizations.", v.strictObject({ id: authId }), (api, request, input) => api.user(input.id, request)),
|
|
226
|
-
authRead("sessions", "List the active sessions of the app, one page at a time.", v.strictObject(authQuery), (api, _request, input) => api.sessions(input)),
|
|
227
|
-
authRead("organizations", "List the organizations of the app, one page at a time.", v.strictObject(authQuery), (api, _request, input) => api.organizations(input)),
|
|
228
|
-
authRead("organization", "Read one organization with its members and invitations, one page at a time.", v.strictObject({
|
|
229
|
-
...authQuery,
|
|
230
|
-
id: authId
|
|
231
|
-
}), (api, _request, { id, ...query }) => api.organization(id, query)),
|
|
232
|
-
authRead("agents", "List the Agent clients that users granted access, one page at a time.", v.strictObject(authQuery), (api, _request, input) => api.agents(input)),
|
|
233
|
-
authAction("ban", "Ban a user, with an optional reason and expiry in seconds.", "write", v.strictObject({
|
|
234
|
-
expiresIn: v.optional(v.number()),
|
|
235
|
-
reason: v.optional(v.pipe(text, v.maxLength(1e3))),
|
|
236
|
-
userId: authId
|
|
237
|
-
}), (input) => ({
|
|
238
|
-
action: "ban",
|
|
239
|
-
...input
|
|
240
|
-
}), "userId"),
|
|
241
|
-
authAction("unban", "Lift the ban of a user.", "write", v.strictObject({ userId: authId }), (input) => ({
|
|
242
|
-
action: "unban",
|
|
243
|
-
...input
|
|
244
|
-
}), "userId"),
|
|
245
|
-
authAction("remove", "Delete a user and its sessions and accounts.", "destructive", v.strictObject({ userId: authId }), (input) => ({
|
|
246
|
-
action: "remove",
|
|
247
|
-
...input
|
|
248
|
-
}), "userId"),
|
|
249
|
-
authAction("revokeSessions", "Sign a user out of every session.", "destructive", v.strictObject({ userId: authId }), (input) => ({
|
|
250
|
-
action: "revokeSessions",
|
|
251
|
-
...input
|
|
252
|
-
}), "userId"),
|
|
253
|
-
authAction("setRole", "Set the role of a user.", "write", v.strictObject({
|
|
254
|
-
role: authId,
|
|
255
|
-
userId: authId
|
|
256
|
-
}), (input) => ({
|
|
257
|
-
action: "setRole",
|
|
258
|
-
...input
|
|
259
|
-
}), "userId"),
|
|
260
|
-
authAction("editField", "Change one field of a user.", "write", v.strictObject({
|
|
261
|
-
field: authId,
|
|
262
|
-
userId: authId,
|
|
263
|
-
value: authValue
|
|
264
|
-
}), (input) => ({
|
|
265
|
-
action: "editField",
|
|
266
|
-
...input
|
|
267
|
-
}), "userId"),
|
|
268
|
-
authAction("revokeSession", "End one session.", "destructive", v.strictObject({ id: authId }), (input) => ({
|
|
269
|
-
action: "revokeSession",
|
|
270
|
-
...input
|
|
271
|
-
}), "id"),
|
|
272
|
-
authAction("revokeConsent", "Revoke the access that a user granted an Agent client.", "destructive", v.strictObject({ id: authId }), (input) => ({
|
|
273
|
-
action: "revokeConsent",
|
|
274
|
-
...input
|
|
275
|
-
}), "id"),
|
|
276
|
-
defineConsoleOperation({
|
|
277
|
-
description: "Return a one-time link that opens the app in the browser as a user. The browser must be signed in to the app with the email of the person who asks.",
|
|
278
|
-
input: v.strictObject({ userId: authId }),
|
|
279
|
-
kind: "write",
|
|
280
|
-
mcp: false,
|
|
281
|
-
name: authConsoleImpersonationOperations.start,
|
|
282
|
-
run: async ({ userId }, context) => (await (import.meta.viteHubConsoleAuth === false ? disabledConsoleFeature("Auth") : import("./console/runtime/server/auth.js"))).issueImpersonationTicket(context, userId),
|
|
283
|
-
section: "auth"
|
|
284
|
-
}),
|
|
285
|
-
defineConsoleOperation({
|
|
286
|
-
description: "Return a one-time link that ends the impersonation of the browser that opens it and restores the administrator's session.",
|
|
287
|
-
input: v.strictObject({}),
|
|
288
|
-
kind: "write",
|
|
289
|
-
mcp: false,
|
|
290
|
-
name: authConsoleImpersonationOperations.stop,
|
|
291
|
-
run: async (_input, context) => (await (import.meta.viteHubConsoleAuth === false ? disabledConsoleFeature("Auth") : import("./console/runtime/server/auth.js"))).issueImpersonationTicket(context),
|
|
292
|
-
section: "auth"
|
|
293
|
-
})
|
|
294
|
-
];
|
|
295
|
-
const databasesBrowse = defineConsoleOperation({
|
|
296
|
-
cli: {
|
|
297
|
-
namespace: "database",
|
|
298
|
-
command: "rows",
|
|
299
|
-
positional: ["table"]
|
|
300
|
-
},
|
|
301
|
-
description: "Read the rows of a database table, one page at a time. Without a table it reads the tables only.",
|
|
302
|
-
input: v.strictObject({
|
|
303
|
-
database: optionalText,
|
|
304
|
-
direction: v.optional(v.picklist(["asc", "desc"])),
|
|
305
|
-
limit: optionalCount,
|
|
306
|
-
offset: optionalCount,
|
|
307
|
-
search: optionalText,
|
|
308
|
-
sort: optionalText,
|
|
309
|
-
table: optionalText
|
|
310
|
-
}),
|
|
311
|
-
kind: "read",
|
|
312
|
-
name: "databases.browse",
|
|
313
|
-
run: async (input, context) => {
|
|
314
|
-
const result = await (await (import.meta.viteHubConsoleDatabase === false ? disabledConsoleFeature("Database") : import("./console/runtime/server/database.get.js"))).browseConsoleDatabase(input);
|
|
315
|
-
if (input.table && context.surface !== "console" && result.table !== input.table) throw consoleRequestError(404, `The database has no table "${input.table}".`);
|
|
316
|
-
return result;
|
|
317
|
-
},
|
|
318
|
-
section: "databases"
|
|
319
|
-
});
|
|
320
|
-
const databasesTables = defineConsoleOperation({
|
|
321
|
-
cli: {
|
|
322
|
-
namespace: "database",
|
|
323
|
-
command: "tables"
|
|
324
|
-
},
|
|
325
|
-
description: "List the tables of a database with their columns and relationships.",
|
|
326
|
-
input: v.strictObject({ database: optionalText }),
|
|
327
|
-
kind: "read",
|
|
328
|
-
name: "databases.tables",
|
|
329
|
-
run: async (input) => {
|
|
330
|
-
const { database, databases, relationships, tables } = await (await (import.meta.viteHubConsoleDatabase === false ? disabledConsoleFeature("Database") : import("./console/runtime/server/database.get.js"))).browseConsoleDatabase(input);
|
|
331
|
-
return {
|
|
332
|
-
database,
|
|
333
|
-
databases,
|
|
334
|
-
relationships,
|
|
335
|
-
tables
|
|
336
|
-
};
|
|
337
|
-
},
|
|
338
|
-
section: "databases"
|
|
339
|
-
});
|
|
340
|
-
const definitionsList = defineConsoleOperation({
|
|
341
|
-
cli: false,
|
|
342
|
-
description: "Read the definitions of one Console section.",
|
|
343
|
-
input: v.strictObject({ section: text }),
|
|
344
|
-
kind: "read",
|
|
345
|
-
name: "definitions.list",
|
|
346
|
-
run: async ({ section }, context) => {
|
|
347
|
-
if (!section) throw selectionError();
|
|
348
|
-
return (await import("./console/runtime/server/definitions.get.js")).listConsoleDefinitions({ section }, context.access);
|
|
349
|
-
},
|
|
350
|
-
section: (input) => input.section
|
|
351
|
-
});
|
|
352
|
-
const documentsAction = defineConsoleOperation({
|
|
353
|
-
mcp: false,
|
|
354
|
-
description: "Run one document editor action of a Console section.",
|
|
355
|
-
input: v.strictObject({
|
|
356
|
-
action: v.picklist(consoleDocumentActionNames),
|
|
357
|
-
body: v.optional(v.unknown()),
|
|
358
|
-
section: text
|
|
359
|
-
}),
|
|
360
|
-
kind: "write",
|
|
361
|
-
maxRequestBytes: consoleOperationRequestBytes["documents.action"],
|
|
362
|
-
readOnlyWhen: ({ action, body }) => action === "session" ? typeof body === "object" && body !== null && "action" in body && (body.action === "report" || body.action === "release") : consoleDocumentReadActions.has(action),
|
|
363
|
-
name: "documents.action",
|
|
364
|
-
run: async ({ action, body, section }, context) => {
|
|
365
|
-
const documents = await (import.meta.viteHubConsoleDocuments === false ? disabledConsoleFeature("document editor") : import("./console/runtime/server/documents.js"));
|
|
366
|
-
if (body === void 0) {
|
|
367
|
-
const actions = await documents.loadConsoleDocumentActions(section);
|
|
368
|
-
const user = await documents.consoleDocumentActionContext(context.access);
|
|
369
|
-
return await documents.runConsoleDocumentAction(() => actions[action](body, user)) ?? null;
|
|
370
|
-
}
|
|
371
|
-
return actionResult(await documents.default(legacyEvent("documents", "POST", {
|
|
372
|
-
body,
|
|
373
|
-
query: {
|
|
374
|
-
action,
|
|
375
|
-
section
|
|
376
|
-
}
|
|
377
|
-
}, context))).value;
|
|
378
|
-
},
|
|
379
|
-
section: (input) => input.section
|
|
380
|
-
});
|
|
381
|
-
const documentsPreview = defineConsoleOperation({
|
|
382
|
-
mcp: false,
|
|
383
|
-
description: "Return a one-time link that opens the page of a document with its draft, on the app origin.",
|
|
384
|
-
input: v.strictObject({
|
|
385
|
-
collection: v.pipe(text, v.minLength(1)),
|
|
386
|
-
id: v.pipe(text, v.minLength(1)),
|
|
387
|
-
section: text
|
|
388
|
-
}),
|
|
389
|
-
kind: "read",
|
|
390
|
-
name: "documents.preview",
|
|
391
|
-
run: async ({ collection, id, section }, context) => (await (import.meta.viteHubConsoleDocuments === false ? disabledConsoleFeature("document editor") : import("./console/runtime/server/documents.js"))).issueConsoleDocumentPreview(context, {
|
|
392
|
-
collection,
|
|
393
|
-
id,
|
|
394
|
-
section
|
|
395
|
-
}),
|
|
396
|
-
section: (input) => input.section
|
|
397
|
-
});
|
|
398
|
-
const envGet = defineConsoleOperation({
|
|
399
|
-
description: "Read the Server Env declarations. `env.inspect` reads the status of their values.",
|
|
400
|
-
input: v.strictObject({}),
|
|
401
|
-
kind: "read",
|
|
402
|
-
name: "env.get",
|
|
403
|
-
run: async (_input, context) => (await import("./console/runtime/server/env.get.js")).default(legacyEvent("env", "GET", {}, context)),
|
|
404
|
-
section: "env"
|
|
405
|
-
});
|
|
406
|
-
const invocationsList = defineConsoleOperation({
|
|
407
|
-
cli: false,
|
|
408
|
-
description: "List Agent Invocations, newest first.",
|
|
409
|
-
input: v.strictObject({
|
|
410
|
-
agent: optionalText,
|
|
411
|
-
capability: optionalText,
|
|
412
|
-
cursor: optionalText,
|
|
413
|
-
id: v.optional(v.array(text)),
|
|
414
|
-
limit: optionalCount,
|
|
415
|
-
triggeredBy: optionalText
|
|
416
|
-
}),
|
|
417
|
-
kind: "read",
|
|
418
|
-
name: "invocations.list",
|
|
419
|
-
run: async (input) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/invocations.get.js"))).listConsoleInvocations(input),
|
|
420
|
-
section: "agents"
|
|
421
|
-
});
|
|
422
|
-
const invocationsGet = defineConsoleOperation({
|
|
423
|
-
cli: false,
|
|
424
|
-
description: "Read one Agent Invocation with its observations.",
|
|
425
|
-
input: v.strictObject({
|
|
426
|
-
id: v.pipe(text, v.minLength(1)),
|
|
427
|
-
observationCount: optionalCount,
|
|
428
|
-
observationCursor: optionalText
|
|
429
|
-
}),
|
|
430
|
-
kind: "read",
|
|
431
|
-
name: "invocations.get",
|
|
432
|
-
run: async ({ id, ...query }, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/invocation.get.js"))).default(legacyEvent("invocations", "GET", {
|
|
433
|
-
id,
|
|
434
|
-
query
|
|
435
|
-
}, context)),
|
|
436
|
-
section: "agents"
|
|
437
|
-
});
|
|
438
|
-
const invocationsCancel = defineConsoleOperation({
|
|
439
|
-
cli: false,
|
|
440
|
-
description: "Ask a running Agent Invocation to stop.",
|
|
441
|
-
input: v.strictObject({ id: v.pipe(text, v.minLength(1)) }),
|
|
442
|
-
kind: "write",
|
|
443
|
-
name: "invocations.cancel",
|
|
444
|
-
run: async ({ id }, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/invocation.get.js"))).default(legacyEvent("invocations", "POST", {
|
|
445
|
-
body: { action: "cancel" },
|
|
446
|
-
id
|
|
447
|
-
}, context)),
|
|
448
|
-
section: "agents"
|
|
449
|
-
});
|
|
450
|
-
const invocationsUndo = defineConsoleOperation({
|
|
451
|
-
cli: false,
|
|
452
|
-
description: "Ask the person's open page to put back one change an Agent made there. The page restores it only while the field still shows the Agent's value.",
|
|
453
|
-
input: v.strictObject({
|
|
454
|
-
change: v.pipe(text, v.minLength(1)),
|
|
455
|
-
id: v.pipe(text, v.minLength(1))
|
|
456
|
-
}),
|
|
457
|
-
kind: "write",
|
|
458
|
-
name: "invocations.undo",
|
|
459
|
-
run: async (input, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./invocation-page-undo-DqYcPlkQ.js"))).undoConsolePageChange(input, context),
|
|
460
|
-
section: "agents"
|
|
461
|
-
});
|
|
462
|
-
const invocationsDelete = defineConsoleOperation({
|
|
463
|
-
cli: false,
|
|
464
|
-
description: "Delete one finished Agent Invocation.",
|
|
465
|
-
input: v.strictObject({ id: v.pipe(text, v.minLength(1)) }),
|
|
466
|
-
kind: "destructive",
|
|
467
|
-
name: "invocations.delete",
|
|
468
|
-
run: async ({ id }, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/invocation.get.js"))).default(legacyEvent("invocations", "POST", {
|
|
469
|
-
body: { action: "delete" },
|
|
470
|
-
id
|
|
471
|
-
}, context)),
|
|
472
|
-
section: "agents"
|
|
473
|
-
});
|
|
474
|
-
const invocationsCapabilities = defineConsoleOperation({
|
|
475
|
-
cli: false,
|
|
476
|
-
description: "List the capabilities of an Agent Invocation setup.",
|
|
477
|
-
input: v.strictObject({ agent: optionalText }),
|
|
478
|
-
kind: "read",
|
|
479
|
-
name: "invocations.capabilities",
|
|
480
|
-
run: async (input) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/invocation-capabilities.get.js"))).listConsoleInvocationCapabilities(input),
|
|
481
|
-
section: "agents"
|
|
482
|
-
});
|
|
483
|
-
const invocationsWorkspace = defineConsoleOperation({
|
|
484
|
-
cli: false,
|
|
485
|
-
description: "Read the Workspace files and history of one Agent Invocation.",
|
|
486
|
-
input: v.strictObject({
|
|
487
|
-
cursor: optionalText,
|
|
488
|
-
history: v.optional(v.boolean()),
|
|
489
|
-
id: v.pipe(text, v.minLength(1)),
|
|
490
|
-
path: optionalText,
|
|
491
|
-
ref: optionalText,
|
|
492
|
-
revision: optionalText
|
|
493
|
-
}),
|
|
494
|
-
kind: "read",
|
|
495
|
-
name: "invocations.workspace",
|
|
496
|
-
run: async ({ id, history, ...query }, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/invocation-workspace.get.js"))).default(legacyEvent("invocation-workspace", "GET", {
|
|
497
|
-
id,
|
|
498
|
-
query: {
|
|
499
|
-
...query,
|
|
500
|
-
history: history ? "1" : void 0
|
|
501
|
-
}
|
|
502
|
-
}, context)),
|
|
503
|
-
section: "agents"
|
|
504
|
-
});
|
|
505
|
-
const workspacesFiles = defineConsoleOperation({
|
|
506
|
-
cli: {
|
|
507
|
-
namespace: "workspaces",
|
|
508
|
-
positional: ["name"]
|
|
509
|
-
},
|
|
510
|
-
description: "Read the files, refs, and revisions of one Workspace, and its changes since main.",
|
|
511
|
-
input: v.strictObject({
|
|
512
|
-
cursor: optionalText,
|
|
513
|
-
name: v.pipe(text, v.minLength(1)),
|
|
514
|
-
path: optionalText,
|
|
515
|
-
ref: optionalText,
|
|
516
|
-
revision: optionalText
|
|
517
|
-
}),
|
|
518
|
-
kind: "read",
|
|
519
|
-
name: "workspaces.files",
|
|
520
|
-
run: async (input, context) => (await (import.meta.viteHubConsoleWorkspaces === false ? disabledConsoleFeature("Workspaces") : import("./console/runtime/server/workspace-files.get.js"))).default(legacyEvent("workspace-files", "GET", { query: input }, context)),
|
|
521
|
-
section: "workspaces"
|
|
522
|
-
});
|
|
523
|
-
const logsList = defineConsoleOperation({
|
|
524
|
-
description: "Read structured events from the connected log source.",
|
|
525
|
-
input: v.strictObject({
|
|
526
|
-
text: optionalText,
|
|
527
|
-
level: v.optional(v.picklist([
|
|
528
|
-
"debug",
|
|
529
|
-
"info",
|
|
530
|
-
"warn",
|
|
531
|
-
"error"
|
|
532
|
-
])),
|
|
533
|
-
service: optionalText,
|
|
534
|
-
cursor: optionalText,
|
|
535
|
-
limit: optionalCount
|
|
536
|
-
}),
|
|
537
|
-
kind: "read",
|
|
538
|
-
name: "logs.list",
|
|
539
|
-
run: async (input, context) => (await import("./console/runtime/server/logs.get.js")).readConsoleLogs(legacyEvent("logs", "GET", { query: input }, context)),
|
|
540
|
-
section: "logs"
|
|
541
|
-
});
|
|
542
|
-
const mediaAction = defineConsoleOperation({
|
|
543
|
-
mcp: false,
|
|
544
|
-
description: "Run one media library action of a Console section.",
|
|
545
|
-
input: v.strictObject({
|
|
546
|
-
action: text,
|
|
547
|
-
body: v.optional(v.unknown()),
|
|
548
|
-
section: text
|
|
549
|
-
}),
|
|
550
|
-
kind: "write",
|
|
551
|
-
maxRequestBytes: consoleOperationRequestBytes["media.action"],
|
|
552
|
-
readOnlyWhen: ({ action }) => consoleMediaReadActions.has(action),
|
|
553
|
-
name: "media.action",
|
|
554
|
-
run: async ({ action, body, section }, context) => (await (import.meta.viteHubConsoleDocuments === false ? disabledConsoleFeature("document editor") : loadConsoleMedia())).runConsoleMediaAction(section, action, body, context.access),
|
|
555
|
-
section: (input) => input.section
|
|
556
|
-
});
|
|
557
|
-
const mediaUpload = defineConsoleOperation({
|
|
558
|
-
mcp: false,
|
|
559
|
-
description: "Upload one file, given as base64, to the media library of a Console section.",
|
|
560
|
-
input: v.strictObject({
|
|
561
|
-
contentType: optionalText,
|
|
562
|
-
crop: optionalText,
|
|
563
|
-
data: text,
|
|
564
|
-
filename: v.pipe(text, v.minLength(1), v.maxLength(255)),
|
|
565
|
-
folder: optionalText,
|
|
566
|
-
pathname: optionalText,
|
|
567
|
-
section: text
|
|
568
|
-
}),
|
|
569
|
-
kind: "write",
|
|
570
|
-
maxRequestBytes: consoleOperationRequestBytes["media.upload"],
|
|
571
|
-
name: "media.upload",
|
|
572
|
-
run: async (input, context) => (await (import.meta.viteHubConsoleDocuments === false ? disabledConsoleFeature("document editor") : loadConsoleMedia())).uploadConsoleMedia(input, context.access),
|
|
573
|
-
section: (input) => input.section
|
|
574
|
-
});
|
|
575
|
-
const projectGet = defineConsoleOperation({
|
|
576
|
-
cli: {
|
|
577
|
-
command: "get",
|
|
578
|
-
namespace: "project"
|
|
579
|
-
},
|
|
580
|
-
description: "Read the project: its name, the vite-hub version, the time and Git commit of its production build, its open Comments threads, and the sections and operations that this access may use.",
|
|
581
|
-
input: v.strictObject({}),
|
|
582
|
-
kind: "read",
|
|
583
|
-
name: "project.get",
|
|
584
|
-
run: async (_input, context) => (await import("./project-DXZRZEPX.js")).readConsoleProject(context, { navigation: context.surface === "console" }),
|
|
585
|
-
section: false
|
|
586
|
-
});
|
|
587
|
-
const searchQuery = defineConsoleOperation({
|
|
588
|
-
cli: {
|
|
589
|
-
namespace: "search",
|
|
590
|
-
command: "query",
|
|
591
|
-
positional: ["search"]
|
|
592
|
-
},
|
|
593
|
-
description: "Search the Agent Invocations of the Console.",
|
|
594
|
-
input: v.strictObject({
|
|
595
|
-
cursor: optionalText,
|
|
596
|
-
limit: optionalCount,
|
|
597
|
-
search: optionalText
|
|
598
|
-
}),
|
|
599
|
-
kind: "read",
|
|
600
|
-
name: "search.query",
|
|
601
|
-
run: async (input) => {
|
|
602
|
-
const url = new URL("http://vitehub.local/_vitehub/api/search");
|
|
603
|
-
for (const [key, value] of Object.entries(input)) if (value !== void 0) url.searchParams.set(key, String(value));
|
|
604
|
-
const response = await (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/search.get.js"))).consoleSearchCollectionHandler.fetch(new Request(url));
|
|
605
|
-
if (!response.ok) throw await searchError(response);
|
|
606
|
-
return await response.json();
|
|
607
|
-
},
|
|
608
|
-
section: "agents"
|
|
609
|
-
});
|
|
610
|
-
const sectionsList = defineConsoleOperation({
|
|
611
|
-
description: "List the Console sections that this access may open.",
|
|
612
|
-
input: v.strictObject({}),
|
|
613
|
-
kind: "read",
|
|
614
|
-
name: "sections.list",
|
|
615
|
-
run: async (_input, context) => (await import("./console/runtime/server/sections.get.js")).listConsoleSections(context.access),
|
|
616
|
-
section: false
|
|
617
|
-
});
|
|
618
|
-
const skillsInspect = defineConsoleOperation({
|
|
619
|
-
description: "Inspect the bundled Skill files of an Agent, or read one exact bundled text file.",
|
|
620
|
-
input: v.strictObject({
|
|
621
|
-
agent: optionalText,
|
|
622
|
-
path: optionalText
|
|
623
|
-
}),
|
|
624
|
-
kind: "read",
|
|
625
|
-
name: "skills.inspect",
|
|
626
|
-
run: async (input) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./skills.get-CRd06TTb.js"))).inspectConsoleSkills(input),
|
|
627
|
-
section: "skills"
|
|
628
|
-
});
|
|
629
|
-
const statusGet = defineConsoleOperation({
|
|
630
|
-
cli: false,
|
|
631
|
-
description: "Read the status of an Agent: its setup and what it can do.",
|
|
632
|
-
input: v.strictObject({ agent: optionalText }),
|
|
633
|
-
kind: "read",
|
|
634
|
-
name: "status.get",
|
|
635
|
-
run: async (input, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/status.get.js"))).readConsoleStatus(legacyEvent("status", "GET", { query: input }, context)),
|
|
636
|
-
section: "agents"
|
|
637
|
-
});
|
|
638
|
-
const sitePagePath = v.optional(v.pipe(text, v.maxLength(2048)));
|
|
639
|
-
const siteId = v.pipe(text, v.minLength(1), v.maxLength(64));
|
|
640
|
-
const siteAccess = () => import("./site-access-CAiWyKOD.js");
|
|
641
|
-
function formatSiteSessions({ sessions }) {
|
|
642
|
-
if (!sessions.length) return "No browser is signed in through Site access.\n";
|
|
643
|
-
return `${table([[
|
|
644
|
-
"ID",
|
|
645
|
-
"KIND",
|
|
646
|
-
"PERSON",
|
|
647
|
-
"DEVICE",
|
|
648
|
-
"LAST SEEN",
|
|
649
|
-
"EXPIRES"
|
|
650
|
-
], ...sessions.map((session) => [
|
|
651
|
-
session.id,
|
|
652
|
-
session.kind,
|
|
653
|
-
session.person.email ? `${session.person.name} <${session.person.email}>` : session.person.name,
|
|
654
|
-
session.device,
|
|
655
|
-
session.lastSeenAt,
|
|
656
|
-
session.expiresAt
|
|
657
|
-
])])}\n`;
|
|
658
|
-
}
|
|
659
|
-
function formatSiteInvites({ invites }) {
|
|
660
|
-
if (!invites.length) return "No open invites.\n";
|
|
661
|
-
return `${table([[
|
|
662
|
-
"ID",
|
|
663
|
-
"NAME",
|
|
664
|
-
"ROLES",
|
|
665
|
-
"PATH",
|
|
666
|
-
"EXPIRES",
|
|
667
|
-
"BY"
|
|
668
|
-
], ...invites.map((invite) => [
|
|
669
|
-
invite.id,
|
|
670
|
-
invite.name,
|
|
671
|
-
invite.grants.join(","),
|
|
672
|
-
invite.path,
|
|
673
|
-
invite.expiresAt,
|
|
674
|
-
invite.createdBy.name
|
|
675
|
-
])])}\n`;
|
|
676
|
-
}
|
|
677
|
-
function formatSiteGrants({ grants }) {
|
|
678
|
-
return `${table([[
|
|
679
|
-
"ROLE",
|
|
680
|
-
"LABEL",
|
|
681
|
-
"GUESTS"
|
|
682
|
-
], ...grants.map((grant) => [
|
|
683
|
-
grant.id,
|
|
684
|
-
grant.label,
|
|
685
|
-
grant.membersOnly ? "no, members only" : "yes"
|
|
686
|
-
])])}\n`;
|
|
687
|
-
}
|
|
688
|
-
/** Site access: the Console signs browsers in to the app for the page tools. See `site-access.ts`. */
|
|
689
|
-
const siteOperations = [
|
|
690
|
-
defineConsoleOperation({
|
|
691
|
-
cli: {
|
|
692
|
-
command: "open",
|
|
693
|
-
format: (ticket) => `${ticket.url}\nThe link works once, until ${ticket.expiresAt}.\n`,
|
|
694
|
-
positional: ["path"]
|
|
695
|
-
},
|
|
696
|
-
description: "Return a one-time link that signs the browser that opens it in to the app as you, with the console role, then opens the page. With qr: true, it works for 10 minutes, for a phone. With the state of GET /_vitehub, it works only in the browser that opened that route.",
|
|
697
|
-
input: v.strictObject({
|
|
698
|
-
path: sitePagePath,
|
|
699
|
-
qr: v.optional(v.boolean()),
|
|
700
|
-
state: v.optional(v.pipe(text, v.regex(/^[\w-]{43}$/)))
|
|
701
|
-
}),
|
|
702
|
-
kind: "write",
|
|
703
|
-
mcp: false,
|
|
704
|
-
name: "site.link",
|
|
705
|
-
run: async (input, context) => (await siteAccess()).linkSite(context, input),
|
|
706
|
-
section: "site"
|
|
707
|
-
}),
|
|
708
|
-
defineConsoleOperation({
|
|
709
|
-
cli: { format: formatSiteSessions },
|
|
710
|
-
description: "List the app sessions of Console members and invited guests: one per browser.",
|
|
711
|
-
input: v.strictObject({}),
|
|
712
|
-
kind: "read",
|
|
713
|
-
name: "site.sessions",
|
|
714
|
-
run: async (_input, context) => (await siteAccess()).listSessions(context),
|
|
715
|
-
section: "site"
|
|
716
|
-
}),
|
|
717
|
-
defineConsoleOperation({
|
|
718
|
-
cli: {
|
|
719
|
-
command: "revoke",
|
|
720
|
-
format: ({ removedUser }) => removedUser ? "Signed the browser out and deleted the guest.\n" : "Signed the browser out.\n",
|
|
721
|
-
positional: ["id"]
|
|
722
|
-
},
|
|
723
|
-
description: "Sign one browser out. Revoking a guest's browser deletes the guest.",
|
|
724
|
-
input: v.strictObject({ id: siteId }),
|
|
725
|
-
kind: "destructive",
|
|
726
|
-
name: "site.revoke-session",
|
|
727
|
-
run: async ({ id }, context) => (await siteAccess()).revokeSession(context, id),
|
|
728
|
-
section: "site"
|
|
729
|
-
}),
|
|
730
|
-
defineConsoleOperation({
|
|
731
|
-
cli: {
|
|
732
|
-
format: ({ url, invite }) => `${url}\nThe link works once, in one browser, until ${invite.expiresAt}. Revoke it with \`vitehub site revoke-invite ${invite.id}\`.\n`,
|
|
733
|
-
positional: ["name"]
|
|
734
|
-
},
|
|
735
|
-
description: "Invite a guest: a one-time link that signs one browser in as a new app user with a name and roles, such as comments-write. Guests never get the Console.",
|
|
736
|
-
input: v.strictObject({
|
|
737
|
-
expiresInDays: v.optional(v.picklist([
|
|
738
|
-
1,
|
|
739
|
-
7,
|
|
740
|
-
30
|
|
741
|
-
])),
|
|
742
|
-
grants: v.pipe(v.array(v.pipe(text, v.maxLength(128))), v.maxLength(32)),
|
|
743
|
-
name: v.pipe(text, v.maxLength(64)),
|
|
744
|
-
path: sitePagePath
|
|
745
|
-
}),
|
|
746
|
-
kind: "write",
|
|
747
|
-
mcp: false,
|
|
748
|
-
name: "site.invite",
|
|
749
|
-
run: async (input, context) => (await siteAccess()).inviteGuest(context, input),
|
|
750
|
-
section: "site"
|
|
751
|
-
}),
|
|
752
|
-
defineConsoleOperation({
|
|
753
|
-
cli: { format: formatSiteInvites },
|
|
754
|
-
description: "List the guest invites that nobody opened yet.",
|
|
755
|
-
input: v.strictObject({}),
|
|
756
|
-
kind: "read",
|
|
757
|
-
name: "site.invites",
|
|
758
|
-
run: async (_input, context) => (await siteAccess()).listInvites(context),
|
|
759
|
-
section: "site"
|
|
760
|
-
}),
|
|
761
|
-
defineConsoleOperation({
|
|
762
|
-
cli: {
|
|
763
|
-
format: () => "Revoked the invite.\n",
|
|
764
|
-
positional: ["id"]
|
|
765
|
-
},
|
|
766
|
-
description: "Revoke a guest invite that nobody opened yet.",
|
|
767
|
-
input: v.strictObject({ id: siteId }),
|
|
768
|
-
kind: "destructive",
|
|
769
|
-
name: "site.revoke-invite",
|
|
770
|
-
run: async ({ id }, context) => (await siteAccess()).revokeInvite(context, id),
|
|
771
|
-
section: "site"
|
|
772
|
-
}),
|
|
773
|
-
defineConsoleOperation({
|
|
774
|
-
cli: { format: formatSiteGrants },
|
|
775
|
-
description: "List the roles that Site access gives. Console is for members only.",
|
|
776
|
-
input: v.strictObject({}),
|
|
777
|
-
kind: "read",
|
|
778
|
-
name: "site.grants",
|
|
779
|
-
run: async () => (await siteAccess()).listGrants(),
|
|
780
|
-
section: "site"
|
|
781
|
-
})
|
|
782
|
-
];
|
|
783
|
-
const usageGet = defineConsoleOperation({
|
|
784
|
-
cli: {
|
|
785
|
-
command: "usage",
|
|
786
|
-
namespace: "agent"
|
|
787
|
-
},
|
|
788
|
-
description: "Read token use and cost evidence of Agent Invocations.",
|
|
789
|
-
input: v.strictObject({
|
|
790
|
-
agent: optionalText,
|
|
791
|
-
cursor: optionalText,
|
|
792
|
-
search: optionalText,
|
|
793
|
-
status: optionalText,
|
|
794
|
-
window: optionalText
|
|
795
|
-
}),
|
|
796
|
-
kind: "read",
|
|
797
|
-
name: "usage.get",
|
|
798
|
-
run: async (input, context) => (await (import.meta.viteHubConsoleAgents === false ? disabledConsoleFeature("Agents") : import("./console/runtime/server/usage.get.js"))).readConsoleUsage(legacyEvent("usage", "GET", { query: input }, context)),
|
|
799
|
-
section: "usage"
|
|
800
|
-
});
|
|
801
|
-
async function searchError(response) {
|
|
802
|
-
const body = await response.text();
|
|
803
|
-
let message = body;
|
|
804
|
-
try {
|
|
805
|
-
const parsed = v.safeParse(v.object({
|
|
806
|
-
message: v.optional(v.unknown()),
|
|
807
|
-
statusMessage: v.optional(v.unknown())
|
|
808
|
-
}), JSON.parse(body));
|
|
809
|
-
if (parsed.success) {
|
|
810
|
-
const statusMessage = v.safeParse(v.string(), parsed.output.statusMessage);
|
|
811
|
-
const responseMessage = v.safeParse(v.string(), parsed.output.message);
|
|
812
|
-
if (statusMessage.success) message = statusMessage.output;
|
|
813
|
-
else if (responseMessage.success) message = responseMessage.output;
|
|
814
|
-
}
|
|
815
|
-
} catch {}
|
|
816
|
-
return Object.assign(viteHubErrorDiagnostics.VITE_HUB_R0052({ message }), {
|
|
817
|
-
statusCode: response.status,
|
|
818
|
-
statusMessage: message
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
/** The operations that `vite-hub` owns for the Console sections. Packages contribute their own through plugin metadata. */
|
|
822
|
-
const consoleOperations = [
|
|
823
|
-
agentsInvoke,
|
|
824
|
-
agentsList,
|
|
825
|
-
...authOperations,
|
|
826
|
-
channelsReplay,
|
|
827
|
-
databasesBrowse,
|
|
828
|
-
databasesTables,
|
|
829
|
-
definitionsList,
|
|
830
|
-
documentsAction,
|
|
831
|
-
documentsPreview,
|
|
832
|
-
envGet,
|
|
833
|
-
invocationsCancel,
|
|
834
|
-
invocationsUndo,
|
|
835
|
-
invocationsCapabilities,
|
|
836
|
-
invocationsDelete,
|
|
837
|
-
invocationsGet,
|
|
838
|
-
invocationsList,
|
|
839
|
-
invocationsWorkspace,
|
|
840
|
-
workspacesFiles,
|
|
841
|
-
logsList,
|
|
842
|
-
mediaAction,
|
|
843
|
-
mediaUpload,
|
|
844
|
-
projectGet,
|
|
845
|
-
searchQuery,
|
|
846
|
-
sectionsList,
|
|
847
|
-
...siteOperations,
|
|
848
|
-
skillsInspect,
|
|
849
|
-
statusGet,
|
|
850
|
-
usageGet
|
|
851
|
-
];
|
|
852
|
-
//#endregion
|
|
853
|
-
export { consoleOperations as n, defineConsoleOperation as r, consoleOperationRequestBytes as t };
|