@ai-matrx/associations 0.14.88 → 0.14.90

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.
@@ -46,6 +46,7 @@ __export(core_exports, {
46
46
  isContentSourceEdge: () => isContentSourceEdge,
47
47
  isMembershipMetadata: () => isMembershipMetadata,
48
48
  ok: () => ok,
49
+ pluralizeLabel: () => pluralizeLabel,
49
50
  resolveEntityToken: () => resolveEntityToken
50
51
  });
51
52
  module.exports = __toCommonJS(core_exports);
@@ -423,18 +424,25 @@ var ENTITY_TYPE_METADATA = {
423
424
  "crm_sending_identity": { token: "crm_sending_identity", schema: "crm", table: "sending_identity", label: "Sending mailbox", baseTier: 1, isComponent: false, isModule: false, isListed: true, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
424
425
  "crm_sending_identity_check": { token: "crm_sending_identity_check", schema: "crm", table: "sending_identity_check", label: "Sending Check", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: "check_kind", contentRole: null, referenceCategory: null },
425
426
  "crm_sending_policy": { token: "crm_sending_policy", schema: "crm", table: "sending_policy", label: "Sending Policy", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
427
+ "custom_agent_table_origin": { token: "custom_agent_table_origin", schema: "custom", table: "agent_table_origin", label: "Agent Table Origin", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
426
428
  "custom_agent_table_trust": { token: "custom_agent_table_trust", schema: "custom", table: "agent_table_trust", label: "Agent table trust", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
427
429
  "custom_agg_digest_checked": { token: "custom_agg_digest_checked", schema: "custom", table: "agg_digest_checked", label: "Aggregate digest checked", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
430
+ "custom_anon_form_draft": { token: "custom_anon_form_draft", schema: "custom", table: "anon_form_draft", label: "Anonymous Form Draft", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
428
431
  "custom_base": { token: "custom_base", schema: "custom", table: "base", label: "Base", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
429
432
  "custom_base_snapshot": { token: "custom_base_snapshot", schema: "custom", table: "base_snapshot", label: "Base snapshot", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
430
433
  "custom_field_definition": { token: "custom_field_definition", schema: "platform", table: "custom_field_definition", label: "Custom Field", baseTier: 1, isComponent: false, isModule: false, isListed: true, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
431
434
  "custom_field_target": { token: "custom_field_target", schema: "platform", table: "custom_field_target", label: "Custom Field Target", baseTier: 1, isComponent: false, isModule: false, isListed: true, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
435
+ "custom_inbox_item_state": { token: "custom_inbox_item_state", schema: "custom", table: "inbox_item_state", label: "Inbox Item State", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
432
436
  "custom_io_outbox_consumer": { token: "custom_io_outbox_consumer", schema: "custom", table: "io_outbox_consumer", label: "Outbox consumer", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
433
437
  "custom_io_outbox_consumption": { token: "custom_io_outbox_consumption", schema: "custom", table: "io_outbox_consumption", label: "Outbox consumption", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
438
+ "custom_portal": { token: "custom_portal", schema: "custom", table: "portal", label: "Portal", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
439
+ "custom_portal_principal": { token: "custom_portal_principal", schema: "custom", table: "portal_principal", label: "Portal Principal", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
440
+ "custom_portal_table": { token: "custom_portal_table", schema: "custom", table: "portal_table", label: "Portal Table", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
434
441
  "custom_share_tails_mine_repair": { token: "custom_share_tails_mine_repair", schema: "custom", table: "_share_tails_mine_repair", label: "Share tails repair", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
435
442
  "custom_synced_source": { token: "custom_synced_source", schema: "custom", table: "synced_source", label: "Synced source", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
436
443
  "custom_template": { token: "custom_template", schema: "custom", table: "template", label: "Template", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
437
444
  "custom_template_install": { token: "custom_template_install", schema: "custom", table: "template_install", label: "Template install", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
445
+ "custom_whole_value_parked": { token: "custom_whole_value_parked", schema: "custom", table: "whole_value_parked", label: "Parked Whole Value", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
438
446
  "cx_agent_memory": { token: "cx_agent_memory", schema: "chat", table: "agent_memory", label: "Agent Memory", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: false, category: "Conversations", referencePickable: true, titleColumn: "key", contentRole: null, referenceCategory: null },
439
447
  "cx_agent_plan": { token: "cx_agent_plan", schema: "chat", table: "agent_plan", label: "Agent Plan", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: false, category: "Conversations", referencePickable: false, titleColumn: "title", contentRole: null, referenceCategory: null },
440
448
  "cx_agent_task": { token: "cx_agent_task", schema: "chat", table: "agent_task", label: "Agent Task", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: false, category: "Conversations", referencePickable: false, titleColumn: "title", contentRole: null, referenceCategory: null },
@@ -714,9 +722,13 @@ var ENTITY_TYPE_METADATA = {
714
722
  "iam_org_availability_key": { token: "iam_org_availability_key", schema: "iam", table: "_org_availability_key", label: "Organization availability key", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
715
723
  "iam_org_domain": { token: "iam_org_domain", schema: "iam", table: "org_domain", label: "Custom Domain", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
716
724
  "iam_org_domain_route": { token: "iam_org_domain_route", schema: "iam", table: "org_domain_route", label: "Custom Domain Route", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
725
+ "iam_publish_binding": { token: "iam_publish_binding", schema: "iam", table: "publish_binding", label: "Publish Binding", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
726
+ "iam_publisher_verification": { token: "iam_publisher_verification", schema: "iam", table: "publisher_verification", label: "Publisher Verification", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
717
727
  "iam_read_lane_v2_rollout": { token: "iam_read_lane_v2_rollout", schema: "iam", table: "read_lane_v2_rollout", label: "Read lane v2 rollout", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
718
728
  "iam_record_seat_change": { token: "iam_record_seat_change", schema: "iam", table: "record_seat_change", label: "Record seat change", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
719
729
  "iam_sign_in_event": { token: "iam_sign_in_event", schema: "iam", table: "sign_in_event", label: "Sign-in", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
730
+ "iam_world_namespace": { token: "iam_world_namespace", schema: "iam", table: "world_namespace", label: "World Namespace", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
731
+ "iam_world_publish_admission": { token: "iam_world_publish_admission", schema: "iam", table: "world_publish_admission", label: "World Publish Admission", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
720
732
  "idempotency": { token: "idempotency", schema: "files", table: "idempotency", label: "Idempotency", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
721
733
  "industry": { token: "industry", schema: "iam", table: "industries", label: "Industry", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
722
734
  "industry_curator": { token: "industry_curator", schema: "iam", table: "industry_curators", label: "Industry Curator", baseTier: 2, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
@@ -956,6 +968,7 @@ var ENTITY_TYPE_METADATA = {
956
968
  "provision_vocabulary": { token: "provision_vocabulary", schema: "platform", table: "provision_vocabulary", label: "Provision Vocabulary", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
957
969
  "public_compat_wrapper": { token: "public_compat_wrapper", schema: "platform", table: "public_compat_wrapper", label: "Public compat wrapper", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
958
970
  "public_placement_baseline": { token: "public_placement_baseline", schema: "platform", table: "public_placement_baseline", label: "Public placement baseline", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
971
+ "public_placement_census": { token: "public_placement_census", schema: "platform", table: "public_placement_census", label: "Public placement census", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
959
972
  "public_placement_domain": { token: "public_placement_domain", schema: "platform", table: "public_placement_domain", label: "Public placement domain", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
960
973
  "public_restore_permit": { token: "public_restore_permit", schema: "platform", table: "public_restore_permit", label: "Public restore permit", baseTier: 1, isComponent: false, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
961
974
  "purpose": { token: "purpose", schema: "platform", table: "purpose", label: "Purpose", baseTier: 1, isComponent: false, isModule: false, isListed: true, scopeable: true, category: null, referencePickable: false, titleColumn: "title", contentRole: null, referenceCategory: null },
@@ -1028,7 +1041,9 @@ var ENTITY_TYPE_METADATA = {
1028
1041
  "seo_ai_visibility_brand_check": { token: "seo_ai_visibility_brand_check", schema: "seo", table: "ai_visibility_brand_check", label: "AI visibility brand check", baseTier: 1, isComponent: true, isModule: false, isListed: true, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1029
1042
  "seo_ai_visibility_citation": { token: "seo_ai_visibility_citation", schema: "seo", table: "ai_visibility_citation", label: "AI Visibility Citation", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: "marketing", referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1030
1043
  "seo_ai_visibility_claim": { token: "seo_ai_visibility_claim", schema: "seo", table: "ai_visibility_claim", label: "AI Visibility Claim", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: "marketing", referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1044
+ "seo_ai_visibility_design_artifact": { token: "seo_ai_visibility_design_artifact", schema: "seo", table: "ai_visibility_design_artifact", label: "AI Visibility Design Artifact", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1031
1045
  "seo_ai_visibility_panel": { token: "seo_ai_visibility_panel", schema: "seo", table: "ai_visibility_panel", label: "AI Visibility Panel", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1046
+ "seo_ai_visibility_panel_version": { token: "seo_ai_visibility_panel_version", schema: "seo", table: "ai_visibility_panel_version", label: "AI Visibility Panel Version", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: null, referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1032
1047
  "seo_ai_visibility_response": { token: "seo_ai_visibility_response", schema: "seo", table: "ai_visibility_response", label: "AI Visibility Response", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: "marketing", referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1033
1048
  "seo_ai_visibility_signal": { token: "seo_ai_visibility_signal", schema: "seo", table: "ai_visibility_signal", label: "AI Visibility Signal", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: "marketing", referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
1034
1049
  "seo_backlink": { token: "seo_backlink", schema: "seo", table: "backlink", label: "SEO Backlink", baseTier: 1, isComponent: true, isModule: false, isListed: false, scopeable: true, category: "marketing", referencePickable: false, titleColumn: null, contentRole: null, referenceCategory: null },
@@ -1680,18 +1695,25 @@ var ENTITY_TYPE_TOKENS = [
1680
1695
  "crm_sending_identity",
1681
1696
  "crm_sending_identity_check",
1682
1697
  "crm_sending_policy",
1698
+ "custom_agent_table_origin",
1683
1699
  "custom_agent_table_trust",
1684
1700
  "custom_agg_digest_checked",
1701
+ "custom_anon_form_draft",
1685
1702
  "custom_base",
1686
1703
  "custom_base_snapshot",
1687
1704
  "custom_field_definition",
1688
1705
  "custom_field_target",
1706
+ "custom_inbox_item_state",
1689
1707
  "custom_io_outbox_consumer",
1690
1708
  "custom_io_outbox_consumption",
1709
+ "custom_portal",
1710
+ "custom_portal_principal",
1711
+ "custom_portal_table",
1691
1712
  "custom_share_tails_mine_repair",
1692
1713
  "custom_synced_source",
1693
1714
  "custom_template",
1694
1715
  "custom_template_install",
1716
+ "custom_whole_value_parked",
1695
1717
  "cx_agent_memory",
1696
1718
  "cx_agent_plan",
1697
1719
  "cx_agent_task",
@@ -1971,9 +1993,13 @@ var ENTITY_TYPE_TOKENS = [
1971
1993
  "iam_org_availability_key",
1972
1994
  "iam_org_domain",
1973
1995
  "iam_org_domain_route",
1996
+ "iam_publish_binding",
1997
+ "iam_publisher_verification",
1974
1998
  "iam_read_lane_v2_rollout",
1975
1999
  "iam_record_seat_change",
1976
2000
  "iam_sign_in_event",
2001
+ "iam_world_namespace",
2002
+ "iam_world_publish_admission",
1977
2003
  "idempotency",
1978
2004
  "industry",
1979
2005
  "industry_curator",
@@ -2213,6 +2239,7 @@ var ENTITY_TYPE_TOKENS = [
2213
2239
  "provision_vocabulary",
2214
2240
  "public_compat_wrapper",
2215
2241
  "public_placement_baseline",
2242
+ "public_placement_census",
2216
2243
  "public_placement_domain",
2217
2244
  "public_restore_permit",
2218
2245
  "purpose",
@@ -2285,7 +2312,9 @@ var ENTITY_TYPE_TOKENS = [
2285
2312
  "seo_ai_visibility_brand_check",
2286
2313
  "seo_ai_visibility_citation",
2287
2314
  "seo_ai_visibility_claim",
2315
+ "seo_ai_visibility_design_artifact",
2288
2316
  "seo_ai_visibility_panel",
2317
+ "seo_ai_visibility_panel_version",
2289
2318
  "seo_ai_visibility_response",
2290
2319
  "seo_ai_visibility_signal",
2291
2320
  "seo_backlink",
@@ -2786,6 +2815,36 @@ function createRpcResultHelpers(errorSink, sessionAttached) {
2786
2815
  return { ok, err, mapPgError, mapPgErrorPair };
2787
2816
  }
2788
2817
 
2818
+ // src/core/pluralizeLabel.ts
2819
+ var UNCOUNTABLE = /* @__PURE__ */ new Set([
2820
+ "data",
2821
+ "media",
2822
+ "research",
2823
+ "information",
2824
+ "feedback",
2825
+ "content",
2826
+ "software",
2827
+ "evidence",
2828
+ "equipment",
2829
+ "metadata",
2830
+ "knowledge",
2831
+ "news",
2832
+ "series",
2833
+ "species"
2834
+ ]);
2835
+ function pluralizeLabel(label) {
2836
+ const m = /^(.*?)([A-Za-z]+)$/.exec(label);
2837
+ const head = m?.[1];
2838
+ const word = m?.[2];
2839
+ if (head === void 0 || word === void 0) return label;
2840
+ const lower = word.toLowerCase();
2841
+ if (UNCOUNTABLE.has(lower)) return label;
2842
+ if (lower.endsWith("sis")) return `${head}${word.slice(0, -2)}es`;
2843
+ if (/[^aeiou]y$/.test(lower)) return `${head}${word.slice(0, -1)}ies`;
2844
+ if (/(s|x|z|ch|sh)$/.test(lower)) return `${head}${word}es`;
2845
+ return `${label}s`;
2846
+ }
2847
+
2789
2848
  // src/record-store-nouns.ts
2790
2849
  var RECORD_STORE_NOUNS = {
2791
2850
  /** The canonical Table token (2026-10-07). */
@@ -2897,7 +2956,7 @@ function createEntityRegistry(errorSink, initialOverlay) {
2897
2956
  function getEntityInfo(token) {
2898
2957
  const meta = ENTITY_TYPE_METADATA[token] ?? recordStoreMeta(token) ?? retiredTokenMeta(token);
2899
2958
  const overlay = overlayByToken[token];
2900
- const labelPlural = overlay?.labelPlural ?? `${meta.label}s`;
2959
+ const labelPlural = overlay?.labelPlural ?? pluralizeLabel(meta.label);
2901
2960
  const titleColumn = meta.titleColumn;
2902
2961
  const contentRole = isContentRole(meta.contentRole) ? meta.contentRole : "destination";
2903
2962
  if (meta.contentRole !== null && !isContentRole(meta.contentRole)) {