@axiom-lattice/react-sdk 2.1.33 → 2.1.35
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/dist/index.d.mts +236 -5
- package/dist/index.d.ts +236 -5
- package/dist/index.js +14944 -7790
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13947 -6745
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _axiom_lattice_protocols from '@axiom-lattice/protocols';
|
|
2
|
+
import { Message, InterruptMessage, Thread, User, Tenant, Skill } from '@axiom-lattice/protocols';
|
|
2
3
|
export * from '@axiom-lattice/protocols';
|
|
3
4
|
import * as React$1 from 'react';
|
|
4
5
|
import React__default, { ReactNode } from 'react';
|
|
@@ -76,6 +77,16 @@ interface ChatState {
|
|
|
76
77
|
content: string;
|
|
77
78
|
status: "pending" | "in_progress" | "completed";
|
|
78
79
|
}>;
|
|
80
|
+
tasks?: Array<{
|
|
81
|
+
id: string;
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
status: "pending" | "in_progress" | "completed" | "failed";
|
|
85
|
+
assignee?: string;
|
|
86
|
+
dependencies: string[];
|
|
87
|
+
result?: string;
|
|
88
|
+
error?: string;
|
|
89
|
+
}>;
|
|
79
90
|
/**
|
|
80
91
|
* Array of messages in the chat
|
|
81
92
|
*/
|
|
@@ -408,6 +419,139 @@ declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assis
|
|
|
408
419
|
*/
|
|
409
420
|
declare function useAgentThreadContext<T extends UseChatOptions>(): AgentThreadContextValue<T>;
|
|
410
421
|
|
|
422
|
+
interface UserTenantInfo {
|
|
423
|
+
tenantId: string;
|
|
424
|
+
role: string;
|
|
425
|
+
tenant?: Tenant;
|
|
426
|
+
}
|
|
427
|
+
interface AuthContextValue {
|
|
428
|
+
user: User | null;
|
|
429
|
+
tenants: UserTenantInfo[];
|
|
430
|
+
currentTenant: Tenant | null;
|
|
431
|
+
isAuthenticated: boolean;
|
|
432
|
+
isLoading: boolean;
|
|
433
|
+
error: string | null;
|
|
434
|
+
login: (email: string, password: string) => Promise<{
|
|
435
|
+
requiresTenantSelection: boolean;
|
|
436
|
+
hasTenants: boolean;
|
|
437
|
+
}>;
|
|
438
|
+
register: (email: string, password: string, name: string) => Promise<{
|
|
439
|
+
message: string;
|
|
440
|
+
token?: string;
|
|
441
|
+
}>;
|
|
442
|
+
logout: () => void;
|
|
443
|
+
selectTenant: (tenantId: string) => Promise<void>;
|
|
444
|
+
fetchUserTenants: () => Promise<void>;
|
|
445
|
+
refreshUser: () => Promise<void>;
|
|
446
|
+
clearError: () => void;
|
|
447
|
+
}
|
|
448
|
+
declare const useAuth: () => AuthContextValue;
|
|
449
|
+
interface AuthProviderProps {
|
|
450
|
+
children: ReactNode;
|
|
451
|
+
baseURL: string;
|
|
452
|
+
onLoginSuccess?: (user: User, tenants: UserTenantInfo[]) => void;
|
|
453
|
+
onTenantSelected?: (tenant: Tenant) => void;
|
|
454
|
+
onLogout?: () => void;
|
|
455
|
+
}
|
|
456
|
+
declare const AuthProvider: React__default.FC<AuthProviderProps>;
|
|
457
|
+
|
|
458
|
+
interface LoginFormProps {
|
|
459
|
+
onSuccess?: () => void;
|
|
460
|
+
onCancel?: () => void;
|
|
461
|
+
logo?: React__default.ReactNode;
|
|
462
|
+
title?: string;
|
|
463
|
+
footer?: React__default.ReactNode;
|
|
464
|
+
className?: string;
|
|
465
|
+
}
|
|
466
|
+
declare const LoginForm: React__default.FC<LoginFormProps>;
|
|
467
|
+
interface LoginPageProps extends LoginFormProps {
|
|
468
|
+
background?: string;
|
|
469
|
+
containerStyle?: React__default.CSSProperties;
|
|
470
|
+
}
|
|
471
|
+
declare const LoginPage: React__default.FC<LoginPageProps>;
|
|
472
|
+
interface RegisterFormProps {
|
|
473
|
+
onSuccess?: () => void;
|
|
474
|
+
onCancel?: () => void;
|
|
475
|
+
logo?: React__default.ReactNode;
|
|
476
|
+
title?: string;
|
|
477
|
+
footer?: React__default.ReactNode;
|
|
478
|
+
className?: string;
|
|
479
|
+
}
|
|
480
|
+
declare const RegisterForm: React__default.FC<RegisterFormProps>;
|
|
481
|
+
|
|
482
|
+
interface UserProfileProps {
|
|
483
|
+
/** Called when user clicks logout */
|
|
484
|
+
onLogout?: () => void;
|
|
485
|
+
/** Show tenant switcher */
|
|
486
|
+
showTenantSwitcher?: boolean;
|
|
487
|
+
/** Custom class name */
|
|
488
|
+
className?: string;
|
|
489
|
+
}
|
|
490
|
+
declare const UserProfile: React__default.FC<UserProfileProps>;
|
|
491
|
+
interface ProtectedRouteProps {
|
|
492
|
+
children: React__default.ReactNode;
|
|
493
|
+
/** Component to show when not authenticated */
|
|
494
|
+
fallback?: React__default.ReactNode;
|
|
495
|
+
/** Redirect URL (if using react-router) */
|
|
496
|
+
redirectTo?: string;
|
|
497
|
+
}
|
|
498
|
+
declare const ProtectedRoute: React__default.FC<ProtectedRouteProps>;
|
|
499
|
+
|
|
500
|
+
interface TenantSelectorProps {
|
|
501
|
+
tenants: Tenant[];
|
|
502
|
+
currentTenantId?: string | null;
|
|
503
|
+
onSelect: (tenant: Tenant) => void;
|
|
504
|
+
isLoading?: boolean;
|
|
505
|
+
className?: string;
|
|
506
|
+
title?: string;
|
|
507
|
+
description?: string;
|
|
508
|
+
background?: string;
|
|
509
|
+
hideBackground?: boolean;
|
|
510
|
+
}
|
|
511
|
+
declare const TenantSelector: React__default.FC<TenantSelectorProps>;
|
|
512
|
+
interface TenantSwitcherProps {
|
|
513
|
+
tenants: Tenant[];
|
|
514
|
+
currentTenant: Tenant | null;
|
|
515
|
+
onSwitch: (tenant: Tenant) => void;
|
|
516
|
+
isLoading?: boolean;
|
|
517
|
+
className?: string;
|
|
518
|
+
}
|
|
519
|
+
declare const TenantSwitcher: React__default.FC<TenantSwitcherProps>;
|
|
520
|
+
interface TenantGuardProps {
|
|
521
|
+
children: React__default.ReactNode;
|
|
522
|
+
tenantSelector: React__default.ReactNode;
|
|
523
|
+
isAuthenticated: boolean;
|
|
524
|
+
currentTenant: Tenant | null;
|
|
525
|
+
loginRedirect?: React__default.ReactNode;
|
|
526
|
+
}
|
|
527
|
+
declare const TenantGuard: React__default.FC<TenantGuardProps>;
|
|
528
|
+
|
|
529
|
+
interface UseTenantsOptions {
|
|
530
|
+
baseURL: string;
|
|
531
|
+
token?: string;
|
|
532
|
+
}
|
|
533
|
+
interface UseTenantsReturn {
|
|
534
|
+
tenants: Tenant[];
|
|
535
|
+
isLoading: boolean;
|
|
536
|
+
error: string | null;
|
|
537
|
+
refresh: () => Promise<void>;
|
|
538
|
+
getTenantById: (id: string) => Tenant | undefined;
|
|
539
|
+
}
|
|
540
|
+
declare function useTenants(options: UseTenantsOptions): UseTenantsReturn;
|
|
541
|
+
interface UseUsersOptions {
|
|
542
|
+
baseURL: string;
|
|
543
|
+
tenantId: string;
|
|
544
|
+
token?: string;
|
|
545
|
+
}
|
|
546
|
+
interface UseUsersReturn {
|
|
547
|
+
users: _axiom_lattice_protocols.User[];
|
|
548
|
+
isLoading: boolean;
|
|
549
|
+
error: string | null;
|
|
550
|
+
refresh: () => Promise<void>;
|
|
551
|
+
searchByEmail: (email: string) => Promise<_axiom_lattice_protocols.User | null>;
|
|
552
|
+
}
|
|
553
|
+
declare function useUsers(options: UseUsersOptions): UseUsersReturn;
|
|
554
|
+
|
|
411
555
|
interface ChatingProps {
|
|
412
556
|
name?: string;
|
|
413
557
|
description?: string;
|
|
@@ -736,7 +880,7 @@ interface MiddlewareConfigSchemaProperty {
|
|
|
736
880
|
maxLength?: number;
|
|
737
881
|
pattern?: string;
|
|
738
882
|
format?: string;
|
|
739
|
-
widget?: "input" | "textarea" | "select" | "segmented" | "switch" | "numberInput" | "skillSelect";
|
|
883
|
+
widget?: "input" | "textarea" | "select" | "segmented" | "switch" | "numberInput" | "skillSelect" | "databaseSelect" | "metricsSelect";
|
|
740
884
|
items?: {
|
|
741
885
|
type: string;
|
|
742
886
|
};
|
|
@@ -775,6 +919,49 @@ interface MiddlewareConfigDefinition {
|
|
|
775
919
|
config: Record<string, any>;
|
|
776
920
|
tools?: MiddlewareToolDefinition[];
|
|
777
921
|
}
|
|
922
|
+
/**
|
|
923
|
+
* Sidebar menu item type
|
|
924
|
+
*/
|
|
925
|
+
type SideMenuItemType = "drawer" | "route";
|
|
926
|
+
interface ResourceFolderConfig {
|
|
927
|
+
name: string;
|
|
928
|
+
displayName?: string;
|
|
929
|
+
allowUpload: boolean;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Sidebar menu item configuration
|
|
933
|
+
*/
|
|
934
|
+
interface SideMenuItemConfig {
|
|
935
|
+
/** Unique identifier for the menu item */
|
|
936
|
+
id: string;
|
|
937
|
+
/** Type of the menu item - drawer or route (SideApp) */
|
|
938
|
+
type: SideMenuItemType;
|
|
939
|
+
/** Display name of the menu item */
|
|
940
|
+
name: string;
|
|
941
|
+
/** Icon component for the menu item */
|
|
942
|
+
icon?: ReactNode;
|
|
943
|
+
/** Order for sorting menu items (lower values first) */
|
|
944
|
+
order?: number;
|
|
945
|
+
/** Whether this is a builtin menu item (assistant, skill, tools, workspace, settings, agents, database, metrics) */
|
|
946
|
+
builtin?: "assistant" | "skill" | "tools" | "workspace" | "settings" | "agents" | "database" | "metrics";
|
|
947
|
+
/**
|
|
948
|
+
* Menu group for organizing items
|
|
949
|
+
*/
|
|
950
|
+
group?: string;
|
|
951
|
+
/**
|
|
952
|
+
* Whether the menu item is enabled (can be toggled)
|
|
953
|
+
* Defaults to true
|
|
954
|
+
*/
|
|
955
|
+
enabled?: boolean;
|
|
956
|
+
/** Content to display inside the drawer (for drawer type) */
|
|
957
|
+
content?: ReactNode;
|
|
958
|
+
/** Drawer title (for drawer type) */
|
|
959
|
+
title?: string;
|
|
960
|
+
/** Drawer width in pixels or percentage (for drawer type) */
|
|
961
|
+
width?: string | number;
|
|
962
|
+
/** Component to render in SideApp (for route type) */
|
|
963
|
+
sideAppComponent?: ReactNode;
|
|
964
|
+
}
|
|
778
965
|
/**
|
|
779
966
|
* Lattice Chat Shell configuration interface
|
|
780
967
|
*/
|
|
@@ -828,10 +1015,39 @@ interface LatticeChatShellConfig {
|
|
|
828
1015
|
*/
|
|
829
1016
|
enableAssistantCreation?: boolean;
|
|
830
1017
|
/**
|
|
831
|
-
|
|
1018
|
+
* Whether users can edit existing assistants
|
|
1019
|
+
* Defaults to true
|
|
1020
|
+
*/
|
|
1021
|
+
enableAssistantEditing?: boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Whether to enable workspace and project management
|
|
1024
|
+
* When enabled, shows workspace selector in header and file browser
|
|
1025
|
+
* Defaults to false
|
|
1026
|
+
*/
|
|
1027
|
+
enableWorkspace?: boolean;
|
|
1028
|
+
/**
|
|
1029
|
+
* Resource folders configuration for workspace
|
|
1030
|
+
* Each folder represents a section in the workspace assets panel
|
|
1031
|
+
* If not provided, defaults to a single root folder with upload enabled
|
|
1032
|
+
*/
|
|
1033
|
+
resourceFolders?: ResourceFolderConfig[];
|
|
1034
|
+
/**
|
|
1035
|
+
* Custom sidebar menu items that can be registered
|
|
1036
|
+
* These will be displayed alongside the default menu items
|
|
1037
|
+
*/
|
|
1038
|
+
sideMenuItems?: SideMenuItemConfig[];
|
|
1039
|
+
/**
|
|
1040
|
+
* Whether to enable the database picker slot in the chat sender
|
|
1041
|
+
* When enabled, shows a database selection button in the sender footer
|
|
832
1042
|
* Defaults to true
|
|
833
1043
|
*/
|
|
834
|
-
|
|
1044
|
+
enableDatabaseSlot?: boolean;
|
|
1045
|
+
/**
|
|
1046
|
+
* Whether to enable the skill picker slot in the chat sender
|
|
1047
|
+
* When enabled, shows a skill selection button in the sender footer
|
|
1048
|
+
* Defaults to true
|
|
1049
|
+
*/
|
|
1050
|
+
enableSkillSlot?: boolean;
|
|
835
1051
|
}
|
|
836
1052
|
/**
|
|
837
1053
|
* Lattice Chat Shell context value interface
|
|
@@ -955,6 +1171,11 @@ interface AgentConversationsProps {
|
|
|
955
1171
|
}
|
|
956
1172
|
declare const AgentConversations: React__default.FC<AgentConversationsProps>;
|
|
957
1173
|
|
|
1174
|
+
interface MetricsConfigDrawerContentProps {
|
|
1175
|
+
tenantId?: string;
|
|
1176
|
+
}
|
|
1177
|
+
declare const MetricsConfigDrawerContent: React__default.FC<MetricsConfigDrawerContentProps>;
|
|
1178
|
+
|
|
958
1179
|
type LatticeChatShellProps = Omit<LatticeChatShellContextProviderProps, "children"> & {
|
|
959
1180
|
/**
|
|
960
1181
|
* Whether users can create new assistants (default: true)
|
|
@@ -964,6 +1185,10 @@ type LatticeChatShellProps = Omit<LatticeChatShellContextProviderProps, "childre
|
|
|
964
1185
|
* Whether users can edit existing assistants (default: true)
|
|
965
1186
|
*/
|
|
966
1187
|
enableAssistantEditing?: boolean;
|
|
1188
|
+
/**
|
|
1189
|
+
* Whether to enable workspace and project management (default: false)
|
|
1190
|
+
*/
|
|
1191
|
+
enableWorkspace?: boolean;
|
|
967
1192
|
};
|
|
968
1193
|
/**
|
|
969
1194
|
* Lattice Chat Shell component
|
|
@@ -1068,4 +1293,10 @@ interface CreateAssistantModalProps {
|
|
|
1068
1293
|
}
|
|
1069
1294
|
declare const CreateAssistantModal: React__default.FC<CreateAssistantModalProps>;
|
|
1070
1295
|
|
|
1071
|
-
|
|
1296
|
+
interface SkillCategoryPromptsProps {
|
|
1297
|
+
senderRef: React__default.RefObject<any>;
|
|
1298
|
+
visible?: boolean;
|
|
1299
|
+
}
|
|
1300
|
+
declare const SkillCategoryPrompts: React__default.FC<SkillCategoryPromptsProps>;
|
|
1301
|
+
|
|
1302
|
+
export { type AgentChatProps, AgentConversations, type AgentConversationsProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, AssistantContext, AssistantContextProvider, type AssistantContextProviderProps, type AssistantContextValue, AssistantFlow, type AssistantFlowProps, AssistantNode, type AssistantNodeData, type AssistantState, type AttachFile, type AuthContextValue, AuthProvider, AxiomLatticeProvider, type AxiomLatticeProviderProps, type ChatResponse, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, ColumnLayout, type ColumnLayoutProps, ConversationContext, ConversationContextProvider, type ConversationContextProviderProps, type ConversationContextValue, type ConversationThread, CreateAssistantModal, type ElementMeta, type ElementProps, type ExplorerFile, FileExplorer, type FileExplorerProps, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, type LoginPageProps, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, ProtectedRoute, type ProtectedRouteProps, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, TenantGuard, type TenantGuardProps, TenantSelector, type TenantSelectorProps, TenantSwitcher, type TenantSwitcherProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, getElement, regsiterElement, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useAssistantContext, useAuth, useAxiomLattice, useChat, useChatUIContext, useConversationContext, useLatticeChatShellContext, useTenants, useUsers };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _axiom_lattice_protocols from '@axiom-lattice/protocols';
|
|
2
|
+
import { Message, InterruptMessage, Thread, User, Tenant, Skill } from '@axiom-lattice/protocols';
|
|
2
3
|
export * from '@axiom-lattice/protocols';
|
|
3
4
|
import * as React$1 from 'react';
|
|
4
5
|
import React__default, { ReactNode } from 'react';
|
|
@@ -76,6 +77,16 @@ interface ChatState {
|
|
|
76
77
|
content: string;
|
|
77
78
|
status: "pending" | "in_progress" | "completed";
|
|
78
79
|
}>;
|
|
80
|
+
tasks?: Array<{
|
|
81
|
+
id: string;
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
status: "pending" | "in_progress" | "completed" | "failed";
|
|
85
|
+
assignee?: string;
|
|
86
|
+
dependencies: string[];
|
|
87
|
+
result?: string;
|
|
88
|
+
error?: string;
|
|
89
|
+
}>;
|
|
79
90
|
/**
|
|
80
91
|
* Array of messages in the chat
|
|
81
92
|
*/
|
|
@@ -408,6 +419,139 @@ declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assis
|
|
|
408
419
|
*/
|
|
409
420
|
declare function useAgentThreadContext<T extends UseChatOptions>(): AgentThreadContextValue<T>;
|
|
410
421
|
|
|
422
|
+
interface UserTenantInfo {
|
|
423
|
+
tenantId: string;
|
|
424
|
+
role: string;
|
|
425
|
+
tenant?: Tenant;
|
|
426
|
+
}
|
|
427
|
+
interface AuthContextValue {
|
|
428
|
+
user: User | null;
|
|
429
|
+
tenants: UserTenantInfo[];
|
|
430
|
+
currentTenant: Tenant | null;
|
|
431
|
+
isAuthenticated: boolean;
|
|
432
|
+
isLoading: boolean;
|
|
433
|
+
error: string | null;
|
|
434
|
+
login: (email: string, password: string) => Promise<{
|
|
435
|
+
requiresTenantSelection: boolean;
|
|
436
|
+
hasTenants: boolean;
|
|
437
|
+
}>;
|
|
438
|
+
register: (email: string, password: string, name: string) => Promise<{
|
|
439
|
+
message: string;
|
|
440
|
+
token?: string;
|
|
441
|
+
}>;
|
|
442
|
+
logout: () => void;
|
|
443
|
+
selectTenant: (tenantId: string) => Promise<void>;
|
|
444
|
+
fetchUserTenants: () => Promise<void>;
|
|
445
|
+
refreshUser: () => Promise<void>;
|
|
446
|
+
clearError: () => void;
|
|
447
|
+
}
|
|
448
|
+
declare const useAuth: () => AuthContextValue;
|
|
449
|
+
interface AuthProviderProps {
|
|
450
|
+
children: ReactNode;
|
|
451
|
+
baseURL: string;
|
|
452
|
+
onLoginSuccess?: (user: User, tenants: UserTenantInfo[]) => void;
|
|
453
|
+
onTenantSelected?: (tenant: Tenant) => void;
|
|
454
|
+
onLogout?: () => void;
|
|
455
|
+
}
|
|
456
|
+
declare const AuthProvider: React__default.FC<AuthProviderProps>;
|
|
457
|
+
|
|
458
|
+
interface LoginFormProps {
|
|
459
|
+
onSuccess?: () => void;
|
|
460
|
+
onCancel?: () => void;
|
|
461
|
+
logo?: React__default.ReactNode;
|
|
462
|
+
title?: string;
|
|
463
|
+
footer?: React__default.ReactNode;
|
|
464
|
+
className?: string;
|
|
465
|
+
}
|
|
466
|
+
declare const LoginForm: React__default.FC<LoginFormProps>;
|
|
467
|
+
interface LoginPageProps extends LoginFormProps {
|
|
468
|
+
background?: string;
|
|
469
|
+
containerStyle?: React__default.CSSProperties;
|
|
470
|
+
}
|
|
471
|
+
declare const LoginPage: React__default.FC<LoginPageProps>;
|
|
472
|
+
interface RegisterFormProps {
|
|
473
|
+
onSuccess?: () => void;
|
|
474
|
+
onCancel?: () => void;
|
|
475
|
+
logo?: React__default.ReactNode;
|
|
476
|
+
title?: string;
|
|
477
|
+
footer?: React__default.ReactNode;
|
|
478
|
+
className?: string;
|
|
479
|
+
}
|
|
480
|
+
declare const RegisterForm: React__default.FC<RegisterFormProps>;
|
|
481
|
+
|
|
482
|
+
interface UserProfileProps {
|
|
483
|
+
/** Called when user clicks logout */
|
|
484
|
+
onLogout?: () => void;
|
|
485
|
+
/** Show tenant switcher */
|
|
486
|
+
showTenantSwitcher?: boolean;
|
|
487
|
+
/** Custom class name */
|
|
488
|
+
className?: string;
|
|
489
|
+
}
|
|
490
|
+
declare const UserProfile: React__default.FC<UserProfileProps>;
|
|
491
|
+
interface ProtectedRouteProps {
|
|
492
|
+
children: React__default.ReactNode;
|
|
493
|
+
/** Component to show when not authenticated */
|
|
494
|
+
fallback?: React__default.ReactNode;
|
|
495
|
+
/** Redirect URL (if using react-router) */
|
|
496
|
+
redirectTo?: string;
|
|
497
|
+
}
|
|
498
|
+
declare const ProtectedRoute: React__default.FC<ProtectedRouteProps>;
|
|
499
|
+
|
|
500
|
+
interface TenantSelectorProps {
|
|
501
|
+
tenants: Tenant[];
|
|
502
|
+
currentTenantId?: string | null;
|
|
503
|
+
onSelect: (tenant: Tenant) => void;
|
|
504
|
+
isLoading?: boolean;
|
|
505
|
+
className?: string;
|
|
506
|
+
title?: string;
|
|
507
|
+
description?: string;
|
|
508
|
+
background?: string;
|
|
509
|
+
hideBackground?: boolean;
|
|
510
|
+
}
|
|
511
|
+
declare const TenantSelector: React__default.FC<TenantSelectorProps>;
|
|
512
|
+
interface TenantSwitcherProps {
|
|
513
|
+
tenants: Tenant[];
|
|
514
|
+
currentTenant: Tenant | null;
|
|
515
|
+
onSwitch: (tenant: Tenant) => void;
|
|
516
|
+
isLoading?: boolean;
|
|
517
|
+
className?: string;
|
|
518
|
+
}
|
|
519
|
+
declare const TenantSwitcher: React__default.FC<TenantSwitcherProps>;
|
|
520
|
+
interface TenantGuardProps {
|
|
521
|
+
children: React__default.ReactNode;
|
|
522
|
+
tenantSelector: React__default.ReactNode;
|
|
523
|
+
isAuthenticated: boolean;
|
|
524
|
+
currentTenant: Tenant | null;
|
|
525
|
+
loginRedirect?: React__default.ReactNode;
|
|
526
|
+
}
|
|
527
|
+
declare const TenantGuard: React__default.FC<TenantGuardProps>;
|
|
528
|
+
|
|
529
|
+
interface UseTenantsOptions {
|
|
530
|
+
baseURL: string;
|
|
531
|
+
token?: string;
|
|
532
|
+
}
|
|
533
|
+
interface UseTenantsReturn {
|
|
534
|
+
tenants: Tenant[];
|
|
535
|
+
isLoading: boolean;
|
|
536
|
+
error: string | null;
|
|
537
|
+
refresh: () => Promise<void>;
|
|
538
|
+
getTenantById: (id: string) => Tenant | undefined;
|
|
539
|
+
}
|
|
540
|
+
declare function useTenants(options: UseTenantsOptions): UseTenantsReturn;
|
|
541
|
+
interface UseUsersOptions {
|
|
542
|
+
baseURL: string;
|
|
543
|
+
tenantId: string;
|
|
544
|
+
token?: string;
|
|
545
|
+
}
|
|
546
|
+
interface UseUsersReturn {
|
|
547
|
+
users: _axiom_lattice_protocols.User[];
|
|
548
|
+
isLoading: boolean;
|
|
549
|
+
error: string | null;
|
|
550
|
+
refresh: () => Promise<void>;
|
|
551
|
+
searchByEmail: (email: string) => Promise<_axiom_lattice_protocols.User | null>;
|
|
552
|
+
}
|
|
553
|
+
declare function useUsers(options: UseUsersOptions): UseUsersReturn;
|
|
554
|
+
|
|
411
555
|
interface ChatingProps {
|
|
412
556
|
name?: string;
|
|
413
557
|
description?: string;
|
|
@@ -736,7 +880,7 @@ interface MiddlewareConfigSchemaProperty {
|
|
|
736
880
|
maxLength?: number;
|
|
737
881
|
pattern?: string;
|
|
738
882
|
format?: string;
|
|
739
|
-
widget?: "input" | "textarea" | "select" | "segmented" | "switch" | "numberInput" | "skillSelect";
|
|
883
|
+
widget?: "input" | "textarea" | "select" | "segmented" | "switch" | "numberInput" | "skillSelect" | "databaseSelect" | "metricsSelect";
|
|
740
884
|
items?: {
|
|
741
885
|
type: string;
|
|
742
886
|
};
|
|
@@ -775,6 +919,49 @@ interface MiddlewareConfigDefinition {
|
|
|
775
919
|
config: Record<string, any>;
|
|
776
920
|
tools?: MiddlewareToolDefinition[];
|
|
777
921
|
}
|
|
922
|
+
/**
|
|
923
|
+
* Sidebar menu item type
|
|
924
|
+
*/
|
|
925
|
+
type SideMenuItemType = "drawer" | "route";
|
|
926
|
+
interface ResourceFolderConfig {
|
|
927
|
+
name: string;
|
|
928
|
+
displayName?: string;
|
|
929
|
+
allowUpload: boolean;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Sidebar menu item configuration
|
|
933
|
+
*/
|
|
934
|
+
interface SideMenuItemConfig {
|
|
935
|
+
/** Unique identifier for the menu item */
|
|
936
|
+
id: string;
|
|
937
|
+
/** Type of the menu item - drawer or route (SideApp) */
|
|
938
|
+
type: SideMenuItemType;
|
|
939
|
+
/** Display name of the menu item */
|
|
940
|
+
name: string;
|
|
941
|
+
/** Icon component for the menu item */
|
|
942
|
+
icon?: ReactNode;
|
|
943
|
+
/** Order for sorting menu items (lower values first) */
|
|
944
|
+
order?: number;
|
|
945
|
+
/** Whether this is a builtin menu item (assistant, skill, tools, workspace, settings, agents, database, metrics) */
|
|
946
|
+
builtin?: "assistant" | "skill" | "tools" | "workspace" | "settings" | "agents" | "database" | "metrics";
|
|
947
|
+
/**
|
|
948
|
+
* Menu group for organizing items
|
|
949
|
+
*/
|
|
950
|
+
group?: string;
|
|
951
|
+
/**
|
|
952
|
+
* Whether the menu item is enabled (can be toggled)
|
|
953
|
+
* Defaults to true
|
|
954
|
+
*/
|
|
955
|
+
enabled?: boolean;
|
|
956
|
+
/** Content to display inside the drawer (for drawer type) */
|
|
957
|
+
content?: ReactNode;
|
|
958
|
+
/** Drawer title (for drawer type) */
|
|
959
|
+
title?: string;
|
|
960
|
+
/** Drawer width in pixels or percentage (for drawer type) */
|
|
961
|
+
width?: string | number;
|
|
962
|
+
/** Component to render in SideApp (for route type) */
|
|
963
|
+
sideAppComponent?: ReactNode;
|
|
964
|
+
}
|
|
778
965
|
/**
|
|
779
966
|
* Lattice Chat Shell configuration interface
|
|
780
967
|
*/
|
|
@@ -828,10 +1015,39 @@ interface LatticeChatShellConfig {
|
|
|
828
1015
|
*/
|
|
829
1016
|
enableAssistantCreation?: boolean;
|
|
830
1017
|
/**
|
|
831
|
-
|
|
1018
|
+
* Whether users can edit existing assistants
|
|
1019
|
+
* Defaults to true
|
|
1020
|
+
*/
|
|
1021
|
+
enableAssistantEditing?: boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Whether to enable workspace and project management
|
|
1024
|
+
* When enabled, shows workspace selector in header and file browser
|
|
1025
|
+
* Defaults to false
|
|
1026
|
+
*/
|
|
1027
|
+
enableWorkspace?: boolean;
|
|
1028
|
+
/**
|
|
1029
|
+
* Resource folders configuration for workspace
|
|
1030
|
+
* Each folder represents a section in the workspace assets panel
|
|
1031
|
+
* If not provided, defaults to a single root folder with upload enabled
|
|
1032
|
+
*/
|
|
1033
|
+
resourceFolders?: ResourceFolderConfig[];
|
|
1034
|
+
/**
|
|
1035
|
+
* Custom sidebar menu items that can be registered
|
|
1036
|
+
* These will be displayed alongside the default menu items
|
|
1037
|
+
*/
|
|
1038
|
+
sideMenuItems?: SideMenuItemConfig[];
|
|
1039
|
+
/**
|
|
1040
|
+
* Whether to enable the database picker slot in the chat sender
|
|
1041
|
+
* When enabled, shows a database selection button in the sender footer
|
|
832
1042
|
* Defaults to true
|
|
833
1043
|
*/
|
|
834
|
-
|
|
1044
|
+
enableDatabaseSlot?: boolean;
|
|
1045
|
+
/**
|
|
1046
|
+
* Whether to enable the skill picker slot in the chat sender
|
|
1047
|
+
* When enabled, shows a skill selection button in the sender footer
|
|
1048
|
+
* Defaults to true
|
|
1049
|
+
*/
|
|
1050
|
+
enableSkillSlot?: boolean;
|
|
835
1051
|
}
|
|
836
1052
|
/**
|
|
837
1053
|
* Lattice Chat Shell context value interface
|
|
@@ -955,6 +1171,11 @@ interface AgentConversationsProps {
|
|
|
955
1171
|
}
|
|
956
1172
|
declare const AgentConversations: React__default.FC<AgentConversationsProps>;
|
|
957
1173
|
|
|
1174
|
+
interface MetricsConfigDrawerContentProps {
|
|
1175
|
+
tenantId?: string;
|
|
1176
|
+
}
|
|
1177
|
+
declare const MetricsConfigDrawerContent: React__default.FC<MetricsConfigDrawerContentProps>;
|
|
1178
|
+
|
|
958
1179
|
type LatticeChatShellProps = Omit<LatticeChatShellContextProviderProps, "children"> & {
|
|
959
1180
|
/**
|
|
960
1181
|
* Whether users can create new assistants (default: true)
|
|
@@ -964,6 +1185,10 @@ type LatticeChatShellProps = Omit<LatticeChatShellContextProviderProps, "childre
|
|
|
964
1185
|
* Whether users can edit existing assistants (default: true)
|
|
965
1186
|
*/
|
|
966
1187
|
enableAssistantEditing?: boolean;
|
|
1188
|
+
/**
|
|
1189
|
+
* Whether to enable workspace and project management (default: false)
|
|
1190
|
+
*/
|
|
1191
|
+
enableWorkspace?: boolean;
|
|
967
1192
|
};
|
|
968
1193
|
/**
|
|
969
1194
|
* Lattice Chat Shell component
|
|
@@ -1068,4 +1293,10 @@ interface CreateAssistantModalProps {
|
|
|
1068
1293
|
}
|
|
1069
1294
|
declare const CreateAssistantModal: React__default.FC<CreateAssistantModalProps>;
|
|
1070
1295
|
|
|
1071
|
-
|
|
1296
|
+
interface SkillCategoryPromptsProps {
|
|
1297
|
+
senderRef: React__default.RefObject<any>;
|
|
1298
|
+
visible?: boolean;
|
|
1299
|
+
}
|
|
1300
|
+
declare const SkillCategoryPrompts: React__default.FC<SkillCategoryPromptsProps>;
|
|
1301
|
+
|
|
1302
|
+
export { type AgentChatProps, AgentConversations, type AgentConversationsProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, AssistantContext, AssistantContextProvider, type AssistantContextProviderProps, type AssistantContextValue, AssistantFlow, type AssistantFlowProps, AssistantNode, type AssistantNodeData, type AssistantState, type AttachFile, type AuthContextValue, AuthProvider, AxiomLatticeProvider, type AxiomLatticeProviderProps, type ChatResponse, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, ColumnLayout, type ColumnLayoutProps, ConversationContext, ConversationContextProvider, type ConversationContextProviderProps, type ConversationContextValue, type ConversationThread, CreateAssistantModal, type ElementMeta, type ElementProps, type ExplorerFile, FileExplorer, type FileExplorerProps, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, type LoginPageProps, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, ProtectedRoute, type ProtectedRouteProps, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, TenantGuard, type TenantGuardProps, TenantSelector, type TenantSelectorProps, TenantSwitcher, type TenantSwitcherProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, getElement, regsiterElement, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useAssistantContext, useAuth, useAxiomLattice, useChat, useChatUIContext, useConversationContext, useLatticeChatShellContext, useTenants, useUsers };
|