@elevasis/ui 2.80.0 → 2.82.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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/dist/api/index.js +3 -3
  4. package/dist/app/index.d.ts +32 -16
  5. package/dist/app/index.js +12 -10
  6. package/dist/auth/index.js +4 -4
  7. package/dist/charts/index.js +4 -4
  8. package/dist/{chunk-JDPPV2XI.js → chunk-2S5477QR.js} +17 -227
  9. package/dist/{chunk-U3GB5PDF.js → chunk-3OQVXI4C.js} +2 -2
  10. package/dist/{chunk-BXFZ676L.js → chunk-3PQMF4RP.js} +3 -3
  11. package/dist/{chunk-NGRRAYMO.js → chunk-3RYXJS2F.js} +3 -3
  12. package/dist/{chunk-XEO2UG4J.js → chunk-4C4IFMRP.js} +3 -3
  13. package/dist/{chunk-WOYW24U7.js → chunk-4TEVJRKQ.js} +1 -1
  14. package/dist/{chunk-6IWH757Q.js → chunk-5WNRTDEZ.js} +1 -1
  15. package/dist/{chunk-QQKYBGBX.js → chunk-6NIGO2LD.js} +3 -3
  16. package/dist/{chunk-KGUBFIMQ.js → chunk-7RS2NUC6.js} +10 -2
  17. package/dist/{chunk-NKMBW7WE.js → chunk-AA257QZO.js} +21 -10
  18. package/dist/{chunk-CIGWHY7C.js → chunk-DEZW7QDI.js} +15 -4
  19. package/dist/{chunk-SPH5WW44.js → chunk-ELQLU323.js} +5 -5
  20. package/dist/{chunk-6MWTTBBT.js → chunk-ER2HBKS7.js} +5 -5
  21. package/dist/{chunk-A32PJ2DO.js → chunk-G6VHIXWD.js} +1 -1
  22. package/dist/{chunk-T6AOVZAI.js → chunk-GH3UY2FM.js} +4 -4
  23. package/dist/{chunk-AKANHRQ5.js → chunk-GKTQEVSO.js} +3 -4
  24. package/dist/{chunk-MJIDC25O.js → chunk-HDITVHZT.js} +2 -2
  25. package/dist/{chunk-QSN7BWI3.js → chunk-HOX4CMYY.js} +1 -1
  26. package/dist/{chunk-ZU676PFP.js → chunk-I2JOA54D.js} +1 -1
  27. package/dist/{chunk-MMOR2HQZ.js → chunk-KQTI4RZN.js} +8 -8
  28. package/dist/{chunk-YSFLFD4U.js → chunk-LTRJZOHA.js} +1 -1
  29. package/dist/{chunk-7A25EJ4A.js → chunk-M5CRPFJA.js} +44 -30
  30. package/dist/{chunk-52G4B33T.js → chunk-NQSZ4UGG.js} +2 -2
  31. package/dist/{chunk-VKA4LQ7N.js → chunk-OWAEBFWH.js} +1 -1
  32. package/dist/{chunk-DFGQG32T.js → chunk-PJN6CMWZ.js} +1 -1
  33. package/dist/{chunk-3HMRK3RC.js → chunk-PNCJJE4Z.js} +1 -1
  34. package/dist/{chunk-I5SYS6DT.js → chunk-PTB575MP.js} +5 -5
  35. package/dist/{chunk-3UO2CJTR.js → chunk-PV64XFZY.js} +1 -1
  36. package/dist/{chunk-BG7VCCFB.js → chunk-RKTFFLVV.js} +1 -1
  37. package/dist/{chunk-HVNDBY42.js → chunk-ROC2TFPS.js} +2 -2
  38. package/dist/{chunk-VHK5J55Q.js → chunk-TAGPVICO.js} +8 -8
  39. package/dist/{chunk-W6QOWA3L.js → chunk-TCVMLAMC.js} +2 -2
  40. package/dist/{chunk-JZBMZLD3.js → chunk-VTUVB3J3.js} +1 -1
  41. package/dist/{chunk-Q6HRTWA6.js → chunk-XHJBDW2S.js} +1 -1
  42. package/dist/{chunk-2KXSFLU2.js → chunk-ZG3DARVR.js} +1 -1
  43. package/dist/{chunk-CSEADI37.js → chunk-ZYIGD2QY.js} +3 -3
  44. package/dist/components/index.d.ts +0 -14
  45. package/dist/components/index.js +39 -39
  46. package/dist/components/navigation/index.js +5 -5
  47. package/dist/features/auth/index.d.ts +1 -1
  48. package/dist/features/auth/index.js +6 -6
  49. package/dist/features/clients/index.js +7 -7
  50. package/dist/features/content/index.js +7 -7
  51. package/dist/features/crm/index.d.ts +0 -14
  52. package/dist/features/crm/index.js +10 -10
  53. package/dist/features/dashboard/index.js +6 -6
  54. package/dist/features/delivery/index.d.ts +0 -14
  55. package/dist/features/delivery/index.js +17 -17
  56. package/dist/features/knowledge/index.js +4 -4
  57. package/dist/features/lead-gen/index.d.ts +54 -16
  58. package/dist/features/lead-gen/index.js +11 -11
  59. package/dist/features/monitoring/index.js +8 -8
  60. package/dist/features/monitoring/requests/index.js +6 -6
  61. package/dist/features/operations/index.js +11 -11
  62. package/dist/features/seo/index.d.ts +105 -17
  63. package/dist/features/seo/index.js +7 -7
  64. package/dist/features/settings/index.d.ts +1 -1
  65. package/dist/features/settings/index.js +7 -7
  66. package/dist/hooks/access/index.js +4 -4
  67. package/dist/hooks/delivery/index.d.ts +0 -14
  68. package/dist/hooks/delivery/index.js +3 -3
  69. package/dist/hooks/published.d.ts +2 -16
  70. package/dist/hooks/published.js +15 -15
  71. package/dist/initialization/index.d.ts +1 -1
  72. package/dist/knowledge/index.d.ts +32 -16
  73. package/dist/knowledge/index.js +20 -7185
  74. package/dist/layout/index.js +8 -8
  75. package/dist/profile/index.d.ts +1 -1
  76. package/dist/provider/index.d.ts +39 -16
  77. package/dist/provider/index.js +4 -4
  78. package/dist/provider/published.d.ts +31 -15
  79. package/dist/provider/published.js +4 -4
  80. package/dist/sse/index.d.ts +7 -1
  81. package/dist/sse/index.js +22 -2
  82. package/dist/test-utils/index.d.ts +3 -1
  83. package/dist/test-utils/index.js +29 -6
  84. package/dist/types/index.d.ts +1 -15
  85. package/dist/utils/index.d.ts +9 -9
  86. package/dist/utils/index.js +1 -1
  87. package/dist/vite/index.js +2 -2
  88. package/dist/vite-plugin-knowledge/index.js +1 -1
  89. package/package.json +6 -6
  90. package/src/knowledge/README.md +32 -32
  91. package/dist/knowledge-search-index-YU6V3FTK.js +0 -1539
@@ -1,14 +1,14 @@
1
- export { AppPageLayout, AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CollapsibleSidebarGroup, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, SubshellNavList, Topbar, TopbarActions, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse } from '../chunk-BG7VCCFB.js';
2
- export { SubshellLoader } from '../chunk-WOYW24U7.js';
3
- export { AppShellCenteredContainer, AppShellError, AppShellLoader } from '../chunk-3UO2CJTR.js';
4
- export { SubshellPageLayout } from '../chunk-Q6HRTWA6.js';
1
+ export { AppPageLayout, AppShellContainer, AppShellContentContainer, AppShellRightSideContainer, AppShellRightSideOuterContainer, AppTopbarAdjusterWrapper, CollapsibleSidebarGroup, CyberParticles, LinksGroup, Sidebar, SidebarContext, SidebarProvider, SubshellNavList, Topbar, TopbarActions, TopbarContainer, Vignette, subsidebarWidth, useSidebar, useSidebarCollapse } from '../chunk-RKTFFLVV.js';
2
+ export { SubshellLoader } from '../chunk-4TEVJRKQ.js';
3
+ export { AppShellCenteredContainer, AppShellError, AppShellLoader } from '../chunk-PV64XFZY.js';
4
+ export { SubshellPageLayout } from '../chunk-XHJBDW2S.js';
5
5
  export { PageContainer } from '../chunk-BZZCNLT6.js';
6
- export { SubshellContainer, SubshellContentContainer, SubshellNavItem, SubshellRightSideContainer, SubshellSidebar, SubshellSidebarLoader, SubshellSidebarSection, sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding, sidebarSectionPadding, sidebarSubLinkIndent, sidebarSubLinkPaddingX, sidebarSubLinkPaddingY, sidebarToggleIconSize, sidebarTransitionDuration, sidebarWidth, subshellNavItemIconSize, topbarHeight } from '../chunk-7A25EJ4A.js';
6
+ export { SubshellContainer, SubshellContentContainer, SubshellNavItem, SubshellRightSideContainer, SubshellSidebar, SubshellSidebarLoader, SubshellSidebarSection, sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding, sidebarSectionPadding, sidebarSubLinkIndent, sidebarSubLinkPaddingX, sidebarSubLinkPaddingY, sidebarToggleIconSize, sidebarTransitionDuration, sidebarWidth, subshellNavItemIconSize, topbarHeight } from '../chunk-M5CRPFJA.js';
7
7
  import '../chunk-4WLAVUPS.js';
8
8
  export { AmbientBloomGrid, AppBackground, CyberBackground, FilmGrain, FloatingMotes, FloatingOrbs, PerspectiveGrid, RadiantGlow, WaveBackground } from '../chunk-RXZ3XDBM.js';
9
- import '../chunk-KGUBFIMQ.js';
9
+ import '../chunk-7RS2NUC6.js';
10
10
  import '../chunk-L7BZZ4SI.js';
11
- import '../chunk-3HMRK3RC.js';
11
+ import '../chunk-PNCJJE4Z.js';
12
12
  import '../chunk-62GVNH5U.js';
13
13
  import '../chunk-P45GQ3ZW.js';
14
14
  import '../chunk-IIMC4TRH.js';
@@ -19,7 +19,7 @@ import '../chunk-YJ437RDY.js';
19
19
  import '../chunk-DD3CCMCZ.js';
20
20
  import '../chunk-RNP5R5I3.js';
21
21
  import '../chunk-RT4KRGZT.js';
22
- import '../chunk-CIGWHY7C.js';
22
+ import '../chunk-DEZW7QDI.js';
23
23
  import '../chunk-6XBZPKMI.js';
24
24
  import '../chunk-7ZUXA2NW.js';
25
25
  import '../chunk-BI5VDO2K.js';
@@ -5,7 +5,7 @@ import { QueryKey } from '@tanstack/react-query';
5
5
  /**
6
6
  * Concrete row shapes for the published Supabase tables.
7
7
  *
8
- * GENERATED by `scripts/gen-published-rows.mjs`do not hand-edit; re-run the script instead.
8
+ * @generated by packages/core/scripts/gen-published-rows.mjs — DO NOT EDIT. Re-run `pnpm gen:published-rows`.
9
9
  *
10
10
  * These were `Tables<'users'>` / `TablesInsert<...>` aliases in `./index.ts`. Each one indexes
11
11
  * into the generated `Database` type, and a published `.d.ts` that references `Database` makes
@@ -2872,13 +2872,6 @@ type Database = {
2872
2872
  referencedRelation: "users";
2873
2873
  referencedColumns: ["id"];
2874
2874
  },
2875
- {
2876
- foreignKeyName: "prj_notes_milestone_id_fkey";
2877
- columns: ["milestone_id"];
2878
- isOneToOne: false;
2879
- referencedRelation: "prj_milestones";
2880
- referencedColumns: ["id"];
2881
- },
2882
2875
  {
2883
2876
  foreignKeyName: "prj_notes_organization_id_fkey";
2884
2877
  columns: ["organization_id"];
@@ -2892,13 +2885,6 @@ type Database = {
2892
2885
  isOneToOne: false;
2893
2886
  referencedRelation: "prj_projects";
2894
2887
  referencedColumns: ["id"];
2895
- },
2896
- {
2897
- foreignKeyName: "prj_notes_task_id_fkey";
2898
- columns: ["task_id"];
2899
- isOneToOne: false;
2900
- referencedRelation: "prj_tasks";
2901
- referencedColumns: ["id"];
2902
2888
  }
2903
2889
  ];
2904
2890
  };
@@ -5581,6 +5567,27 @@ interface SSEConnectionManagerLike {
5581
5567
 
5582
5568
  type TablerIconComponent = typeof IconBrain;
5583
5569
 
5570
+ /**
5571
+ * Props every compiled knowledge-node body component accepts. Matches the
5572
+ * shape emitted by `generateKnowledgeBodies()` (`packages/sdk/src/node/knowledge-bodies-codegen.ts`)
5573
+ * for each `_generated/knowledge-bodies.tsx` this project produces.
5574
+ */
5575
+ interface KnowledgeBodyProps {
5576
+ /** MDX component allowlist merged from the nearest `KnowledgeMDXProvider`. */
5577
+ components?: Record<string, ComponentType>;
5578
+ }
5579
+ /**
5580
+ * Map of knowledge node id -> compiled MDX body component.
5581
+ *
5582
+ * Each consumer generates its own corpus at build time (via `knowledgePlugin()`)
5583
+ * and supplies it as the required `knowledgeBodies` prop on `ElevasisSystemsProvider`
5584
+ * / `ElevasisAuthenticatedShell`, instead of `@repo/ui` compiling a fixed corpus
5585
+ * into its published bundle. See `knowledge-corpus-injection.mdx` for the full
5586
+ * rationale -- this type is the generated file's own shape, named so consumers
5587
+ * and tests can reference it without importing from `_generated/`.
5588
+ */
5589
+ type KnowledgeBodiesMap = Record<string, ComponentType<KnowledgeBodyProps>>;
5590
+
5584
5591
  type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
5585
5592
  knowledge?: OrganizationModel['knowledge'];
5586
5593
  };
@@ -5709,6 +5716,13 @@ interface ElevasisSystemsProviderProps {
5709
5716
  /** Registered topbar action modules. OM node presence controls visibility; module supplies behavior. */
5710
5717
  topbarActions?: TopbarActionModule[];
5711
5718
  organizationModel?: ElevasisOrganizationModel;
5719
+ /**
5720
+ * Compiled knowledge-node body components for this consumer's own corpus.
5721
+ * Required, not defaulted: a missing corpus must fail to compile at the
5722
+ * provider mount rather than render a blank panel at runtime. See
5723
+ * `knowledge-corpus-injection.mdx`.
5724
+ */
5725
+ knowledgeBodies: KnowledgeBodiesMap;
5712
5726
  timeRange?: TimeRange;
5713
5727
  operationsApiUrl?: string;
5714
5728
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -5727,6 +5741,8 @@ interface ElevasisSystemsContextValue {
5727
5741
  resolvedSystems: ResolvedSystemModule[];
5728
5742
  organizationGraph: OrganizationGraphContextValue;
5729
5743
  organizationModel?: OrganizationModel;
5744
+ /** Compiled knowledge-node body components for this consumer's own corpus. See `ElevasisSystemsProviderProps.knowledgeBodies`. */
5745
+ knowledgeBodies: KnowledgeBodiesMap;
5730
5746
  timeRange?: TimeRange;
5731
5747
  operationsApiUrl?: string;
5732
5748
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -5739,7 +5755,7 @@ interface ElevasisSystemsContextValue {
5739
5755
 
5740
5756
  declare function useElevasisSystems(): ElevasisSystemsContextValue;
5741
5757
  declare function useOptionalElevasisSystems(): ElevasisSystemsContextValue | null;
5742
- declare function ElevasisSystemsProvider({ systems, topbarActions, organizationModel, timeRange, operationsApiUrl, operationsSSEManager, deliveryApiUrl, deliverySSEManager, disabledSubsectionPaths, children }: ElevasisSystemsProviderProps): react_jsx_runtime.JSX.Element;
5758
+ declare function ElevasisSystemsProvider({ systems, topbarActions, organizationModel, knowledgeBodies, timeRange, operationsApiUrl, operationsSSEManager, deliveryApiUrl, deliverySSEManager, disabledSubsectionPaths, children }: ElevasisSystemsProviderProps): react_jsx_runtime.JSX.Element;
5743
5759
 
5744
5760
  /**
5745
5761
  * Filters a static candidate manifest list down to the ones whose System is
@@ -5832,8 +5848,15 @@ declare function ElevasisUIProvider({ theme, children, ...coreProps }: ElevasisU
5832
5848
  interface CreateTestSystemsProviderOptions {
5833
5849
  organizationModel?: OrganizationModel;
5834
5850
  systems?: SystemModule[];
5851
+ /**
5852
+ * Compiled knowledge-node body map. Required, mirroring the prop on
5853
+ * `ElevasisSystemsProvider` -- a test that renders a knowledge surface must
5854
+ * state which corpus it is rendering against. Pass `{}` explicitly when the
5855
+ * test genuinely has no corpus.
5856
+ */
5857
+ knowledgeBodies: KnowledgeBodiesMap;
5835
5858
  }
5836
- declare function createTestSystemsProvider({ organizationModel, systems }?: CreateTestSystemsProviderOptions): ({ children }: {
5859
+ declare function createTestSystemsProvider({ organizationModel, systems, knowledgeBodies }: CreateTestSystemsProviderOptions): ({ children }: {
5837
5860
  children: ReactNode;
5838
5861
  }) => react_jsx_runtime.JSX.Element;
5839
5862
 
@@ -1,9 +1,9 @@
1
- export { AppearanceProvider, CrmActionsProvider, ElevasisCoreProvider, ElevasisSystemsProvider, ElevasisUIProvider, ListActionsProvider, NotificationProvider, SystemShell, createTestSystemsProvider, selectDeclaredSystems, useAppearance, useCrmActions, useElevasisSystems, useListActions, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel } from '../chunk-7A25EJ4A.js';
1
+ export { AppearanceProvider, CrmActionsProvider, ElevasisCoreProvider, ElevasisSystemsProvider, ElevasisUIProvider, ListActionsProvider, NotificationProvider, SystemShell, createTestSystemsProvider, selectDeclaredSystems, useAppearance, useCrmActions, useElevasisSystems, useListActions, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel } from '../chunk-M5CRPFJA.js';
2
2
  import '../chunk-4WLAVUPS.js';
3
3
  import '../chunk-RXZ3XDBM.js';
4
- import '../chunk-KGUBFIMQ.js';
4
+ import '../chunk-7RS2NUC6.js';
5
5
  import '../chunk-L7BZZ4SI.js';
6
- import '../chunk-3HMRK3RC.js';
6
+ import '../chunk-PNCJJE4Z.js';
7
7
  import '../chunk-62GVNH5U.js';
8
8
  import '../chunk-P45GQ3ZW.js';
9
9
  import '../chunk-IIMC4TRH.js';
@@ -14,7 +14,7 @@ import '../chunk-YJ437RDY.js';
14
14
  import '../chunk-DD3CCMCZ.js';
15
15
  import '../chunk-RNP5R5I3.js';
16
16
  import '../chunk-RT4KRGZT.js';
17
- import '../chunk-CIGWHY7C.js';
17
+ import '../chunk-DEZW7QDI.js';
18
18
  import '../chunk-6XBZPKMI.js';
19
19
  import '../chunk-7ZUXA2NW.js';
20
20
  export { ElevasisServiceProvider, useElevasisServices } from '../chunk-BI5VDO2K.js';
@@ -2871,13 +2871,6 @@ type Database = {
2871
2871
  referencedRelation: "users";
2872
2872
  referencedColumns: ["id"];
2873
2873
  },
2874
- {
2875
- foreignKeyName: "prj_notes_milestone_id_fkey";
2876
- columns: ["milestone_id"];
2877
- isOneToOne: false;
2878
- referencedRelation: "prj_milestones";
2879
- referencedColumns: ["id"];
2880
- },
2881
2874
  {
2882
2875
  foreignKeyName: "prj_notes_organization_id_fkey";
2883
2876
  columns: ["organization_id"];
@@ -2891,13 +2884,6 @@ type Database = {
2891
2884
  isOneToOne: false;
2892
2885
  referencedRelation: "prj_projects";
2893
2886
  referencedColumns: ["id"];
2894
- },
2895
- {
2896
- foreignKeyName: "prj_notes_task_id_fkey";
2897
- columns: ["task_id"];
2898
- isOneToOne: false;
2899
- referencedRelation: "prj_tasks";
2900
- referencedColumns: ["id"];
2901
2887
  }
2902
2888
  ];
2903
2889
  };
@@ -5465,6 +5451,27 @@ interface SSEConnectionManagerLike {
5465
5451
 
5466
5452
  type TablerIconComponent = typeof IconBrain;
5467
5453
 
5454
+ /**
5455
+ * Props every compiled knowledge-node body component accepts. Matches the
5456
+ * shape emitted by `generateKnowledgeBodies()` (`packages/sdk/src/node/knowledge-bodies-codegen.ts`)
5457
+ * for each `_generated/knowledge-bodies.tsx` this project produces.
5458
+ */
5459
+ interface KnowledgeBodyProps {
5460
+ /** MDX component allowlist merged from the nearest `KnowledgeMDXProvider`. */
5461
+ components?: Record<string, ComponentType>;
5462
+ }
5463
+ /**
5464
+ * Map of knowledge node id -> compiled MDX body component.
5465
+ *
5466
+ * Each consumer generates its own corpus at build time (via `knowledgePlugin()`)
5467
+ * and supplies it as the required `knowledgeBodies` prop on `ElevasisSystemsProvider`
5468
+ * / `ElevasisAuthenticatedShell`, instead of `@repo/ui` compiling a fixed corpus
5469
+ * into its published bundle. See `knowledge-corpus-injection.mdx` for the full
5470
+ * rationale -- this type is the generated file's own shape, named so consumers
5471
+ * and tests can reference it without importing from `_generated/`.
5472
+ */
5473
+ type KnowledgeBodiesMap = Record<string, ComponentType<KnowledgeBodyProps>>;
5474
+
5468
5475
  type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
5469
5476
  knowledge?: OrganizationModel['knowledge'];
5470
5477
  };
@@ -5593,6 +5600,13 @@ interface ElevasisSystemsProviderProps {
5593
5600
  /** Registered topbar action modules. OM node presence controls visibility; module supplies behavior. */
5594
5601
  topbarActions?: TopbarActionModule[];
5595
5602
  organizationModel?: ElevasisOrganizationModel;
5603
+ /**
5604
+ * Compiled knowledge-node body components for this consumer's own corpus.
5605
+ * Required, not defaulted: a missing corpus must fail to compile at the
5606
+ * provider mount rather than render a blank panel at runtime. See
5607
+ * `knowledge-corpus-injection.mdx`.
5608
+ */
5609
+ knowledgeBodies: KnowledgeBodiesMap;
5596
5610
  timeRange?: TimeRange;
5597
5611
  operationsApiUrl?: string;
5598
5612
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -5611,6 +5625,8 @@ interface ElevasisSystemsContextValue {
5611
5625
  resolvedSystems: ResolvedSystemModule[];
5612
5626
  organizationGraph: OrganizationGraphContextValue;
5613
5627
  organizationModel?: OrganizationModel;
5628
+ /** Compiled knowledge-node body components for this consumer's own corpus. See `ElevasisSystemsProviderProps.knowledgeBodies`. */
5629
+ knowledgeBodies: KnowledgeBodiesMap;
5614
5630
  timeRange?: TimeRange;
5615
5631
  operationsApiUrl?: string;
5616
5632
  operationsSSEManager?: SSEConnectionManagerLike;
@@ -5623,7 +5639,7 @@ interface ElevasisSystemsContextValue {
5623
5639
 
5624
5640
  declare function useElevasisSystems(): ElevasisSystemsContextValue;
5625
5641
  declare function useOptionalElevasisSystems(): ElevasisSystemsContextValue | null;
5626
- declare function ElevasisSystemsProvider({ systems, topbarActions, organizationModel, timeRange, operationsApiUrl, operationsSSEManager, deliveryApiUrl, deliverySSEManager, disabledSubsectionPaths, children }: ElevasisSystemsProviderProps): react_jsx_runtime.JSX.Element;
5642
+ declare function ElevasisSystemsProvider({ systems, topbarActions, organizationModel, knowledgeBodies, timeRange, operationsApiUrl, operationsSSEManager, deliveryApiUrl, deliverySSEManager, disabledSubsectionPaths, children }: ElevasisSystemsProviderProps): react_jsx_runtime.JSX.Element;
5627
5643
 
5628
5644
  /**
5629
5645
  * Filters a static candidate manifest list down to the ones whose System is
@@ -1,9 +1,9 @@
1
- export { AppearanceProvider, ElevasisCoreProvider, ElevasisSystemsProvider, NotificationProvider, SystemShell, selectDeclaredSystems, useAppearance, useElevasisSystems, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel } from '../chunk-7A25EJ4A.js';
1
+ export { AppearanceProvider, ElevasisCoreProvider, ElevasisSystemsProvider, NotificationProvider, SystemShell, selectDeclaredSystems, useAppearance, useElevasisSystems, useNotificationAdapter, useOptionalElevasisSystems, useResolvedOrganizationModel } from '../chunk-M5CRPFJA.js';
2
2
  import '../chunk-4WLAVUPS.js';
3
3
  import '../chunk-RXZ3XDBM.js';
4
- import '../chunk-KGUBFIMQ.js';
4
+ import '../chunk-7RS2NUC6.js';
5
5
  import '../chunk-L7BZZ4SI.js';
6
- import '../chunk-3HMRK3RC.js';
6
+ import '../chunk-PNCJJE4Z.js';
7
7
  import '../chunk-62GVNH5U.js';
8
8
  import '../chunk-P45GQ3ZW.js';
9
9
  import '../chunk-IIMC4TRH.js';
@@ -14,7 +14,7 @@ import '../chunk-YJ437RDY.js';
14
14
  import '../chunk-DD3CCMCZ.js';
15
15
  import '../chunk-RNP5R5I3.js';
16
16
  import '../chunk-RT4KRGZT.js';
17
- import '../chunk-CIGWHY7C.js';
17
+ import '../chunk-DEZW7QDI.js';
18
18
  import '../chunk-6XBZPKMI.js';
19
19
  import '../chunk-7ZUXA2NW.js';
20
20
  export { ElevasisServiceProvider, useElevasisServices } from '../chunk-BI5VDO2K.js';
@@ -57,7 +57,13 @@ declare class SSEConnectionManager implements SSEConnectionManagerLike {
57
57
  * If a connection already exists for this endpoint, reuses it.
58
58
  * Otherwise, creates a new connection.
59
59
  *
60
- * @param key - Unique identifier for the connection (e.g., 'notifications', 'resource-executive-agent')
60
+ * The key must encode everything that varies the request — the organization above all. Only the
61
+ * first subscriber's `options` open the connection; a later subscriber on the same key inherits
62
+ * that request wholesale, headers included. A mismatch is reported to the console but not
63
+ * repaired, because repairing it here would move the other subscribers onto a stream they did
64
+ * not ask for.
65
+ *
66
+ * @param key - Unique identifier for the connection (e.g., `notifications:${organizationId}`)
61
67
  * @param subscriberId - Unique identifier for this subscriber (usually component instance)
62
68
  * @param options - SSE connection options
63
69
  * @returns Unsubscribe function to call when component unmounts
package/dist/sse/index.js CHANGED
@@ -109,6 +109,13 @@ async function fetchEventSourceWithTokenRefresh(options) {
109
109
  }
110
110
 
111
111
  // src/sse/SSEConnectionManager.ts
112
+ function differingHeaderNames(a, b) {
113
+ const normalize = (headers) => new Map(Object.entries(headers).map(([name, value]) => [name.toLowerCase(), value]));
114
+ const left = normalize(a);
115
+ const right = normalize(b);
116
+ const names = /* @__PURE__ */ new Set([...left.keys(), ...right.keys()]);
117
+ return Array.from(names).filter((name) => left.get(name) !== right.get(name));
118
+ }
112
119
  var SSEConnectionManager = class {
113
120
  connections = /* @__PURE__ */ new Map();
114
121
  closeGracePeriodMs;
@@ -121,7 +128,13 @@ var SSEConnectionManager = class {
121
128
  * If a connection already exists for this endpoint, reuses it.
122
129
  * Otherwise, creates a new connection.
123
130
  *
124
- * @param key - Unique identifier for the connection (e.g., 'notifications', 'resource-executive-agent')
131
+ * The key must encode everything that varies the request — the organization above all. Only the
132
+ * first subscriber's `options` open the connection; a later subscriber on the same key inherits
133
+ * that request wholesale, headers included. A mismatch is reported to the console but not
134
+ * repaired, because repairing it here would move the other subscribers onto a stream they did
135
+ * not ask for.
136
+ *
137
+ * @param key - Unique identifier for the connection (e.g., `notifications:${organizationId}`)
125
138
  * @param subscriberId - Unique identifier for this subscriber (usually component instance)
126
139
  * @param options - SSE connection options
127
140
  * @returns Unsubscribe function to call when component unmounts
@@ -129,6 +142,12 @@ var SSEConnectionManager = class {
129
142
  subscribe(key, subscriberId, options) {
130
143
  const existing = this.connections.get(key);
131
144
  if (existing) {
145
+ const mismatched = differingHeaderNames(existing.headers, options.headers ?? {});
146
+ if (mismatched.length > 0) {
147
+ console.error(
148
+ `[SSEConnectionManager] Subscriber "${subscriberId}" joined key "${key}" with different ${mismatched.join(", ")}. The live connection keeps the headers it was opened with. Include the differing value in the connection key.`
149
+ );
150
+ }
132
151
  if (existing.closeTimeout) {
133
152
  clearTimeout(existing.closeTimeout);
134
153
  existing.closeTimeout = void 0;
@@ -144,7 +163,8 @@ var SSEConnectionManager = class {
144
163
  const connection = {
145
164
  controller,
146
165
  subscribers,
147
- url: options.url
166
+ url: options.url,
167
+ headers: options.headers ?? {}
148
168
  };
149
169
  this.connections.set(key, connection);
150
170
  fetchEventSourceWithTokenRefresh({
@@ -194,13 +194,15 @@ interface OrgOsUiRouteContractOptions {
194
194
  */
195
195
  publiclyReachableRoutePaths?: Iterable<string>;
196
196
  }
197
- type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route' | 'unguarded-route';
197
+ type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route' | 'unguarded-route' | 'no-coverage';
198
198
  interface OrgOsUiRouteContractIssue {
199
199
  target: OrgOsUiRouteContractTarget;
200
200
  kind: OrgOsUiRouteContractIssueKind;
201
201
  systemId: string;
202
202
  path?: string;
203
203
  ownerSystemId?: string;
204
+ /** `no-coverage` only: Systems that declare a UI path but no owner claimed. */
205
+ unownedSystemIds?: readonly string[];
204
206
  }
205
207
  interface OrgOsUiRouteContractResult {
206
208
  issues: OrgOsUiRouteContractIssue[];
@@ -2,10 +2,10 @@ import { server, handlers } from '../chunk-7XKCG5CT.js';
2
2
  export { handlers, server } from '../chunk-7XKCG5CT.js';
3
3
  import { mockWorkOSUser, mockUseAuth, mockUnauthenticatedUser, mockAuthenticatedUser, mockAuthLoading, createMockUseAuth } from '../chunk-N7U24M2J.js';
4
4
  export { createMockUseAuth, mockAuthLoading, mockAuthenticatedUser, mockUnauthenticatedUser, mockUseAuth, mockWorkOSUser } from '../chunk-N7U24M2J.js';
5
- import '../chunk-A32PJ2DO.js';
6
- import { ApiClientProvider } from '../chunk-KGUBFIMQ.js';
5
+ import '../chunk-G6VHIXWD.js';
6
+ import { ApiClientProvider } from '../chunk-7RS2NUC6.js';
7
7
  import '../chunk-DD3CCMCZ.js';
8
- import '../chunk-CIGWHY7C.js';
8
+ import '../chunk-DEZW7QDI.js';
9
9
  import '../chunk-6XBZPKMI.js';
10
10
  import '../chunk-7ZUXA2NW.js';
11
11
  import { ElevasisServiceProvider } from '../chunk-BI5VDO2K.js';
@@ -186,8 +186,8 @@ function getOrgOsRouteContractSystems(organizationModel) {
186
186
  for (const [key, system] of Object.entries(entries)) {
187
187
  const id = prefix ? `${prefix}.${key}` : system.id || key;
188
188
  result.push({ ...system, id });
189
- if (system.systems) visit(system.systems, id);
190
- if (system.subsystems) visit(system.subsystems, id);
189
+ const nested = system.systems ?? system.subsystems;
190
+ if (nested) visit(nested, id);
191
191
  }
192
192
  };
193
193
  visit(systems);
@@ -207,6 +207,7 @@ function collectOrgOsUiRouteContractIssues(options) {
207
207
  const systems = getOrgOsRouteContractSystems(organizationModel);
208
208
  const modelSystemIds = new Set(systems.map((system) => system.id));
209
209
  const issues = [];
210
+ const unownedRoutableSystemIds = [];
210
211
  let checkedPathCount = 0;
211
212
  for (const systemId of target.systemIds) {
212
213
  if (!modelSystemIds.has(systemId)) {
@@ -222,7 +223,10 @@ function collectOrgOsUiRouteContractIssues(options) {
222
223
  if (!path || system.enabled === false) continue;
223
224
  if (system.lifecycle === "archived" || system.lifecycle === "deprecated") continue;
224
225
  const ownerSystemId = target.systemIds.find((candidate) => ownsOrgOsSystem(candidate, system.id));
225
- if (!ownerSystemId) continue;
226
+ if (!ownerSystemId) {
227
+ unownedRoutableSystemIds.push(system.id);
228
+ continue;
229
+ }
226
230
  checkedPathCount += 1;
227
231
  const normalizedPath = normalizeOrgOsRoutePath(path);
228
232
  if (!normalizedRoutePaths.has(normalizedPath)) {
@@ -245,9 +249,28 @@ function collectOrgOsUiRouteContractIssues(options) {
245
249
  });
246
250
  }
247
251
  }
252
+ if (checkedPathCount === 0 && unownedRoutableSystemIds.length > 0) {
253
+ issues.push({
254
+ target,
255
+ kind: "no-coverage",
256
+ systemId: "(none)",
257
+ unownedSystemIds: unownedRoutableSystemIds
258
+ });
259
+ }
248
260
  return { issues, checkedPathCount };
249
261
  }
250
262
  function formatOrgOsUiRouteContractIssue(issue) {
263
+ if (issue.kind === "no-coverage") {
264
+ const unowned = issue.unownedSystemIds ?? [];
265
+ return [
266
+ `[no-coverage] The contract checked 0 paths for ${issue.target.name}, but its Organization Model declares ${unowned.length} routable System(s): ${unowned.join(", ")}.`,
267
+ `No id in this target's derived systemIds owns any of them, so every path was skipped and the run reported a pass that asserted nothing.`,
268
+ `Derived systemIds: ${issue.target.systemIds.length === 0 ? "(empty)" : issue.target.systemIds.join(", ")}`,
269
+ "Fix one of:",
270
+ `- Point the target's shellSource at the file that actually declares the SYSTEM_MANIFESTS array. ${issue.target.shellSource} is what was read; a shell that imports the array from elsewhere yields no ids.`,
271
+ `- Or, if ${issue.target.name} genuinely mounts no System from its Organization Model, remove the target rather than leaving a check that cannot fail.`
272
+ ].join("\n");
273
+ }
251
274
  if (issue.kind === "missing-system") {
252
275
  return [
253
276
  `[missing-system] Registered SystemModule "${issue.systemId}" is not present in ${issue.target.orgModelSource}.`,
@@ -3540,13 +3540,6 @@ type Database = {
3540
3540
  referencedRelation: "users";
3541
3541
  referencedColumns: ["id"];
3542
3542
  },
3543
- {
3544
- foreignKeyName: "prj_notes_milestone_id_fkey";
3545
- columns: ["milestone_id"];
3546
- isOneToOne: false;
3547
- referencedRelation: "prj_milestones";
3548
- referencedColumns: ["id"];
3549
- },
3550
3543
  {
3551
3544
  foreignKeyName: "prj_notes_organization_id_fkey";
3552
3545
  columns: ["organization_id"];
@@ -3560,13 +3553,6 @@ type Database = {
3560
3553
  isOneToOne: false;
3561
3554
  referencedRelation: "prj_projects";
3562
3555
  referencedColumns: ["id"];
3563
- },
3564
- {
3565
- foreignKeyName: "prj_notes_task_id_fkey";
3566
- columns: ["task_id"];
3567
- isOneToOne: false;
3568
- referencedRelation: "prj_tasks";
3569
- referencedColumns: ["id"];
3570
3556
  }
3571
3557
  ];
3572
3558
  };
@@ -4484,7 +4470,7 @@ type Database = {
4484
4470
  /**
4485
4471
  * Concrete row shapes for the published Supabase tables.
4486
4472
  *
4487
- * GENERATED by `scripts/gen-published-rows.mjs`do not hand-edit; re-run the script instead.
4473
+ * @generated by packages/core/scripts/gen-published-rows.mjs — DO NOT EDIT. Re-run `pnpm gen:published-rows`.
4488
4474
  *
4489
4475
  * These were `Tables<'users'>` / `TablesInsert<...>` aliases in `./index.ts`. Each one indexes
4490
4476
  * into the generated `Database` type, and a published `.d.ts` that references `Database` makes
@@ -305,6 +305,15 @@ interface SystemInterfaceReadinessIssue {
305
305
  message: string;
306
306
  }
307
307
 
308
+ /**
309
+ * Type-safe error codes
310
+ * Adding a member obliges a producer in `apps/api` and a display title in the frontend.
311
+ * Both are enforced: `apps/api/src/platform/errors/__tests__/error-code-producers.test.ts`
312
+ * keys a producer map by this union, and `getErrorTitle` in `packages/ui/src/utils/error-utils.ts`
313
+ * looks up a `Record<APIErrorCode, string>` -- an unhandled member fails to compile in both.
314
+ */
315
+ type APIErrorCode = 'VALIDATION_ERROR' | 'AUTHENTICATION_FAILED' | 'FORBIDDEN' | 'NOT_FOUND' | 'CONFLICT' | 'RATE_LIMIT_EXCEEDED' | 'INTERNAL_SERVER_ERROR' | 'SERVICE_UNAVAILABLE';
316
+
308
317
  /**
309
318
  * Time range selector for dashboard metrics
310
319
  */
@@ -407,15 +416,6 @@ type NodeColorType = 'violet' | 'blue' | 'orange' | 'teal' | 'gray' | 'yellow';
407
416
  */
408
417
  declare function getResourceColor(type: ResourceDefinitionType): NodeColorType;
409
418
 
410
- /**
411
- * Type-safe error codes
412
- * Adding a member obliges a producer in `apps/api` and a display title in the frontend.
413
- * Both are enforced: `apps/api/src/platform/errors/__tests__/error-code-producers.test.ts`
414
- * keys a producer map by this union, and `getErrorTitle` in `packages/ui/src/utils/error-utils.ts`
415
- * looks up a `Record<APIErrorCode, string>` -- an unhandled member fails to compile in both.
416
- */
417
- type APIErrorCode = 'VALIDATION_ERROR' | 'AUTHENTICATION_FAILED' | 'FORBIDDEN' | 'NOT_FOUND' | 'CONFLICT' | 'RATE_LIMIT_EXCEEDED' | 'INTERNAL_SERVER_ERROR' | 'SERVICE_UNAVAILABLE';
418
-
419
419
  /**
420
420
  * Time range utility functions
421
421
  * Converts TimeRange enum to ISO 8601 date strings and labels
@@ -1,4 +1,4 @@
1
- export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, buildQueryString, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getSystemReadinessServerErrorDetails, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail } from '../chunk-CIGWHY7C.js';
1
+ export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, buildQueryString, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, getSystemReadinessServerErrorDetails, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail } from '../chunk-DEZW7QDI.js';
2
2
  export { REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, getTimeRangeDates, getTimeRangeLabel } from '../chunk-6XBZPKMI.js';
3
3
  export { ResourceStatusColors } from '../chunk-7ZUXA2NW.js';
4
4
  import '../chunk-34B3ACOZ.js';
@@ -1,5 +1,5 @@
1
- import { knowledgePlugin } from '../chunk-AKANHRQ5.js';
2
- export { knowledgePlugin } from '../chunk-AKANHRQ5.js';
1
+ import { knowledgePlugin } from '../chunk-GKTQEVSO.js';
2
+ export { knowledgePlugin } from '../chunk-GKTQEVSO.js';
3
3
  import '../chunk-I2KLQ2HA.js';
4
4
  import { existsSync, readFileSync } from 'fs';
5
5
  import { resolve } from 'path';
@@ -1,2 +1,2 @@
1
- export { knowledgePlugin } from '../chunk-AKANHRQ5.js';
1
+ export { knowledgePlugin } from '../chunk-GKTQEVSO.js';
2
2
  import '../chunk-I2KLQ2HA.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/ui",
3
- "version": "2.80.0",
3
+ "version": "2.82.0",
4
4
  "description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -280,11 +280,11 @@
280
280
  "typescript": "5.9.2",
281
281
  "vite": "^7.0.0",
282
282
  "vitest": "^3.2.4",
283
- "@elevasis/sdk": "1.53.0",
284
- "@repo/core": "0.70.0",
283
+ "@elevasis/sdk": "1.55.0",
284
+ "@repo/core": "0.72.0",
285
285
  "@repo/eslint-config": "0.0.0",
286
- "@repo/typescript-config": "0.0.0",
287
- "@repo/elevasis-core": "1.0.0"
286
+ "@repo/elevasis-core": "1.0.0",
287
+ "@repo/typescript-config": "0.0.0"
288
288
  },
289
289
  "dependencies": {
290
290
  "@dagrejs/dagre": "^1.1.4",
@@ -372,7 +372,7 @@
372
372
  "lint": "eslint src --max-warnings 47",
373
373
  "check-types": "tsc --noEmit",
374
374
  "test": "vitest run --passWithNoTests",
375
- "test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts src/__tests__/published-peer-dependencies.test.ts src/__tests__/published-subpath-identity.test.ts",
375
+ "test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts src/__tests__/published-peer-dependencies.test.ts src/__tests__/published-subpath-identity.test.ts src/__tests__/published-zero-leak.test.ts",
376
376
  "test:watch": "vitest watch"
377
377
  }
378
378
  }