@antelopejs/dms 0.25.8 → 0.25.9-next.1183.ga9db169
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/CHANGELOG.md +0 -48
- package/E2E.md +138 -0
- package/README.md +2 -2
- package/data/mockup-example/spec.json +13 -0
- package/data/mockup-spec.schema.json +399 -16
- package/dist/e2e/index.d.mts +2 -1
- package/dist/implementations/dms/live-pages.d.ts +6 -0
- package/dist/implementations/dms/live-pages.js +139 -0
- package/dist/implementations/dms/live-pages.js.map +1 -0
- package/dist/implementations/dms/page/notifications.js +2 -0
- package/dist/implementations/dms/page/notifications.js.map +1 -1
- package/dist/implementations/dms/page/registry.js +19 -4
- package/dist/implementations/dms/page/registry.js.map +1 -1
- package/dist/implementations/dms/registry-snapshot.d.ts +32 -0
- package/dist/implementations/dms/registry-snapshot.js +55 -0
- package/dist/implementations/dms/registry-snapshot.js.map +1 -0
- package/dist/implementations/dms/services.d.ts +2 -0
- package/dist/implementations/dms/services.js +2 -0
- package/dist/implementations/dms/services.js.map +1 -1
- package/dist/implementations/dms/tenant-access.d.ts +1 -0
- package/dist/implementations/dms/tenant-access.js +7 -0
- package/dist/implementations/dms/tenant-access.js.map +1 -1
- package/dist/implementations/dms-builder/engine/compose-page.js +1 -1
- package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-pages.js +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-pages.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.d.ts +2 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.js +12 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.js.map +1 -1
- package/dist/implementations/dms-builder/engine/table-view-settings.js +9 -33
- package/dist/implementations/dms-builder/engine/table-view-settings.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +9 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/mockup-export/capture.d.ts +19 -0
- package/dist/mcp/mockup-export/capture.js +99 -0
- package/dist/mcp/mockup-export/capture.js.map +1 -0
- package/dist/mcp/mockup-export/document.d.ts +4 -0
- package/dist/mcp/mockup-export/document.js +199 -0
- package/dist/mcp/mockup-export/document.js.map +1 -0
- package/dist/mcp/mockup-export/index.d.ts +20 -0
- package/dist/mcp/mockup-export/index.js +112 -0
- package/dist/mcp/mockup-export/index.js.map +1 -0
- package/dist/mcp/mockup-export/jobs.d.ts +32 -0
- package/dist/mcp/mockup-export/jobs.js +49 -0
- package/dist/mcp/mockup-export/jobs.js.map +1 -0
- package/dist/mcp/mockup-export/plan.d.ts +78 -0
- package/dist/mcp/mockup-export/plan.js +296 -0
- package/dist/mcp/mockup-export/plan.js.map +1 -0
- package/dist/mcp/mockup-export/route.d.ts +23 -0
- package/dist/mcp/mockup-export/route.js +91 -0
- package/dist/mcp/mockup-export/route.js.map +1 -0
- package/dist/mcp/page-verify/index.d.ts +15 -0
- package/dist/mcp/page-verify/index.js +16 -6
- package/dist/mcp/page-verify/index.js.map +1 -1
- package/dist/mcp/page-verify/mockup.d.ts +3 -1
- package/dist/mcp/page-verify/mockup.js +2 -0
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/page-verify/modules.d.ts +1 -0
- package/dist/mcp/page-verify/modules.js +22 -0
- package/dist/mcp/page-verify/modules.js.map +1 -0
- package/dist/mcp/page-verify/page-probe.d.ts +5 -0
- package/dist/mcp/page-verify/page-probe.js +2 -0
- package/dist/mcp/page-verify/page-probe.js.map +1 -1
- package/dist/mcp/page-verify/playwright.d.ts +22 -4
- package/dist/mcp/page-verify/playwright.js.map +1 -1
- package/dist/mcp/page-verify/report.d.ts +1 -0
- package/dist/mcp/tools/builder-compose.js +4 -1
- package/dist/mcp/tools/builder-compose.js.map +1 -1
- package/dist/mcp/tools/builder-pages.js +1 -1
- package/dist/mcp/tools/builder-pages.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +2 -0
- package/dist/mcp/tools/index.js +6 -1
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/mockup-export-pdf.d.ts +1 -0
- package/dist/mcp/tools/mockup-export-pdf.js +69 -0
- package/dist/mcp/tools/mockup-export-pdf.js.map +1 -0
- package/dist/mcp/tools/mockup-install-modules.d.ts +9 -0
- package/dist/mcp/tools/mockup-install-modules.js +122 -0
- package/dist/mcp/tools/mockup-install-modules.js.map +1 -0
- package/dist/mcp/tools/mockup-module-catalog.d.ts +3 -0
- package/dist/mcp/tools/mockup-module-catalog.js +52 -0
- package/dist/mcp/tools/mockup-module-catalog.js.map +1 -0
- package/dist/mcp/tools/mockup-patch-spec.js +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-read-spec.js +8 -6
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-support.js +18 -5
- package/dist/mcp/tools/mockup-support.js.map +1 -1
- package/dist/mcp/tools/mockup-write-spec.js +1 -1
- package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
- package/dist/mcp/tools/mockup.js +6 -0
- package/dist/mcp/tools/mockup.js.map +1 -1
- package/dist/mcp/tools/page-verify.d.ts +1 -0
- package/dist/mcp/tools/page-verify.js +6 -2
- package/dist/mcp/tools/page-verify.js.map +1 -1
- package/dist/mcp/tools/pages.d.ts +1 -0
- package/dist/mcp/tools/pages.js +9 -3
- package/dist/mcp/tools/pages.js.map +1 -1
- package/dist/mockup/annotations.js +2 -2
- package/dist/mockup/annotations.js.map +1 -1
- package/dist/mockup/apply-notes.js +1 -1
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/compile-layouts.d.ts +5 -0
- package/dist/mockup/compile-layouts.js +74 -0
- package/dist/mockup/compile-layouts.js.map +1 -0
- package/dist/mockup/compile-modules.d.ts +5 -0
- package/dist/mockup/compile-modules.js +40 -0
- package/dist/mockup/compile-modules.js.map +1 -0
- package/dist/mockup/compile-nodes.d.ts +11 -0
- package/dist/mockup/compile-nodes.js +119 -0
- package/dist/mockup/compile-nodes.js.map +1 -0
- package/dist/mockup/compile-pages.d.ts +20 -0
- package/dist/mockup/compile-pages.js +272 -0
- package/dist/mockup/compile-pages.js.map +1 -0
- package/dist/mockup/compile.d.ts +10 -12
- package/dist/mockup/compile.js +36 -292
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/controller-blocks.js +2 -0
- package/dist/mockup/controller-blocks.js.map +1 -1
- package/dist/mockup/create.d.ts +16 -0
- package/dist/mockup/create.js +78 -0
- package/dist/mockup/create.js.map +1 -0
- package/dist/mockup/created-watch.d.ts +18 -0
- package/dist/mockup/created-watch.js +110 -0
- package/dist/mockup/created-watch.js.map +1 -0
- package/dist/mockup/database-routes.d.ts +15 -0
- package/dist/mockup/database-routes.js +58 -0
- package/dist/mockup/database-routes.js.map +1 -0
- package/dist/mockup/database-schema.d.ts +17 -0
- package/dist/mockup/database-schema.js +41 -0
- package/dist/mockup/database-schema.js.map +1 -0
- package/dist/mockup/entities.d.ts +20 -0
- package/dist/mockup/entities.js +213 -0
- package/dist/mockup/entities.js.map +1 -0
- package/dist/mockup/etag.d.ts +1 -0
- package/dist/mockup/etag.js +10 -0
- package/dist/mockup/etag.js.map +1 -0
- package/dist/mockup/extensions.d.ts +34 -0
- package/dist/mockup/extensions.js +107 -0
- package/dist/mockup/extensions.js.map +1 -0
- package/dist/mockup/files.d.ts +2 -1
- package/dist/mockup/files.js +2 -1
- package/dist/mockup/files.js.map +1 -1
- package/dist/mockup/fixture-answers.d.ts +3 -2
- package/dist/mockup/fixture-answers.js +13 -4
- package/dist/mockup/fixture-answers.js.map +1 -1
- package/dist/mockup/fixture-batch.d.ts +21 -0
- package/dist/mockup/fixture-batch.js +111 -0
- package/dist/mockup/fixture-batch.js.map +1 -0
- package/dist/mockup/fixture-routes.d.ts +21 -0
- package/dist/mockup/fixture-routes.js +136 -0
- package/dist/mockup/fixture-routes.js.map +1 -0
- package/dist/mockup/fixtures.d.ts +2 -29
- package/dist/mockup/fixtures.js +0 -111
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/from-page.js +2 -9
- package/dist/mockup/from-page.js.map +1 -1
- package/dist/mockup/generate.js +4 -1
- package/dist/mockup/generate.js.map +1 -1
- package/dist/mockup/history-routes.d.ts +2 -4
- package/dist/mockup/history-routes.js +30 -39
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/history.js +7 -3
- package/dist/mockup/history.js.map +1 -1
- package/dist/mockup/index.d.ts +14 -0
- package/dist/mockup/index.js +14 -0
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema-entities.d.ts +5 -0
- package/dist/mockup/json-schema-entities.js +141 -0
- package/dist/mockup/json-schema-entities.js.map +1 -0
- package/dist/mockup/json-schema-layout.d.ts +1 -0
- package/dist/mockup/json-schema-layout.js +95 -2
- package/dist/mockup/json-schema-layout.js.map +1 -1
- package/dist/mockup/json-schema.d.ts +1 -1
- package/dist/mockup/json-schema.js +41 -20
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/json.d.ts +8 -0
- package/dist/mockup/json.js +20 -0
- package/dist/mockup/json.js.map +1 -0
- package/dist/mockup/layout-model.d.ts +156 -0
- package/dist/mockup/layout-model.js +96 -0
- package/dist/mockup/layout-model.js.map +1 -0
- package/dist/mockup/layouts.d.ts +9 -0
- package/dist/mockup/layouts.js +40 -0
- package/dist/mockup/layouts.js.map +1 -0
- package/dist/mockup/manage-routes.d.ts +3 -1
- package/dist/mockup/manage-routes.js +38 -1
- package/dist/mockup/manage-routes.js.map +1 -1
- package/dist/mockup/manage.js +1 -1
- package/dist/mockup/manage.js.map +1 -1
- package/dist/mockup/model.d.ts +145 -99
- package/dist/mockup/model.js +101 -86
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/module-context.d.ts +25 -0
- package/dist/mockup/module-context.js +83 -0
- package/dist/mockup/module-context.js.map +1 -0
- package/dist/mockup/module-install.d.ts +22 -0
- package/dist/mockup/module-install.js +71 -0
- package/dist/mockup/module-install.js.map +1 -0
- package/dist/mockup/module-states.d.ts +17 -0
- package/dist/mockup/module-states.js +167 -0
- package/dist/mockup/module-states.js.map +1 -0
- package/dist/mockup/modules-schema.d.ts +2 -0
- package/dist/mockup/modules-schema.js +38 -0
- package/dist/mockup/modules-schema.js.map +1 -0
- package/dist/mockup/modules.d.ts +9 -10
- package/dist/mockup/modules.js +104 -25
- package/dist/mockup/modules.js.map +1 -1
- package/dist/mockup/page-capture-routes.d.ts +19 -0
- package/dist/mockup/page-capture-routes.js +92 -0
- package/dist/mockup/page-capture-routes.js.map +1 -0
- package/dist/mockup/page-captures.d.ts +61 -0
- package/dist/mockup/page-captures.js +252 -0
- package/dist/mockup/page-captures.js.map +1 -0
- package/dist/mockup/page-descriptions.d.ts +2 -0
- package/dist/mockup/page-descriptions.js +18 -0
- package/dist/mockup/page-descriptions.js.map +1 -0
- package/dist/mockup/parse-spec.d.ts +10 -0
- package/dist/mockup/parse-spec.js +62 -0
- package/dist/mockup/parse-spec.js.map +1 -0
- package/dist/mockup/places.d.ts +17 -0
- package/dist/mockup/places.js +75 -0
- package/dist/mockup/places.js.map +1 -0
- package/dist/mockup/presence-board.js +1 -1
- package/dist/mockup/presence-board.js.map +1 -1
- package/dist/mockup/presence-routes.js +2 -2
- package/dist/mockup/presence-routes.js.map +1 -1
- package/dist/mockup/refusals.d.ts +6 -0
- package/dist/mockup/refusals.js +17 -0
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.d.ts +3 -5
- package/dist/mockup/routes.js +24 -163
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/sketch-limits.d.ts +1 -0
- package/dist/mockup/sketch-limits.js +2 -1
- package/dist/mockup/sketch-limits.js.map +1 -1
- package/dist/mockup/sketch.d.ts +2 -2
- package/dist/mockup/sketch.js +2 -1
- package/dist/mockup/sketch.js.map +1 -1
- package/dist/mockup/slug.d.ts +3 -0
- package/dist/mockup/slug.js +7 -0
- package/dist/mockup/slug.js.map +1 -0
- package/dist/mockup/source-routes.d.ts +5 -4
- package/dist/mockup/source-routes.js +26 -17
- package/dist/mockup/source-routes.js.map +1 -1
- package/dist/mockup/source.d.ts +3 -3
- package/dist/mockup/source.js +4 -3
- package/dist/mockup/source.js.map +1 -1
- package/dist/mockup/state-patch.d.ts +22 -0
- package/dist/mockup/state-patch.js +76 -0
- package/dist/mockup/state-patch.js.map +1 -0
- package/dist/mockup/state.d.ts +163 -0
- package/dist/mockup/state.js +24 -0
- package/dist/mockup/state.js.map +1 -0
- package/dist/mockup/store-list.d.ts +28 -0
- package/dist/mockup/store-list.js +89 -0
- package/dist/mockup/store-list.js.map +1 -0
- package/dist/mockup/store.d.ts +25 -38
- package/dist/mockup/store.js +126 -203
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/table-archive.d.ts +0 -1
- package/dist/mockup/table-archive.js +0 -16
- package/dist/mockup/table-archive.js.map +1 -1
- package/dist/mockup/tenancy.d.ts +19 -0
- package/dist/mockup/tenancy.js +73 -0
- package/dist/mockup/tenancy.js.map +1 -0
- package/dist/mockup/tenant-rows.d.ts +4 -0
- package/dist/mockup/tenant-rows.js +19 -0
- package/dist/mockup/tenant-rows.js.map +1 -0
- package/dist/mockup/unknown-keys.d.ts +2 -2
- package/dist/mockup/unknown-keys.js +8 -4
- package/dist/mockup/unknown-keys.js.map +1 -1
- package/dist/mockup/validate.d.ts +2 -2
- package/dist/mockup/validate.js.map +1 -1
- package/dist/store/catalog.d.ts +5 -1
- package/dist/store/catalog.js +12 -1
- package/dist/store/catalog.js.map +1 -1
- package/dist/store/changes.d.ts +3 -0
- package/dist/store/changes.js +22 -0
- package/dist/store/changes.js.map +1 -0
- package/dist/store/index.d.ts +2 -0
- package/dist/store/index.js +2 -0
- package/dist/store/index.js.map +1 -1
- package/dist/store/listing.js +5 -5
- package/dist/store/listing.js.map +1 -1
- package/dist/store/operations.d.ts +8 -0
- package/dist/store/operations.js +27 -3
- package/dist/store/operations.js.map +1 -1
- package/dist/store/registry.d.ts +1 -0
- package/dist/store/registry.js +9 -0
- package/dist/store/registry.js.map +1 -1
- package/dist/store/types.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/live-pages.d.ts +41 -0
- package/dist/types/live-pages.js +3 -0
- package/dist/types/live-pages.js.map +1 -0
- package/dist/validation/store.schema.d.ts +1 -0
- package/dist/validation/store.schema.js +4 -4
- package/dist/validation/store.schema.js.map +1 -1
- package/e2e/index.mjs +3 -2
- package/frontend-vue/build/viewer-chunks.ts +181 -0
- package/frontend-vue/dms.frontend.build.ts +2 -1
- package/frontend-vue/dms.frontend.ts +7 -0
- package/frontend-vue/eslint-globals.generated.mjs +27 -24
- package/frontend-vue/layers/dms-core/app/build/utils/asyncDataScope.ts +3 -31
- package/frontend-vue/layers/dms-core/app/build/utils/previewFrame.ts +6 -1
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +8 -2
- package/frontend-vue/layers/dms-core/app/utils/localFetchAnswers.ts +124 -0
- package/frontend-vue/layers/dms-core/app/utils/textDigest.ts +29 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +4 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +4 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +89 -31
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +21 -6
- package/frontend-vue/layers/dms-layout/app/build/components/layout/SidebarUserMenu.vue +61 -8
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +79 -9
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsNav.vue +57 -8
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +12 -0
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/useSettingsNavigation.ts +42 -62
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-mockups.ts +12 -2
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +9 -1
- package/frontend-vue/layers/dms-layout/app/composables/page/useMockupStoreInstaller.ts +85 -0
- package/frontend-vue/layers/dms-layout/app/custom-layouts/MockupLayout.vue +0 -2
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +53 -6
- package/frontend-vue/layers/dms-layout/app/plugins/mockup-store-installer.ts +10 -0
- package/frontend-vue/layers/dms-layout/app/plugins/registered-sidebar-widgets.ts +10 -0
- package/frontend-vue/layers/dms-layout/app/plugins/seo.ts +7 -0
- package/frontend-vue/layers/dms-layout/app/theme/actions.ts +11 -7
- package/frontend-vue/layers/dms-onboarding/app/middleware/onboarding.global.ts +3 -3
- package/frontend-vue/layers/dms-onboarding/app/plugins/onboarding-preload.ts +5 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +31 -5
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCanvasChrome.vue +2 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +204 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseData.vue +288 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseDiagram.vue +91 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseRelationEdge.vue +40 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseTableNode.vue +133 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEmptyState.vue +23 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModuleStore.vue +240 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +54 -33
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSectionLabel.vue +52 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +65 -12
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPagesList.vue +21 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinCard.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupReconnecting.vue +17 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +48 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTitle.vue +24 -15
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupToolbar.vue +196 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +200 -179
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWarningsMenu.vue +59 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +152 -57
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +142 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewAdmission.ts +20 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +71 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +44 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewSwapHold.ts +157 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/registeredSidebarWidgets.ts +20 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/storeModuleInstaller.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +14 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +309 -41
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useFixtureBatches.ts +154 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupActivation.ts +182 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupConnectionTables.ts +80 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +212 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +13 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameRender.ts +126 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameSize.ts +10 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +50 -23
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +103 -29
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageZoom.ts +146 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +124 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPins.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +11 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +60 -14
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +8 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +6 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupToolModes.ts +5 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerActivation.ts +59 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerExport.ts +46 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +44 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +13 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupWarningFocus.ts +145 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +39 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePersistedCaptures.ts +151 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +41 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +37 -3
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCreateModal.vue +130 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +20 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreview.ts +137 -78
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +1 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +165 -103
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +321 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +22 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +112 -175
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupActivation.ts +120 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupAnnotations.ts +146 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +118 -9
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupDiagram.ts +330 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +80 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +123 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +11 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModuleNavigation.ts +215 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModules.ts +240 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +21 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverviewSections.ts +66 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPageTree.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPins.ts +6 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRealData.ts +23 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRows.ts +83 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +173 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSettings.ts +218 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +17 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +20 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStatePatch.ts +180 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +17 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +148 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +23 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTitles.ts +33 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupVersions.ts +2 -7
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixtureAnswers.ts +156 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixturesOnly.ts +37 -19
- package/frontend-vue/layers/dms-ui/app/build/utils/previewOptionRules.ts +129 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +108 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +5 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/previewRows.ts +400 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/settingsGroups.ts +73 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +68 -12
- package/frontend-vue/layers/dms-ui/app/build/utils/urlVariables.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +61 -12
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +4 -1
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupModuleStore.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/registeredSidebarWidgets.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/storeModuleInstaller.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useFixtureBatches.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupActivation.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupOverview.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupRoutePage.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupSession.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePersistedCaptures.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/json.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupActivation.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupAnnotations.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupDiagram.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupModuleNavigation.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOverviewSections.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupRows.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSettings.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupStatePatch.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTitles.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/previewFixtureAnswers.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/previewRows.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/settingsGroups.ts +1 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +85 -7
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +85 -7
- package/frontend-vue/package.json +2 -2
- package/frontend-vue/scripts/test-dms-components.mjs +1 -1
- package/package.json +6 -5
- package/dist/mockup/row-filters.d.ts +0 -8
- package/dist/mockup/row-filters.js +0 -107
- package/dist/mockup/row-filters.js.map +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +0 -47
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +0 -67
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.mockupExportPdfTool = void 0;
|
|
37
|
+
const mockup_1 = require("../../mockup");
|
|
38
|
+
const plan_1 = require("../mockup-export/plan");
|
|
39
|
+
const tool_1 = require("../tool");
|
|
40
|
+
const mockup_support_1 = require("./mockup-support");
|
|
41
|
+
const page_verify_1 = require("./page-verify");
|
|
42
|
+
exports.mockupExportPdfTool = (0, tool_1.defineTool)({
|
|
43
|
+
name: "mockup_export_pdf",
|
|
44
|
+
title: "Export a mockup to PDF",
|
|
45
|
+
description: "Prints a mockup to one PDF at mockups/<name>/export.pdf: a cover with its title, the date, its counts and a contents list grouped by module; one sheet per screen, drawn in the dashboard's /mockup viewer by page_verify's headless Chromium (the real sidebar and header, on the spec's fixtures), with its menu path, its mode and its block list, and its open annotations when annotations is true; then the data model, an ERD and an entity table, when includeSchema is true and the spec has entities. Screens print grouped like the contents: the app's own pages, then each module in the spec's order, each page followed by its sub-pages. pages keeps only those page ids. A mockup whose installed module provides tenancy (saas) prints in SaaS mode, as saasTenant names a tenant of fixtures.tenants, the first one when it is absent; saasTenant needs such a module to be installed in the project, and without one every page prints single-tenant and saasTenant is refused. A module's group is titled as the module registers its title, or by its id when that title is an i18n key. Refused while another export of the mockup runs, from this tool or the viewer's Export PDF button. Answers { path, screens, undrawn, schema }: undrawn lists the pages the viewer did not draw in time, printed without a picture. The first call installs Chromium, as page_verify's does. Development only.",
|
|
46
|
+
effect: "builder",
|
|
47
|
+
input: plan_1.exportOptionsSchema.extend({ name: mockup_support_1.mockupArgument }),
|
|
48
|
+
run: ({ name: raw, ...options }) => (0, mockup_support_1.withMockup)(raw, async (name) => {
|
|
49
|
+
const { startExport } = await Promise.resolve().then(() => __importStar(require("../mockup-export")));
|
|
50
|
+
const started = await startExport({
|
|
51
|
+
name,
|
|
52
|
+
mockupsDir: (0, mockup_1.defaultMockupsDir)(),
|
|
53
|
+
origin: (0, page_verify_1.dashboardOrigin)(),
|
|
54
|
+
options,
|
|
55
|
+
});
|
|
56
|
+
if (!started.ok)
|
|
57
|
+
return (0, tool_1.textResult)(started.message, true);
|
|
58
|
+
const outcome = await started.finished;
|
|
59
|
+
if (outcome.status === "failed")
|
|
60
|
+
return (0, tool_1.textResult)(outcome.message, true);
|
|
61
|
+
return (0, tool_1.jsonResult)({
|
|
62
|
+
path: `mockups/${name}/${mockup_1.EXPORT_PDF_FILE}`,
|
|
63
|
+
screens: outcome.screens,
|
|
64
|
+
undrawn: outcome.undrawn,
|
|
65
|
+
schema: outcome.schema,
|
|
66
|
+
});
|
|
67
|
+
}),
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=mockup-export-pdf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockup-export-pdf.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-export-pdf.ts"],"names":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ACL,CAAC,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type InstallStep, readInstalledModules } from "../../mockup";
|
|
2
|
+
import { runPackageManager } from "../../utils/package-manager/index";
|
|
3
|
+
export type ModuleInstaller = (step: InstallStep) => Promise<void>;
|
|
4
|
+
export declare function createModuleInstaller(runner?: typeof runPackageManager): ModuleInstaller;
|
|
5
|
+
export declare const runModuleInstall: ModuleInstaller;
|
|
6
|
+
type InstalledReader = typeof readInstalledModules;
|
|
7
|
+
export declare function createInstallModulesTool(install: ModuleInstaller, readInstalled?: InstalledReader): import("../tool").McpTool;
|
|
8
|
+
export declare const mockupInstallModulesTool: import("../tool").McpTool;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mockupInstallModulesTool = exports.runModuleInstall = void 0;
|
|
4
|
+
exports.createModuleInstaller = createModuleInstaller;
|
|
5
|
+
exports.createInstallModulesTool = createInstallModulesTool;
|
|
6
|
+
const runtime_1 = require("@antelopejs/interface-core/runtime");
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const mockup_1 = require("../../mockup");
|
|
9
|
+
const store_1 = require("../../store");
|
|
10
|
+
const index_1 = require("../../utils/package-manager/index");
|
|
11
|
+
const tool_1 = require("../tool");
|
|
12
|
+
const mockup_support_1 = require("./mockup-support");
|
|
13
|
+
const INSTALL_TIMEOUT_MS = 5 * 60_000;
|
|
14
|
+
const MAX_BUFFER_BYTES = 8 * 1024 * 1024;
|
|
15
|
+
const MAX_DETAIL_LENGTH = 1000;
|
|
16
|
+
const ExecFailureSchema = zod_1.z.object({
|
|
17
|
+
stdout: zod_1.z.string().optional(),
|
|
18
|
+
stderr: zod_1.z.string().optional(),
|
|
19
|
+
message: zod_1.z.string().optional(),
|
|
20
|
+
});
|
|
21
|
+
function createModuleInstaller(runner = index_1.runPackageManager) {
|
|
22
|
+
return async (step) => {
|
|
23
|
+
const { projectPath } = await (0, runtime_1.GetRuntimeInfo)();
|
|
24
|
+
await runner("pnpm", step.pnpmArguments, {
|
|
25
|
+
cwd: projectPath,
|
|
26
|
+
timeout: INSTALL_TIMEOUT_MS,
|
|
27
|
+
maxBuffer: MAX_BUFFER_BYTES,
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
exports.runModuleInstall = createModuleInstaller();
|
|
32
|
+
function failureDetail(error) {
|
|
33
|
+
const failure = ExecFailureSchema.safeParse(error).data ?? {};
|
|
34
|
+
const text = (failure.stderr || failure.stdout || failure.message || "")
|
|
35
|
+
.trim()
|
|
36
|
+
.slice(-MAX_DETAIL_LENGTH);
|
|
37
|
+
return text || "the command failed without output";
|
|
38
|
+
}
|
|
39
|
+
async function installOne(module, installed, install) {
|
|
40
|
+
const base = { id: module.id, package: module.package };
|
|
41
|
+
const reason = (0, mockup_1.uninstalledModuleReason)(module, installed);
|
|
42
|
+
if (reason === undefined)
|
|
43
|
+
return { ...base, outcome: "running" };
|
|
44
|
+
if (installed.declarations.has(module.id)) {
|
|
45
|
+
return { ...base, outcome: "skipped", detail: reason };
|
|
46
|
+
}
|
|
47
|
+
const step = (0, mockup_1.installStep)(module.package, installed.projectKind);
|
|
48
|
+
try {
|
|
49
|
+
await install(step);
|
|
50
|
+
return {
|
|
51
|
+
...base,
|
|
52
|
+
outcome: "installed",
|
|
53
|
+
command: step.command,
|
|
54
|
+
afterward: step.afterward,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
return {
|
|
59
|
+
...base,
|
|
60
|
+
outcome: "failed",
|
|
61
|
+
command: step.command,
|
|
62
|
+
detail: failureDetail(error),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function answerOf(outcomes) {
|
|
67
|
+
const failed = outcomes.some((entry) => entry.outcome === "failed");
|
|
68
|
+
const added = outcomes.some((entry) => entry.outcome === "installed");
|
|
69
|
+
return (0, tool_1.jsonResult)({
|
|
70
|
+
ok: !failed,
|
|
71
|
+
modules: outcomes,
|
|
72
|
+
...(added && {
|
|
73
|
+
next: "Do what each installed module's `afterward` says so it loads, then read the mockup again: its pages, settings and tenancy come from what it registers.",
|
|
74
|
+
}),
|
|
75
|
+
}, failed);
|
|
76
|
+
}
|
|
77
|
+
async function installMissing(name, install, readInstalled) {
|
|
78
|
+
const text = await (0, mockup_1.readSpecText)((0, mockup_1.defaultMockupsDir)(), name);
|
|
79
|
+
if (text === undefined) {
|
|
80
|
+
return (0, tool_1.textResult)(`Mockup "${name}" has no spec.json. Call mockup_write_spec to create it.`, true);
|
|
81
|
+
}
|
|
82
|
+
const catalog = await (0, store_1.loadStoreCatalog)();
|
|
83
|
+
const modules = (0, mockup_1.listedCatalogModules)((0, mockup_1.parseSpecObject)(text)?.modules, catalog);
|
|
84
|
+
const [first] = modules;
|
|
85
|
+
if (first === undefined)
|
|
86
|
+
return answerOf([]);
|
|
87
|
+
const done = await (0, store_1.runStoreWork)("install", first.id, async (focus) => {
|
|
88
|
+
const installed = await readInstalled(catalog);
|
|
89
|
+
const outcomes = [];
|
|
90
|
+
for (const module of modules) {
|
|
91
|
+
focus(module.id);
|
|
92
|
+
outcomes.push(await installOne(module, installed, install));
|
|
93
|
+
}
|
|
94
|
+
return outcomes;
|
|
95
|
+
});
|
|
96
|
+
if (!done.ran) {
|
|
97
|
+
return (0, tool_1.textResult)(`The module store is busy (${done.busy.kind} on ${done.busy.moduleId}), so nothing was installed. Call again once it has finished.`, true);
|
|
98
|
+
}
|
|
99
|
+
return answerOf(done.value);
|
|
100
|
+
}
|
|
101
|
+
function createInstallModulesTool(install, readInstalled = mockup_1.readInstalledModules) {
|
|
102
|
+
return (0, tool_1.defineTool)({
|
|
103
|
+
name: "mockup_install_modules",
|
|
104
|
+
title: "Install the modules of a mockup",
|
|
105
|
+
description: "Installs the catalog modules mockup `mockup` lists that the project does not have, each with the project's own install command: `ajs project modules add <package>` in a project with an antelope.config.ts, `pnpm add <package>` in an embedded one, whose host passes its modules to `createRuntime`. It changes the project's configuration and node_modules, so ASK THE USER first: name the modules (`mockup_module_catalog` lists them with their packages, and `mockup_write_spec` warns of each missing one with its command) and pass `approved: true` only after the user said yes. With `approved` false or absent nothing runs and the call is refused. The installs run as the module store's one operation, so the Modules page and the mockup's module store refuse another while they run, and the call is refused, nothing installed, while the store is busy. A module the project already runs is left alone, and one antelope.config.ts declares but the backend does not run is reported, not reinstalled: its warning says how to enable or start it. Answers `{ ok, modules: [{ id, package, outcome, command?, afterward?, detail? }], next? }`, `outcome` being `installed` (with `afterward`, what is left to do before it loads: restart the backend, and in an embedded project first add the package to the `modules` map of `createRuntime`), `failed` (with the command's last output as `detail`), `skipped` or `running`. An installed module registers its pages, settings and tenancy when it loads, which is what the mockup then reads. Needs Full access.",
|
|
106
|
+
effect: "project",
|
|
107
|
+
input: zod_1.z.object({
|
|
108
|
+
mockup: mockup_support_1.mockupArgument,
|
|
109
|
+
approved: zod_1.z
|
|
110
|
+
.boolean()
|
|
111
|
+
.describe("true only when the user said yes to installing the spec's missing modules. false, or anything else, refuses the call."),
|
|
112
|
+
}),
|
|
113
|
+
run: ({ mockup, approved }) => {
|
|
114
|
+
if (approved !== true) {
|
|
115
|
+
return Promise.resolve((0, tool_1.textResult)("mockup_install_modules was not run: the user has not approved installing modules. Show the user which modules the mockup lists that the project lacks, ask them, and call again with approved: true only after they said yes.", true));
|
|
116
|
+
}
|
|
117
|
+
return (0, mockup_support_1.withMockup)(mockup, (name) => installMissing(name, install, readInstalled));
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
exports.mockupInstallModulesTool = createInstallModulesTool(exports.runModuleInstall);
|
|
122
|
+
//# sourceMappingURL=mockup-install-modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockup-install-modules.js","sourceRoot":"","sources":["../../../src/mcp/tools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use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mockupModuleCatalogTool = void 0;
|
|
4
|
+
exports.createModuleCatalogTool = createModuleCatalogTool;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const mockup_1 = require("../../mockup");
|
|
7
|
+
const store_1 = require("../../store");
|
|
8
|
+
const json_1 = require("../json");
|
|
9
|
+
const tool_1 = require("../tool");
|
|
10
|
+
function describeModule(entry, provided) {
|
|
11
|
+
const base = {
|
|
12
|
+
id: entry.id,
|
|
13
|
+
package: entry.package,
|
|
14
|
+
category: entry.category,
|
|
15
|
+
...(entry.description !== undefined && { description: entry.description }),
|
|
16
|
+
};
|
|
17
|
+
const installed = provided.get(entry.id);
|
|
18
|
+
if (installed === undefined)
|
|
19
|
+
return { ...base, installed: false };
|
|
20
|
+
return {
|
|
21
|
+
...base,
|
|
22
|
+
installed: true,
|
|
23
|
+
provides: {
|
|
24
|
+
...(installed.tenancy && { tenancy: installed.tenancy }),
|
|
25
|
+
...(installed.root && { root: installed.root }),
|
|
26
|
+
pages: installed.pages,
|
|
27
|
+
extensions: installed.extensions,
|
|
28
|
+
settings: installed.settings,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function createModuleCatalogTool(load) {
|
|
33
|
+
return (0, tool_1.defineTool)({
|
|
34
|
+
name: "mockup_module_catalog",
|
|
35
|
+
title: "List the DMS modules",
|
|
36
|
+
description: "Lists every official DMS module of the module store: the remote catalog of `store.catalogUrl` when it is configured and readable, the catalog @antelopejs/dms ships otherwise. Answers `{ modules }`, each `{ id, package, category, description?, installed, provides? }`. `id` is what a mockup's `modules` lists, `package` the npm package that installs it, `description` the package's npm description (absent when npm cannot say). `installed` says whether the project runs the module. An installed module's `provides` is read from the DMS runtime registries the real menu is built from: its `root` (`RegisterModule`), its `pages`, its page `extensions`, the `settings` categories and pages it adds under /settings, and `tenancy` when it owns a tenant access gate. A module that is not installed provides nothing yet: list it in a mockup and call `mockup_install_modules` once the user approves. Call it before proposing a module in a mockup interview, rather than relying on a list you remember. Changes nothing.",
|
|
37
|
+
effect: "read",
|
|
38
|
+
input: zod_1.z.object({}),
|
|
39
|
+
run: async () => {
|
|
40
|
+
const ids = (await (0, store_1.loadStoreCatalog)()).map((entry) => entry.id);
|
|
41
|
+
const context = await load(ids);
|
|
42
|
+
const provided = new Map((0, mockup_1.moduleStates)(ids, context).flatMap((module) => module.kind === "catalog" && module.installed
|
|
43
|
+
? [[module.id, module]]
|
|
44
|
+
: []));
|
|
45
|
+
return (0, tool_1.jsonResult)(json_1.JsonValueSchema.parse({
|
|
46
|
+
modules: context.catalog.map((entry) => describeModule(entry, provided)),
|
|
47
|
+
}));
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exports.mockupModuleCatalogTool = createModuleCatalogTool((modules) => (0, mockup_1.loadModuleContext)(modules, { describe: mockup_1.describeWithinBudget }));
|
|
52
|
+
//# sourceMappingURL=mockup-module-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockup-module-catalog.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-module-catalog.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AACxB,yCAMsB;AACtB,uCAAuE;AACvE,kCAA0C;AAC1C,kCAAiD;AAqBjD,SAAS,cAAc,CACrB,KAAmD,EACnD,QAAoD;IAEpD,MAAM,IAAI,GAAG;QACX,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;KAC3E,CAAC;IACF,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzC,IAAI,SAA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OAAO,IAAA,iBAAU,EACf,sBAAe,CAAC,KAAK,CAAC;gBACpB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACrC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAChC;aACF,CAAC,CACH,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAGY,QAAA,uBAAuB,GAAG,uBAAuB,CAAC,CAAC,OAAO,EAAE,EAAE,CACzE,IAAA,0BAAiB,EAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,6BAAoB,EAAE,CAAC,CAC/D,CAAC"}
|
|
@@ -30,7 +30,7 @@ function parseSpecObject(text) {
|
|
|
30
30
|
exports.mockupPatchSpecTool = (0, tool_1.defineTool)({
|
|
31
31
|
name: "mockup_patch_spec",
|
|
32
32
|
title: "Patch a mockup spec",
|
|
33
|
-
description: "Edits the existing mockups/<mockup>/spec.json with an RFC 6902 JSON Patch: an array of { op, path, value?, from? } where op is add, remove, replace, move, copy or test, and path is a JSON pointer into the spec, such as /pages/0/tree/2/options/title. The patch applies in order to the current spec, then the result is checked and written exactly as mockup_write_spec does, which includes refusing a change to a block another viewer of the /mockup page is editing. Answers { ok, errors: [{ path, message }], warnings: [{ path, message }] }; on ok: false nothing is written. A warning never refuses the patch: it names a fixture a block cannot draw, or a key a block does not know, as mockup_write_spec says, so fix
|
|
33
|
+
description: "Edits the existing mockups/<mockup>/spec.json with an RFC 6902 JSON Patch: an array of { op, path, value?, from? } where op is add, remove, replace, move, copy or test, and path is a JSON pointer into the spec, such as /pages/0/tree/2/options/title. The patch applies in order to the current spec, then the result is checked and written exactly as mockup_write_spec does, which includes refusing a change to a block another viewer of the /mockup page is editing. Answers { ok, done, errors: [{ path, message }], warnings: [{ path, message, fix }] }; on ok: false nothing is written. A warning never refuses the patch, but the mockup is done only at done: true, once no warning remains: it names a page with no description, a fixture a block cannot draw, or a key a block does not know, as mockup_write_spec says, so apply its fix and patch again until done: true. A block reading a fixture key the page lacks is an error, so add the fixture in the same patch as the block. A failed test op or a pointer that leads nowhere is an error naming the operation's index, and nothing is written. Needs a spec: for a new mockup call mockup_write_spec first. To see what a path holds before you patch it, read it with mockup_read_spec rather than probing with test operations. A block's id anchors the reviewer notes on it, so keep it when you move or rewrite the block, and give a copy a new id or none: a copy keeps the ids of the block and its children, and one that keeps a stamped id (b- and 8 letters or digits) is refused. On ok: true the dev-only /mockup page re-renders by itself.",
|
|
34
34
|
effect: "builder",
|
|
35
35
|
alwaysLoad: true,
|
|
36
36
|
input: zod_1.z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockup-patch-spec.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-patch-spec.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA6E;AAC7E,kCAA4D;AAC5D,kCAAiD;AACjD,6CAAgE;AAChE,qDAO0B;AAE1B,MAAM,OAAO,GAAG,OAAC;KACd,MAAM,EAAE;KACR,QAAQ,CACP,sEAAsE,CACvE,CAAC;AAOJ,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChE,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IAC1E,KAAK,EAAE,OAAC;SACL,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,+CAA+C,CAAC;CAC7D,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,OAAO,uBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,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IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,IAAA,iBAAU,EACf,WAAW,IAAI,iGAAiG,EAChH,IAAI,CACL,CAAC;YACJ,CAAC;YACD,MAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAC3C,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;gBAChB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;gBACnC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC/B,OAAO,IAAA,iBAAU,EACf,aAAa,KAAK,KAAK,SAAS,CAAC,EAAE,IAAI,SAAS,CAAC,IAAI,aAAa,OAAO,wBAAwB,EACjG,IAAI,CACL,CAAC;YACJ,CAAC;YACD,MAAM,OAAO,GAAG,IAAA,+BAAc,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;YAChE,IAAI,OAAO;gBAAE,OAAO,OAAO,CAAC;YAC5B,OAAO,IAAA,4BAAW,EAChB,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE;gBAC5B,EAAE,EAAE,IAAI;gBACR,OAAO;gBACP,KAAK,EAAE,UAAU;aAClB,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.mockupReadSpecTool = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const mockup_1 = require("../../mockup");
|
|
6
|
+
const store_1 = require("../../store");
|
|
6
7
|
const tool_1 = require("../tool");
|
|
7
8
|
const json_patch_1 = require("./json-patch");
|
|
8
9
|
const mockup_support_1 = require("./mockup-support");
|
|
@@ -14,12 +15,11 @@ function listMembers(members) {
|
|
|
14
15
|
const more = members.length - MAX_LISTED_MEMBERS;
|
|
15
16
|
return `its members are: ${shown}${more > 0 ? `, and ${more} more` : ""}`;
|
|
16
17
|
}
|
|
17
|
-
function packageNote(spec) {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
18
|
+
function packageNote(spec, catalog) {
|
|
19
|
+
const named = (0, mockup_1.listedCatalogModules)(spec.modules, catalog).map((entry) => `${entry.id} is ${entry.package}`);
|
|
20
|
+
if (named.length === 0)
|
|
20
21
|
return "";
|
|
21
|
-
|
|
22
|
-
return `Building the mockup installs its modules with \`ajs project modules add <package>\`: ${named.join(", ")}.`;
|
|
22
|
+
return `The project runs its modules once each is added with the project's install command, which \`mockup_install_modules\` runs after the user approves: ${named.join(", ")}.`;
|
|
23
23
|
}
|
|
24
24
|
exports.mockupReadSpecTool = (0, tool_1.defineTool)({
|
|
25
25
|
name: "mockup_read_spec",
|
|
@@ -46,7 +46,9 @@ exports.mockupReadSpecTool = (0, tool_1.defineTool)({
|
|
|
46
46
|
const read = (0, json_patch_1.readPointer)(spec, path ?? "");
|
|
47
47
|
if (read.ok) {
|
|
48
48
|
const answer = (0, tool_1.jsonResult)(read.value);
|
|
49
|
-
const note = !path || path === "/modules"
|
|
49
|
+
const note = !path || path === "/modules"
|
|
50
|
+
? packageNote(spec, await (0, store_1.loadStoreCatalog)())
|
|
51
|
+
: "";
|
|
50
52
|
if (note)
|
|
51
53
|
answer.content.push({ type: "text", text: note });
|
|
52
54
|
return answer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockup-read-spec.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-read-spec.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAMsB;AACtB,kCAA6D;AAC7D,6CAA2C;AAC3C,qDAA8D;AAE9D,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,SAAS,WAAW,CAAC,OAAiB;IACpC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,mBAAmB,CAAC;IACrD,MAAM,KAAK,GAAG,OAA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,UAAU;gBAC1B,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,IAAA,wBAAgB,GAAE,CAAC;gBAC7C,CAAC,CAAC,EAAE,CAAC;YACT,IAAI,IAAI;gBAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5D,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,IAAA,iBAAU,EACf,gBAAgB,IAAI,MAAM,IAAI,CAAC,OAAO,qDAAqD,IAAI,CAAC,MAAM,MAAM,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EACxI,IAAI,CACL,CAAC;IACJ,CAAC,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -41,11 +41,24 @@ function withMockup(raw, run) {
|
|
|
41
41
|
return Promise.resolve((0, tool_1.textResult)(`"${raw}" is not a valid mockup name: use a lowercase slug (a-z, 0-9 and "-", at most 64 characters, "schema" and "example" are reserved).`, true));
|
|
42
42
|
}
|
|
43
43
|
function reportWrite(written) {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
const warnings = written.warnings.map(({ path, message, fix }) => ({
|
|
45
|
+
path,
|
|
46
|
+
message,
|
|
47
|
+
fix,
|
|
48
|
+
}));
|
|
49
|
+
if (written.ok) {
|
|
50
|
+
return (0, tool_1.jsonResult)({
|
|
51
|
+
ok: true,
|
|
52
|
+
done: warnings.length === 0,
|
|
53
|
+
errors: [],
|
|
54
|
+
warnings,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const errors = written.errors.map(({ path, message }) => ({
|
|
58
|
+
path,
|
|
59
|
+
message,
|
|
60
|
+
}));
|
|
61
|
+
return (0, tool_1.jsonResult)({ ok: false, done: false, errors, warnings });
|
|
49
62
|
}
|
|
50
63
|
function refusedByLocks(name, current, next) {
|
|
51
64
|
const errors = current ? (0, mockup_1.mockupLockRefusals)(name, current, next) : [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockup-support.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-support.ts"],"names":[],"mappings":";;;;;;;AACA,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"mockup-support.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-support.ts"],"names":[],"mappings":";;;;;;;AACA,6BAAwB;AACxB,yCAUsB;AACtB,kCAA4D;AAC5D,kCAAqE;AAGxD,QAAA,cAAc,GAAG,OAAC;KAC5B,MAAM,EAAE;KACR,QAAQ,CACP,uFAAuF,CACxF,CAAC;AAOS,QAAA,YAAY,GAAG,OAAC;KAC1B,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC;KAC/B,QAAQ,CACP,gHAAgH,CACjH;KACA,SAAS,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IAC3B,MAAM,IAAI,GAAG,uBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC;QACf,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;QAC3B,OAAO,EAAE,4BAA4B;KACtC,CAAC,CAAC;IACH,OAAO,OAAC,CAAC,KAAK,CAAC;AACjB,CAAC,CAAC,CAAC;AAGQ,QAAA,eAAe,GAAG,OAAC;KAC7B,MAAM,EAAE;KACR,GAAG,CAAC,2BAAkB,CAAC;KACvB,QAAQ,EAAE;KACV,QAAQ,CACP,wJAAwJ,CACzJ,CAAC;AAQS,QAAA,kBAAkB,GAAG,+BAAsB;KACrD,QAAQ,EAAE;KACV,KAAK,CAAC,SAAS,CAAC;KAChB,QAAQ,CACP,sMAAsM,CACvM,CAAC;AAMJ,oBACE,GAAW,EACX,GAAiD;IAEjD,MAAM,I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,QAAQ,EAAE,EAAE,EAAE,CAAC;QAClD,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAOD,kBACE,UAAkB,EAClB,IAAgB,EAChB,IAAe,EACf,OAAiD;IAEjD,OAAO,IAAA,qBAAY,EAAC,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QACpD,MAAM,OAAO,GAAG,MAAM,IAAA,uBAAc,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACvD,OAAO,CACL,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;YACzC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CACzD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -8,7 +8,7 @@ const mockup_support_1 = require("./mockup-support");
|
|
|
8
8
|
exports.mockupWriteSpecTool = (0, tool_1.defineTool)({
|
|
9
9
|
name: "mockup_write_spec",
|
|
10
10
|
title: "Write a mockup spec",
|
|
11
|
-
description: "Writes mockups/<mockup>/spec.json, the whole spec, creating the mockup when it is new. The spec is checked first exactly as the /mockup page checks it: nothing is written unless it has zero errors, and a refused write leaves the existing file untouched. A write that changes or removes a block another viewer of the /mockup page is editing is refused too, with an error at the block's path naming who holds it: leave that block as it is, or retry once it is free. Answers { ok, errors: [{ path, message }], warnings: [{ path, message }] } where path is a JSON pointer into your spec ('' is the whole file). On ok: false, fix each error at its pointer and call again. A warning never refuses the write: it names a fixture a block reads through fetchUrl 'fixture:<key>' but cannot draw, such as a ChartCard's series written as [{ label, value }] where it reads [{ name, data: [{ x, y }] }] or [{ x, y }], or a list block's fixture written as a bare array where it reads { items }, or a KpiCard or ChartCard fixture with delta or previousValue on a page holding no PeriodSelector, whose built page shows no change figure. Each such warning's path is the fixture and its message says which block reads it, what that block reads and what it got: fix the fixture, else the block draws no data. A warning also names a key a block does not know, at the key's path, such as to on a KpiCard: the block draws nothing from it, so remove the key or move what it says to an option the block has. On ok: true the dev-only /mockup page re-renders by itself; then call mockup_annotations to read what the reviewer left. To change a few nodes of an existing spec, prefer mockup_patch_spec, and read the parts you need with mockup_read_spec. A block's id anchors the reviewer notes on it, so keep it when you move or rewrite the block.",
|
|
11
|
+
description: "Writes mockups/<mockup>/spec.json, the whole spec, creating the mockup when it is new. The spec is checked first exactly as the /mockup page checks it: nothing is written unless it has zero errors, and a refused write leaves the existing file untouched. A write that changes or removes a block another viewer of the /mockup page is editing is refused too, with an error at the block's path naming who holds it: leave that block as it is, or retry once it is free. Answers { ok, done, errors: [{ path, message }], warnings: [{ path, message, fix }] } where path is a JSON pointer into your spec ('' is the whole file). On ok: false, fix each error at its pointer and call again. A warning never refuses the write, but the mockup is done only at done: true, once no warning remains: apply each warning's fix, with mockup_patch_spec, until the answer is done: true. Every page needs a description, one sentence saying what it is for, except a page that extends another one. A warning names a fixture a block reads through fetchUrl 'fixture:<key>' but cannot draw, such as a ChartCard's series written as [{ label, value }] where it reads [{ name, data: [{ x, y }] }] or [{ x, y }], or a list block's fixture written as a bare array where it reads { items }, or a KpiCard or ChartCard fixture with delta or previousValue on a page holding no PeriodSelector, whose built page shows no change figure. Each such warning's path is the fixture and its message says which block reads it, what that block reads and what it got: fix the fixture, else the block draws no data. A warning also names a key a block does not know, at the key's path, such as to on a KpiCard: the block draws nothing from it, so remove the key or move what it says to an option the block has. On ok: true the dev-only /mockup page re-renders by itself; then call mockup_annotations to read what the reviewer left. To change a few nodes of an existing spec, prefer mockup_patch_spec, and read the parts you need with mockup_read_spec. A block's id anchors the reviewer notes on it, so keep it when you move or rewrite the block.",
|
|
12
12
|
effect: "builder",
|
|
13
13
|
input: zod_1.z.object({
|
|
14
14
|
mockup: mockup_support_1.mockupArgument,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockup-write-spec.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-write-spec.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAAiD;AACjD,kCAAqC;AACrC,qDAO0B;AAGb,QAAA,mBAAmB,GAAG,IAAA,iBAAU,EAAC;IAC5C,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"mockup-write-spec.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup-write-spec.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAAiD;AACjD,kCAAqC;AACrC,qDAO0B;AAGb,QAAA,mBAAmB,GAAG,IAAA,iBAAU,EAAC;IAC5C,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,8iEAA8iE;IAChjE,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,+BAAc;QACtB,IAAI,EAAE,6BAAY;QAClB,OAAO,EAAE,gCAAe;QACxB,UAAU,EAAE,mCAAkB;KAC/B,CAAC;IACF,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CACjE,IAAA,2BAAU,EAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,IAAA,yBAAQ,EACN,IAAA,0BAAiB,GAAE,EACnB,IAAI,EACJ,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,EACtD,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAC/B,CACF;CACJ,CAAC,CAAC"}
|
package/dist/mcp/tools/mockup.js
CHANGED
|
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MOCKUP_TOOLS = void 0;
|
|
4
4
|
const mockup_annotations_1 = require("./mockup-annotations");
|
|
5
5
|
const mockup_apply_to_page_1 = require("./mockup-apply-to-page");
|
|
6
|
+
const mockup_export_pdf_1 = require("./mockup-export-pdf");
|
|
6
7
|
const mockup_from_page_1 = require("./mockup-from-page");
|
|
8
|
+
const mockup_install_modules_1 = require("./mockup-install-modules");
|
|
9
|
+
const mockup_module_catalog_1 = require("./mockup-module-catalog");
|
|
7
10
|
const mockup_patch_spec_1 = require("./mockup-patch-spec");
|
|
8
11
|
const mockup_read_spec_1 = require("./mockup-read-spec");
|
|
9
12
|
const mockup_resolve_annotation_1 = require("./mockup-resolve-annotation");
|
|
@@ -12,9 +15,12 @@ exports.MOCKUP_TOOLS = [
|
|
|
12
15
|
mockup_annotations_1.mockupAnnotationsTool,
|
|
13
16
|
mockup_resolve_annotation_1.mockupResolveAnnotationTool,
|
|
14
17
|
mockup_read_spec_1.mockupReadSpecTool,
|
|
18
|
+
mockup_module_catalog_1.mockupModuleCatalogTool,
|
|
19
|
+
mockup_install_modules_1.mockupInstallModulesTool,
|
|
15
20
|
mockup_write_spec_1.mockupWriteSpecTool,
|
|
16
21
|
mockup_patch_spec_1.mockupPatchSpecTool,
|
|
17
22
|
mockup_from_page_1.mockupFromPageTool,
|
|
18
23
|
mockup_apply_to_page_1.mockupApplyToPageTool,
|
|
24
|
+
mockup_export_pdf_1.mockupExportPdfTool,
|
|
19
25
|
];
|
|
20
26
|
//# sourceMappingURL=mockup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockup.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup.ts"],"names":[],"mappings":";;;AACA,6DAA6D;AAC7D,iEAA+D;AAC/D,yDAAwD;AACxD,2DAA0D;AAC1D,yDAAwD;AACxD,2EAA0E;AAC1E,2DAA0D;
|
|
1
|
+
{"version":3,"file":"mockup.js","sourceRoot":"","sources":["../../../src/mcp/tools/mockup.ts"],"names":[],"mappings":";;;AACA,6DAA6D;AAC7D,iEAA+D;AAC/D,2DAA0D;AAC1D,yDAAwD;AACxD,qEAAoE;AACpE,mEAAkE;AAClE,2DAA0D;AAC1D,yDAAwD;AACxD,2EAA0E;AAC1E,2DAA0D;AAY7C,QAAA,YAAY,GAAuB;IAC9C,0CAAqB;IACrB,uDAA2B;IAC3B,qCAAkB;IAClB,+CAAuB;IACvB,iDAAwB;IACxB,uCAAmB;IACnB,uCAAmB;IACnB,qCAAkB;IAClB,4CAAqB;IACrB,uCAAmB;CACpB,CAAC"}
|
|
@@ -34,12 +34,16 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.PAGE_VERIFY_TOOLS = void 0;
|
|
37
|
+
exports.dashboardOrigin = dashboardOrigin;
|
|
37
38
|
const zod_1 = require("zod");
|
|
38
39
|
const config_1 = require("../../config");
|
|
39
40
|
const redact_report_1 = require("../page-verify/redact-report");
|
|
40
41
|
const report_1 = require("../page-verify/report");
|
|
41
42
|
const tool_1 = require("../tool");
|
|
42
43
|
const MAX_PAGES = 10;
|
|
44
|
+
function dashboardOrigin() {
|
|
45
|
+
return ((0, config_1.getClientBaseUrl)() ?? config_1.DEFAULT_CLIENT_BASE_URL).replace(/\/+$/, "");
|
|
46
|
+
}
|
|
43
47
|
const MAX_VIEWPORTS = 4;
|
|
44
48
|
const MIN_SIDE_PX = 240;
|
|
45
49
|
const MAX_SIDE_PX = 3_840;
|
|
@@ -84,7 +88,7 @@ const PageVerifyInput = zod_1.z.object({
|
|
|
84
88
|
const verifyPageTool = (0, tool_1.defineTool)({
|
|
85
89
|
name: "page_verify",
|
|
86
90
|
title: "Verify pages in a browser",
|
|
87
|
-
description: "Opens each page in a headless Chromium signed in as a role and answers a JSON report: `ok`, then per page `failures` (one line per failed check: read these first), the render at each viewport, read from the page's DOM (every block present and visible, sideways scrolling, overlapping blocks), the data state of each table, chart and KPI (`ok`, `empty`, `error`, `loading`, `needs_backend`), console errors (by their error class only) and failed requests (`other origin` for another origin, and their path only when a block of the run reads it), interactions (links answer, tabs select, sort and search respond, forms open and validate on an empty submit; each control named by its kind and an ordinal, `tab #2`, never by the text the page shows) and, for every role of the workspace, whether the page opens as the role's grants say. With `mockup`, each mockup block is paired with a page block. No screenshot is taken, of the page or of the mockup, since either can show the values of rows. Writes are held back unless `submit` is true. The first call installs Chromium (about 330 MB, once, in Playwright's browser cache). Development only.",
|
|
91
|
+
description: "Opens each page in a headless Chromium signed in as a role and answers a JSON report: `ok`, then per page `failures` (one line per failed check: read these first), the render at each viewport, read from the page's DOM (every block present and visible, sideways scrolling, overlapping blocks), the data state of each table, chart and KPI (`ok`, `empty`, `error`, `loading`, `needs_backend`), console errors (by their error class only) and failed requests (`other origin` for another origin, and their path only when a block of the run reads it), interactions (links answer, tabs select, sort and search respond, forms open and validate on an empty submit; each control named by its kind and an ordinal, `tab #2`, never by the text the page shows) and, for every role of the workspace, whether the page opens as the role's grants say. With `mockup`, each mockup block is paired with a page block, and the report's top-level `failures` names each catalog module the mockup lists that the backend does not run, with the command that adds it. No screenshot is taken, of the page or of the mockup, since either can show the values of rows. Writes are held back unless `submit` is true. The first call installs Chromium (about 330 MB, once, in Playwright's browser cache). Development only.",
|
|
88
92
|
effect: "read",
|
|
89
93
|
input: PageVerifyInput,
|
|
90
94
|
async run(args) {
|
|
@@ -101,7 +105,7 @@ const verifyPageTool = (0, tool_1.defineTool)({
|
|
|
101
105
|
},
|
|
102
106
|
}),
|
|
103
107
|
submit: args.submit ?? false,
|
|
104
|
-
origin: (
|
|
108
|
+
origin: dashboardOrigin(),
|
|
105
109
|
});
|
|
106
110
|
return (0, tool_1.textResult)(JSON.stringify((0, redact_report_1.redactVerifyReport)(report)), !report.ok);
|
|
107
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-verify.js","sourceRoot":"","sources":["../../../src/mcp/tools/page-verify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page-ver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IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACnD,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,wBAAe,CAAC;gBAC3D,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI;oBAC/B,MAAM,EAAE;wBACN,IAAI,EAAE,IAAI,CAAC,MAAM;wBACjB,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;qBAChE;iBACF,CAAC;gBACF,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;gBAC5B,MAAM,EAAE,eAAe,EAAE;aAC1B,CAAC,CAAC;YACH,OAAO,IAAA,iBAAU,EAAC,IAAI,CAAC,SAAS,CAAC,IAAA,kCAAkB,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC5E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAA,iBAAU,EACf,8BAA8B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACtF,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,CAAC,cAAc,CAAC,CAAC"}
|
package/dist/mcp/tools/pages.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PAGE_TOOLS = void 0;
|
|
4
4
|
exports.normalizeRoute = normalizeRoute;
|
|
5
|
+
exports.routeSuffix = routeSuffix;
|
|
5
6
|
exports.servesRoute = servesRoute;
|
|
6
7
|
const zod_1 = require("zod");
|
|
7
8
|
const config_1 = require("../../config");
|
|
@@ -15,6 +16,10 @@ function normalizeRoute(path) {
|
|
|
15
16
|
const pathOnly = path.split(/[?#]/, 1)[0] ?? path;
|
|
16
17
|
return `/${pathOnly.replace(/^\/+|\/+$/g, "")}`;
|
|
17
18
|
}
|
|
19
|
+
function routeSuffix(path) {
|
|
20
|
+
const start = path.search(/[?#]/);
|
|
21
|
+
return start === -1 ? "" : path.slice(start);
|
|
22
|
+
}
|
|
18
23
|
function servesRoute(slug, path) {
|
|
19
24
|
const slugSegments = normalizeRoute(slug).split("/");
|
|
20
25
|
const pathSegments = path.split("/");
|
|
@@ -57,16 +62,17 @@ const navigateToPage = (0, tool_1.defineTool)({
|
|
|
57
62
|
}));
|
|
58
63
|
}
|
|
59
64
|
const origin = ((0, config_1.getClientBaseUrl)() ?? config_1.DEFAULT_CLIENT_BASE_URL).replace(/\/+$/, "");
|
|
60
|
-
const
|
|
65
|
+
const target = `${route}${routeSuffix(path)}`;
|
|
66
|
+
const url = `${origin}${target}`;
|
|
61
67
|
const tabs = (0, realtime_1.sendToLeaderTabs)({
|
|
62
68
|
topic: "dms:navigate",
|
|
63
69
|
type: "navigate",
|
|
64
|
-
payload: { path:
|
|
70
|
+
payload: { path: target },
|
|
65
71
|
ts: Date.now(),
|
|
66
72
|
});
|
|
67
73
|
return (0, tool_1.textResult)(JSON.stringify({
|
|
68
74
|
ok: true,
|
|
69
|
-
data: { path:
|
|
75
|
+
data: { path: target, url, tabs },
|
|
70
76
|
message: tabs > 0
|
|
71
77
|
? `Moved the dashboard tab of ${tabs} browser(s) to ${url}.`
|
|
72
78
|
: `No dashboard tab is open: open ${url}.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/mcp/tools/pages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/mcp/tools/pages.ts"],"names":[],"mappings":";;;;;;AAAA,6BAAwB;AACxB,yCAAyE;AACzE,uCAA0C;AAC1C,6CAAkD;AAClD,kCAAiD;AAEj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,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;gBAC1D,OAAO,EAAE,GAAG,KAAK,0DAA0D,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,2DAA2D;aAC7J,CAAC,CACH,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,IAAA,yBAAgB,GAAE,IAAI,gCAAuB,CAAC,CAAC,OAAO,CACpE,MAAM,EACN,EAAE,CACH,CAAC;QACF,MAAM,MAAM,GAAG,GAAG,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,IAAA,2BAAgB,EAAC;YAC5B,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;SACf,CAAC,CAAC;QACH,OAAO,IAAA,iBAAU,EACf,IAAI,CAAC,SAAS,CAAC;YACb,EAAE,EAAE,IAAI;YACR,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;YACjC,OAAO,EACL,IAAI,GAAG,CAAC;gBACN,CAAC,CAAC,8BAA8B,IAAI,kBAAkB,GAAG,GAAG;gBAC5D,CAAC,CAAC,kCAAkC,GAAG,GAAG;SAC/C,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ exports.deleteAnnotation = deleteAnnotation;
|
|
|
11
11
|
const node_crypto_1 = require("node:crypto");
|
|
12
12
|
const zod_1 = require("zod");
|
|
13
13
|
const anchor_1 = require("./anchor");
|
|
14
|
-
const
|
|
14
|
+
const parse_spec_1 = require("./parse-spec");
|
|
15
15
|
const annotations_file_1 = require("./annotations-file");
|
|
16
16
|
const files_1 = require("./files");
|
|
17
17
|
const history_1 = require("./history");
|
|
@@ -53,7 +53,7 @@ async function readStrictSpec(held) {
|
|
|
53
53
|
const text = await (0, source_1.readSpecText)(held.mockupsDir, held.name);
|
|
54
54
|
if (text === undefined)
|
|
55
55
|
return { kind: "missing" };
|
|
56
|
-
const read = (0,
|
|
56
|
+
const read = (0, parse_spec_1.parseSpec)(text);
|
|
57
57
|
return read.ok
|
|
58
58
|
? { kind: "read", spec: read.spec, text }
|
|
59
59
|
: { kind: "invalid", errors: read.issues };
|