@ai-matrx/associations 0.13.135 → 0.13.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog — @ai-matrx/associations
2
2
 
3
+ ## 0.13.136
4
+
5
+ **A retired entity token never crashes the host.** `getEntityInfo(token)` for a token the live
6
+ vocabulary no longer carries now returns a stand-in labelled `<token> (retired)` and reports
7
+ `retired_entity_token` through the errorSink once per token, instead of throwing
8
+ `Cannot read properties of undefined (reading 'titleColumn')`. 0.13.135's regenerated vocabulary
9
+ dropped `dataset`, `structured_list`, `udt_dataset_*` and `udt_structured_list_items` (deactivated
10
+ in `platform.entity_types` by the custom-data cutover) — its changelog line "no source changes"
11
+ was wrong — and a module-scope `getEntityInfo("structured_list")` in the frontend then crashed
12
+ every route of the dev app (found by real test PB-05, 2026-10-02 19:46Z).
13
+
14
+ **Consumer action:** search your code for the retired tokens above and move each reference to
15
+ the live token; each one now lands in your error sink as `retired_entity_token` until you do.
16
+
3
17
  ## 0.13.135
4
18
 
5
19
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -991,7 +1005,7 @@ Automatic changed-only republish (docs/metadata drift since the last tag — see
991
1005
  `git diff npm/associations/v0.10.2..npm/associations/v0.10.3 -- apps/shared/associations`).
992
1006
  No source changes intended and no consumer action required.
993
1007
 
994
- ## Unreleased
1008
+ ## 0.13.136
995
1009
 
996
1010
  Regenerated the entity vocabulary from the live registry (999 active tokens): adds
997
1011
  `document`, `document_version`, `message_template_detail`, `skill_detail` and
@@ -2403,8 +2403,35 @@ function createEntityRegistry(errorSink, initialOverlay) {
2403
2403
  const overlayByToken = {
2404
2404
  ...initialOverlay ?? {}
2405
2405
  };
2406
+ const retiredReported = /* @__PURE__ */ new Set();
2407
+ function retiredTokenMeta(token) {
2408
+ if (!retiredReported.has(token)) {
2409
+ retiredReported.add(token);
2410
+ errorSink({
2411
+ code: "retired_entity_token",
2412
+ message: `[entityRegistry] "${token}" is not in the live entity vocabulary (retired or renamed in platform.entity_types). The host still references it; rename the reference to the live token, or drop it. Serving a stand-in so the page can render.`,
2413
+ context: { token }
2414
+ });
2415
+ }
2416
+ return {
2417
+ token,
2418
+ schema: "",
2419
+ table: "",
2420
+ label: `${token} (retired)`,
2421
+ baseTier: 1,
2422
+ isComponent: false,
2423
+ isModule: false,
2424
+ isListed: false,
2425
+ scopeable: false,
2426
+ category: null,
2427
+ referencePickable: false,
2428
+ titleColumn: null,
2429
+ contentRole: null,
2430
+ referenceCategory: null
2431
+ };
2432
+ }
2406
2433
  function getEntityInfo(token) {
2407
- const meta = ENTITY_TYPE_METADATA[token];
2434
+ const meta = ENTITY_TYPE_METADATA[token] ?? retiredTokenMeta(token);
2408
2435
  const overlay = overlayByToken[token];
2409
2436
  const labelPlural = overlay?.labelPlural ?? `${meta.label}s`;
2410
2437
  const titleColumn = meta.titleColumn;