@axiom-lattice/react-sdk 2.1.51 → 2.1.53
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 +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +2908 -2785
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2229 -2107
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -119,6 +119,35 @@ interface ChatStateWithAgent extends ChatState {
|
|
|
119
119
|
* Current agent state (when enableReturnStateWhenStreamCompleted is true)
|
|
120
120
|
*/
|
|
121
121
|
agentState: AgentState | null;
|
|
122
|
+
/**
|
|
123
|
+
* Thread lifecycle status
|
|
124
|
+
*/
|
|
125
|
+
threadStatus: 'idle' | 'busy' | 'interrupted';
|
|
126
|
+
/**
|
|
127
|
+
* Queue configuration
|
|
128
|
+
*/
|
|
129
|
+
queueConfig: {
|
|
130
|
+
mode: 'collect' | 'followup' | 'steer';
|
|
131
|
+
maxSize: number;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Pending messages in queue
|
|
135
|
+
*/
|
|
136
|
+
pendingMessages: PendingMessage[];
|
|
137
|
+
/**
|
|
138
|
+
* Count of pending messages (convenience field)
|
|
139
|
+
*/
|
|
140
|
+
pendingCount?: number;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Pending message in queue
|
|
144
|
+
*/
|
|
145
|
+
interface PendingMessage {
|
|
146
|
+
id: string;
|
|
147
|
+
content: any;
|
|
148
|
+
type: 'human' | 'system';
|
|
149
|
+
sequence: number;
|
|
150
|
+
createdAt: Date | string;
|
|
122
151
|
}
|
|
123
152
|
/**
|
|
124
153
|
* Chat hook options
|
|
@@ -528,6 +557,18 @@ interface AuthContextValue {
|
|
|
528
557
|
clearError: () => void;
|
|
529
558
|
}
|
|
530
559
|
declare const useAuth: () => AuthContextValue;
|
|
560
|
+
/**
|
|
561
|
+
* Optional version of useAuth that returns null instead of throwing when AuthProvider is not present.
|
|
562
|
+
* Use this when authentication is optional for the component.
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* // For required auth - throws if no provider
|
|
566
|
+
* const { user } = useAuth();
|
|
567
|
+
*
|
|
568
|
+
* // For optional auth - returns null if no provider
|
|
569
|
+
* const user = useAuthOptional()?.user;
|
|
570
|
+
*/
|
|
571
|
+
declare const useAuthOptional: () => AuthContextValue | null;
|
|
531
572
|
interface AuthProviderProps {
|
|
532
573
|
children: ReactNode;
|
|
533
574
|
baseURL: string;
|
|
@@ -2087,4 +2128,4 @@ type IframeMessage = {
|
|
|
2087
2128
|
};
|
|
2088
2129
|
declare function generateIframeSrcdoc(): string;
|
|
2089
2130
|
|
|
2090
|
-
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 BalanceResult, 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, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useLatticeChatShellContext, useTenants, useUsers };
|
|
2131
|
+
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 BalanceResult, 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, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, type PendingMessage, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAuthOptional, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useLatticeChatShellContext, useTenants, useUsers };
|
package/dist/index.d.ts
CHANGED
|
@@ -119,6 +119,35 @@ interface ChatStateWithAgent extends ChatState {
|
|
|
119
119
|
* Current agent state (when enableReturnStateWhenStreamCompleted is true)
|
|
120
120
|
*/
|
|
121
121
|
agentState: AgentState | null;
|
|
122
|
+
/**
|
|
123
|
+
* Thread lifecycle status
|
|
124
|
+
*/
|
|
125
|
+
threadStatus: 'idle' | 'busy' | 'interrupted';
|
|
126
|
+
/**
|
|
127
|
+
* Queue configuration
|
|
128
|
+
*/
|
|
129
|
+
queueConfig: {
|
|
130
|
+
mode: 'collect' | 'followup' | 'steer';
|
|
131
|
+
maxSize: number;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Pending messages in queue
|
|
135
|
+
*/
|
|
136
|
+
pendingMessages: PendingMessage[];
|
|
137
|
+
/**
|
|
138
|
+
* Count of pending messages (convenience field)
|
|
139
|
+
*/
|
|
140
|
+
pendingCount?: number;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Pending message in queue
|
|
144
|
+
*/
|
|
145
|
+
interface PendingMessage {
|
|
146
|
+
id: string;
|
|
147
|
+
content: any;
|
|
148
|
+
type: 'human' | 'system';
|
|
149
|
+
sequence: number;
|
|
150
|
+
createdAt: Date | string;
|
|
122
151
|
}
|
|
123
152
|
/**
|
|
124
153
|
* Chat hook options
|
|
@@ -528,6 +557,18 @@ interface AuthContextValue {
|
|
|
528
557
|
clearError: () => void;
|
|
529
558
|
}
|
|
530
559
|
declare const useAuth: () => AuthContextValue;
|
|
560
|
+
/**
|
|
561
|
+
* Optional version of useAuth that returns null instead of throwing when AuthProvider is not present.
|
|
562
|
+
* Use this when authentication is optional for the component.
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* // For required auth - throws if no provider
|
|
566
|
+
* const { user } = useAuth();
|
|
567
|
+
*
|
|
568
|
+
* // For optional auth - returns null if no provider
|
|
569
|
+
* const user = useAuthOptional()?.user;
|
|
570
|
+
*/
|
|
571
|
+
declare const useAuthOptional: () => AuthContextValue | null;
|
|
531
572
|
interface AuthProviderProps {
|
|
532
573
|
children: ReactNode;
|
|
533
574
|
baseURL: string;
|
|
@@ -2087,4 +2128,4 @@ type IframeMessage = {
|
|
|
2087
2128
|
};
|
|
2088
2129
|
declare function generateIframeSrcdoc(): string;
|
|
2089
2130
|
|
|
2090
|
-
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 BalanceResult, 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, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useLatticeChatShellContext, useTenants, useUsers };
|
|
2131
|
+
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 BalanceResult, 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, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, type PendingMessage, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAuthOptional, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useLatticeChatShellContext, useTenants, useUsers };
|