@antelopejs/dms 0.21.3 → 0.21.4-next.1000.g005d1ab
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/E2E.md +101 -10
- package/README.md +3 -3
- package/data/mockup-spec.schema.json +181 -0
- package/dist/config/internal/state.d.ts +4 -1
- package/dist/config/internal/state.js +5 -0
- package/dist/config/internal/state.js.map +1 -1
- package/dist/db/setup-token.d.ts +1 -1
- package/dist/db/setup-token.js +2 -2
- package/dist/db/setup-token.js.map +1 -1
- package/dist/{bin/control → e2e}/backend.d.mts +4 -4
- package/dist/{bin/control → e2e}/base.d.mts +5 -5
- package/dist/{bin/control → e2e}/browser.d.mts +2 -28
- package/dist/e2e/fixtures.d.mts +45 -0
- package/dist/{bin/control → e2e}/frontend-workspace.d.mts +9 -1
- package/dist/e2e/global-setup.d.mts +27 -0
- package/dist/{bin/control → e2e}/identity.d.mts +3 -4
- package/dist/e2e/index.d.mts +57 -0
- package/dist/{bin/control → e2e}/journey-judge.d.mts +8 -8
- package/dist/{bin/control → e2e}/journey-load.d.mts +0 -6
- package/dist/e2e/journey-run.d.mts +61 -0
- package/dist/{bin/control → e2e}/journey.d.mts +37 -38
- package/dist/e2e/journeys-config.d.mts +56 -0
- package/dist/{bin/control → e2e}/json.d.mts +7 -14
- package/dist/{bin/control → e2e}/launch.d.mts +3 -3
- package/dist/{bin/control → e2e}/module-root.d.mts +3 -3
- package/dist/{bin/control → e2e}/mongo.d.mts +3 -3
- package/dist/{bin/control → e2e}/renderer.d.mts +1 -1
- package/dist/{bin/control → e2e}/run-state.d.mts +8 -7
- package/dist/e2e/run.d.mts +53 -0
- package/dist/{bin/control → e2e}/stack.d.mts +0 -1
- package/dist/e2e/start.d.mts +50 -0
- package/dist/{bin/control/e2e-suite.d.mts → e2e/suite.d.mts} +13 -16
- package/dist/e2e/test-journey.d.mts +30 -0
- package/dist/{bin/control → e2e}/timing.d.mts +0 -29
- package/dist/e2e/types.d.mts +58 -0
- package/dist/implementations/dms-auth/database-deadline.d.ts +7 -0
- package/dist/implementations/dms-auth/database-deadline.js +45 -0
- package/dist/implementations/dms-auth/database-deadline.js.map +1 -0
- package/dist/implementations/dms-auth/index.js +14 -6
- package/dist/implementations/dms-auth/index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/analysis.js +1 -0
- package/dist/implementations/dms-builder/engine/analysis.js.map +1 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js +1 -0
- package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/compose-page.js +2 -5
- package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -1
- package/dist/implementations/dms-builder/engine/index.d.ts +3 -0
- package/dist/implementations/dms-builder/engine/index.js +5 -1
- package/dist/implementations/dms-builder/engine/index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/indexed-project.d.ts +3 -0
- package/dist/implementations/dms-builder/engine/indexed-project.js +18 -3
- package/dist/implementations/dms-builder/engine/indexed-project.js.map +1 -1
- package/dist/implementations/dms-builder/engine/interface-capabilities.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/interface-capabilities.js +14 -5
- package/dist/implementations/dms-builder/engine/interface-capabilities.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources.js +2 -3
- package/dist/implementations/dms-builder/engine/map-resources.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-choices.js +9 -1
- package/dist/implementations/dms-builder/engine/mapped-choices.js.map +1 -1
- package/dist/implementations/dms-builder/engine/modules.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/modules.js +3 -2
- package/dist/implementations/dms-builder/engine/modules.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.js +1 -2
- package/dist/implementations/dms-builder/engine/ops-blocks.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops-categories.js +2 -4
- package/dist/implementations/dms-builder/engine/ops-categories.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops.js +3 -4
- package/dist/implementations/dms-builder/engine/ops.js.map +1 -1
- package/dist/implementations/dms-builder/engine/page-access.js +3 -1
- package/dist/implementations/dms-builder/engine/page-access.js.map +1 -1
- package/dist/implementations/dms-builder/engine/page-category-move.js +3 -3
- package/dist/implementations/dms-builder/engine/page-category-move.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-chain.d.ts +3 -1
- package/dist/implementations/dms-builder/engine/query-chain.js +10 -4
- package/dist/implementations/dms-builder/engine/query-chain.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-emit.d.ts +17 -2
- package/dist/implementations/dms-builder/engine/query-emit.js +72 -15
- package/dist/implementations/dms-builder/engine/query-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-ops-emit.js +6 -0
- package/dist/implementations/dms-builder/engine/query-ops-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-ops.js +29 -1
- package/dist/implementations/dms-builder/engine/query-ops.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-plan-execute.d.ts +1 -1
- package/dist/implementations/dms-builder/engine/query-plan-execute.js +11 -4
- package/dist/implementations/dms-builder/engine/query-plan-execute.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-plan.d.ts +14 -1
- package/dist/implementations/dms-builder/engine/query-plan.js +68 -28
- package/dist/implementations/dms-builder/engine/query-plan.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-preview.js +25 -15
- package/dist/implementations/dms-builder/engine/query-preview.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-route-response.js +3 -4
- package/dist/implementations/dms-builder/engine/query-route-response.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-structure.js +66 -15
- package/dist/implementations/dms-builder/engine/query-structure.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-template-emit.js +2 -0
- package/dist/implementations/dms-builder/engine/query-template-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-template-ratio.d.ts +2 -0
- package/dist/implementations/dms-builder/engine/query-template-ratio.js +140 -0
- package/dist/implementations/dms-builder/engine/query-template-ratio.js.map +1 -0
- package/dist/implementations/dms-builder/engine/query-template.d.ts +8 -1
- package/dist/implementations/dms-builder/engine/query-template.js +2 -3
- package/dist/implementations/dms-builder/engine/query-template.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-where.d.ts +2 -1
- package/dist/implementations/dms-builder/engine/query-where.js +4 -2
- package/dist/implementations/dms-builder/engine/query-where.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resolution-inputs.d.ts +8 -0
- package/dist/implementations/dms-builder/engine/resolution-inputs.js +85 -0
- package/dist/implementations/dms-builder/engine/resolution-inputs.js.map +1 -0
- package/dist/implementations/dms-builder/engine/resource-index.js +1 -1
- package/dist/implementations/dms-builder/engine/resource-index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-ops.js +2 -4
- package/dist/implementations/dms-builder/engine/resource-ops.js.map +1 -1
- package/dist/implementations/dms-builder/engine/save-check.d.ts +3 -0
- package/dist/implementations/dms-builder/engine/save-check.js +104 -0
- package/dist/implementations/dms-builder/engine/save-check.js.map +1 -0
- package/dist/implementations/dms-builder/engine/theme-scaffold.js +1 -2
- package/dist/implementations/dms-builder/engine/theme-scaffold.js.map +1 -1
- package/dist/implementations/dms-builder/engine/writable.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/writable.js +46 -42
- package/dist/implementations/dms-builder/engine/writable.js.map +1 -1
- package/dist/implementations/dms-html-render/index.js +1 -0
- package/dist/implementations/dms-html-render/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/analysis-summary.d.ts +3 -0
- package/dist/mcp/analysis-summary.js +23 -1
- package/dist/mcp/analysis-summary.js.map +1 -1
- package/dist/mcp/page-verify/mockup.js +2 -2
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/relation-groups.d.ts +7 -0
- package/dist/mcp/relation-groups.js +88 -0
- package/dist/mcp/relation-groups.js.map +1 -0
- package/dist/mcp/tools/builder-analysis.js +1 -1
- package/dist/mcp/tools/builder-analysis.js.map +1 -1
- package/dist/mcp/tools/builder-queries.js +3 -3
- package/dist/mcp/tools/builder-queries.js.map +1 -1
- package/dist/mcp/tools/builder-resources.js +1 -1
- package/dist/mcp/tools/builder-resources.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +1 -0
- package/dist/mcp/tools/index.js +3 -3
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/mockup-from-page.d.ts +2 -0
- package/dist/mcp/tools/mockup-from-page.js +28 -24
- package/dist/mcp/tools/mockup-from-page.js.map +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js +4 -1
- package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-read-spec.js +14 -2
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-support.d.ts +2 -0
- package/dist/mcp/tools/mockup-support.js +13 -2
- 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/mockup/anchor.d.ts +1 -0
- package/dist/mockup/anchor.js +7 -0
- package/dist/mockup/anchor.js.map +1 -1
- package/dist/mockup/compile.d.ts +2 -1
- package/dist/mockup/compile.js +3 -0
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/from-page-routes.d.ts +4 -2
- package/dist/mockup/from-page-routes.js +3 -2
- package/dist/mockup/from-page-routes.js.map +1 -1
- package/dist/mockup/history-routes.d.ts +3 -1
- package/dist/mockup/history-routes.js +25 -11
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/index.d.ts +5 -0
- package/dist/mockup/index.js +11 -4
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema.js +8 -0
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/live-page.d.ts +2 -1
- package/dist/mockup/live-page.js +19 -10
- package/dist/mockup/live-page.js.map +1 -1
- package/dist/mockup/manage-routes.d.ts +1 -0
- package/dist/mockup/model.d.ts +8 -0
- package/dist/mockup/model.js +6 -0
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/modules.d.ts +11 -0
- package/dist/mockup/modules.js +38 -0
- package/dist/mockup/modules.js.map +1 -0
- package/dist/mockup/owner-controller.d.ts +2 -0
- package/dist/mockup/owner-controller.js +8 -0
- package/dist/mockup/owner-controller.js.map +1 -1
- package/dist/mockup/presence-board.d.ts +45 -0
- package/dist/mockup/presence-board.js +181 -0
- package/dist/mockup/presence-board.js.map +1 -0
- package/dist/mockup/presence-routes.d.ts +23 -0
- package/dist/mockup/presence-routes.js +169 -0
- package/dist/mockup/presence-routes.js.map +1 -0
- package/dist/mockup/presence.d.ts +83 -0
- package/dist/mockup/presence.js +168 -0
- package/dist/mockup/presence.js.map +1 -0
- package/dist/mockup/routes.d.ts +6 -0
- package/dist/mockup/routes.js +20 -4
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/source-routes.d.ts +6 -1
- package/dist/mockup/source-routes.js +36 -13
- package/dist/mockup/source-routes.js.map +1 -1
- package/dist/mockup/source.d.ts +1 -0
- package/dist/mockup/source.js +1 -0
- package/dist/mockup/source.js.map +1 -1
- package/dist/mockup/store.d.ts +4 -0
- package/dist/mockup/store.js +3 -0
- package/dist/mockup/store.js.map +1 -1
- package/dist/pages/settings/users/role-preview.d.ts +1 -1
- package/dist/pages/settings/users/role-preview.js +2 -2
- package/dist/pages/settings/users/role-preview.js.map +1 -1
- package/dist/pages/settings/users/roles.js +1 -1
- package/dist/pages/settings/users/roles.js.map +1 -1
- package/dist/routes/auth/refresh.d.ts +1 -1
- package/dist/routes/auth/refresh.js +3 -25
- package/dist/routes/auth/refresh.js.map +1 -1
- package/dist/store/catalog.d.ts +1 -0
- package/dist/store/catalog.js +1 -0
- package/dist/store/catalog.js.map +1 -1
- package/dist/utils/auth-constants.d.ts +0 -1
- package/dist/utils/auth-constants.js +1 -2
- package/dist/utils/auth-constants.js.map +1 -1
- package/dist/utils/user-activity.js +1 -7
- package/dist/utils/user-activity.js.map +1 -1
- package/{bin/control → e2e}/backend.mjs +5 -5
- package/{bin/control → e2e}/base.mjs +11 -11
- package/{bin/control → e2e}/browser.mjs +1 -113
- package/{bin/control → e2e}/build-cache.mjs +3 -3
- package/{bin/control → e2e}/build-key.mjs +27 -3
- package/{bin/control → e2e}/dashboard.mjs +33 -6
- package/e2e/fixtures.mjs +154 -0
- package/{bin/control → e2e}/frontend-workspace.mjs +39 -5
- package/e2e/global-setup.mjs +74 -0
- package/{bin/control → e2e}/identity.mjs +4 -5
- package/e2e/index.mjs +110 -0
- package/{bin/control → e2e}/journey-judge.mjs +4 -4
- package/{bin/control → e2e}/journey-load.mjs +0 -13
- package/e2e/journey-run.mjs +190 -0
- package/{bin/control → e2e}/journey.mjs +57 -216
- package/e2e/journeys-config.mjs +126 -0
- package/{bin/control → e2e}/json.mjs +11 -32
- package/{bin/control → e2e}/launch.mjs +6 -6
- package/{bin/control → e2e}/mail.mjs +2 -3
- package/{bin/control → e2e}/module-root.mjs +3 -3
- package/{bin/control → e2e}/mongo.mjs +8 -8
- package/{bin/control → e2e}/prepared-workspace.mjs +1 -1
- package/{bin/control → e2e}/renderer.mjs +6 -4
- package/{bin/control → e2e}/run-state.mjs +15 -14
- package/e2e/run.mjs +96 -0
- package/e2e/service.mjs +11 -0
- package/e2e/services.mjs +64 -0
- package/{bin/control → e2e}/session.mjs +1 -3
- package/{bin/control → e2e}/stack.mjs +4 -5
- package/e2e/start.mjs +79 -0
- package/{bin/control/e2e-suite.mjs → e2e/suite.mjs} +25 -33
- package/e2e/test-journey.mjs +55 -0
- package/{bin/control → e2e}/timing.mjs +0 -112
- package/{bin/control/verify → e2e}/types.mjs +3 -7
- package/frontend-vue/eslint-globals.generated.mjs +20 -20
- package/frontend-vue/layers/dms-auth/server/session.ts +9 -2
- package/frontend-vue/layers/dms-core/app/build/utils/previewFrame.ts +12 -0
- package/frontend-vue/layers/dms-core/app/composables/page/useSiteLayout.ts +20 -14
- package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +2 -1
- package/frontend-vue/layers/dms-core/app/entries/utils/previewFrame.ts +1 -0
- package/frontend-vue/layers/dms-core/app/types/live.ts +1 -1
- package/frontend-vue/layers/dms-core/app/types/page.ts +1 -0
- package/frontend-vue/layers/dms-core/app/types/row-action.ts +2 -0
- package/frontend-vue/layers/dms-core/app/utils/http-status.ts +1 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +5 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +5 -0
- package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/assets/css/foundation.css +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +30 -29
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +4 -8
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +4 -7
- package/frontend-vue/layers/dms-layout/app/error.vue +7 -0
- package/frontend-vue/layers/dms-layout/app/plugins/dms-dev-reload.client.ts +2 -1
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +1 -1
- package/frontend-vue/layers/dms-layout/public/images/antelope-logo/dark.svg +1 -1
- package/frontend-vue/layers/dms-layout/public/images/antelope-logo/light.svg +1 -1
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-en-GB.json +2 -2
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-fr-FR.json +2 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +29 -8
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupLayers.vue +10 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +46 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +26 -5
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +47 -3
- package/frontend-vue/layers/dms-ui/app/build/components/button/DisabledReason.vue +27 -0
- package/frontend-vue/layers/dms-ui/app/build/components/period/PeriodRangeCalendar.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/build/components/stat/StatCell.vue +2 -11
- package/frontend-vue/layers/dms-ui/app/build/components/table/TableActions.vue +17 -17
- package/frontend-vue/layers/dms-ui/app/build/components/table/TablePagination.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardAvatar.vue +2 -10
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/IdentityCell.vue +15 -11
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetContainers.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetHandlers.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetRequests.ts +14 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetUrl.ts +25 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/useActionTargets.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +5 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDocument.ts +12 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +34 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupLocks.ts +268 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +39 -23
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +10 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +21 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +92 -29
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +11 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexAxes.ts +11 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexCategoryFormat.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexTheme.ts +8 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultIdentityCells.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/metricCells.ts +45 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationFilter.ts +17 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/page/pageUrlValues.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodDisplay.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionDescriptors.ts +47 -31
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionRendering.ts +19 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionSizing.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnTypes.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionTypes.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewActions.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewLive.ts +10 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewRowActions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +4 -2
- package/frontend-vue/layers/dms-ui/app/build/types/tree.ts +8 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/fetchStatus.ts +12 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/initials.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +24 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEdit.ts +18 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOutline.ts +7 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +15 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPresence.ts +117 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRebase.ts +139 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +16 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +23 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +13 -1
- package/frontend-vue/layers/dms-ui/app/components/form/FormBlock.vue +5 -3
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCalendar.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputRelation.vue +14 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputRepeater.vue +23 -10
- package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +1 -6
- package/frontend-vue/layers/dms-ui/app/components/period/PeriodSelector.vue +9 -8
- package/frontend-vue/layers/dms-ui/app/components/period/usePeriodSelectorInteraction.ts +62 -16
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/button/DisabledReason.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/stat/StatCell.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupLocks.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/initials.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupPresence.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupRebase.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/types/row-action.ts +2 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +4 -1
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +4 -1
- package/frontend-vue/package.json +1 -1
- package/package.json +20 -18
- package/skills/dms/REFERENCE.md +1 -1
- package/skills/dms-module/SKILL.md +1 -1
- package/bin/control/backend-mode.test.mjs +0 -112
- package/bin/control/backend-records.test.mjs +0 -330
- package/bin/control/backend.test.mjs +0 -346
- package/bin/control/base.test.mjs +0 -88
- package/bin/control/browser-client.mjs +0 -65
- package/bin/control/browser-wire.mjs +0 -41
- package/bin/control/browser-wire.test.mjs +0 -96
- package/bin/control/build-cache.test.mjs +0 -270
- package/bin/control/build-key-refusals.test.mjs +0 -138
- package/bin/control/build-key.test.mjs +0 -417
- package/bin/control/build-layout.test.mjs +0 -357
- package/bin/control/commands-stack.mjs +0 -297
- package/bin/control/commands-verify.mjs +0 -157
- package/bin/control/consumer-install.test.mjs +0 -86
- package/bin/control/dashboard.test.mjs +0 -102
- package/bin/control/doctor.mjs +0 -346
- package/bin/control/e2e-run.mjs +0 -61
- package/bin/control/e2e-suite.test.mjs +0 -174
- package/bin/control/e2e.mjs +0 -178
- package/bin/control/forwarder.test.mjs +0 -267
- package/bin/control/frontend-check.mjs +0 -55
- package/bin/control/frontend-mode.test.mjs +0 -24
- package/bin/control/frontend-workspace.test.mjs +0 -133
- package/bin/control/helpers/env.mjs +0 -21
- package/bin/control/helpers/ephemeral-range.mjs +0 -18
- package/bin/control/helpers/evidence.mjs +0 -13
- package/bin/control/helpers/fake-run.mjs +0 -368
- package/bin/control/helpers/key-fixture.mjs +0 -85
- package/bin/control/helpers/narrow-range.mjs +0 -35
- package/bin/control/helpers/pids.mjs +0 -37
- package/bin/control/helpers/repo.mjs +0 -13
- package/bin/control/helpers/tree.mjs +0 -40
- package/bin/control/identity.test.mjs +0 -166
- package/bin/control/journey-judge.test.mjs +0 -106
- package/bin/control/journey.test.mjs +0 -392
- package/bin/control/json.test.mjs +0 -130
- package/bin/control/mail.test.mjs +0 -55
- package/bin/control/module-root.test.mjs +0 -69
- package/bin/control/mongo-server.test.mjs +0 -136
- package/bin/control/mongo.test.mjs +0 -298
- package/bin/control/namespaces.test.mjs +0 -263
- package/bin/control/options.mjs +0 -36
- package/bin/control/pid-guard.test.mjs +0 -202
- package/bin/control/pid-reuse.test.mjs +0 -278
- package/bin/control/processes.test.mjs +0 -289
- package/bin/control/renderer.test.mjs +0 -268
- package/bin/control/run-ports.test.mjs +0 -141
- package/bin/control/run-state.test.mjs +0 -171
- package/bin/control/tab.test.mjs +0 -444
- package/bin/control/timing.test.mjs +0 -186
- package/bin/control/verify/decode.mjs +0 -78
- package/bin/control/verify/decode.test.mjs +0 -123
- package/bin/control/verify/doors.mjs +0 -44
- package/bin/control/verify/doors.test.mjs +0 -87
- package/bin/control/verify/formal.mjs +0 -77
- package/bin/control/verify/formal.test.mjs +0 -94
- package/bin/control/verify/map.mjs +0 -236
- package/bin/control/verify/map.test.mjs +0 -212
- package/bin/control/verify/skill.mjs +0 -160
- package/bin/dms-control.mjs +0 -77
- package/dist/bin/control/browser-client.d.mts +0 -26
- package/dist/bin/control/browser-wire.d.mts +0 -4
- package/dist/bin/control/commands-stack.d.mts +0 -40
- package/dist/bin/control/doctor.d.mts +0 -18
- package/dist/bin/control/e2e-run.d.mts +0 -22
- package/dist/bin/control/e2e.d.mts +0 -47
- package/dist/bin/control/frontend-check.d.mts +0 -11
- package/dist/bin/control/options.d.mts +0 -95
- package/dist/bin/control/verify/decode.d.mts +0 -41
- package/dist/bin/control/verify/skill.d.mts +0 -69
- package/dist/bin/control/verify/types.d.mts +0 -106
- package/dist/mcp/tools/preview-blocks.d.ts +0 -1
- package/dist/mcp/tools/preview-blocks.js +0 -249
- package/dist/mcp/tools/preview-blocks.js.map +0 -1
- /package/dist/{bin/control → e2e}/build-cache.d.mts +0 -0
- /package/dist/{bin/control → e2e}/build-inputs.d.mts +0 -0
- /package/dist/{bin/control → e2e}/build-key.d.mts +0 -0
- /package/dist/{bin/control → e2e}/dashboard.d.mts +0 -0
- /package/dist/{bin/control → e2e}/database.d.mts +0 -0
- /package/dist/{bin/control → e2e}/failure.d.mts +0 -0
- /package/dist/{bin/control → e2e}/forwarder.d.mts +0 -0
- /package/dist/{bin/control → e2e}/git.d.mts +0 -0
- /package/dist/{bin/control → e2e}/mail.d.mts +0 -0
- /package/dist/{bin/control → e2e}/processes.d.mts +0 -0
- /package/dist/{bin/control → e2e}/run-copy.d.mts +0 -0
- /package/dist/{bin/control → e2e}/session.d.mts +0 -0
- /package/dist/{bin/control → e2e}/tab.d.mts +0 -0
- /package/{bin/control → e2e}/build-inputs.mjs +0 -0
- /package/{bin/control → e2e}/database.mjs +0 -0
- /package/{bin/control → e2e}/failure.mjs +0 -0
- /package/{bin/control → e2e}/forwarder.mjs +0 -0
- /package/{bin/control → e2e}/git.mjs +0 -0
- /package/{bin/control → e2e}/processes.mjs +0 -0
- /package/{bin/control → e2e}/run-copy.mjs +0 -0
- /package/{bin/control → e2e}/tab.mjs +0 -0
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { existsSync, readdirSync } from "node:fs";
|
|
2
|
-
import { join, matchesGlob, relative } from "node:path";
|
|
3
|
-
import { git } from "../git.mjs";
|
|
4
|
-
import { loadJourneys } from "../journey-load.mjs";
|
|
5
|
-
import { journeysFile, readFeatures } from "./skill.mjs";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {string} file A repository path
|
|
9
|
-
* @param {string[]} globs The globs
|
|
10
|
-
* @returns {boolean} Whether a glob matches the path
|
|
11
|
-
*/
|
|
12
|
-
function matches(file, globs) {
|
|
13
|
-
return globs.some((glob) => matchesGlob(file, glob));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Whether a repository path is user-facing: matched by the config's
|
|
18
|
-
* `userFacing` globs and by none of its `notUserFacing` globs.
|
|
19
|
-
*
|
|
20
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
21
|
-
* @param {string} file A repository path
|
|
22
|
-
* @returns {boolean} True when a feature must cover it
|
|
23
|
-
*/
|
|
24
|
-
export function isUserFacing(skill, file) {
|
|
25
|
-
return (
|
|
26
|
-
matches(file, skill.config.userFacing) &&
|
|
27
|
-
!matches(file, skill.config.notUserFacing ?? [])
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Whether a repository path is shared: matched by the config's `shared`
|
|
33
|
-
* globs and by none of its `notShared` globs. A change to it can alter any
|
|
34
|
-
* feature, so the plan runs them all.
|
|
35
|
-
*
|
|
36
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
37
|
-
* @param {string} file A repository path
|
|
38
|
-
* @returns {boolean} True when the file forces the full set
|
|
39
|
-
*/
|
|
40
|
-
export function isShared(skill, file) {
|
|
41
|
-
return (
|
|
42
|
-
matches(file, skill.config.shared) && !matches(file, skill.config.notShared)
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The features whose `covers:` globs match a file.
|
|
48
|
-
*
|
|
49
|
-
* @param {string} file A repository path
|
|
50
|
-
* @param {{ name: string, covers: string[] }[]} features The features
|
|
51
|
-
* @returns {string[]} Their names
|
|
52
|
-
*/
|
|
53
|
-
export function featuresOf(file, features) {
|
|
54
|
-
return features
|
|
55
|
-
.filter((feature) => matches(file, feature.covers))
|
|
56
|
-
.map((feature) => feature.name);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
61
|
-
* @returns {string[]} The tracked paths
|
|
62
|
-
*/
|
|
63
|
-
function trackedFiles(skill) {
|
|
64
|
-
return git(["ls-files"], skill.repo).split("\n").filter(Boolean);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
69
|
-
* @param {ReturnType<typeof readFeatures>[number]} feature The feature
|
|
70
|
-
* @param {string[]} tracked The tracked paths
|
|
71
|
-
* @returns {Promise<string[]>} One line per problem
|
|
72
|
-
*/
|
|
73
|
-
async function featureProblems(skill, feature, tracked) {
|
|
74
|
-
const problems = [];
|
|
75
|
-
const file = journeysFile(skill, feature.name);
|
|
76
|
-
const journeys = existsSync(file) ? await loadJourneys(file) : null;
|
|
77
|
-
if (!journeys)
|
|
78
|
-
problems.push(`${feature.file}: no ${relative(skill.repo, file)}`);
|
|
79
|
-
for (const journey of journeys ?? []) {
|
|
80
|
-
if (!feature.body.includes(`\`${journey.id}\``)) {
|
|
81
|
-
problems.push(
|
|
82
|
-
`${feature.file}: journey \`${journey.id}\` is not described`,
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (feature.name !== skill.config.smoke && feature.covers.length === 0) {
|
|
87
|
-
problems.push(`${feature.file}: lists no covers globs`);
|
|
88
|
-
}
|
|
89
|
-
for (const glob of feature.covers) {
|
|
90
|
-
if (!tracked.some((path) => matchesGlob(path, glob))) {
|
|
91
|
-
problems.push(`${feature.file}: glob ${glob} matches no tracked file`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
for (const doc of feature.docs) {
|
|
95
|
-
if (!existsSync(join(skill.repo, doc))) {
|
|
96
|
-
problems.push(`${feature.file}: docs path ${doc} does not exist`);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return problems;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
104
|
-
* @param {string[]} tracked The tracked paths
|
|
105
|
-
* @returns {string[]} One line per problem
|
|
106
|
-
*/
|
|
107
|
-
function sharedProblems(skill, tracked) {
|
|
108
|
-
return skill.config.shared
|
|
109
|
-
.filter(
|
|
110
|
-
(glob) =>
|
|
111
|
-
!tracked.some(
|
|
112
|
-
(path) =>
|
|
113
|
-
matchesGlob(path, glob) && !matches(path, skill.config.notShared),
|
|
114
|
-
),
|
|
115
|
-
)
|
|
116
|
-
.map(
|
|
117
|
-
(glob) => `verify.config.ts: shared glob ${glob} matches no tracked file`,
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
123
|
-
* @param {string[]} tracked The tracked paths
|
|
124
|
-
* @returns {string[]} One line per problem
|
|
125
|
-
*/
|
|
126
|
-
function doorProblems(skill, tracked) {
|
|
127
|
-
const problems = [];
|
|
128
|
-
for (const [kind, rule] of Object.entries(skill.config.doors)) {
|
|
129
|
-
if (!rule) continue;
|
|
130
|
-
for (const glob of [...rule.globs, ...rule.funnels]) {
|
|
131
|
-
if (!tracked.some((path) => matchesGlob(path, glob))) {
|
|
132
|
-
problems.push(
|
|
133
|
-
`verify.config.ts: ${kind} door glob ${glob} matches no tracked file`,
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return problems;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Checks the map against the repository: every user-facing file is
|
|
143
|
-
* covered, every feature has journeys, each described in its file,
|
|
144
|
-
* existing docs pages, and every feature, shared and door glob matches a
|
|
145
|
-
* tracked file.
|
|
146
|
-
*
|
|
147
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
148
|
-
* @returns {Promise<string[]>} One line per problem
|
|
149
|
-
*/
|
|
150
|
-
export async function checkMap(skill) {
|
|
151
|
-
const features = readFeatures(skill);
|
|
152
|
-
const tracked = trackedFiles(skill);
|
|
153
|
-
const problems = tracked
|
|
154
|
-
.filter(
|
|
155
|
-
(file) =>
|
|
156
|
-
isUserFacing(skill, file) && featuresOf(file, features).length === 0,
|
|
157
|
-
)
|
|
158
|
-
.map((file) => `unmapped: ${file} matches no feature glob`);
|
|
159
|
-
for (const feature of features)
|
|
160
|
-
problems.push(...(await featureProblems(skill, feature, tracked)));
|
|
161
|
-
if (existsSync(skill.journeysDir)) {
|
|
162
|
-
for (const file of readdirSync(skill.journeysDir).filter((name) =>
|
|
163
|
-
name.endsWith(".mjs"),
|
|
164
|
-
)) {
|
|
165
|
-
const name = file.replace(/\.mjs$/, "");
|
|
166
|
-
if (!features.some((feature) => feature.name === name)) {
|
|
167
|
-
problems.push(
|
|
168
|
-
`${relative(skill.repo, join(skill.journeysDir, file))} has no features/${name}.md`,
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return [
|
|
174
|
-
...problems,
|
|
175
|
-
...sharedProblems(skill, tracked),
|
|
176
|
-
...doorProblems(skill, tracked),
|
|
177
|
-
];
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Maps the diff from the merge base of `baseRef` to HEAD onto features:
|
|
182
|
-
* every touched feature plus the smoke feature runs, a user-facing file
|
|
183
|
-
* outside every glob is an unmapped surface. A changed shared file, or
|
|
184
|
-
* `all`, runs the smoke feature and then every feature; `shared` lists the
|
|
185
|
-
* changed files that forced it.
|
|
186
|
-
*
|
|
187
|
-
* @param {import("./skill.mjs").Skill} skill The skill
|
|
188
|
-
* @param {string} baseRef The base, such as `origin/main`
|
|
189
|
-
* @param {boolean} [all] Run every feature whatever the diff, for a release
|
|
190
|
-
* @returns {import("./types.mjs").Plan} The plan
|
|
191
|
-
*/
|
|
192
|
-
export function planFor(skill, baseRef, all = false) {
|
|
193
|
-
const features = readFeatures(skill);
|
|
194
|
-
const baseSha = git(["merge-base", baseRef, "HEAD"], skill.repo);
|
|
195
|
-
const changed = git(
|
|
196
|
-
["diff", "--name-only", "--no-renames", `${baseSha}...HEAD`],
|
|
197
|
-
skill.repo,
|
|
198
|
-
)
|
|
199
|
-
.split("\n")
|
|
200
|
-
.filter(Boolean);
|
|
201
|
-
const touched = features
|
|
202
|
-
.map((feature) => ({
|
|
203
|
-
feature: feature.name,
|
|
204
|
-
files: changed.filter((file) => matches(file, feature.covers)),
|
|
205
|
-
}))
|
|
206
|
-
.filter((entry) => entry.files.length > 0);
|
|
207
|
-
const unmapped = changed.filter(
|
|
208
|
-
(file) =>
|
|
209
|
-
isUserFacing(skill, file) && featuresOf(file, features).length === 0,
|
|
210
|
-
);
|
|
211
|
-
const touchedNames = new Set(touched.map((entry) => entry.feature));
|
|
212
|
-
const docs = [
|
|
213
|
-
...new Set(
|
|
214
|
-
features
|
|
215
|
-
.filter((feature) => touchedNames.has(feature.name))
|
|
216
|
-
.flatMap((feature) => feature.docs),
|
|
217
|
-
),
|
|
218
|
-
];
|
|
219
|
-
const shared = changed.filter((file) => isShared(skill, file));
|
|
220
|
-
const smoke = skill.config.smoke;
|
|
221
|
-
const names =
|
|
222
|
-
all || shared.length > 0
|
|
223
|
-
? features.map((feature) => feature.name)
|
|
224
|
-
: [...touchedNames];
|
|
225
|
-
return {
|
|
226
|
-
baseRef,
|
|
227
|
-
baseSha,
|
|
228
|
-
headSha: git(["rev-parse", "HEAD"], skill.repo),
|
|
229
|
-
changed,
|
|
230
|
-
touched,
|
|
231
|
-
shared,
|
|
232
|
-
unmapped,
|
|
233
|
-
docs,
|
|
234
|
-
run: [smoke, ...names.filter((name) => name !== smoke)],
|
|
235
|
-
};
|
|
236
|
-
}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import { execFileSync } from "node:child_process";
|
|
3
|
-
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { tmpdir } from "node:os";
|
|
5
|
-
import { dirname, join } from "node:path";
|
|
6
|
-
import test from "node:test";
|
|
7
|
-
import { checkMap, planFor } from "./map.mjs";
|
|
8
|
-
import { loadSkill } from "./skill.mjs";
|
|
9
|
-
|
|
10
|
-
const JOURNEYS = (/** @type {string} */ id) =>
|
|
11
|
-
`export const journeys = [{ id: "${id}", title: "t", entryPoint: "e", async run() {} }];\n`;
|
|
12
|
-
const FEATURE = (/** @type {string} */ id, /** @type {string[]} */ covers) =>
|
|
13
|
-
`---\ncovers:\n${covers.map((glob) => ` - ${glob}`).join("\n")}\n---\n\`${id}\`\n`;
|
|
14
|
-
|
|
15
|
-
const BASE_FILES = {
|
|
16
|
-
"package.json": "{}\n",
|
|
17
|
-
"pnpm-lock.yaml": "lock: 1\n",
|
|
18
|
-
"src/a/x.ts": "export const x = 1;\n",
|
|
19
|
-
"src/b/y.ts": "export const y = 1;\n",
|
|
20
|
-
"fixtures/host/package.json": "{}\n",
|
|
21
|
-
"skill/features/smoke.md": "---\ncovers:\n---\n`smoke`\n",
|
|
22
|
-
"skill/features/a.md": FEATURE("a-journey", ["src/a/**"]),
|
|
23
|
-
"skill/features/b.md": FEATURE("b-journey", ["src/b/**"]),
|
|
24
|
-
"skill/journeys/smoke.mjs": JOURNEYS("smoke"),
|
|
25
|
-
"skill/journeys/a.mjs": JOURNEYS("a-journey"),
|
|
26
|
-
"skill/journeys/b.mjs": JOURNEYS("b-journey"),
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {string} repo
|
|
31
|
-
* @param {...string} args
|
|
32
|
-
* @returns {string}
|
|
33
|
-
*/
|
|
34
|
-
function git(repo, ...args) {
|
|
35
|
-
return execFileSync("git", args, { cwd: repo, encoding: "utf8" }).trim();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @param {string} repo
|
|
40
|
-
* @param {Record<string, string>} files
|
|
41
|
-
* @returns {string} The new HEAD
|
|
42
|
-
*/
|
|
43
|
-
function commit(repo, files) {
|
|
44
|
-
for (const [path, content] of Object.entries(files)) {
|
|
45
|
-
mkdirSync(dirname(join(repo, path)), { recursive: true });
|
|
46
|
-
writeFileSync(join(repo, path), content);
|
|
47
|
-
}
|
|
48
|
-
git(repo, "add", "-A");
|
|
49
|
-
git(
|
|
50
|
-
repo,
|
|
51
|
-
"-c",
|
|
52
|
-
"user.name=t",
|
|
53
|
-
"-c",
|
|
54
|
-
"user.email=t@example.com",
|
|
55
|
-
"-c",
|
|
56
|
-
"commit.gpgsign=false",
|
|
57
|
-
"commit",
|
|
58
|
-
"-q",
|
|
59
|
-
"-m",
|
|
60
|
-
"change",
|
|
61
|
-
);
|
|
62
|
-
return git(repo, "rev-parse", "HEAD");
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* A repository with two features beside the smoke one, committed once, then
|
|
67
|
-
* changed by `changes` in a second commit.
|
|
68
|
-
*
|
|
69
|
-
* @param {import("node:test").TestContext} t
|
|
70
|
-
* @param {Record<string, string>} changes
|
|
71
|
-
* @param {Partial<import("./skill.mjs").SkillConfig>} [config]
|
|
72
|
-
*/
|
|
73
|
-
function fixture(t, changes, config = {}) {
|
|
74
|
-
const repo = mkdtempSync(join(tmpdir(), "dms-control-map-test-"));
|
|
75
|
-
t.after(() => rmSync(repo, { recursive: true, force: true }));
|
|
76
|
-
git(repo, "init", "-q");
|
|
77
|
-
git(repo, "remote", "add", "origin", "https://github.com/o/r.git");
|
|
78
|
-
const base = commit(repo, BASE_FILES);
|
|
79
|
-
const head = commit(repo, changes);
|
|
80
|
-
/** @type {import("./skill.mjs").Skill} */
|
|
81
|
-
const skill = {
|
|
82
|
-
dir: join(repo, "skill"),
|
|
83
|
-
name: "verify-x",
|
|
84
|
-
repo,
|
|
85
|
-
featuresDir: join(repo, "skill", "features"),
|
|
86
|
-
journeysDir: join(repo, "skill", "journeys"),
|
|
87
|
-
config: {
|
|
88
|
-
playground: "p",
|
|
89
|
-
prepare: [],
|
|
90
|
-
userFacing: ["src/**"],
|
|
91
|
-
notUserFacing: [],
|
|
92
|
-
shared: ["**/package.json", "pnpm-lock.yaml"],
|
|
93
|
-
notShared: ["fixtures/**"],
|
|
94
|
-
smoke: "smoke",
|
|
95
|
-
smokeJourney: "",
|
|
96
|
-
doors: {},
|
|
97
|
-
formal: [],
|
|
98
|
-
...config,
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
return { repo, base, head, skill };
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
await test("a changed lockfile runs smoke and then every feature and names the file; a planner that maps only covers globs runs smoke alone", (t) => {
|
|
105
|
-
const { skill, base } = fixture(t, { "pnpm-lock.yaml": "lock: 2\n" });
|
|
106
|
-
const plan = planFor(skill, base);
|
|
107
|
-
assert.deepEqual(plan.run, ["smoke", "a", "b"]);
|
|
108
|
-
assert.deepEqual(plan.shared, ["pnpm-lock.yaml"]);
|
|
109
|
-
assert.deepEqual(plan.touched, []);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
await test("a nested manifest is shared too; a root-only package.json glob leaves it to the covers", (t) => {
|
|
113
|
-
const { skill, base } = fixture(t, { "src/a/package.json": "{ }\n" });
|
|
114
|
-
const plan = planFor(skill, base);
|
|
115
|
-
assert.deepEqual(plan.run, ["smoke", "a", "b"]);
|
|
116
|
-
assert.deepEqual(plan.shared, ["src/a/package.json"]);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
await test("a diff of covered files runs those features beside smoke; escalating on every change would run b too", (t) => {
|
|
120
|
-
const { skill, base } = fixture(t, { "src/a/x.ts": "export const x = 2;\n" });
|
|
121
|
-
const plan = planFor(skill, base);
|
|
122
|
-
assert.deepEqual(plan.run, ["smoke", "a"]);
|
|
123
|
-
assert.deepEqual(plan.shared, []);
|
|
124
|
-
assert.deepEqual(plan.touched, [{ feature: "a", files: ["src/a/x.ts"] }]);
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
await test("a shared file next to a covered one keeps touched and shared apart; dropping touched on escalation loses the diff-to-feature evidence", (t) => {
|
|
128
|
-
const { skill, base } = fixture(t, {
|
|
129
|
-
"src/b/y.ts": "export const y = 2;\n",
|
|
130
|
-
"package.json": '{ "name": "x" }\n',
|
|
131
|
-
});
|
|
132
|
-
const plan = planFor(skill, base);
|
|
133
|
-
assert.deepEqual(plan.run, ["smoke", "a", "b"]);
|
|
134
|
-
assert.deepEqual(plan.shared, ["package.json"]);
|
|
135
|
-
assert.deepEqual(plan.touched, [{ feature: "b", files: ["src/b/y.ts"] }]);
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
await test("a shared file renamed out of its shared path still runs every feature; a diff with rename detection lists only the new path and runs smoke alone", (t) => {
|
|
139
|
-
const { repo, skill, base } = fixture(t, { "README.md": "x\n" });
|
|
140
|
-
git(repo, "mv", "pnpm-lock.yaml", "moved-lock.txt");
|
|
141
|
-
commit(repo, {});
|
|
142
|
-
const plan = planFor(skill, base);
|
|
143
|
-
assert.deepEqual(plan.run, ["smoke", "a", "b"]);
|
|
144
|
-
assert.deepEqual(plan.shared, ["pnpm-lock.yaml"]);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
await test("a fixture manifest under notShared stays on smoke; a planner that ignores notShared escalates on test fixtures", (t) => {
|
|
148
|
-
const { skill, base } = fixture(t, {
|
|
149
|
-
"fixtures/host/package.json": '{ "name": "host" }\n',
|
|
150
|
-
});
|
|
151
|
-
const plan = planFor(skill, base);
|
|
152
|
-
assert.deepEqual(plan.run, ["smoke"]);
|
|
153
|
-
assert.deepEqual(plan.shared, []);
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
await test("a skill without shared globs still plans from covers alone; a planner that treats every package.json as shared breaks the other dms-* repositories", (t) => {
|
|
157
|
-
const { skill, base } = fixture(
|
|
158
|
-
t,
|
|
159
|
-
{ "pnpm-lock.yaml": "lock: 2\n" },
|
|
160
|
-
{ shared: [], notShared: [] },
|
|
161
|
-
);
|
|
162
|
-
assert.deepEqual(planFor(skill, base).run, ["smoke"]);
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
await test("all runs every feature on a diff that touches none and lists no shared file; ignoring the flag runs smoke alone", (t) => {
|
|
166
|
-
const { skill, base } = fixture(t, { "README.md": "x\n" });
|
|
167
|
-
const plan = planFor(skill, base, true);
|
|
168
|
-
assert.deepEqual(plan.run, ["smoke", "a", "b"]);
|
|
169
|
-
assert.deepEqual(plan.shared, []);
|
|
170
|
-
assert.deepEqual(planFor(skill, base).run, ["smoke"]);
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
await test("a config that names a journeys folder has map read the journeys there and name that path; a loader that keeps the skill's journeys/ reports every feature without journeys", async (t) => {
|
|
174
|
-
const { repo } = fixture(t, {
|
|
175
|
-
"skill/verify.config.ts": `export default ${JSON.stringify({
|
|
176
|
-
playground: "p",
|
|
177
|
-
prepare: [],
|
|
178
|
-
userFacing: ["src/**"],
|
|
179
|
-
smoke: "smoke",
|
|
180
|
-
smokeJourney: "",
|
|
181
|
-
journeys: "e2e/journeys",
|
|
182
|
-
doors: {},
|
|
183
|
-
formal: [],
|
|
184
|
-
})};\n`,
|
|
185
|
-
"e2e/journeys/smoke.mjs": JOURNEYS("smoke"),
|
|
186
|
-
"e2e/journeys/a.mjs": JOURNEYS("a-journey"),
|
|
187
|
-
"e2e/journeys/orphan.mjs": JOURNEYS("orphan"),
|
|
188
|
-
});
|
|
189
|
-
git(repo, "rm", "-q", "skill/journeys/b.mjs");
|
|
190
|
-
const skill = await loadSkill(join(repo, "skill"), repo);
|
|
191
|
-
assert.deepEqual(await checkMap(skill), [
|
|
192
|
-
"skill/features/b.md: no e2e/journeys/b.mjs",
|
|
193
|
-
"e2e/journeys/orphan.mjs has no features/orphan.md",
|
|
194
|
-
]);
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
await test("map fails a shared glob that matches no tracked file or only notShared ones; a checkMap blind to shared globs lets a renamed lockfile glob rot", async (t) => {
|
|
198
|
-
const { skill } = fixture(
|
|
199
|
-
t,
|
|
200
|
-
{ "README.md": "x\n" },
|
|
201
|
-
{
|
|
202
|
-
shared: ["**/package.json", "gone/**", "fixtures/**"],
|
|
203
|
-
},
|
|
204
|
-
);
|
|
205
|
-
const problems = (await checkMap(skill)).filter((line) =>
|
|
206
|
-
line.includes("shared glob"),
|
|
207
|
-
);
|
|
208
|
-
assert.deepEqual(problems, [
|
|
209
|
-
"verify.config.ts: shared glob gone/** matches no tracked file",
|
|
210
|
-
"verify.config.ts: shared glob fixtures/** matches no tracked file",
|
|
211
|
-
]);
|
|
212
|
-
});
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
3
|
-
import { basename, join, relative, resolve } from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
5
|
-
import { checkoutOf } from "../git.mjs";
|
|
6
|
-
import { isRecord } from "../json.mjs";
|
|
7
|
-
import { stopwatch } from "../timing.mjs";
|
|
8
|
-
import { decodeSkillConfig } from "./decode.mjs";
|
|
9
|
-
|
|
10
|
-
const CONFIG_FILE = "verify.config.ts";
|
|
11
|
-
const OUTPUT_LIMIT = 64 * 1024 * 1024;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @typedef {{ dir: string, name: string, repo: string, config: SkillConfig, featuresDir: string, journeysDir: string }} Skill
|
|
15
|
-
* @typedef {{ playground: string, renderer?: string, prepare: string[][], userFacing: string[], notUserFacing: string[], shared: string[], notShared: string[], smoke: string, smokeJourney: string, journeys?: string, doors: Record<string, { globs: string[], funnels: string[], why: string } | null>, formal: import("./types.mjs").FormalCheck[] }} SkillConfig
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @param {string} text A feature file
|
|
20
|
-
* @returns {Map<string, string[]>} The lists of its frontmatter
|
|
21
|
-
*/
|
|
22
|
-
function frontmatterLists(text) {
|
|
23
|
-
/** @type {Map<string, string[]>} */
|
|
24
|
-
const lists = new Map();
|
|
25
|
-
const match = /^---\n([\s\S]*?)\n---\n/.exec(text);
|
|
26
|
-
/** @type {string[] | undefined} */
|
|
27
|
-
let current;
|
|
28
|
-
for (const line of (match?.[1] ?? "").split("\n")) {
|
|
29
|
-
const key = /^(\w+):\s*$/.exec(line);
|
|
30
|
-
const item = /^\s+-\s+(.+)$/.exec(line);
|
|
31
|
-
if (key) {
|
|
32
|
-
current = [];
|
|
33
|
-
lists.set(key[1], current);
|
|
34
|
-
} else if (item && current) {
|
|
35
|
-
current.push(item[1].replace(/^"|"$/g, ""));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return lists;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @param {string} cwd Where the command runs
|
|
43
|
-
* @returns {string} The one verification skill folder of the checkout
|
|
44
|
-
*/
|
|
45
|
-
function discover(cwd) {
|
|
46
|
-
const { root } = checkoutOf(cwd);
|
|
47
|
-
const skills = join(root ?? cwd, ".agents", "skills");
|
|
48
|
-
const found = existsSync(skills)
|
|
49
|
-
? readdirSync(skills)
|
|
50
|
-
.filter((name) => name.startsWith("verify-"))
|
|
51
|
-
.map((name) => join(skills, name))
|
|
52
|
-
.filter((dir) => existsSync(join(dir, CONFIG_FILE)))
|
|
53
|
-
: [];
|
|
54
|
-
if (found.length !== 1) {
|
|
55
|
-
throw new Error(
|
|
56
|
-
`Expected one .agents/skills/verify-*/${CONFIG_FILE} under ${root ?? cwd}, found ${found.length}; pass --skill <dir>.`,
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
return found[0];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Loads a verification skill: its `verify.config.ts` (imported with Node's
|
|
64
|
-
* TypeScript type stripping), its feature files and where its journeys
|
|
65
|
-
* live. Without `--skill`, the one
|
|
66
|
-
* `.agents/skills/verify-*` folder of the checkout holding `cwd`.
|
|
67
|
-
*
|
|
68
|
-
* @param {string | undefined} option The `--skill` folder
|
|
69
|
-
* @param {string} cwd Where the command runs
|
|
70
|
-
* @returns {Promise<import("./skill.mjs").Skill>} The skill
|
|
71
|
-
*/
|
|
72
|
-
export async function loadSkill(option, cwd) {
|
|
73
|
-
const dir = resolve(option ?? discover(cwd));
|
|
74
|
-
const { root } = checkoutOf(dir);
|
|
75
|
-
if (!root) throw new Error(`${dir} is not inside a git checkout`);
|
|
76
|
-
const file = join(dir, CONFIG_FILE);
|
|
77
|
-
/** @type {unknown} */
|
|
78
|
-
const loaded = await import(pathToFileURL(file).href);
|
|
79
|
-
const config = decodeSkillConfig(
|
|
80
|
-
isRecord(loaded) ? loaded.default : undefined,
|
|
81
|
-
file,
|
|
82
|
-
);
|
|
83
|
-
return {
|
|
84
|
-
dir,
|
|
85
|
-
name: basename(dir),
|
|
86
|
-
repo: root,
|
|
87
|
-
config,
|
|
88
|
-
featuresDir: join(dir, "features"),
|
|
89
|
-
journeysDir: config.journeys
|
|
90
|
-
? resolve(root, config.journeys)
|
|
91
|
-
: join(dir, "journeys"),
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Every feature file under `features/`, README.md excluded, with its
|
|
97
|
-
* `covers:` globs, `docs:` pages and text.
|
|
98
|
-
*
|
|
99
|
-
* @param {Skill} skill The skill
|
|
100
|
-
* @returns {{ name: string, file: string, covers: string[], docs: string[], body: string }[]} The features
|
|
101
|
-
*/
|
|
102
|
-
export function readFeatures(skill) {
|
|
103
|
-
return readdirSync(skill.featuresDir)
|
|
104
|
-
.filter((file) => file.endsWith(".md") && file !== "README.md")
|
|
105
|
-
.sort()
|
|
106
|
-
.map((file) => {
|
|
107
|
-
const text = readFileSync(join(skill.featuresDir, file), "utf8");
|
|
108
|
-
const lists = frontmatterLists(text);
|
|
109
|
-
return {
|
|
110
|
-
name: file.replace(/\.md$/, ""),
|
|
111
|
-
file: relative(skill.repo, join(skill.featuresDir, file)),
|
|
112
|
-
covers: lists.get("covers") ?? [],
|
|
113
|
-
docs: lists.get("docs") ?? [],
|
|
114
|
-
body: text,
|
|
115
|
-
};
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* The journeys module of a feature.
|
|
121
|
-
*
|
|
122
|
-
* @param {Skill} skill The skill
|
|
123
|
-
* @param {string} feature The feature name
|
|
124
|
-
* @returns {string} Its path
|
|
125
|
-
*/
|
|
126
|
-
export function journeysFile(skill, feature) {
|
|
127
|
-
return join(skill.journeysDir, `${feature}.mjs`);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Runs the config's `prepare` commands (install and build) in a checkout of
|
|
132
|
-
* the repository, so a run starts from a fresh build.
|
|
133
|
-
*
|
|
134
|
-
* @param {Skill} skill The skill
|
|
135
|
-
* @param {string} cwd The checkout
|
|
136
|
-
* @returns {import("../timing.mjs").TimingEntry[]} One timing entry per command, for the run folder that does not exist yet
|
|
137
|
-
* @throws When a command fails, with its output
|
|
138
|
-
*/
|
|
139
|
-
export function runPrepare(skill, cwd) {
|
|
140
|
-
return skill.config.prepare.map(([program, ...args]) => {
|
|
141
|
-
const stop = stopwatch();
|
|
142
|
-
const result = spawnSync(program, args, {
|
|
143
|
-
cwd,
|
|
144
|
-
encoding: "utf8",
|
|
145
|
-
maxBuffer: OUTPUT_LIMIT,
|
|
146
|
-
env: { ...process.env, CI: "1" },
|
|
147
|
-
});
|
|
148
|
-
if (result.status !== 0) {
|
|
149
|
-
throw new Error(
|
|
150
|
-
`${program} ${args.join(" ")} failed in ${cwd}:\n${result.stdout}${result.stderr}`,
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
return {
|
|
154
|
-
phase: "prepare",
|
|
155
|
-
...stop(),
|
|
156
|
-
ok: true,
|
|
157
|
-
command: [program, ...args].join(" "),
|
|
158
|
-
};
|
|
159
|
-
});
|
|
160
|
-
}
|
package/bin/dms-control.mjs
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { parseArgs } from "node:util";
|
|
3
|
-
import { OPTIONS } from "./control/options.mjs";
|
|
4
|
-
import { print, runStackCommand } from "./control/commands-stack.mjs";
|
|
5
|
-
import { runVerifyCommand } from "./control/commands-verify.mjs";
|
|
6
|
-
|
|
7
|
-
const USAGE = `Usage: dms-control <command>
|
|
8
|
-
|
|
9
|
-
Drive an isolated DMS (run from the repository, or pass --playground):
|
|
10
|
-
up [--prepare] [--playground <dir>] [--renderer <dir>] [--runs <dir>] [--mongo-url <url>] [--env KEY=VALUE]... [--base <ref>] [--skill <dir>] [--no-standby] [--no-build-cache] [--dev-frontend] [--dev-backend]
|
|
11
|
-
build and start a playground copy on free ports; print the run folder
|
|
12
|
-
(--prepare first runs the skill's install and build commands;
|
|
13
|
-
--renderer serves that built @antelopejs/dms-frontend checkout;
|
|
14
|
-
--no-standby, or DMS_CONTROL_NO_STANDBY=1, starts each fresh database's
|
|
15
|
-
backend when it is needed instead of one ahead: about 160 MB less while
|
|
16
|
-
journeys run, about 5 s more per journey; a journey's standby: false
|
|
17
|
-
does the same for that journey alone;
|
|
18
|
-
the frontend build of the same inputs comes from $XDG_CACHE_HOME/dms-control/frontend,
|
|
19
|
-
--no-build-cache runs ajs dms build as it is;
|
|
20
|
-
--dev-frontend serves the sources with ajs dms dev instead of a build,
|
|
21
|
-
which shows the module UI a production frontend leaves out;
|
|
22
|
-
--dev-backend runs every backend with ajs project dev instead of start,
|
|
23
|
-
which serves the routes only development serves; a journey's backend
|
|
24
|
-
field overrides it for that journey)
|
|
25
|
-
doctor <run> [--verbose] check the run is worth driving; print the failing checks
|
|
26
|
-
onboard <run> [--platform-name <name>]
|
|
27
|
-
create the run's administrator through POST /api/onboarding/register
|
|
28
|
-
browser <run> <action> [--as <account>] [--tab <name>] [--role <role> --name <name> [--exact] [--nth <n>]
|
|
29
|
-
[--within-role <role> --within-name <name>]] [--value <text>] [--key <key>] [--path <path>]
|
|
30
|
-
actions: goto, reload, click, fill, select, check, uncheck, hover, press, wait,
|
|
31
|
-
snapshot (prints the ARIA tree), screenshot (prints the file), login
|
|
32
|
-
api <run> <method> <path> [--as <account>|anon] [--body <json>]
|
|
33
|
-
an authenticated request; prints the status and the body
|
|
34
|
-
mail <run> the messages the run's mail sink captured
|
|
35
|
-
reset <run> move the run onto an empty database and a backend that served nothing
|
|
36
|
-
down <run> stop the run, drop its databases, keep its evidence
|
|
37
|
-
timings <run> the time each phase of the run took, from evidence/timings.jsonl
|
|
38
|
-
|
|
39
|
-
Verify a change (the .agents/skills/verify-* folder of the checkout, or --skill <dir>):
|
|
40
|
-
map check the feature map covers every user-facing file
|
|
41
|
-
plan [--base <ref>] [--all] map the diff to features; list shared files and unmapped surfaces
|
|
42
|
-
(a shared file, or --all for a release, runs every feature)
|
|
43
|
-
journey <run> <feature> [ids...] run a feature's journeys and record evidence
|
|
44
|
-
doors [patch] [--base <ref>] print the One-way-door line for a patch, or for the diff
|
|
45
|
-
formal <run> [--all] run the formal checks that cover the diff (or every one)
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @param {string[]} argv The command line without the node and script paths
|
|
50
|
-
* @returns {Promise<number>} The exit code
|
|
51
|
-
*/
|
|
52
|
-
async function main(argv) {
|
|
53
|
-
const { positionals, values } = parseArgs({
|
|
54
|
-
args: argv,
|
|
55
|
-
allowPositionals: true,
|
|
56
|
-
options: OPTIONS,
|
|
57
|
-
});
|
|
58
|
-
const [command, ...rest] = positionals;
|
|
59
|
-
const code =
|
|
60
|
-
(await runStackCommand(command, rest, values)) ??
|
|
61
|
-
(await runVerifyCommand(command, rest, values));
|
|
62
|
-
if (code !== undefined) return code;
|
|
63
|
-
print(USAGE);
|
|
64
|
-
return command ? 2 : 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
process.stdout.on("error", (error) => {
|
|
68
|
-
if (error.code === "EPIPE") process.exit(process.exitCode ?? 0);
|
|
69
|
-
throw error;
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
try {
|
|
73
|
-
process.exitCode = await main(process.argv.slice(2));
|
|
74
|
-
} catch (error) {
|
|
75
|
-
process.stderr.write(`dms-control: ${error?.message ?? error}\n`);
|
|
76
|
-
process.exitCode = 1;
|
|
77
|
-
}
|