@elevasis/ui 2.64.1 → 2.66.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 (72) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/app/index.d.ts +26 -0
  3. package/dist/app/index.js +8 -8
  4. package/dist/auth/index.d.ts +12 -5
  5. package/dist/auth/index.js +8 -8
  6. package/dist/charts/index.js +8 -8
  7. package/dist/{chunk-DRQPEMJI.js → chunk-4DV4ECMG.js} +3 -0
  8. package/dist/{chunk-KRWALB24.js → chunk-6SSQGWK7.js} +1 -1
  9. package/dist/{chunk-ZTWA5H77.js → chunk-6ZAP3FOA.js} +0 -1
  10. package/dist/{chunk-PGAA4G3T.js → chunk-ANNM5R7S.js} +275 -382
  11. package/dist/{chunk-I3CFGE3N.js → chunk-BLXJEIQS.js} +1 -1
  12. package/dist/chunk-L7BZZ4SI.js +56 -0
  13. package/dist/chunk-P45GQ3ZW.js +104 -0
  14. package/dist/{chunk-EIXSQONC.js → chunk-RT4KRGZT.js} +37 -59
  15. package/dist/{chunk-FVOMKZ7S.js → chunk-Y6I3IC45.js} +3 -6
  16. package/dist/components/index.d.ts +274 -191
  17. package/dist/components/index.js +8 -8
  18. package/dist/components/navigation/index.js +8 -8
  19. package/dist/execution/index.d.ts +115 -104
  20. package/dist/execution/index.js +2 -2
  21. package/dist/features/auth/index.d.ts +125 -9
  22. package/dist/features/auth/index.js +154 -14
  23. package/dist/features/clients/index.js +8 -8
  24. package/dist/features/crm/index.d.ts +20 -0
  25. package/dist/features/crm/index.js +8 -8
  26. package/dist/features/dashboard/index.js +8 -8
  27. package/dist/features/delivery/index.d.ts +20 -0
  28. package/dist/features/delivery/index.js +8 -8
  29. package/dist/features/knowledge/index.js +8 -8
  30. package/dist/features/lead-gen/index.js +8 -8
  31. package/dist/features/monitoring/index.js +8 -8
  32. package/dist/features/monitoring/requests/index.js +9 -9
  33. package/dist/features/notes/index.js +2 -2
  34. package/dist/features/operations/index.d.ts +177 -106
  35. package/dist/features/operations/index.js +8 -8
  36. package/dist/features/public-agent-chat/index.js +1 -1
  37. package/dist/features/settings/index.d.ts +21 -0
  38. package/dist/features/settings/index.js +8 -8
  39. package/dist/hooks/access/index.js +8 -8
  40. package/dist/hooks/delivery/index.d.ts +20 -0
  41. package/dist/hooks/delivery/index.js +8 -8
  42. package/dist/hooks/index.d.ts +319 -145
  43. package/dist/hooks/index.js +8 -8
  44. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -2
  45. package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -1
  46. package/dist/hooks/published.d.ts +319 -145
  47. package/dist/hooks/published.js +8 -8
  48. package/dist/index.d.ts +409 -219
  49. package/dist/index.js +8 -8
  50. package/dist/initialization/index.d.ts +95 -28
  51. package/dist/initialization/index.js +3 -3
  52. package/dist/knowledge/index.js +12 -12
  53. package/dist/{knowledge-search-index-JOPRYZN6.js → knowledge-search-index-6EZNBNSR.js} +4 -4
  54. package/dist/layout/index.js +8 -8
  55. package/dist/organization/index.d.ts +63 -4
  56. package/dist/organization/index.js +8 -8
  57. package/dist/profile/index.d.ts +43 -2
  58. package/dist/profile/index.js +1 -1
  59. package/dist/provider/index.d.ts +20 -0
  60. package/dist/provider/index.js +8 -8
  61. package/dist/provider/published.d.ts +20 -0
  62. package/dist/provider/published.js +8 -8
  63. package/dist/supabase/index.d.ts +40 -0
  64. package/dist/test-utils/index.d.ts +5 -0
  65. package/dist/test-utils/index.js +4 -4
  66. package/dist/test-utils/setup-integration.js +1 -1
  67. package/dist/test-utils/setup.js +1 -1
  68. package/dist/types/index.d.ts +483 -244
  69. package/dist/utils/index.js +2 -2
  70. package/package.json +6 -4
  71. package/dist/chunk-LO7GWG24.js +0 -75
  72. package/dist/chunk-T4LA4RY2.js +0 -56
package/dist/api/index.js CHANGED
@@ -2,7 +2,7 @@ export { createElevasisQueryClient } from '../chunk-M535KHLW.js';
2
2
  export { ApiClientProvider, useApiClient, useApiClientContext } from '../chunk-XNW3O6QW.js';
3
3
  import '../chunk-DD3CCMCZ.js';
4
4
  import '../chunk-I7BZVVVU.js';
5
- import '../chunk-FVOMKZ7S.js';
6
- import '../chunk-KRWALB24.js';
5
+ import '../chunk-Y6I3IC45.js';
6
+ import '../chunk-6SSQGWK7.js';
7
7
  import '../chunk-TVTSASST.js';
8
8
  import '../chunk-I2KLQ2HA.js';
@@ -2753,6 +2753,7 @@ type Database = {
2753
2753
  deleted_at: string | null;
2754
2754
  ended_at: string | null;
2755
2755
  memory_snapshot: Json;
2756
+ memory_version: number;
2756
2757
  metadata: Json | null;
2757
2758
  organization_id: string;
2758
2759
  resource_id: string;
@@ -2769,6 +2770,7 @@ type Database = {
2769
2770
  deleted_at?: string | null;
2770
2771
  ended_at?: string | null;
2771
2772
  memory_snapshot: Json;
2773
+ memory_version?: number;
2772
2774
  metadata?: Json | null;
2773
2775
  organization_id: string;
2774
2776
  resource_id: string;
@@ -2785,6 +2787,7 @@ type Database = {
2785
2787
  deleted_at?: string | null;
2786
2788
  ended_at?: string | null;
2787
2789
  memory_snapshot?: Json;
2790
+ memory_version?: number;
2788
2791
  metadata?: Json | null;
2789
2792
  organization_id?: string;
2790
2793
  resource_id?: string;
@@ -3122,9 +3125,14 @@ type Database = {
3122
3125
  p_session_id: string;
3123
3126
  };
3124
3127
  Returns: {
3128
+ context_window_size: number;
3125
3129
  created_at: string;
3130
+ cumulative_input_tokens: number;
3131
+ cumulative_output_tokens: number;
3132
+ deleted_at: string;
3126
3133
  ended_at: string;
3127
3134
  memory_snapshot: Json;
3135
+ memory_version: number;
3128
3136
  metadata: Json;
3129
3137
  organization_id: string;
3130
3138
  resource_id: string;
@@ -3166,6 +3174,18 @@ type Database = {
3166
3174
  };
3167
3175
  Returns: boolean;
3168
3176
  };
3177
+ increment_session_tokens: {
3178
+ Args: {
3179
+ p_input_tokens: number;
3180
+ p_output_tokens: number;
3181
+ p_session_id: string;
3182
+ };
3183
+ Returns: {
3184
+ context_window_size: number;
3185
+ cumulative_input_tokens: number;
3186
+ cumulative_output_tokens: number;
3187
+ }[];
3188
+ };
3169
3189
  is_org_member: {
3170
3190
  Args: {
3171
3191
  org_id: string;
@@ -5070,6 +5090,12 @@ interface ElevasisSystemsProviderProps {
5070
5090
  children: ReactNode;
5071
5091
  }
5072
5092
 
5093
+ /**
5094
+ * Canonical initialization types, owned here next to {@link InitializationProvider}
5095
+ * (the live, wired implementation). The legacy `createUseAppInitialization`
5096
+ * factory in `./hooks/useAppInitialization.ts` imports these rather than
5097
+ * declaring its own copy, so the two implementations can never drift on shape.
5098
+ */
5073
5099
  interface InitializationError {
5074
5100
  layer: 'auth' | 'profile' | 'organization';
5075
5101
  message: string;
package/dist/app/index.js CHANGED
@@ -1,27 +1,27 @@
1
- import { useSessionCheck, AppErrorBoundary, SidebarProvider, ElevasisSystemsProvider, useElevasisSystems, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer, SystemShell, ElevasisUIProvider } from '../chunk-PGAA4G3T.js';
1
+ import { useSessionCheck, AppErrorBoundary, SidebarProvider, ElevasisSystemsProvider, useElevasisSystems, AppShellContainer, Sidebar, AppShellRightSideContainer, AppShellRightSideOuterContainer, SystemShell, ElevasisUIProvider } from '../chunk-ANNM5R7S.js';
2
2
  import '../chunk-4OEVLV66.js';
3
3
  import '../chunk-RBGVNPA6.js';
4
- import '../chunk-ZTWA5H77.js';
4
+ import '../chunk-6ZAP3FOA.js';
5
5
  import '../chunk-AUDNF2Q7.js';
6
6
  import '../chunk-6M6OLGQY.js';
7
7
  import '../chunk-MKH2KOAO.js';
8
8
  import '../chunk-XNW3O6QW.js';
9
- import '../chunk-T4LA4RY2.js';
9
+ import '../chunk-L7BZZ4SI.js';
10
10
  import '../chunk-GMXGDO3I.js';
11
11
  import '../chunk-62GVNH5U.js';
12
- import { useInitialization } from '../chunk-LO7GWG24.js';
12
+ import { useInitialization } from '../chunk-P45GQ3ZW.js';
13
13
  import '../chunk-DD3CCMCZ.js';
14
14
  import '../chunk-M7WWRZ5Z.js';
15
15
  import '../chunk-JFBZ6XDW.js';
16
16
  import { TanStackRouterBridge, ScrollToTop } from '../chunk-2IFYDILW.js';
17
17
  import '../chunk-Q7DJKLEN.js';
18
18
  import '../chunk-HENXLGVD.js';
19
- import '../chunk-I3CFGE3N.js';
19
+ import '../chunk-BLXJEIQS.js';
20
20
  import '../chunk-RNP5R5I3.js';
21
- import '../chunk-EIXSQONC.js';
21
+ import '../chunk-RT4KRGZT.js';
22
22
  import { listAllSystems } from '../chunk-I7BZVVVU.js';
23
- import '../chunk-FVOMKZ7S.js';
24
- import '../chunk-KRWALB24.js';
23
+ import '../chunk-Y6I3IC45.js';
24
+ import '../chunk-6SSQGWK7.js';
25
25
  import '../chunk-BI5VDO2K.js';
26
26
  import '../chunk-MQZE7SUI.js';
27
27
  import '../chunk-TVTSASST.js';
@@ -169,6 +169,12 @@ declare function useStableAccessToken(): () => Promise<string>;
169
169
  */
170
170
  declare function useSessionCheck(): void;
171
171
 
172
+ /**
173
+ * Canonical initialization types, owned here next to {@link InitializationProvider}
174
+ * (the live, wired implementation). The legacy `createUseAppInitialization`
175
+ * factory in `./hooks/useAppInitialization.ts` imports these rather than
176
+ * declaring its own copy, so the two implementations can never drift on shape.
177
+ */
172
178
  interface InitializationError {
173
179
  layer: 'auth' | 'profile' | 'organization';
174
180
  message: string;
@@ -197,7 +203,7 @@ interface ProtectedRouteProps {
197
203
  /**
198
204
  * When true (default), waits for both user AND organization to be ready
199
205
  * before rendering children. When false, only waits for user readiness.
200
- * @default true
206
+ * @default true -- see {@link DEFAULT_WAIT_FOR_ORGANIZATION}
201
207
  */
202
208
  waitForOrganization?: boolean;
203
209
  }
@@ -216,8 +222,9 @@ interface ProtectedRouteProps {
216
222
  * When `canRecover()` returns false, falls back to navigating to `redirectTo`
217
223
  * (default: '/login') with a `returnTo` search param.
218
224
  *
219
- * Organization-layer errors are allowed through -- routes like /invitations
220
- * must be accessible even when the user has no org membership.
225
+ * Organization-layer errors are allowed through so a route can render its own
226
+ * no-org UI (e.g. "you have no organization membership yet") instead of being
227
+ * stuck behind this guard's fallback indefinitely.
221
228
  *
222
229
  * @example
223
230
  * // With custom fallback (your Mantine loader):
@@ -226,9 +233,9 @@ interface ProtectedRouteProps {
226
233
  * </ProtectedRoute>
227
234
  *
228
235
  * @example
229
- * // Wait only for user, not org (e.g. /invitations route):
236
+ * // Wait only for user, not org (e.g. a page reachable before onboarding):
230
237
  * <ProtectedRoute waitForOrganization={false}>
231
- * <InvitationsPage />
238
+ * <WelcomePage />
232
239
  * </ProtectedRoute>
233
240
  */
234
241
  declare function ProtectedRoute({ children, redirectTo, fallback, errorFallback, waitForOrganization }: ProtectedRouteProps): react_jsx_runtime.JSX.Element | null;
@@ -1,27 +1,27 @@
1
- export { AccessGuard, AccessKeys, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken } from '../chunk-PGAA4G3T.js';
1
+ export { AccessGuard, AccessKeys, ProtectedRoute, useSessionCheck as useRefocusSessionCheck, useSessionCheck, useStableAccessToken } from '../chunk-ANNM5R7S.js';
2
2
  import '../chunk-4OEVLV66.js';
3
3
  import '../chunk-RBGVNPA6.js';
4
- import '../chunk-ZTWA5H77.js';
4
+ import '../chunk-6ZAP3FOA.js';
5
5
  import '../chunk-AUDNF2Q7.js';
6
6
  import '../chunk-6M6OLGQY.js';
7
7
  import '../chunk-MKH2KOAO.js';
8
8
  import '../chunk-XNW3O6QW.js';
9
- import '../chunk-T4LA4RY2.js';
9
+ import '../chunk-L7BZZ4SI.js';
10
10
  import '../chunk-GMXGDO3I.js';
11
11
  import '../chunk-62GVNH5U.js';
12
- import '../chunk-LO7GWG24.js';
12
+ import '../chunk-P45GQ3ZW.js';
13
13
  import '../chunk-DD3CCMCZ.js';
14
14
  import '../chunk-M7WWRZ5Z.js';
15
15
  import '../chunk-JFBZ6XDW.js';
16
16
  import '../chunk-2IFYDILW.js';
17
17
  import '../chunk-Q7DJKLEN.js';
18
18
  import '../chunk-HENXLGVD.js';
19
- import '../chunk-I3CFGE3N.js';
19
+ import '../chunk-BLXJEIQS.js';
20
20
  import '../chunk-RNP5R5I3.js';
21
- import '../chunk-EIXSQONC.js';
21
+ import '../chunk-RT4KRGZT.js';
22
22
  import '../chunk-I7BZVVVU.js';
23
- import '../chunk-FVOMKZ7S.js';
24
- import '../chunk-KRWALB24.js';
23
+ import '../chunk-Y6I3IC45.js';
24
+ import '../chunk-6SSQGWK7.js';
25
25
  import '../chunk-BI5VDO2K.js';
26
26
  import '../chunk-MQZE7SUI.js';
27
27
  import '../chunk-TVTSASST.js';
@@ -1,27 +1,27 @@
1
- export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-PGAA4G3T.js';
1
+ export { ActivityTrendChart, ChartFrame, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-ANNM5R7S.js';
2
2
  import '../chunk-4OEVLV66.js';
3
3
  import '../chunk-RBGVNPA6.js';
4
- import '../chunk-ZTWA5H77.js';
4
+ import '../chunk-6ZAP3FOA.js';
5
5
  import '../chunk-AUDNF2Q7.js';
6
6
  import '../chunk-6M6OLGQY.js';
7
7
  import '../chunk-MKH2KOAO.js';
8
8
  import '../chunk-XNW3O6QW.js';
9
- import '../chunk-T4LA4RY2.js';
9
+ import '../chunk-L7BZZ4SI.js';
10
10
  import '../chunk-GMXGDO3I.js';
11
11
  import '../chunk-62GVNH5U.js';
12
- import '../chunk-LO7GWG24.js';
12
+ import '../chunk-P45GQ3ZW.js';
13
13
  import '../chunk-DD3CCMCZ.js';
14
14
  import '../chunk-M7WWRZ5Z.js';
15
15
  import '../chunk-JFBZ6XDW.js';
16
16
  import '../chunk-2IFYDILW.js';
17
17
  import '../chunk-Q7DJKLEN.js';
18
18
  import '../chunk-HENXLGVD.js';
19
- import '../chunk-I3CFGE3N.js';
19
+ import '../chunk-BLXJEIQS.js';
20
20
  import '../chunk-RNP5R5I3.js';
21
- import '../chunk-EIXSQONC.js';
21
+ import '../chunk-RT4KRGZT.js';
22
22
  import '../chunk-I7BZVVVU.js';
23
- import '../chunk-FVOMKZ7S.js';
24
- import '../chunk-KRWALB24.js';
23
+ import '../chunk-Y6I3IC45.js';
24
+ import '../chunk-6SSQGWK7.js';
25
25
  import '../chunk-BI5VDO2K.js';
26
26
  import '../chunk-MQZE7SUI.js';
27
27
  import '../chunk-TVTSASST.js';
@@ -15,6 +15,9 @@ var mockUseAuth = {
15
15
  user: null,
16
16
  isLoading: false,
17
17
  signIn: vi.fn(),
18
+ // AuthKit's useAuth exposes signUp alongside signIn; the invited-user flow routes
19
+ // to it when no account exists yet.
20
+ signUp: vi.fn(),
18
21
  signOut: vi.fn(),
19
22
  getAccessToken: vi.fn().mockResolvedValue("mock-access-token"),
20
23
  organizationId: "test-org-id",
@@ -42,7 +42,7 @@ function isLifecycleEvent(ctx) {
42
42
  return "stage" in ctx && ctx.stage !== void 0;
43
43
  }
44
44
  function isIterationEvent(ctx) {
45
- return "eventType" in ctx && ctx.eventType !== void 0;
45
+ return "eventType" in ctx && ctx.eventType !== void 0 && ctx.eventType !== "tool-call";
46
46
  }
47
47
  function isToolCallEvent(ctx) {
48
48
  return "eventType" in ctx && ctx.eventType === "tool-call";
@@ -24,7 +24,6 @@ function transformCommandViewData(data) {
24
24
  modelProvider: agent.modelProvider,
25
25
  modelId: agent.modelId,
26
26
  toolCount: agent.toolCount,
27
- hasKnowledgeMap: agent.hasKnowledgeMap,
28
27
  hasMemory: agent.hasMemory,
29
28
  stats: agentWithStats.stats || null
30
29
  // Preserve stats if present