create-mercato-app 0.6.8-develop.6917.1.af45bc96e2 → 0.6.8-develop.6924.1.a8d208fcdc

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.
Files changed (64) hide show
  1. package/agentic/shared/ai/review-checklist.md +1 -1
  2. package/agentic/shared/ai/skills/om-module-scaffold/references/module-surfaces.md +1 -1
  3. package/dist/agentic/guides/module-facts.json +112 -112
  4. package/dist/agentic/guides/modules/ai_assistant.md +1 -1
  5. package/dist/agentic/guides/modules/api_docs.md +1 -1
  6. package/dist/agentic/guides/modules/api_keys.md +1 -1
  7. package/dist/agentic/guides/modules/attachments.md +1 -1
  8. package/dist/agentic/guides/modules/audit_logs.md +1 -1
  9. package/dist/agentic/guides/modules/auth.md +1 -1
  10. package/dist/agentic/guides/modules/business_rules.md +1 -1
  11. package/dist/agentic/guides/modules/catalog.md +1 -1
  12. package/dist/agentic/guides/modules/channel_gmail.md +1 -1
  13. package/dist/agentic/guides/modules/channel_imap.md +1 -1
  14. package/dist/agentic/guides/modules/checkout.md +1 -1
  15. package/dist/agentic/guides/modules/communication_channels.md +1 -1
  16. package/dist/agentic/guides/modules/configs.md +1 -1
  17. package/dist/agentic/guides/modules/content.md +1 -1
  18. package/dist/agentic/guides/modules/currencies.md +1 -1
  19. package/dist/agentic/guides/modules/customer_accounts.md +1 -1
  20. package/dist/agentic/guides/modules/customers.md +1 -1
  21. package/dist/agentic/guides/modules/dashboards.md +1 -1
  22. package/dist/agentic/guides/modules/data_sync.md +1 -1
  23. package/dist/agentic/guides/modules/design_system.md +1 -1
  24. package/dist/agentic/guides/modules/dictionaries.md +1 -1
  25. package/dist/agentic/guides/modules/directory.md +1 -1
  26. package/dist/agentic/guides/modules/entities.md +1 -1
  27. package/dist/agentic/guides/modules/events.md +3 -3
  28. package/dist/agentic/guides/modules/feature_toggles.md +1 -1
  29. package/dist/agentic/guides/modules/gateway_stripe.md +1 -1
  30. package/dist/agentic/guides/modules/generators.md +1 -1
  31. package/dist/agentic/guides/modules/inbox_ops.md +1 -1
  32. package/dist/agentic/guides/modules/integrations.md +1 -1
  33. package/dist/agentic/guides/modules/messages.md +1 -1
  34. package/dist/agentic/guides/modules/notifications.md +1 -1
  35. package/dist/agentic/guides/modules/onboarding.md +1 -1
  36. package/dist/agentic/guides/modules/payment_gateways.md +1 -1
  37. package/dist/agentic/guides/modules/perspectives.md +1 -1
  38. package/dist/agentic/guides/modules/planner.md +1 -1
  39. package/dist/agentic/guides/modules/portal.md +1 -1
  40. package/dist/agentic/guides/modules/progress.md +1 -1
  41. package/dist/agentic/guides/modules/query_index.md +1 -1
  42. package/dist/agentic/guides/modules/record_locks.md +1 -1
  43. package/dist/agentic/guides/modules/resources.md +1 -1
  44. package/dist/agentic/guides/modules/sales.md +1 -1
  45. package/dist/agentic/guides/modules/scheduler.md +1 -1
  46. package/dist/agentic/guides/modules/search.md +1 -1
  47. package/dist/agentic/guides/modules/security.md +1 -1
  48. package/dist/agentic/guides/modules/shipping_carriers.md +1 -1
  49. package/dist/agentic/guides/modules/sso.md +1 -1
  50. package/dist/agentic/guides/modules/staff.md +1 -1
  51. package/dist/agentic/guides/modules/storage_s3.md +1 -1
  52. package/dist/agentic/guides/modules/sync_akeneo.md +1 -1
  53. package/dist/agentic/guides/modules/sync_excel.md +1 -1
  54. package/dist/agentic/guides/modules/system_status_overlays.md +1 -1
  55. package/dist/agentic/guides/modules/translations.md +1 -1
  56. package/dist/agentic/guides/modules/webhooks.md +1 -1
  57. package/dist/agentic/guides/modules/wms.md +1 -1
  58. package/dist/agentic/guides/modules/workflows.md +1 -1
  59. package/dist/agentic/guides/upstream/manifest.json +1 -1
  60. package/dist/agentic/shared/ai/review-checklist.md +1 -1
  61. package/dist/agentic/shared/ai/skills/om-module-scaffold/references/module-surfaces.md +1 -1
  62. package/dist/index.js +10 -1
  63. package/package.json +4 -4
  64. package/template/.env.example +15 -0
@@ -23,7 +23,7 @@ Apply this checklist in addition to the installed `om-code-review` checklist whe
23
23
  ## Encryption, custom fields, search, and extension hosts
24
24
 
25
25
  - Sensitive fields are declared in `defaultEncryptionMaps`. Reads use `findWithDecryption`, `findOneWithDecryption`, or `findAndCountWithDecryption` with both scoped query filters and the decryption scope; responses, logs, events, exports, cache keys, and indexes do not expose ciphertext or plaintext secrets.
26
- - Equality lookup uses an explicitly approved hash-only sibling populated by `TenantDataEncryptionService`; direct queries use `lookupHashCandidates(value)` from `@open-mercato/shared/lib/encryption/aes` (or `hashForLookup(value)` only where the installed write contract requires one keyed value), never raw SHA-256 for low-entropy PII. New or changed encryption maps have isolated runtime evidence that reconciliation registered the map and the real write path stored ciphertext. `search.ts` uses a stable entity ID and safe `fieldPolicy`; searchable CRUD writes index after commit, bulk paths reindex deterministically, vector sources have `checksumSource`, token results have `formatResult`, and tests do not wait with arbitrary sleeps.
26
+ - Equality lookup uses an explicitly approved hash-only sibling populated by `TenantDataEncryptionService`; direct queries use `lookupHashCandidates(value)` from `@open-mercato/shared/lib/encryption/aes` (or `hashForLookup(value)` only where the installed write contract requires one keyed value), never raw SHA-256 for low-entropy PII. New or changed encryption maps have isolated runtime evidence that reconciliation registered the map and the real write path stored ciphertext. `search.ts` uses a stable entity ID, safe `fieldPolicy`, and `aclFeatures` naming the owning module's view feature(s) so global search can authorize reads per entity; searchable CRUD writes index after commit, bulk paths reindex deterministically, vector sources have `checksumSource`, token results have `formatResult`, and tests do not wait with arbitrary sleeps.
27
27
  - `CrudForm` uses shared helpers, `initialValues.updatedAt`, localized fields/groups/errors, `collectCustomFieldValues`/`entityIds`, explicit null clearing, and conflict surfacing. `DataTable` owns pagination/loading/empty/error/export and uses stable column/action/row-action IDs plus `extensionTableId`.
28
28
  - An intentional extensible API host declares an aligned colon-form `enrichers` entity ID. UI injection spots, widgets, interceptors, guards, enrichers, component handles, and menu entries keep stable IDs and demonstrate the complete render/read/save/reload/clear or execute/undo path they claim to support.
29
29
  - When AI behavior is requested, use the installed AI framework's discovered agent/tool surfaces rather than a bespoke model client. Tools declare non-empty feature gates, validate inputs, remove transport-only session tokens, handle expired sessions, return serializable data, and route mutations through the same scoped commands, confirmation, optimistic-lock, audit, undo, and post-commit contracts as the API/UI.
@@ -9,7 +9,7 @@ Load only the rows the brief requires.
9
9
  | ACL/setup | Declare stable resource features such as `<module>.<resources>.view`/`manage` and dependencies as the named `export const features = [...]` in `acl.ts`, followed by `export default features`; generated registry code expects both exports. Export `setup: ModuleSetupConfig = { defaultRoleFeatures, ... }` (plus default when useful) from `setup.ts`; do not rename the `features` export or export `defaultRoleFeatures` as a disconnected top-level map. Keep tenant/default/example seeds idempotent and run ACL sync. |
10
10
  | Events | `events.ts` imports `createModuleEvents` from `@open-mercato/shared/modules/events`, declares `const events = [{ id, label, category: 'crud' }] as const` (`category` is `crud`, `lifecycle`, `system`, or `custom`), then exports `createModuleEvents({ moduleId, events })`. It receives one options object, not positional module/event arguments. Use typed stable past-tense IDs before emission and idempotent subscribers; do not invent a shared `lib/events` entrypoint. |
11
11
  | Worker/progress | Load `runtime-cache-and-queues.md`; use discovered metadata, scoped/idempotent payloads, bounded concurrency/retry, command writes, and `ProgressJob`. |
12
- | Search | `search.ts` imports `SearchModuleConfig`/`SearchBuildContext`/`SearchIndexSource`/`SearchResultPresenter` from `@open-mercato/shared/modules/search` and exports `searchConfig`. Its stable colon-form entity uses the exact `entityId` key and declares `fieldPolicy: { searchable: [...], excluded: [...] }`; sensitive values remain excluded and only approved hash siblings support exact lookup. `buildSource(ctx)` returns `{ text: string[], presenter, checksumSource: { record: ctx.record, customFields: ctx.customFields } }`; `formatResult(ctx)` independently derives its presenter from `ctx.record`, and `resolveUrl(ctx)` reads the ID from `ctx.record.id`. `SearchResultPresenter` permits only `title`/`subtitle`/`icon`/`badge` and has no `metadata`; indexed structured values belong in `SearchIndexSource.fields`. CRUD uses `indexer: { entityType }`; bulk writes use the SearchIndexer reindex path. Do not invent `entityType` in `search.ts`, `ctx.presenter`, `ctx.id`, `convergenceKey`, `result`, per-field policy keys, `body`, or `href` aliases. Tests prove delete/reindex deterministic convergence without sleeps. |
12
+ | Search | `search.ts` imports `SearchModuleConfig`/`SearchBuildContext`/`SearchIndexSource`/`SearchResultPresenter` from `@open-mercato/shared/modules/search` and exports `searchConfig`. Its stable colon-form entity uses the exact `entityId` key and declares `fieldPolicy: { searchable: [...], excluded: [...] }`; sensitive values remain excluded and only approved hash siblings support exact lookup. `buildSource(ctx)` returns `{ text: string[], presenter, checksumSource: { record: ctx.record, customFields: ctx.customFields } }`; `formatResult(ctx)` independently derives its presenter from `ctx.record`, and `resolveUrl(ctx)` reads the ID from `ctx.record.id`. Every entity declares `aclFeatures` naming the owning module's view feature(s) — global search and the search AI tools fail closed, so an entity without it is invisible to every non-superadmin. `SearchResultPresenter` permits only `title`/`subtitle`/`icon`/`badge` and has no `metadata`; indexed structured values belong in `SearchIndexSource.fields`. CRUD uses `indexer: { entityType }`; bulk writes use the SearchIndexer reindex path. Do not invent `entityType` in `search.ts`, `ctx.presenter`, `ctx.id`, `convergenceKey`, `result`, per-field policy keys, `body`, or `href` aliases. Tests prove delete/reindex deterministic convergence without sleeps. |
13
13
  | Cache | Load `runtime-cache-and-queues.md`; use the DI cache, tenant/org/entity tags, and post-commit invalidation including undo/sub-resource paths. |
14
14
  | Notifications | type, renderer, subscriber/handler, ACL, client reactive behavior when needed. |
15
15
  | CLI | discovered command, scoped inputs, compiled-package test. |