@cosmicdrift/kumiko-framework 0.413.0 → 0.414.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +5 -2
- package/agents/api/framework-db.md +14 -3
- package/agents/api/framework-engine.md +64 -13
- package/agents/api/framework-event-store.md +14 -0
- package/agents/api/framework-ui-types.md +149 -21
- package/agents/api/renderer-web.md +93 -9
- package/agents/api/testing-helpers.md +3 -2
- package/agents/api/testing-stack.md +3 -0
- package/agents/api/types.md +205 -14
- package/agents/api.md +7 -7
- package/agents/boot-rules.md +63 -9
- package/agents/examples/api-docs.md +2 -6
- package/agents/examples/auth-mfa.md +57 -10
- package/agents/examples/chat-channels.md +2 -0
- package/agents/examples/currencies-global.md +1 -0
- package/agents/examples/env-composition.md +7 -11
- package/agents/examples/helpdesk.md +15 -8
- package/agents/examples/managed-pages.md +90 -1
- package/agents/examples/pwa-shell.md +210 -0
- package/agents/examples/rate-limiting.md +3 -3
- package/agents/examples/record-detail-layout.md +1537 -67
- package/agents/examples/workflow-engine.md +16 -12
- package/agents/examples.md +1 -0
- package/agents/features-index.md +4 -2
- package/agents/features.md +22 -7
- package/agents/widgets.md +19 -1
- package/dist/api/api-constants.d.ts +1 -0
- package/dist/api/api-constants.js +4 -0
- package/dist/api/auth-middleware.js +4 -3
- package/dist/api/auth-routes-shared.js +2 -1
- package/dist/api/entity-read-access.d.ts +1 -0
- package/dist/api/entity-read-access.js +18 -0
- package/dist/api/export/export-route.d.ts +6 -1
- package/dist/api/export/export-route.js +27 -1
- package/dist/api/export/export-rows.js +19 -3
- package/dist/api/routes.d.ts +2 -0
- package/dist/api/routes.js +9 -1
- package/dist/api/server-extra-routes.js +2 -1
- package/dist/api/server-feature-http-routes.d.ts +9 -0
- package/dist/api/server-feature-http-routes.js +109 -0
- package/dist/api/server-middleware.js +2 -19
- package/dist/api/server-pat-rate-limit-guard.d.ts +3 -0
- package/dist/api/server-pat-rate-limit-guard.js +19 -0
- package/dist/api/server-rate-limit-wiring.d.ts +10 -0
- package/dist/api/server-rate-limit-wiring.js +37 -0
- package/dist/api/server-routes.d.ts +4 -12
- package/dist/api/server-routes.js +12 -171
- package/dist/api/server-schema-route.d.ts +3 -0
- package/dist/api/server-schema-route.js +58 -0
- package/dist/api/server-wiring.js +2 -37
- package/dist/api/server.js +3 -1
- package/dist/compliance/override-schema.js +5 -5
- package/dist/compliance/sub-processors.js +10 -1
- package/dist/crypto/index.d.ts +1 -1
- package/dist/crypto/index.js +1 -1
- package/dist/crypto/pii-field-encryption.d.ts +2 -0
- package/dist/crypto/pii-field-encryption.js +16 -1
- package/dist/db/apply-entity-event.js +4 -0
- package/dist/db/bun-sql-connection-codes.d.ts +1 -0
- package/dist/db/bun-sql-connection-codes.js +7 -0
- package/dist/db/collect-table-metas.js +4 -1
- package/dist/db/config-seed.js +1 -1
- package/dist/db/derived-field-sql.js +15 -13
- package/dist/db/derived-related-sql.d.ts +2 -2
- package/dist/db/derived-related-sql.js +4 -2
- package/dist/db/dialect.d.ts +3 -0
- package/dist/db/dialect.js +1 -3
- package/dist/db/driver-row-coercion.js +2 -2
- package/dist/db/driver-value-preparation.js +1 -1
- package/dist/db/eagerload.js +15 -12
- package/dist/db/entity-table-meta.d.ts +2 -0
- package/dist/db/entity-table-meta.js +7 -0
- package/dist/db/event-store-executor-context.js +13 -8
- package/dist/db/event-store-executor-read-aggregate-currencies.js +2 -2
- package/dist/db/event-store-executor-read-aggregate.js +2 -2
- package/dist/db/event-store-executor-read-filter.d.ts +4 -0
- package/dist/db/event-store-executor-read-filter.js +28 -11
- package/dist/db/event-store-executor-read-search.d.ts +1 -0
- package/dist/db/event-store-executor-read-search.js +6 -6
- package/dist/db/event-store-executor-read-sort.js +3 -3
- package/dist/db/event-store-executor-read-where.js +14 -5
- package/dist/db/event-store-executor-read.js +7 -7
- package/dist/db/event-store-executor-write.js +50 -95
- package/dist/db/executor-managed-tables.js +4 -1
- package/dist/db/index.d.ts +4 -2
- package/dist/db/index.js +4 -2
- package/dist/db/known-table-names.d.ts +1 -0
- package/dist/db/known-table-names.js +7 -5
- package/dist/db/list-aggregate-labels.d.ts +1 -0
- package/dist/db/list-aggregate-labels.js +9 -1
- package/dist/db/migrate-generator.js +23 -4
- package/dist/db/migrate-rls-diff.d.ts +1 -0
- package/dist/db/migrate-rls-diff.js +15 -1
- package/dist/db/migrate-runner.js +2 -2
- package/dist/db/money.d.ts +1 -1
- package/dist/db/money.js +1 -4
- package/dist/db/parent-ref-clause.d.ts +6 -2
- package/dist/db/parent-ref-clause.js +76 -23
- package/dist/db/parent-ref-global-hosts.d.ts +20 -0
- package/dist/db/parent-ref-global-hosts.js +47 -0
- package/dist/db/production-schema-command-hint.d.ts +1 -0
- package/dist/db/production-schema-command-hint.js +3 -0
- package/dist/db/queries/backfill-pii.js +55 -29
- package/dist/db/queries/ddl.js +13 -2
- package/dist/db/queries/event-store-open-streams.d.ts +15 -0
- package/dist/db/queries/event-store-open-streams.js +33 -0
- package/dist/db/queries/event-store-payload-scrub.d.ts +5 -0
- package/dist/db/queries/event-store-payload-scrub.js +11 -0
- package/dist/db/queries/event-store.js +0 -1
- package/dist/db/queries/raw-sql.js +0 -1
- package/dist/db/queries/rebuild-rls-guard.d.ts +2 -1
- package/dist/db/queries/rebuild-rls-guard.js +24 -11
- package/dist/db/queries/rls-boot-catalog.d.ts +1 -0
- package/dist/db/queries/rls-boot-catalog.js +13 -8
- package/dist/db/queries/rls-shape.d.ts +2 -1
- package/dist/db/queries/rls-shape.js +10 -0
- package/dist/db/queries/session-advisory-lock.js +2 -1
- package/dist/db/queries/test-stack.js +7 -7
- package/dist/db/query.js +16 -11
- package/dist/db/rebuild-marker.js +11 -2
- package/dist/db/render-rls-ddl.d.ts +2 -0
- package/dist/db/render-rls-ddl.js +16 -11
- package/dist/db/replay-migration-sql.js +1 -1
- package/dist/db/row-level-security-boot-check.js +18 -5
- package/dist/db/row-level-security-connection.js +25 -12
- package/dist/db/row-level-security-scope.d.ts +2 -1
- package/dist/db/row-level-security-scope.js +9 -5
- package/dist/db/sql-identifier.d.ts +1 -0
- package/dist/db/sql-identifier.js +3 -0
- package/dist/db/system-tenant-read-db.d.ts +5 -0
- package/dist/db/system-tenant-read-db.js +28 -0
- package/dist/db/table-builder.d.ts +3 -1
- package/dist/db/table-builder.js +18 -8
- package/dist/db/table-info.d.ts +1 -2
- package/dist/db/table-introspection.d.ts +3 -0
- package/dist/db/table-introspection.js +6 -0
- package/dist/db/table-push.d.ts +1 -0
- package/dist/db/table-push.js +7 -1
- package/dist/db/tenant-db-runner.d.ts +3 -0
- package/dist/db/tenant-db-runner.js +19 -1
- package/dist/db/transaction-serialization.d.ts +1 -0
- package/dist/db/transaction-serialization.js +20 -3
- package/dist/db/where-clause.js +11 -2
- package/dist/db/write-ownership-failures.d.ts +25 -0
- package/dist/db/write-ownership-failures.js +82 -0
- package/dist/engine/boot-validator/boot-check.js +7 -1
- package/dist/engine/boot-validator/boot-phases-app.js +5 -5
- package/dist/engine/boot-validator/boot-phases.js +3 -2
- package/dist/engine/boot-validator/boot-rules.d.ts +293 -26
- package/dist/engine/boot-validator/boot-rules.js +4 -0
- package/dist/engine/boot-validator/bundled-lists-table.js +2 -2
- package/dist/engine/boot-validator/card-meta-overflow.js +1 -0
- package/dist/engine/boot-validator/config-deps.d.ts +0 -1
- package/dist/engine/boot-validator/config-deps.js +0 -28
- package/dist/engine/boot-validator/config-key-rules.d.ts +0 -15
- package/dist/engine/boot-validator/config-key-rules.js +0 -15
- package/dist/engine/boot-validator/dashboard-screen-target.d.ts +22 -0
- package/dist/engine/boot-validator/dashboard-screen-target.js +20 -0
- package/dist/engine/boot-validator/dashboard-stat-navigate.d.ts +1 -0
- package/dist/engine/boot-validator/dashboard-stat-navigate.js +25 -17
- package/dist/engine/boot-validator/definition-webhook-events-rules.d.ts +5 -0
- package/dist/engine/boot-validator/definition-webhook-events-rules.js +5 -0
- package/dist/engine/boot-validator/derived-sql-fields.js +1 -2
- package/dist/engine/boot-validator/entity-declaration-rules.d.ts +5 -0
- package/dist/engine/boot-validator/entity-declaration-rules.js +5 -0
- package/dist/engine/boot-validator/entity-list-screens.d.ts +1 -0
- package/dist/engine/boot-validator/entity-list-screens.js +33 -6
- package/dist/engine/boot-validator/entity-structure-rules.d.ts +5 -0
- package/dist/engine/boot-validator/entity-structure-rules.js +5 -0
- package/dist/engine/boot-validator/list-column-layout.js +10 -6
- package/dist/engine/boot-validator/list-row-guidance-rules.d.ts +67 -0
- package/dist/engine/boot-validator/list-row-guidance-rules.js +67 -0
- package/dist/engine/boot-validator/list-row-guidance.d.ts +20 -0
- package/dist/engine/boot-validator/list-row-guidance.js +129 -0
- package/dist/engine/boot-validator/list-sort-summary-rules.d.ts +42 -0
- package/dist/engine/boot-validator/list-sort-summary-rules.js +42 -0
- package/dist/engine/boot-validator/list-sort-summary.d.ts +5 -0
- package/dist/engine/boot-validator/list-sort-summary.js +149 -0
- package/dist/engine/boot-validator/list-table-options.js +15 -1
- package/dist/engine/boot-validator/list-table-rules.d.ts +10 -5
- package/dist/engine/boot-validator/list-table-rules.js +10 -5
- package/dist/engine/boot-validator/list-toolbar-options.d.ts +10 -0
- package/dist/engine/boot-validator/list-toolbar-options.js +31 -0
- package/dist/engine/boot-validator/named-filter-rules.d.ts +32 -2
- package/dist/engine/boot-validator/named-filter-rules.js +32 -2
- package/dist/engine/boot-validator/ownership.js +10 -1
- package/dist/engine/boot-validator/parent-ref.js +87 -50
- package/dist/engine/boot-validator/projection-list-screens.d.ts +1 -0
- package/dist/engine/boot-validator/projection-list-screens.js +31 -1
- package/dist/engine/boot-validator/query-output-columns.js +62 -9
- package/dist/engine/boot-validator/query-output-guidance.d.ts +7 -0
- package/dist/engine/boot-validator/query-output-guidance.js +39 -0
- package/dist/engine/boot-validator/query-refs.js +24 -1
- package/dist/engine/boot-validator/row-decoration.d.ts +11 -0
- package/dist/engine/boot-validator/row-decoration.js +16 -0
- package/dist/engine/boot-validator/screens-dashboard-links.d.ts +10 -0
- package/dist/engine/boot-validator/screens-dashboard-links.js +36 -0
- package/dist/engine/boot-validator/screens-dashboard-narrow.d.ts +4 -0
- package/dist/engine/boot-validator/screens-dashboard-narrow.js +211 -0
- package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +84 -4
- package/dist/engine/boot-validator/screens-dashboard-rules.js +84 -4
- package/dist/engine/boot-validator/screens-dashboard.js +29 -7
- package/dist/engine/boot-validator/screens-kind-entity-list.js +32 -27
- package/dist/engine/boot-validator/screens-kind-projection-detail-guidance.d.ts +3 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-guidance.js +46 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +20 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +20 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail.js +2 -0
- package/dist/engine/boot-validator/screens-kind-projection-list.js +4 -0
- package/dist/engine/boot-validator/screens-kind-rules.d.ts +25 -0
- package/dist/engine/boot-validator/screens-kind-rules.js +25 -0
- package/dist/engine/boot-validator/screens-lists.d.ts +8 -2
- package/dist/engine/boot-validator/screens-lists.js +19 -3
- package/dist/engine/boot-validator/screens.js +1 -1
- package/dist/engine/boot-validator/sort-nulls.d.ts +2 -0
- package/dist/engine/boot-validator/sort-nulls.js +15 -0
- package/dist/engine/boot-validator/zod-shape.d.ts +2 -1
- package/dist/engine/boot-validator/zod-shape.js +19 -1
- package/dist/engine/build-app-schema.js +4 -0
- package/dist/engine/config-helpers.d.ts +1 -2
- package/dist/engine/config-helpers.js +6 -7
- package/dist/engine/define-feature.js +1 -0
- package/dist/engine/define-handler.d.ts +1 -0
- package/dist/engine/define-handler.js +4 -2
- package/dist/engine/definition-violations.js +2 -2
- package/dist/engine/entity-handlers.js +3 -8
- package/dist/engine/entity-list-runtime-options.js +9 -8
- package/dist/engine/factories.d.ts +2 -0
- package/dist/engine/feature-config-events-jobs.js +1 -0
- package/dist/engine/feature-entity-handlers.js +5 -2
- package/dist/engine/field-access.d.ts +1 -1
- package/dist/engine/field-access.js +7 -10
- package/dist/engine/find-entity.js +3 -3
- package/dist/engine/form-derivations.js +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.js +2 -2
- package/dist/engine/named-filter-roles.d.ts +3 -0
- package/dist/engine/named-filter-roles.js +23 -0
- package/dist/engine/pipeline.js +0 -1
- package/dist/engine/project-app-schema-for-roles.js +17 -2
- package/dist/engine/qualified-name.js +0 -1
- package/dist/engine/registry-facade.js +1 -2
- package/dist/engine/registry-state.d.ts +1 -1
- package/dist/engine/registry-state.js +5 -2
- package/dist/engine/registry-validate.d.ts +1 -0
- package/dist/engine/registry-validate.js +9 -1
- package/dist/engine/registry.js +2 -1
- package/dist/engine/resolve-named-list-filters.js +5 -2
- package/dist/engine/schema-builder.js +6 -10
- package/dist/engine/screen-helpers.d.ts +12 -0
- package/dist/engine/screen-helpers.js +17 -1
- package/dist/engine/soft-delete-cleanup.js +5 -8
- package/dist/engine/state-machine.js +0 -1
- package/dist/engine/steps/_database-clock.d.ts +2 -0
- package/dist/engine/steps/_database-clock.js +6 -0
- package/dist/engine/steps/compute.js +1 -1
- package/dist/engine/steps/retry.js +5 -1
- package/dist/engine/steps/return.js +0 -1
- package/dist/engine/steps/wait-for-event.js +2 -1
- package/dist/engine/steps/wait.js +2 -1
- package/dist/engine/system-user.d.ts +2 -2
- package/dist/engine/system-user.js +2 -2
- package/dist/engine/types/handlers.d.ts +1 -1
- package/dist/engine/types/handlers.js +1 -1
- package/dist/engine/types/screen.d.ts +1 -1
- package/dist/engine/types/screen.js +1 -1
- package/dist/engine/webhook-contracts.d.ts +2 -3
- package/dist/engine/webhook-contracts.js +2 -25
- package/dist/engine/webhook-events.js +48 -29
- package/dist/engine/webhook-payload-strictness.d.ts +7 -0
- package/dist/engine/webhook-payload-strictness.js +53 -0
- package/dist/env/_zod-introspect.d.ts +1 -0
- package/dist/env/dry-run.d.ts +1 -1
- package/dist/env/dry-run.js +1 -1
- package/dist/env/field-meta.d.ts +4 -0
- package/dist/env/field-meta.js +67 -0
- package/dist/env/field-rules.d.ts +9 -0
- package/dist/env/field-rules.js +46 -0
- package/dist/env/index.d.ts +3 -3
- package/dist/env/index.js +16 -71
- package/dist/env/internals.d.ts +3 -0
- package/dist/env/internals.js +1 -2
- package/dist/env/required-env.d.ts +3 -1
- package/dist/env/required-env.js +5 -2
- package/dist/errors/serialize.js +2 -2
- package/dist/errors/write-error-info.js +0 -2
- package/dist/es-ops/operations-schema.js +18 -7
- package/dist/event-store/admin-api.js +3 -3
- package/dist/event-store/event-store.js +0 -3
- package/dist/event-store/index.d.ts +1 -0
- package/dist/event-store/index.js +1 -0
- package/dist/event-store/transfer.js +1 -1
- package/dist/files/assert-file-refs-belong-to-tenant.d.ts +2 -1
- package/dist/files/assert-file-refs-belong-to-tenant.js +15 -13
- package/dist/files/bind-pending-file-refs.d.ts +3 -1
- package/dist/files/bind-pending-file-refs.js +54 -27
- package/dist/files/copy-pending-file-refs-to-tenant.js +7 -3
- package/dist/files/create-file-ref.d.ts +4 -1
- package/dist/files/create-file-ref.js +14 -3
- package/dist/files/default-file-guard.js +4 -1
- package/dist/files/feature.js +1 -0
- package/dist/files/file-claim.d.ts +6 -0
- package/dist/files/file-claim.js +17 -0
- package/dist/files/file-field-slots.d.ts +2 -0
- package/dist/files/file-field-slots.js +28 -0
- package/dist/files/file-ref-entity.d.ts +3 -0
- package/dist/files/file-ref-entity.js +2 -0
- package/dist/files/file-ref-table.d.ts +3 -0
- package/dist/files/file-routes.d.ts +4 -1
- package/dist/files/file-routes.js +80 -16
- package/dist/files/in-memory-provider.d.ts +1 -1
- package/dist/files/in-memory-provider.js +2 -1
- package/dist/files/index.d.ts +1 -1
- package/dist/files/index.js +1 -1
- package/dist/files/invalid-file-ref-error.d.ts +2 -0
- package/dist/files/invalid-file-ref-error.js +15 -0
- package/dist/files/local-provider.js +9 -2
- package/dist/files/provider-resolver.js +1 -1
- package/dist/files/rebind-file-ref.d.ts +3 -2
- package/dist/files/rebind-file-ref.js +24 -18
- package/dist/files/resolve-file-handles.d.ts +13 -0
- package/dist/files/resolve-file-handles.js +57 -0
- package/dist/files/storage-tracking.d.ts +1 -1
- package/dist/files/storage-tracking.js +5 -2
- package/dist/files/sweep-stale-pending-file-refs.js +10 -4
- package/dist/files/types.d.ts +4 -0
- package/dist/files/types.js +10 -0
- package/dist/files/upload-field-resolution.d.ts +1 -0
- package/dist/files/upload-field-resolution.js +16 -2
- package/dist/files/upload-ledger.js +1 -1
- package/dist/i18n/required-surface-guidance-keys.d.ts +3 -0
- package/dist/i18n/required-surface-guidance-keys.js +9 -0
- package/dist/i18n/required-surface-keys.js +19 -4
- package/dist/internal/boot-rule-table-expectations.d.ts +2 -0
- package/dist/internal/boot-rule-table-expectations.js +29 -0
- package/dist/internal/row-level-security.d.ts +1 -0
- package/dist/internal/row-level-security.js +1 -0
- package/dist/internal/testing.d.ts +1 -0
- package/dist/internal/testing.js +1 -0
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.js +1 -0
- package/dist/jobs/job-load-events.d.ts +10 -0
- package/dist/jobs/job-load-events.js +12 -0
- package/dist/jobs/job-runner-context.js +6 -158
- package/dist/jobs/job-runner-dispatch.d.ts +7 -0
- package/dist/jobs/job-runner-dispatch.js +57 -0
- package/dist/jobs/job-runner-event-triggers.js +18 -9
- package/dist/jobs/job-runner-execution.js +2 -2
- package/dist/jobs/job-runner-facets.d.ts +48 -0
- package/dist/jobs/job-runner-facets.js +156 -0
- package/dist/jobs/job-runner-gates.js +24 -12
- package/dist/jobs/job-runner-helpers.d.ts +5 -1
- package/dist/jobs/job-runner-helpers.js +18 -3
- package/dist/jobs/job-runner-scope.d.ts +1 -0
- package/dist/jobs/job-runner-scope.js +2 -0
- package/dist/jobs/job-runner-tenant-cap-lock.d.ts +2 -0
- package/dist/jobs/job-runner-tenant-cap-lock.js +30 -0
- package/dist/jobs/job-runner.js +31 -70
- package/dist/jobs/obliterate-job-queues.d.ts +6 -0
- package/dist/jobs/obliterate-job-queues.js +23 -0
- package/dist/lifecycle/lifecycle.js +1 -1
- package/dist/migrations/event-header-scrub.d.ts +11 -0
- package/dist/migrations/event-header-scrub.js +33 -0
- package/dist/migrations/event-payload-scrub.d.ts +1 -1
- package/dist/migrations/event-payload-scrub.js +36 -4
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.js +2 -0
- package/dist/migrations/kumiko-drift.d.ts +5 -2
- package/dist/migrations/kumiko-drift.js +51 -14
- package/dist/migrations/pending-rebuilds.js +4 -5
- package/dist/observability/sensitive-filter.js +0 -12
- package/dist/pipeline/aggregate-type-removal.js +17 -4
- package/dist/pipeline/context-services.d.ts +2 -0
- package/dist/pipeline/context-services.js +5 -2
- package/dist/pipeline/dispatch-batch.js +4 -3
- package/dist/pipeline/dispatch-context-helpers.d.ts +11 -0
- package/dist/pipeline/dispatch-context-helpers.js +58 -0
- package/dist/pipeline/dispatch-nested-write.d.ts +7 -0
- package/dist/pipeline/dispatch-nested-write.js +119 -0
- package/dist/pipeline/dispatch-query.js +10 -3
- package/dist/pipeline/dispatch-scope.js +4 -3
- package/dist/pipeline/dispatch-shared.d.ts +2 -6
- package/dist/pipeline/dispatch-shared.js +6 -38
- package/dist/pipeline/dispatch-write.d.ts +0 -1
- package/dist/pipeline/dispatch-write.js +3 -302
- package/dist/pipeline/dispatcher-utils.js +6 -0
- package/dist/pipeline/effective-system-scope.d.ts +3 -0
- package/dist/pipeline/effective-system-scope.js +22 -0
- package/dist/pipeline/event-dispatcher-delivery.d.ts +1 -0
- package/dist/pipeline/event-dispatcher-delivery.js +17 -9
- package/dist/pipeline/event-dispatcher.d.ts +4 -1
- package/dist/pipeline/event-dispatcher.js +6 -7
- package/dist/pipeline/handler-context-auth.d.ts +3 -2
- package/dist/pipeline/handler-context-auth.js +3 -4
- package/dist/pipeline/handler-context-db.js +11 -4
- package/dist/pipeline/handler-context-dispatch.js +2 -2
- package/dist/pipeline/handler-context-events.d.ts +8 -3
- package/dist/pipeline/handler-context-events.js +20 -65
- package/dist/pipeline/handler-context-member-resolution.js +16 -8
- package/dist/pipeline/handler-context-notify.d.ts +1 -0
- package/dist/pipeline/handler-context-notify.js +2 -0
- package/dist/pipeline/handler-context-phase-denials.js +3 -2
- package/dist/pipeline/handler-context-projection.d.ts +3 -0
- package/dist/pipeline/handler-context-projection.js +39 -0
- package/dist/pipeline/handler-context-scope.d.ts +1 -1
- package/dist/pipeline/handler-context-scope.js +14 -2
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/index.js +1 -1
- package/dist/pipeline/lifecycle-pipeline.d.ts +1 -0
- package/dist/pipeline/lifecycle-pipeline.js +7 -4
- package/dist/pipeline/member-reader.js +4 -2
- package/dist/pipeline/msp-rebuild.js +1 -1
- package/dist/pipeline/nested-write-parent-guard.d.ts +5 -0
- package/dist/pipeline/nested-write-parent-guard.js +81 -0
- package/dist/pipeline/projection-rebuild.d.ts +2 -0
- package/dist/pipeline/projection-rebuild.js +16 -7
- package/dist/pipeline/projection-state.js +4 -6
- package/dist/pipeline/system-hooks.js +36 -6
- package/dist/pipeline/write-result-masking.js +31 -3
- package/dist/pipeline/write-transition-guard.d.ts +7 -0
- package/dist/pipeline/write-transition-guard.js +95 -0
- package/dist/schema-cli/shared.d.ts +2 -0
- package/dist/schema-cli/shared.js +4 -2
- package/dist/schema-cli/validate-command.js +43 -28
- package/dist/search/meilisearch-adapter.js +14 -9
- package/dist/search/reindex-entity.d.ts +2 -0
- package/dist/search/reindex-entity.js +32 -4
- package/dist/search/reindex-tenants-search.js +20 -4
- package/dist/time/tz-context.js +1 -1
- package/dist/ui-types/card-column-roles.d.ts +4 -0
- package/dist/ui-types/card-column-roles.js +6 -3
- package/dist/ui-types/index.d.ts +2 -2
- package/dist/ui-types/index.js +1 -1
- package/dist/utils/ids.js +0 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/return-path-limit.d.ts +1 -0
- package/dist/utils/return-path-limit.js +1 -0
- package/package.json +5 -3
- package/presets/biome-app.json +39 -21
- package/presets/biome-plugins/admin-api.grit +10 -0
- package/presets/biome-plugins/error-reasons.grit +53 -0
- package/presets/biome-plugins/es-literal-writes-tests.grit +18 -0
- package/presets/biome-plugins/es-literal-writes.grit +22 -0
- package/presets/biome-plugins/i18n-locale-terminology-de.grit +15 -0
- package/presets/biome-plugins/i18n-locale-terminology-romance.grit +10 -0
- package/presets/biome-plugins/no-create-test-dispatcher.grit +5 -0
- package/presets/biome-plugins/no-css-properties-type.grit +7 -0
- package/presets/biome-plugins/no-date-api.grit +9 -0
- package/presets/biome-plugins/no-direct-fetch.grit +16 -0
- package/presets/biome-plugins/no-direct-fs.grit +16 -0
- package/presets/biome-plugins/no-external-font-cdn-css.grit +9 -0
- package/presets/biome-plugins/no-external-font-cdn.grit +12 -0
- package/presets/biome-plugins/no-raw-hooks.grit +10 -0
- package/presets/biome-plugins/no-same-folder-barrel-import.grit +11 -0
- package/presets/biome-plugins/no-screen-container-classes.grit +7 -0
- package/presets/biome-plugins/no-skipped-or-retried-tests.grit +34 -0
- package/presets/biome-plugins/no-temporal-polyfill-require.grit +10 -0
- package/presets/biome-plugins/raw-html-in-web.grit +40 -0
- package/presets/biome-plugins/raw-ui-in-app.grit +142 -0
- package/presets/biome-plugins/restricted-event-store-symbols.grit +18 -0
- package/presets/biome-plugins/test-title.grit +20 -0
- package/presets/biome-plugins/unsafe-json-parse.grit +6 -0
- package/presets/biome-rules.json +465 -0
- package/src/changes.json +309 -0
- package/dist/engine/minor-units.d.ts +0 -2
- package/dist/engine/minor-units.js +0 -8
package/agents/boot-rules.md
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
| <a id="bundled-lists-not-object"></a>`bundled-lists/not-object` | The bundledLists option is an object. | Write bundledLists as an object such as { table: { columnPicker: true } }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
60
60
|
| <a id="bundled-lists-pin-first-column-not-boolean"></a>`bundled-lists/pin-first-column-not-boolean` | bundledLists.pinFirstColumn is a boolean. | Set pinFirstColumn to true or false. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
61
61
|
| <a id="bundled-lists-pin-first-column-without-pinning"></a>`bundled-lists/pin-first-column-without-pinning` | bundledLists.pinFirstColumn needs bundledLists.table.pinning. | Set bundledLists.table.pinning: true or remove pinFirstColumn. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
62
|
-
| <a id="bundled-lists-screen-only-table-key"></a>`bundled-lists/screen-only-table-key` | bundledLists.table leaves out grouping and
|
|
62
|
+
| <a id="bundled-lists-screen-only-table-key"></a>`bundled-lists/screen-only-table-key` | bundledLists.table leaves out grouping, totals and summaryRow, which depend on one list's fields or query. | Set grouping, totals and summaryRow in the table block of the individual screen. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
63
63
|
| <a id="bundled-lists-table-not-object"></a>`bundled-lists/table-not-object` | bundledLists.table is an object. | Write bundledLists.table as an object such as { columnPicker: true }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
64
64
|
| <a id="bundled-lists-unknown-key"></a>`bundled-lists/unknown-key` | bundledLists uses only the allowed keys. | Remove the unknown keys or rename them to one of the allowed keys. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
65
65
|
|
|
@@ -118,9 +118,6 @@
|
|
|
118
118
|
| <a id="config-key-options-query-payload-self-reference"></a>`config-key/options-query-payload-self-reference` | A config key's optionsQueryPayload does not reference the key itself. | Reference a different config key. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
119
119
|
| <a id="config-key-options-query-payload-unknown-key"></a>`config-key/options-query-payload-unknown-key` | A config key's optionsQueryPayload references only config keys of the same feature. | Reference an existing config key of the feature or remove the entry. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
120
120
|
| <a id="config-key-options-query-payload-without-query"></a>`config-key/options-query-payload-without-query` | A config key that declares optionsQueryPayload also declares optionsQuery. | Set optionsQuery or remove optionsQueryPayload. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
121
|
-
| <a id="config-key-options-query-per-request"></a>`config-key/options-query-per-request` | A config key with optionsQuery does not set allowPerRequest, which would bypass the option set unchecked. | Remove allowPerRequest or optionsQuery. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
122
|
-
| <a id="config-key-per-request-encrypted"></a>`config-key/per-request-encrypted` | A config key with encrypted/backing="secrets" does not set allowPerRequest. | Remove allowPerRequest or the secrets storage from the key. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
123
|
-
| <a id="config-key-per-request-text"></a>`config-key/per-request-text` | A config key of type "text" does not set allowPerRequest (XSS/injection risk). | Remove allowPerRequest or change the key type. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
124
121
|
| <a id="config-key-pii-encrypted-and-encrypted"></a>`config-key/pii-encrypted-and-encrypted` | A config key uses piiEncrypted or encrypted/backing="secrets", never both. | Pick one of piiEncrypted (subject-KMS) or encrypted (shared cipher). | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
125
122
|
| <a id="config-key-pii-encrypted-not-text"></a>`config-key/pii-encrypted-not-text` | A config key with piiEncrypted has type "text". | Use type="text" or remove piiEncrypted. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
126
123
|
| <a id="config-key-pii-encrypted-system-scope"></a>`config-key/pii-encrypted-system-scope` | A config key with piiEncrypted is not system-scoped, because system scope has no subject to encrypt under. | Use scope="tenant" or "user", or remove piiEncrypted. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
|
|
@@ -169,11 +166,18 @@
|
|
|
169
166
|
| <a id="dashboard-filter-options-empty"></a>`dashboard/filter-options-empty` | Static filter options are non-empty. | Declare at least one option or use optionsQuery. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
170
167
|
| <a id="dashboard-filter-options-query-empty"></a>`dashboard/filter-options-query-empty` | filter.optionsQuery is non-empty when set. | Set optionsQuery to a query name or remove it. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
171
168
|
| <a id="dashboard-filter-options-xor"></a>`dashboard/filter-options-xor` | The dashboard filter sets exactly one of options and optionsQuery. | Keep either options or optionsQuery. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
169
|
+
| <a id="dashboard-list-narrow-field-unknown"></a>`dashboard/list-narrow-field-unknown` | A list panel's narrow.field is set only with narrow.layout "line" and names a non-empty query output field; narrow.titleField needs the cards layout and a hint column. | Set narrow.layout "line" and name a field of the query output, or remove narrow.field. For narrow.titleField keep the cards layout and a hint column. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
170
|
+
| <a id="dashboard-list-narrow-invalid"></a>`dashboard/list-narrow-invalid` | A list panel's narrow.limit is a positive integer, narrow.layout is "cards" or "line", and narrow.moreText and icon appear only with the "line" layout. | Set narrow.limit to a whole number of at least 1 and narrow.layout to "cards" or "line"; use narrow.moreText and icon only with "line". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
171
|
+
| <a id="dashboard-list-narrow-line-without-footer-link"></a>`dashboard/list-narrow-line-without-footer-link` | A list panel with narrow.layout "line" declares footerLink, the target of the line. | Add footerLink or use narrow.layout "cards". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
172
172
|
| <a id="dashboard-list-panel-columns-empty"></a>`dashboard/list-panel-columns-empty` | A list panel declares at least one column. | Add at least one column. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
173
|
+
| <a id="dashboard-list-row-link-invalid"></a>`dashboard/list-row-link-invalid` | A list panel rowLink names exactly one target (a registered screen, or the row field screenField holding it), takes the matching params field (paramField with screen, paramsField with screenField), non-empty field names and an icon of "arrow" or "chevron". | Set either rowLink.screen to a registered screen (params from paramField) or rowLink.screenField to the row field holding the screen name (params from paramsField), and icon to "arrow" or "chevron". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
174
|
+
| <a id="dashboard-list-row-tone-marker-invalid"></a>`dashboard/list-row-tone-marker-invalid` | A list panel rowToneMarker is "bar" or "dot". | Set rowToneMarker to "bar" or "dot", or remove it. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
175
|
+
| <a id="dashboard-narrow-order-invalid"></a>`dashboard/narrow-order-invalid` | A panel's narrowOrder is an integer of at least 0 and is not set on a stat-group child. | Set narrowOrder to a whole number from 0 up on the panel (or the whole stat-group). | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
173
176
|
| <a id="dashboard-panel-fallback-gated"></a>`dashboard/panel-fallback-gated` | A panel fallback screen has no visibleWhen of its own. | Embed a fallback screen without visibleWhen. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
174
177
|
| <a id="dashboard-panel-fallback-without-visible-when"></a>`dashboard/panel-fallback-without-visible-when` | A screen panel with a fallback also declares visibleWhen. | Add visibleWhen or remove fallback. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
178
|
+
| <a id="dashboard-panel-link-target"></a>`dashboard/panel-link-target` | A list panel footerLink or stat-group link targets a registered screen, sets string-valued params, and uses namedFilter only on a list screen that declares it. | Point screen at a registered screen, give params string values, and drop namedFilter unless the target list declares it. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
175
179
|
| <a id="dashboard-panel-query-empty"></a>`dashboard/panel-query-empty` | A stat, stat-group child and query panel names a non-empty query string. | Set query to a registered query name. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
176
|
-
| <a id="dashboard-panel-span-invalid"></a>`dashboard/panel-span-invalid` | A panel's span is "half" or "
|
|
180
|
+
| <a id="dashboard-panel-span-invalid"></a>`dashboard/panel-span-invalid` | A panel's span is "half", "full", "third" or "two-thirds". | Set span to "half", "full", "third" or "two-thirds". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
177
181
|
| <a id="dashboard-panel-visible-when-incomplete"></a>`dashboard/panel-visible-when-incomplete` | A panel's visibleWhen names a non-empty query and field. | Set both visibleWhen.query and visibleWhen.field. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
178
182
|
| <a id="dashboard-record-param-collision"></a>`dashboard/record-param-collision` | record.param and payloadKey differ from the filter and timeRange ids. | Use a different name for the record param or the filter/timeRange id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
179
183
|
| <a id="dashboard-record-param-empty"></a>`dashboard/record-param-empty` | record.param is a non-empty string. | Name the URL search param carrying the record id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
@@ -184,14 +188,23 @@
|
|
|
184
188
|
| <a id="dashboard-refresh-field-without-record-query"></a>`dashboard/refresh-field-without-record-query` | A field-driven refresh has a record.query to read the seconds from. | Add record: { param, query } or use refresh: { seconds }. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
185
189
|
| <a id="dashboard-refresh-seconds-and-field"></a>`dashboard/refresh-seconds-and-field` | A dashboard refresh sets either seconds or field, not both. | Keep exactly one of seconds and field. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
186
190
|
| <a id="dashboard-refresh-seconds-too-short"></a>`dashboard/refresh-seconds-too-short` | refresh.seconds is a number of at least DASHBOARD_MIN_REFRESH_SECONDS. | Raise refresh.seconds to the minimum or more. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
191
|
+
| <a id="dashboard-stat-group-child-hide-on-narrow"></a>`dashboard/stat-group-child-hide-on-narrow` | Stat-group children do not set hideOnNarrow. | Set hideOnNarrow on the whole group instead. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
187
192
|
| <a id="dashboard-stat-group-child-visible-when"></a>`dashboard/stat-group-child-visible-when` | Stat-group children do not set visibleWhen. | Gate the whole group with visibleWhen instead. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
193
|
+
| <a id="dashboard-stat-group-columns-invalid"></a>`dashboard/stat-group-columns-invalid` | A stat-group's columns is 2, 3 or 4 and needs layout "cards". | Set columns to 2, 3 or 4 and give the group a label or layout: "cards", or remove columns. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
188
194
|
| <a id="dashboard-stat-group-empty"></a>`dashboard/stat-group-empty` | A stat-group declares at least one stat. | Add at least one stat. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
195
|
+
| <a id="dashboard-stat-group-icon-without-titled-strip"></a>`dashboard/stat-group-icon-without-titled-strip` | A stat-group's icon needs a label and layout "strip" (the icon stands in the one-line phone strip). | Give the group a label and layout "strip", or remove icon. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
196
|
+
| <a id="dashboard-stat-group-narrow-tone-invalid"></a>`dashboard/stat-group-narrow-tone-invalid` | A stat-group's narrow.tone must be one of the select option tones. | Use accent, ok, warn, bad, critical or neutral. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
197
|
+
| <a id="dashboard-stat-group-narrow-without-titled-strip"></a>`dashboard/stat-group-narrow-without-titled-strip` | A stat-group's narrow.tone needs a label and layout "strip" (it tints the one-line phone strip). | Give the group a label and layout "strip", or remove narrow. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
189
198
|
| <a id="dashboard-stat-group-subtitle-without-label"></a>`dashboard/stat-group-subtitle-without-label` | A stat-group with a subtitle also has a label. | Set a label or remove subtitle. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
199
|
+
| <a id="dashboard-stat-narrow-label-outside-group"></a>`dashboard/stat-narrow-label-outside-group` | A stat's narrowLabel is non-empty and only set on a stat-group child (the one-line phone strip is the only place it is drawn). | Move the stat into a titled stat-group or remove narrowLabel. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
200
|
+
| <a id="dashboard-stat-navigate-custom-with-filter"></a>`dashboard/stat-navigate-custom-with-filter` | A stat navigating to a custom screen does not set namedFilter. | Remove navigate.namedFilter; a custom screen has no namedFilters. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
201
|
+
| <a id="dashboard-stat-navigate-params-invalid"></a>`dashboard/stat-navigate-params-invalid` | A stat's navigate.params has non-empty keys and string values. | Use { key: 'value' } with non-empty keys and string values, or remove params. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
190
202
|
| <a id="dashboard-stat-value-field-empty"></a>`dashboard/stat-value-field-empty` | A stat panel and stat-group child has a non-empty valueField. | Set valueField to a field of the query result. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
191
203
|
| <a id="dashboard-text-link-roles-empty"></a>`dashboard/text-link-roles-empty` | A text link block's roles list is non-empty when set. | List the roles or omit roles. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
192
204
|
| <a id="dashboard-text-link-unresolved"></a>`dashboard/text-link-unresolved` | A text link block's screen resolves to a registered screen. | Use a same-feature short id or a cross-feature QN "<feature>:screen:<id>". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
193
205
|
| <a id="dashboard-text-list-block-empty"></a>`dashboard/text-list-block-empty` | A text list block has items. | Add items or remove the block. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
194
|
-
| <a id="dashboard-text-
|
|
206
|
+
| <a id="dashboard-text-narrow-blocks-without-blocks"></a>`dashboard/text-narrow-blocks-without-blocks` | A text panel with narrowBlocks also declares blocks, and narrowBlocks is non-empty. | Add blocks (the wide variant) or remove narrowBlocks. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
207
|
+
| <a id="dashboard-text-panel-empty"></a>`dashboard/text-panel-empty` | A text panel declares at least one block or a query. | Add at least one block or set query. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
195
208
|
| <a id="dashboard-time-range-default-unknown"></a>`dashboard/time-range-default-unknown` | timeRange.default is one of the option values. | Set default to one of the options. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
196
209
|
| <a id="dashboard-time-range-id-collides-filter"></a>`dashboard/time-range-id-collides-filter` | The timeRange id differs from the filter id. | Use a timeRange.id different from the filter id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
197
210
|
| <a id="dashboard-time-range-id-empty"></a>`dashboard/time-range-id-empty` | The dashboard timeRange has a non-empty id. | Set a non-empty timeRange.id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
|
|
@@ -280,6 +293,7 @@
|
|
|
280
293
|
| <a id="entity-located-by-missing-field"></a>`entity/located-by-missing-field` | A timestamp locatedBy names a field of the same entity. | Declare the tz field or use createLocatedTimestampField(). | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
|
|
281
294
|
| <a id="entity-located-by-not-tz"></a>`entity/located-by-not-tz` | A timestamp locatedBy points at a tz field. | Point locatedBy at a field of type tz. | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
|
|
282
295
|
| <a id="entity-searchable-restricted-read"></a>`entity/searchable-restricted-read` | A searchable field has no restricted access.read. | Drop searchable/find: "fuzzy" or access.read. | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
|
|
296
|
+
| <a id="entity-sort-nulls-needs-sortable"></a>`entity/sort-nulls-needs-sortable` | A field with sortNulls is sortable. | Add sortable: true or drop sortNulls. | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
|
|
283
297
|
|
|
284
298
|
## entity-edit
|
|
285
299
|
|
|
@@ -303,6 +317,7 @@
|
|
|
303
317
|
|
|
304
318
|
| Rule | Summary | Fix | Source |
|
|
305
319
|
| --- | --- | --- | --- |
|
|
320
|
+
| <a id="entity-list-create-placement-without-create"></a>`entity-list/create-placement-without-create` | createPlacement "toolbar" moves the create button, so the list has one (no allowCreate: false). | Remove createPlacement or drop allowCreate: false. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
306
321
|
| <a id="entity-list-create-screen-unresolved"></a>`entity-list/create-screen-unresolved` | createScreen resolves to a registered screen in the same feature. | Point createScreen at a screen of this feature. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
307
322
|
| <a id="entity-list-cross-feature-edit-needs-entity-id"></a>`entity-list/cross-feature-edit-needs-entity-id` | A rowAction navigating to a cross-feature entityEdit screen sets entityId. | Set entityId to the row field naming the target entity's id. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
308
323
|
| <a id="entity-list-default-sort-not-listed"></a>`entity-list/default-sort-not-listed` | defaultSort.field is one of the listed columns. | Pick a field from columns or add it there. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
|
|
@@ -316,6 +331,7 @@
|
|
|
316
331
|
| <a id="entity-list-filter-unknown-field"></a>`entity-list/filter-unknown-field` | A screen filter names a field of the entity. | Name an existing entity field. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
317
332
|
| <a id="entity-list-page-size-invalid"></a>`entity-list/page-size-invalid` | pageSize is a positive integer. | Set pageSize to a positive integer. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
318
333
|
| <a id="entity-list-searchable-false"></a>`entity-list/searchable-false` | Operator lists are searchable unless they are on the searchable-false whitelist. | Set searchable: true or add the screen id to the whitelist. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
|
|
334
|
+
| <a id="entity-list-toolbar-sort-without-sort-options"></a>`entity-list/toolbar-sort-without-sort-options` | toolbarSort draws the sortOptions as a select in the filter row, so it needs sortOptions. | Declare sortOptions or remove toolbarSort. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
319
335
|
| <a id="entity-list-unknown-column"></a>`entity-list/unknown-column` | Every column without a label names an entity field, derived field or row-meta column. | Fix the column field name or give the column a label. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
|
|
320
336
|
| <a id="entity-list-unknown-named-filter"></a>`entity-list/unknown-named-filter` | Every screen namedFilters id is declared in the entity's namedFilters. | Declare the rule in EntityDefinition.namedFilters or remove the id from the screen. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
|
|
321
337
|
|
|
@@ -632,6 +648,8 @@
|
|
|
632
648
|
|
|
633
649
|
| Rule | Summary | Fix | Source |
|
|
634
650
|
| --- | --- | --- | --- |
|
|
651
|
+
| <a id="list-button-column-in-list-table"></a>`list/button-column-in-list-table` | display "button" is drawn only in dashboard list panels; entityList and projectionList tables (RenderList) keep a row button as a rowAction. | Declare the button as a rowAction with display: "button" or remove display: "button" from the column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
652
|
+
| <a id="list-button-column-without-link"></a>`list/button-column-without-link` | A column with display "button" has a link (linkScreenField or refEntity) to draw as the button. | Set linkScreenField or refEntity on the column, or remove display: "button". | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
635
653
|
| <a id="list-card-meta-overflow"></a>`list/card-meta-overflow` | A card list shows at most the maximum number of meta columns. | Reduce each list to the maximum number of meta columns or mark the others hideOnNarrow: true. | `packages/framework/src/engine/boot-validator/card-meta-overflow-rules.ts` |
|
|
636
654
|
| <a id="list-column-renderer-component-invalid"></a>`list/column-renderer-component-invalid` | A column renderer's react.__component is a non-empty string. | Set react.__component to the name of a client columnRenderers entry. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
637
655
|
| <a id="list-column-renderer-react-not-object"></a>`list/column-renderer-react-not-object` | A column renderer's react branch is an object. | Use { react: { __component: "Name" } }. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
@@ -642,13 +660,39 @@
|
|
|
642
660
|
| <a id="list-facet-query-unregistered"></a>`list/facet-query-unregistered` | A reference facet loads its options from a registered query handler. | Register the entity's list handler (defineEntityListHandler). | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
643
661
|
| <a id="list-facet-select-no-options"></a>`list/facet-select-no-options` | A select facet declares at least one option. | Declare at least one option. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
644
662
|
| <a id="list-facet-unknown-column"></a>`list/facet-unknown-column` | A non-reference facet names a declared column. | Name a declared column or add the column. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
663
|
+
| <a id="list-guidance-field-empty"></a>`list/guidance-field-empty` | rowToneField, linkParamsField and the hint field names are non-empty strings. | Name a row field or remove the option. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
664
|
+
| <a id="list-hint-column-display"></a>`list/hint-column-display` | A hint column owns its cell rendering and sets no display. | Remove display or hint from the column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
665
|
+
| <a id="list-hint-column-empty-placeholder"></a>`list/hint-column-empty-placeholder` | A hint column shows hint.emptyLabel for an empty value and sets no emptyPlaceholder. | Remove emptyPlaceholder, or name the empty sentence with hint.emptyLabel. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
666
|
+
| <a id="list-hint-column-link"></a>`list/hint-column-link` | A hint column owns its cell rendering and sets no linkScreenField, linkParamsField, refEntity or badgeToneField. | Remove the link or badge option, or move the hint to its own column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
667
|
+
| <a id="list-hint-column-renderer"></a>`list/hint-column-renderer` | A hint column owns its cell rendering and sets no renderer. | Remove renderer or hint from the column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
668
|
+
| <a id="list-link-params-without-screen-field"></a>`list/link-params-without-screen-field` | linkParamsField only parametrizes the linkScreenField target. | Set linkScreenField on the column or remove linkParamsField. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
669
|
+
| <a id="list-named-filter-empty-state-title-empty"></a>`list/named-filter-empty-state-title-empty` | A named filter's emptyState.title is a non-empty i18n key. | Name the title key or remove emptyState from the filter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
670
|
+
| <a id="list-named-filter-facet-without-filters"></a>`list/named-filter-facet-without-filters` | namedFilterFacet only presents the screen's namedFilters. | Declare namedFilters on the screen or remove namedFilterFacet. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
671
|
+
| <a id="list-named-filter-sort-not-listed"></a>`list/named-filter-sort-not-listed` | A named filter's sort.field is one of the listed columns. | Pick a field from columns or add it there. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
672
|
+
| <a id="list-named-filter-sort-not-sortable"></a>`list/named-filter-sort-not-sortable` | A named filter's sort column is sortable. | Mark the field sortable or pick another sort field. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
673
|
+
| <a id="list-narrow-detail-field-without-detail-field"></a>`list/narrow-detail-field-without-detail-field` | hint.narrowDetailField replaces hint.detailField below sm, so it needs detailField. | Set hint.detailField or remove narrowDetailField. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
674
|
+
| <a id="list-narrow-facets-invalid"></a>`list/narrow-facets-invalid` | narrowFacets is "pills". | Use "pills", or remove narrowFacets. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
675
|
+
| <a id="list-narrow-only-conflict"></a>`list/narrow-only-conflict` | A showOnNarrowOnly column sets none of hideOnNarrow: true, hidden: true or pinned. | Remove the conflicting option or showOnNarrowOnly. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
676
|
+
| <a id="list-reason-option-without-reason-field"></a>`list/reason-option-without-reason-field` | hint.reasonOpenField and hint.reasonTitleField shape the reason text, so they need reasonField. | Set hint.reasonField or remove reasonOpenField and reasonTitleField. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
645
677
|
| <a id="list-ref-target-entity-unknown"></a>`list/ref-target-entity-unknown` | An entity reference target resolves to a registered entity. | Name an entity the target feature registers. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
646
678
|
| <a id="list-ref-target-feature-not-mounted"></a>`list/ref-target-feature-not-mounted` | An entity reference target belongs to a mounted feature. | Mount the feature and declare it in r.requires({ features }). | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
647
679
|
| <a id="list-related-read-only-with-row-interaction"></a>`list/related-read-only-with-row-interaction` | A readOnly relatedList section declares no rowClick or rowActions. | Remove readOnly or the row interaction. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
648
680
|
| <a id="list-related-row-click-no-detail"></a>`list/related-row-click-no-detail` | A relatedList rowClick entity target has a screen declaring detailFor for it. | Add detailFor to the screen that shows the entity. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
649
681
|
| <a id="list-related-toolbar-visible-when"></a>`list/related-toolbar-visible-when` | relatedList toolbarActions use visible instead of visibleWhen. | Use visible, a condition on the enclosing record. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
682
|
+
| <a id="list-row-decoration-ids-missing"></a>`list/row-decoration-ids-missing` | The rowDecoration query's input schema declares `ids`, the row ids the list sends with every call. | Add `ids: z.array(z.string())` to the decoration query's schema. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
683
|
+
| <a id="list-row-decoration-query-empty"></a>`list/row-decoration-query-empty` | rowDecoration.query is a non-empty query QN. | Name the decoration query or remove rowDecoration. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
|
|
650
684
|
| <a id="list-screen-id-unresolved"></a>`list/screen-id-unresolved` | listScreenId names a mounted screen. | Fix the listScreenId or mount the list screen. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
651
685
|
| <a id="list-screen-unreachable"></a>`list/screen-unreachable` | A screen without a nav entry has a resolvable list, or is marked dormant. | Declare listScreenId, add a standalone r.nav() pointing at it, or set dormant: true. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
|
|
686
|
+
| <a id="list-sort-option-not-sortable"></a>`list/sort-option-not-sortable` | Every sortOptions field is a listed, sortable column (entityList); a projectionList's query takes sort and sortDirection and, when sort is an enum, lists every option field. | Mark the field sortable and list it as a column, or give the projectionList's query sort and sortDirection parameters that accept the option fields. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
687
|
+
| <a id="list-sort-options-default-not-listed"></a>`list/sort-options-default-not-listed` | A defaultSort is one of the sortOptions, so the select opens on an entry. | Add the defaultSort field and dir to sortOptions or change defaultSort. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
688
|
+
| <a id="list-sort-options-invalid"></a>`list/sort-options-invalid` | sortOptions is not empty and lists each field and dir once. | Remove sortOptions, or list each field and dir pair once. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
689
|
+
| <a id="list-summary-row-on-related-list"></a>`list/summary-row-on-related-list` | A relatedList section or expandableRow sets no table.summaryRow; only entityList and projectionList screens have a list payload to carry it. | Remove summaryRow from the relatedList, or put the summary on the list screen itself. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
690
|
+
| <a id="list-summary-row-query-accepts-list-keys"></a>`list/summary-row-query-accepts-list-keys` | The summaryRow query's Zod schema accepts every list key the screen sends (search, namedFilter, filters). | Add the missing keys to the query schema (or reuse the list query's filter shape) and apply them, or drop the feature on the screen. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
691
|
+
| <a id="list-summary-row-query-unknown"></a>`list/summary-row-query-unknown` | table.summaryRow.query names a registered query handler. | Use the qualified name of a query handler (feature:query:name) or remove summaryRow. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
692
|
+
| <a id="list-summary-row-shape"></a>`list/summary-row-shape` | table.summaryRow is an object with a query string and optional params object. | Write table.summaryRow as { query: "feature:query:order:summary" }. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
693
|
+
| <a id="list-summary-row-with-totals"></a>`list/summary-row-with-totals` | A table sets summaryRow or totals, not both; two footers under one table read as two answers. | Drop totals and put the figures into the summary query, or drop summaryRow. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
|
|
694
|
+
| <a id="list-toolbar-actions-placement-invalid"></a>`list/toolbar-actions-placement-invalid` | toolbarActionsPlacement is "header" or "toolbar". | Use "header" or "toolbar", or remove toolbarActionsPlacement. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
695
|
+
| <a id="list-toolbar-actions-placement-without-actions"></a>`list/toolbar-actions-placement-without-actions` | toolbarActionsPlacement "toolbar" moves the toolbarActions, so the list declares some. | Declare toolbarActions or remove toolbarActionsPlacement. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
|
|
652
696
|
|
|
653
697
|
## list-bulk
|
|
654
698
|
|
|
@@ -696,8 +740,8 @@
|
|
|
696
740
|
| <a id="list-table-column-min-width-exceeds-width"></a>`list-table/column-min-width-exceeds-width` | A column's minWidth is not greater than its width. | Lower minWidth or raise width. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
697
741
|
| <a id="list-table-column-pinned-invalid"></a>`list-table/column-pinned-invalid` | A column's pinned value is one of the known pin sides. | Use one of the listed pin values. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
698
742
|
| <a id="list-table-column-pinned-without-pinning"></a>`list-table/column-pinned-without-pinning` | A pinned column needs table.pinning, otherwise the pin has no effect. | Set table: { pinning: true } or remove pinned from the column. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
699
|
-
| <a id="list-table-column-width-invalid"></a>`list-table/column-width-invalid` | A column's width and minWidth are finite pixel counts greater than 0. | Set a positive finite number or remove the option. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
700
|
-
| <a id="list-table-column-width-without-resizing"></a>`list-table/column-width-without-resizing` | A column's width or minWidth needs table.resizing, otherwise it has no effect. | Set table: { resizing: true } or remove width and minWidth from the column. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
743
|
+
| <a id="list-table-column-width-invalid"></a>`list-table/column-width-invalid` | A column's width and minWidth are finite pixel counts greater than 0 and at most 2000. | Set a positive finite number up to 2000 or remove the option. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
744
|
+
| <a id="list-table-column-width-without-resizing"></a>`list-table/column-width-without-resizing` | A column's width or minWidth needs table.resizing, otherwise it has no effect; a hint column is exempt. | Set table: { resizing: true } or remove width and minWidth from the column. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
701
745
|
| <a id="list-table-density-default-invalid"></a>`list-table/density-default-invalid` | table.density.default is one of the known densities. | Use one of the listed density values. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
702
746
|
| <a id="list-table-density-empty"></a>`list-table/density-empty` | table.density sets default and/or userChoice. | Set default and/or userChoice, or remove table.density. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
703
747
|
| <a id="list-table-density-not-object"></a>`list-table/density-not-object` | table.density is an object. | Write table.density as { default: "compact", userChoice: true }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
@@ -707,6 +751,7 @@
|
|
|
707
751
|
| <a id="list-table-export-not-allowed"></a>`list-table/export-not-allowed` | table.export is only declared on entityList and projectionList screens. | Remove table.export from this screen or section. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
708
752
|
| <a id="list-table-export-not-object"></a>`list-table/export-not-object` | table.export is an object. | Write table.export as { xlsx: true, maxRows: 5000 }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
709
753
|
| <a id="list-table-export-xlsx-not-true"></a>`list-table/export-xlsx-not-true` | table.export.xlsx is true, the only export format. | Set xlsx: true. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
754
|
+
| <a id="list-table-frame-invalid"></a>`list-table/frame-invalid` | table.frame is one of the known frames. | Use "card" or remove table.frame. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
|
|
710
755
|
| <a id="list-table-grouping-field-not-groupable"></a>`list-table/grouping-field-not-groupable` | table.grouping uses only field types that can be grouped by. | Group by a groupable field. | `packages/framework/src/engine/boot-validator/list-table-aggregate-rules.ts` |
|
|
711
756
|
| <a id="list-table-grouping-fields-without-user-choice"></a>`list-table/grouping-fields-without-user-choice` | table.grouping.fields comes with userChoice: true, otherwise the user cannot pick them. | Set userChoice: true or remove fields. | `packages/framework/src/engine/boot-validator/list-table-aggregate-rules.ts` |
|
|
712
757
|
| <a id="list-table-grouping-no-field"></a>`list-table/grouping-no-field` | table.grouping names a field, or offers fields with userChoice: true. | Set field, or userChoice: true with at least one entry in fields. | `packages/framework/src/engine/boot-validator/list-table-aggregate-rules.ts` |
|
|
@@ -762,12 +807,14 @@
|
|
|
762
807
|
|
|
763
808
|
| Rule | Summary | Fix | Source |
|
|
764
809
|
| --- | --- | --- | --- |
|
|
810
|
+
| <a id="named-filter-projection-query-accepts-count"></a>`named-filter/projection-query-accepts-count` | A projectionList with namedFilterFacet.showCounts binds a query whose schema has limit and totalCount keys. | Add limit and totalCount: z.boolean().optional() to the query schema and return the total, or drop showCounts. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
765
811
|
| <a id="named-filter-projection-query-accepts-named-filter"></a>`named-filter/projection-query-accepts-named-filter` | A projectionList with namedFilters binds a query whose schema has a namedFilter key. | Add namedFilter: z.string().optional() to the query schema, resolve it with resolveNamedListFilters and pass the conditions into executor.list filters, the only path that applies field-read and PII guards. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
812
|
+
| <a id="named-filter-projection-query-accepts-sort"></a>`named-filter/projection-query-accepts-sort` | A projectionList whose namedFilter sets a sort binds a query whose schema has sort and sortDirection keys. | Add sort: z.enum([...sortable fields]) and sortDirection to the query schema and order by them, or remove sort from the named filter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
766
813
|
| <a id="named-filter-stat-navigate-filter-declared"></a>`named-filter/stat-navigate-filter-declared` | A stat navigate.namedFilter is declared in the target screen's namedFilters. | Add { id, label } to namedFilters of the target screen. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
767
814
|
| <a id="named-filter-stat-navigate-same-named-filter"></a>`named-filter/stat-navigate-same-named-filter` | A stat's params.namedFilter equals navigate.namedFilter. | Set params.namedFilter to the same id as navigate.namedFilter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
768
815
|
| <a id="named-filter-stat-navigate-same-query"></a>`named-filter/stat-navigate-same-query` | A stat with navigate counts with the target list's own query. | Set the stat query to the target list's query. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
769
816
|
| <a id="named-filter-stat-navigate-static-filter"></a>`named-filter/stat-navigate-static-filter` | A stat repeats the target screen's static filter in params.filter. | Set params.filter to the target screen's filter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
770
|
-
| <a id="named-filter-stat-navigate-target"></a>`named-filter/stat-navigate-target` | A stat navigate.screen resolves to an entityList or
|
|
817
|
+
| <a id="named-filter-stat-navigate-target"></a>`named-filter/stat-navigate-target` | A stat navigate.screen resolves to an entityList, projectionList or custom screen. | Point navigate.screen at a registered list or custom screen. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
|
|
771
818
|
|
|
772
819
|
## nav
|
|
773
820
|
|
|
@@ -812,11 +859,13 @@
|
|
|
812
859
|
| <a id="parent-ref-entity-id-field-unknown"></a>`parent-ref/entity-id-field-unknown` | parentRef.entityIdField names a declared field of the entity. | Point entityIdField at a real field on the entity. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
|
|
813
860
|
| <a id="parent-ref-entity-type-field-unknown"></a>`parent-ref/entity-type-field-unknown` | parentRef.entityTypeField names a declared field of the entity. | Point entityTypeField at a real field on the entity. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
|
|
814
861
|
| <a id="parent-ref-hand-written-query-handler"></a>`parent-ref/hand-written-query-handler` | Query handlers on an entity with parentRef carry the entity-convention brand, so the parent-ref read-gate applies. | Register the handler via defineEntityListHandler/defineEntityDetailHandler, or pass parentVisibility to the executor. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
|
|
862
|
+
| <a id="parent-ref-hand-written-write-handler"></a>`parent-ref/hand-written-write-handler` | Update/delete/restore handlers on an entity with parentRef carry the entity-convention brand, so the parent visibility gate applies. | Register the handler via defineEntityWriteHandler, or pass parentVisibility: parentVisibilityFor(ctx, event.user) to the executor. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
|
|
815
863
|
|
|
816
864
|
## personal-access-tokens
|
|
817
865
|
|
|
818
866
|
| Rule | Summary | Fix | Source |
|
|
819
867
|
| --- | --- | --- | --- |
|
|
868
|
+
| <a id="personal-access-tokens-released-wire-name-collision"></a>`personal-access-tokens/released-wire-name-collision` | Webhook events released through PAT scopes have unique wire names. | Give one of the colliding events another wireName in r.defineWebhookEvent. | `packages/bundled-features/src/personal-access-tokens/boot-rules.ts` |
|
|
820
869
|
| <a id="personal-access-tokens-scope-event-without-contract"></a>`personal-access-tokens/scope-event-without-contract` | Events listed in PAT scopes have a public webhook contract. | Declare the event with r.defineWebhookEvent or opt the entity into webhookEvents. | `packages/bundled-features/src/personal-access-tokens/boot-rules.ts` |
|
|
821
870
|
|
|
822
871
|
## pii
|
|
@@ -884,13 +933,17 @@
|
|
|
884
933
|
| <a id="projection-detail-action-show-on-tabs-invalid"></a>`projection-detail/action-show-on-tabs-invalid` | A header action showOnTabs is non-empty, names section ids of the screen and needs layout.mode "tabs". | List existing section ids or remove showOnTabs. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
885
934
|
| <a id="projection-detail-extension-contributes-to-form-submit"></a>`projection-detail/extension-contributes-to-form-submit` | A projectionDetail extension section does not set contributesToFormSubmit. | Omit contributesToFormSubmit and persist through the extension's own dispatcher writes. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
886
935
|
| <a id="projection-detail-extension-entity-name-missing"></a>`projection-detail/extension-entity-name-missing` | A projectionDetail extension section declares entityName. | Set entityName to the domain entity the extension persists against. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
936
|
+
| <a id="projection-detail-guidance-action-show-on-tabs"></a>`projection-detail/guidance-action-show-on-tabs` | Banner and steps actions set no showOnTabs. | Remove showOnTabs. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
937
|
+
| <a id="projection-detail-guidance-field-empty"></a>`projection-detail/guidance-field-empty` | The field names of breadcrumb, summary, banner, steps and progress are non-empty strings. | Name a query output field or remove the block. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
887
938
|
| <a id="projection-detail-header-with-record-title-field"></a>`projection-detail/header-with-record-title-field` | A projectionDetail with a header sets no recordTitleField. | Drop recordTitleField; header.title names the record. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
888
939
|
| <a id="projection-detail-metric-label-missing"></a>`projection-detail/metric-label-missing` | Every metric has an i18n label key. | Set label on the metric. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
889
940
|
| <a id="projection-detail-metric-navigate-tab-unknown"></a>`projection-detail/metric-navigate-tab-unknown` | A metric navigate.tab names a section id of the screen. | Navigate to an existing section id or remove navigate.tab. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
941
|
+
| <a id="projection-detail-progress-beside-steps-without-steps"></a>`projection-detail/progress-beside-steps-without-steps` | progress.placement "beside-steps" needs a steps block to sit next to. | Add steps to the projectionDetail or remove progress.placement. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
890
942
|
| <a id="projection-detail-singleton-with-detail-for"></a>`projection-detail/singleton-with-detail-for` | A singleton projectionDetail sets no detailFor. | Remove detailFor, or declare an explicit edit action. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
891
943
|
| <a id="projection-detail-singleton-with-id-param"></a>`projection-detail/singleton-with-id-param` | A singleton projectionDetail sets no idParam. | Remove idParam. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
892
944
|
| <a id="projection-detail-status-format-without-status"></a>`projection-detail/status-format-without-status` | header.statusFormat is only set together with header.status. | Set header.status or remove statusFormat. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
893
945
|
| <a id="projection-detail-status-tone-invalid"></a>`projection-detail/status-tone-invalid` | header.statusTones values are known select option tones. | Use one of SELECT_OPTION_TONES. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
946
|
+
| <a id="projection-detail-steps-narrow-limit-invalid"></a>`projection-detail/steps-narrow-limit-invalid` | steps.narrowLimit is a positive integer. | Set narrowLimit to a whole number of at least 1 or remove it. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
894
947
|
| <a id="projection-detail-subtitle-href-with-multi-part"></a>`projection-detail/subtitle-href-with-multi-part` | header.subtitleHref is only set with the string form of header.subtitle. | Use a single-field subtitle or remove subtitleHref. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
895
948
|
| <a id="projection-detail-subtitle-part-duplicate"></a>`projection-detail/subtitle-part-duplicate` | Each field appears once in header.subtitle. | List each field once. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
896
949
|
| <a id="projection-detail-subtitle-part-navigate-target-missing"></a>`projection-detail/subtitle-part-navigate-target-missing` | A header.subtitle part navigate names a screen or an entity. | Set screen or entity on the part's navigate. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
|
|
@@ -1178,6 +1231,7 @@
|
|
|
1178
1231
|
| <a id="webhook-event-duplicate"></a>`webhook-event/duplicate` | Webhook event names are unique per feature. | Rename one of the events. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
|
|
1179
1232
|
| <a id="webhook-event-name-not-kebab"></a>`webhook-event/name-not-kebab` | Webhook event names are kebab-case. | Rename the event to lowercase letters, digits and dashes. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
|
|
1180
1233
|
| <a id="webhook-event-payload-not-zod-object"></a>`webhook-event/payload-not-zod-object` | Webhook event payloads are Zod object schemas. | Pass z.object({ ... }) as payload. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
|
|
1234
|
+
| <a id="webhook-event-payload-open-shape"></a>`webhook-event/payload-open-shape` | Webhook event payload objects are closed; undeclared keys must be stripped. | Replace looseObject/passthrough/catchall with z.object({ ... }) and declare every field. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
|
|
1181
1235
|
| <a id="webhook-event-version-invalid"></a>`webhook-event/version-invalid` | Webhook event version is a positive integer. | Set version to an integer of 1 or higher. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
|
|
1182
1236
|
| <a id="webhook-event-wire-name-empty"></a>`webhook-event/wire-name-empty` | Webhook event wireName is a non-empty string when set. | Set a wireName or omit it. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
|
|
1183
1237
|
|
|
@@ -115,6 +115,7 @@ import {
|
|
|
115
115
|
generateApiDocs,
|
|
116
116
|
type NamedApiExample,
|
|
117
117
|
type NamedWebhookExample,
|
|
118
|
+
resolveApiDocsConfig,
|
|
118
119
|
WebhookExampleFileSchema,
|
|
119
120
|
} from "@cosmicdrift/kumiko-bundled-features/agent-tools";
|
|
120
121
|
import { allAppFeatures } from "@cosmicdrift/kumiko-framework/config";
|
|
@@ -175,12 +176,7 @@ describe("api-docs golden", () => {
|
|
|
175
176
|
registry: createRegistry(
|
|
176
177
|
composeFeatures(allAppFeatures(config), { includeBundled: config.includeBundled === true }),
|
|
177
178
|
),
|
|
178
|
-
config: {
|
|
179
|
-
...config.apiDocs,
|
|
180
|
-
locales: config.apiDocs?.locales ?? ["en"],
|
|
181
|
-
baseUrl: config.apiDocs?.baseUrl ?? "",
|
|
182
|
-
appName: config.apiDocs?.appName ?? appName,
|
|
183
|
-
},
|
|
179
|
+
config: resolveApiDocsConfig(config.apiDocs ?? {}, { appName }),
|
|
184
180
|
// Fixed so that a release does not turn the golden red.
|
|
185
181
|
source: { framework: "0.0.0-recipe", app: { name: appName, version: "0.0.0" } },
|
|
186
182
|
examples: readExamples(),
|
|
@@ -440,11 +440,36 @@ describe("ConfirmationCodeStep", () => {
|
|
|
440
440
|
renderStep(onConfirm);
|
|
441
441
|
type("123456");
|
|
442
442
|
await waitFor(() => expect(screen.getByRole("alert")).toBeTruthy());
|
|
443
|
+
expect(screen.getByRole("alert").textContent).toContain("That code is not valid");
|
|
443
444
|
const input = screen.getByTestId("confirmation-code");
|
|
444
445
|
expect(input).toHaveProperty("value", "");
|
|
445
446
|
await waitFor(() => expect(document.activeElement).toBe(input));
|
|
446
447
|
expect(onConfirm).toHaveBeenCalledTimes(1);
|
|
447
448
|
});
|
|
449
|
+
|
|
450
|
+
test("a failing onConfirm shows a technical error instead of an invalid-code message, clears the field and refocuses", async () => {
|
|
451
|
+
const onConfirm = mock(async (_code: string): Promise<boolean> => {
|
|
452
|
+
throw new Error("network");
|
|
453
|
+
});
|
|
454
|
+
renderStep(onConfirm);
|
|
455
|
+
type("123456");
|
|
456
|
+
await waitFor(() => expect(screen.getByRole("alert")).toBeTruthy());
|
|
457
|
+
expect(screen.getByRole("alert").textContent).toContain("Could not verify the code");
|
|
458
|
+
expect(screen.queryByText(/not valid/)).toBeNull();
|
|
459
|
+
const input = screen.getByTestId("confirmation-code");
|
|
460
|
+
expect(input).toHaveProperty("value", "");
|
|
461
|
+
await waitFor(() => expect(document.activeElement).toBe(input));
|
|
462
|
+
expect(onConfirm).toHaveBeenCalledTimes(1);
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
test("an accepted code disables the field so the used code cannot be edited", async () => {
|
|
466
|
+
const onConfirm = mock(async (_code: string) => true);
|
|
467
|
+
renderStep(onConfirm);
|
|
468
|
+
type("123456");
|
|
469
|
+
const input = screen.getByTestId("confirmation-code");
|
|
470
|
+
await waitFor(() => expect(onConfirm).toHaveBeenCalledTimes(1));
|
|
471
|
+
await waitFor(() => expect(input).toHaveProperty("disabled", true));
|
|
472
|
+
});
|
|
448
473
|
});
|
|
449
474
|
```
|
|
450
475
|
|
|
@@ -452,7 +477,7 @@ describe("ConfirmationCodeStep", () => {
|
|
|
452
477
|
|
|
453
478
|
```tsx
|
|
454
479
|
import { usePrimitives } from "@cosmicdrift/kumiko-renderer";
|
|
455
|
-
import { type ReactNode, useState } from "react";
|
|
480
|
+
import { type ReactNode, useRef, useState } from "react";
|
|
456
481
|
|
|
457
482
|
const CONFIRMATION_CODE_LENGTH = 6;
|
|
458
483
|
|
|
@@ -466,15 +491,32 @@ export function ConfirmationCodeStep({ onConfirm }: ConfirmationCodeStepProps):
|
|
|
466
491
|
const [code, setCode] = useState("");
|
|
467
492
|
const [attempt, setAttempt] = useState(0);
|
|
468
493
|
const [pending, setPending] = useState(false);
|
|
469
|
-
const [
|
|
494
|
+
const [confirmed, setConfirmed] = useState(false);
|
|
495
|
+
// A ref, not `pending`: two onComplete calls in one tick both see the stale render closure.
|
|
496
|
+
const inFlight = useRef(false);
|
|
497
|
+
const [failure, setFailure] = useState<"rejected" | "error" | null>(null);
|
|
470
498
|
|
|
471
499
|
const confirm = async (submittedCode: string): Promise<void> => {
|
|
472
|
-
if (
|
|
500
|
+
if (inFlight.current) return;
|
|
501
|
+
inFlight.current = true;
|
|
473
502
|
setPending(true);
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
503
|
+
setFailure(null);
|
|
504
|
+
let accepted = false;
|
|
505
|
+
let technicalError = false;
|
|
506
|
+
try {
|
|
507
|
+
accepted = await onConfirm(submittedCode);
|
|
508
|
+
} catch {
|
|
509
|
+
// A network or server error must not leave the step stuck with a full field.
|
|
510
|
+
technicalError = true;
|
|
511
|
+
} finally {
|
|
512
|
+
inFlight.current = false;
|
|
513
|
+
setPending(false);
|
|
514
|
+
}
|
|
515
|
+
if (accepted) {
|
|
516
|
+
setConfirmed(true);
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
setFailure(technicalError ? "error" : "rejected");
|
|
478
520
|
setCode("");
|
|
479
521
|
// The input was disabled while pending and lost focus; remounting restores autoFocus.
|
|
480
522
|
setAttempt((n) => n + 1);
|
|
@@ -492,11 +534,16 @@ export function ConfirmationCodeStep({ onConfirm }: ConfirmationCodeStepProps):
|
|
|
492
534
|
value={code}
|
|
493
535
|
onChange={setCode}
|
|
494
536
|
onComplete={(next) => void confirm(next)}
|
|
495
|
-
disabled={pending}
|
|
496
|
-
hasError={
|
|
537
|
+
disabled={pending || confirmed}
|
|
538
|
+
hasError={failure !== null}
|
|
497
539
|
autoFocus
|
|
498
540
|
/>
|
|
499
|
-
{
|
|
541
|
+
{failure === "rejected" ? (
|
|
542
|
+
<Banner variant="error">That code is not valid. Try again.</Banner>
|
|
543
|
+
) : null}
|
|
544
|
+
{failure === "error" ? (
|
|
545
|
+
<Banner variant="error">Could not verify the code. Try again in a moment.</Banner>
|
|
546
|
+
) : null}
|
|
500
547
|
</>
|
|
501
548
|
);
|
|
502
549
|
}
|
|
@@ -22,6 +22,8 @@ Shows how a feature posts to a tenant's Slack channel without ever handling the
|
|
|
22
22
|
|
|
23
23
|
The same shape works for `channel-discord`, `channel-teams` (connection name + webhook secret) and `channel-telegram` (one `botToken` secret, the address is the chat id).
|
|
24
24
|
|
|
25
|
+
WhatsApp is two-way and not a delivery channel; `channel-whatsapp` is covered in `docs/guides/whatsapp-channel.md` and its own integration test.
|
|
26
|
+
|
|
25
27
|
## Run
|
|
26
28
|
|
|
27
29
|
```bash
|
|
@@ -341,6 +341,7 @@ import { createEntity, createTextField } from "@cosmicdrift/kumiko-framework/eng
|
|
|
341
341
|
|
|
342
342
|
export const currencyEntity = createEntity({
|
|
343
343
|
table: "read_sample_currencies",
|
|
344
|
+
systemRowsReadable: true,
|
|
344
345
|
fields: {
|
|
345
346
|
code: createTextField({ personal: false, reason: "is_reference_data", required: true }),
|
|
346
347
|
name: createTextField({ personal: false, reason: "is_reference_data", required: true }),
|
|
@@ -234,18 +234,14 @@ describe("env composition", () => {
|
|
|
234
234
|
expect(report).not.toContain("S3_BUCKET");
|
|
235
235
|
});
|
|
236
236
|
|
|
237
|
-
test("rejects a remote http S3 endpoint
|
|
237
|
+
test("rejects a remote http S3 endpoint when the booted env is production", () => {
|
|
238
238
|
const composed = composeAppEnv();
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
} finally {
|
|
246
|
-
if (originalNodeEnv === undefined) delete process.env["NODE_ENV"];
|
|
247
|
-
else process.env["NODE_ENV"] = originalNodeEnv;
|
|
248
|
-
}
|
|
239
|
+
const values = { ...minimalValidValues, S3_ENDPOINT: "http://s3.example.com" };
|
|
240
|
+
|
|
241
|
+
expect(() => parseEnv(composed.schema, { ...values, NODE_ENV: "production" })).toThrow(
|
|
242
|
+
KumikoBootError,
|
|
243
|
+
);
|
|
244
|
+
expect(() => parseEnv(composed.schema, values)).not.toThrow();
|
|
249
245
|
});
|
|
250
246
|
});
|
|
251
247
|
```
|
|
@@ -18,7 +18,8 @@ SystemAdmins reply from the admin. Phone is off and Telegram is not mounted unle
|
|
|
18
18
|
turns them on (`fields.phone`, `telegram: true`).
|
|
19
19
|
|
|
20
20
|
**What the recipe demonstrates:**
|
|
21
|
-
- Mounting `createHelpdeskFeature` with its companions (delivery, user-data-rights,
|
|
21
|
+
- Mounting `createHelpdeskFeature` with its companions (config, delivery, user-data-rights,
|
|
22
|
+
files, notes-history)
|
|
22
23
|
- The anonymous flow: `helpdesk:query:challenge` hands out a proof-of-work challenge,
|
|
23
24
|
`helpdesk:write:submit` verifies it; spam gets the same 200 body and stores nothing
|
|
24
25
|
- The browser client at `GET /helpdesk/client.js` (`window.KumikoHelpdesk.load()` / `submit()`)
|
|
@@ -48,12 +49,15 @@ bun test --config=bunfig.integration.toml samples/recipes/helpdesk
|
|
|
48
49
|
## Integration into a real app
|
|
49
50
|
|
|
50
51
|
1. Mount `createHelpdeskFeature({ appName })` plus delivery, a mail channel, `user-data-rights`,
|
|
51
|
-
`files` with a file provider and `config`.
|
|
52
|
+
`files` with a file provider, `notes-history` and `config`.
|
|
52
53
|
2. Run `kumiko schema generate` (new tables, plus the delivery `idempotency_key` column).
|
|
53
54
|
3. SystemAdmins set `helpdesk:config:reply-to` in the admin.
|
|
54
|
-
4. Embed `/helpdesk/client.js` on the website; the form is yours.
|
|
55
|
-
|
|
56
|
-
`
|
|
55
|
+
4. Embed `/helpdesk/client.js` on the website; the form is yours. The client posts to the
|
|
56
|
+
relative paths `/api/query` and `/api/write` without cookies, so the page has to share the
|
|
57
|
+
app's origin. A website served by another server forwards `/api` to the app on its own
|
|
58
|
+
origin; it can then serve the same script from `HELPDESK_CLIENT_SOURCE` and type its calls
|
|
59
|
+
with `HelpdeskWebsiteClient`, both from `@cosmicdrift/kumiko-bundled-features/helpdesk/client`.
|
|
60
|
+
`samples/apps/use-all-bundled/public/helpdesk-contact.html` (with `helpdesk-contact.js`) is a complete same-origin page.
|
|
57
61
|
|
|
58
62
|
Telegram is optional and off by default: notifications go by mail to SystemAdmins only. An app
|
|
59
63
|
that turns it on (`telegram: true`) also mounts `channel-telegram` and `secrets` for the bot
|
|
@@ -150,8 +154,10 @@ describe("helpdesk sample", () => {
|
|
|
150
154
|
// captcha: honeypot field, single-use proof-of-work challenge, minimum submit time, per-IP
|
|
151
155
|
// and per-email rate limits. Rejected submits answer 200 with the normal body.
|
|
152
156
|
//
|
|
153
|
-
// The website embeds the anonymous client the feature serves itself
|
|
154
|
-
//
|
|
157
|
+
// The website embeds the anonymous client the feature serves itself. The client posts to the
|
|
158
|
+
// relative paths /api/query and /api/write, so the page must share its origin with the app
|
|
159
|
+
// (or forward /api to it on its own origin):
|
|
160
|
+
// <script src="/helpdesk/client.js"></script>
|
|
155
161
|
// const { kinds, phone } = await window.KumikoHelpdesk.load();
|
|
156
162
|
// const result = await window.KumikoHelpdesk.submit({ kind, name, email, message, locale });
|
|
157
163
|
// // result.kind: "sent" | "rate-limited" (retryAfterSeconds) | "failed"
|
|
@@ -159,7 +165,8 @@ describe("helpdesk sample", () => {
|
|
|
159
165
|
// Prerequisites the app wires itself:
|
|
160
166
|
// - `anonymousAccess` (defaultTenantId = SYSTEM_TENANT_ID) so the form needs no login
|
|
161
167
|
// - delivery with a mail channel (channel-telegram only with `telegram: true`, off by default)
|
|
162
|
-
// -
|
|
168
|
+
// - config, user-data-rights and notes-history (required features)
|
|
169
|
+
// - files with a file provider, because the entities carry file fields
|
|
163
170
|
// - `kumiko schema generate` for the new tables
|
|
164
171
|
|
|
165
172
|
import { createHelpdeskFeature } from "@cosmicdrift/kumiko-bundled-features/helpdesk";
|