@axiom-lattice/react-sdk 2.1.72 → 2.1.74

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 CHANGED
@@ -448,6 +448,60 @@ declare function useAgentGraph(assistantId: string): {
448
448
  */
449
449
  declare function useApi(options?: UseApiOptions): UseApiReturn;
450
450
 
451
+ declare function useEvalProjects(): {
452
+ projects: unknown[];
453
+ loading: boolean;
454
+ error: Error | null;
455
+ create: (data: Record<string, unknown>) => Promise<unknown>;
456
+ update: (id: string, patch: Record<string, unknown>) => Promise<void>;
457
+ remove: (id: string) => Promise<void>;
458
+ refresh: () => Promise<void>;
459
+ };
460
+
461
+ declare function useEvalSuites(projectId: string): {
462
+ suites: unknown[];
463
+ loading: boolean;
464
+ error: Error | null;
465
+ create: (pid: string, data: Record<string, unknown>) => Promise<unknown>;
466
+ update: (pid: string, id: string, patch: Record<string, unknown>) => Promise<void>;
467
+ remove: (pid: string, id: string) => Promise<void>;
468
+ refresh: () => Promise<void>;
469
+ };
470
+
471
+ declare function useEvalCases(projectId: string, suiteId: string): {
472
+ cases: unknown[];
473
+ loading: boolean;
474
+ error: Error | null;
475
+ create: (pid: string, sid: string, data: Record<string, unknown>) => Promise<unknown>;
476
+ update: (pid: string, sid: string, id: string, patch: Record<string, unknown>) => Promise<void>;
477
+ remove: (pid: string, sid: string, id: string) => Promise<void>;
478
+ refresh: () => Promise<void>;
479
+ };
480
+
481
+ declare function useEvalRuns(projectId?: string): {
482
+ runs: unknown[];
483
+ loading: boolean;
484
+ error: Error | null;
485
+ start: (pid: string) => Promise<{
486
+ run_id: string;
487
+ }>;
488
+ abort: (runId: string) => Promise<void>;
489
+ remove: (runId: string) => Promise<void>;
490
+ refresh: () => Promise<void>;
491
+ };
492
+
493
+ declare function useEvalRunStream(runId: string | null): {
494
+ status: string;
495
+ progress: {
496
+ completed: number;
497
+ total: number;
498
+ passed: number;
499
+ failed: number;
500
+ };
501
+ connected: boolean;
502
+ stopStreaming: () => void;
503
+ };
504
+
451
505
  /**
452
506
  * Provider component for the Axiom Lattice client
453
507
  * @param props - Provider props
@@ -523,12 +577,14 @@ interface AgentThreadProviderProps<T extends UseChatOptions> {
523
577
  assistantId?: string;
524
578
  options?: T;
525
579
  children: ReactNode;
580
+ onToolCompleted?: (toolName: string) => void;
581
+ onStreamCompleted?: () => void;
526
582
  }
527
583
  /**
528
584
  * Provider component for AgentThreadContext
529
585
  * Manages all agent thread state and operations
530
586
  */
531
- declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assistantId, options, children, }: AgentThreadProviderProps<T>): react_jsx_runtime.JSX.Element | null;
587
+ declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assistantId, options, children, onToolCompleted, onStreamCompleted, }: AgentThreadProviderProps<T>): react_jsx_runtime.JSX.Element | null;
532
588
  /**
533
589
  * Hook to access AgentThreadContext
534
590
  * @returns Agent thread context value
@@ -1625,6 +1681,28 @@ interface CreateAssistantModalProps {
1625
1681
  }
1626
1682
  declare const CreateAssistantModal: React__default.FC<CreateAssistantModalProps>;
1627
1683
 
1684
+ declare const EvalPanel: React__default.FC;
1685
+
1686
+ interface Props {
1687
+ projectId: string;
1688
+ onSelectSuite: (projectId: string, suiteId: string) => void;
1689
+ }
1690
+ declare const EvalSuiteCardList: React__default.FC<Props>;
1691
+
1692
+ interface EvalSuiteDetailProps {
1693
+ projectId: string;
1694
+ suiteId: string;
1695
+ onBack: () => void;
1696
+ onRun: (runId: string) => void;
1697
+ }
1698
+ declare const EvalSuiteDetail: React__default.FC<EvalSuiteDetailProps>;
1699
+
1700
+ interface EvalRunResultsProps {
1701
+ runId: string;
1702
+ onBack: () => void;
1703
+ }
1704
+ declare const EvalRunResults: React__default.FC<EvalRunResultsProps>;
1705
+
1628
1706
  interface SkillCategoryPromptsProps {
1629
1707
  senderRef: React__default.RefObject<any>;
1630
1708
  visible?: boolean;
@@ -2135,4 +2213,4 @@ type IframeMessage = {
2135
2213
  };
2136
2214
  declare function generateIframeSrcdoc(): string;
2137
2215
 
2138
- 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, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, 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, DEFAULT_MIDDLEWARE_TYPES, 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 ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, 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 };
2216
+ 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, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, 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, DEFAULT_MIDDLEWARE_TYPES, type ElementMeta, type ElementProps, EvalPanel, EvalRunResults, EvalSuiteCardList, EvalSuiteDetail, 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 ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, 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, useEvalCases, useEvalProjects, useEvalRunStream, useEvalRuns, useEvalSuites, useLatticeChatShellContext, useTenants, useUsers };
package/dist/index.d.ts CHANGED
@@ -448,6 +448,60 @@ declare function useAgentGraph(assistantId: string): {
448
448
  */
449
449
  declare function useApi(options?: UseApiOptions): UseApiReturn;
450
450
 
451
+ declare function useEvalProjects(): {
452
+ projects: unknown[];
453
+ loading: boolean;
454
+ error: Error | null;
455
+ create: (data: Record<string, unknown>) => Promise<unknown>;
456
+ update: (id: string, patch: Record<string, unknown>) => Promise<void>;
457
+ remove: (id: string) => Promise<void>;
458
+ refresh: () => Promise<void>;
459
+ };
460
+
461
+ declare function useEvalSuites(projectId: string): {
462
+ suites: unknown[];
463
+ loading: boolean;
464
+ error: Error | null;
465
+ create: (pid: string, data: Record<string, unknown>) => Promise<unknown>;
466
+ update: (pid: string, id: string, patch: Record<string, unknown>) => Promise<void>;
467
+ remove: (pid: string, id: string) => Promise<void>;
468
+ refresh: () => Promise<void>;
469
+ };
470
+
471
+ declare function useEvalCases(projectId: string, suiteId: string): {
472
+ cases: unknown[];
473
+ loading: boolean;
474
+ error: Error | null;
475
+ create: (pid: string, sid: string, data: Record<string, unknown>) => Promise<unknown>;
476
+ update: (pid: string, sid: string, id: string, patch: Record<string, unknown>) => Promise<void>;
477
+ remove: (pid: string, sid: string, id: string) => Promise<void>;
478
+ refresh: () => Promise<void>;
479
+ };
480
+
481
+ declare function useEvalRuns(projectId?: string): {
482
+ runs: unknown[];
483
+ loading: boolean;
484
+ error: Error | null;
485
+ start: (pid: string) => Promise<{
486
+ run_id: string;
487
+ }>;
488
+ abort: (runId: string) => Promise<void>;
489
+ remove: (runId: string) => Promise<void>;
490
+ refresh: () => Promise<void>;
491
+ };
492
+
493
+ declare function useEvalRunStream(runId: string | null): {
494
+ status: string;
495
+ progress: {
496
+ completed: number;
497
+ total: number;
498
+ passed: number;
499
+ failed: number;
500
+ };
501
+ connected: boolean;
502
+ stopStreaming: () => void;
503
+ };
504
+
451
505
  /**
452
506
  * Provider component for the Axiom Lattice client
453
507
  * @param props - Provider props
@@ -523,12 +577,14 @@ interface AgentThreadProviderProps<T extends UseChatOptions> {
523
577
  assistantId?: string;
524
578
  options?: T;
525
579
  children: ReactNode;
580
+ onToolCompleted?: (toolName: string) => void;
581
+ onStreamCompleted?: () => void;
526
582
  }
527
583
  /**
528
584
  * Provider component for AgentThreadContext
529
585
  * Manages all agent thread state and operations
530
586
  */
531
- declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assistantId, options, children, }: AgentThreadProviderProps<T>): react_jsx_runtime.JSX.Element | null;
587
+ declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assistantId, options, children, onToolCompleted, onStreamCompleted, }: AgentThreadProviderProps<T>): react_jsx_runtime.JSX.Element | null;
532
588
  /**
533
589
  * Hook to access AgentThreadContext
534
590
  * @returns Agent thread context value
@@ -1625,6 +1681,28 @@ interface CreateAssistantModalProps {
1625
1681
  }
1626
1682
  declare const CreateAssistantModal: React__default.FC<CreateAssistantModalProps>;
1627
1683
 
1684
+ declare const EvalPanel: React__default.FC;
1685
+
1686
+ interface Props {
1687
+ projectId: string;
1688
+ onSelectSuite: (projectId: string, suiteId: string) => void;
1689
+ }
1690
+ declare const EvalSuiteCardList: React__default.FC<Props>;
1691
+
1692
+ interface EvalSuiteDetailProps {
1693
+ projectId: string;
1694
+ suiteId: string;
1695
+ onBack: () => void;
1696
+ onRun: (runId: string) => void;
1697
+ }
1698
+ declare const EvalSuiteDetail: React__default.FC<EvalSuiteDetailProps>;
1699
+
1700
+ interface EvalRunResultsProps {
1701
+ runId: string;
1702
+ onBack: () => void;
1703
+ }
1704
+ declare const EvalRunResults: React__default.FC<EvalRunResultsProps>;
1705
+
1628
1706
  interface SkillCategoryPromptsProps {
1629
1707
  senderRef: React__default.RefObject<any>;
1630
1708
  visible?: boolean;
@@ -2135,4 +2213,4 @@ type IframeMessage = {
2135
2213
  };
2136
2214
  declare function generateIframeSrcdoc(): string;
2137
2215
 
2138
- 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, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, 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, DEFAULT_MIDDLEWARE_TYPES, 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 ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, 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 };
2216
+ 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, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, 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, DEFAULT_MIDDLEWARE_TYPES, type ElementMeta, type ElementProps, EvalPanel, EvalRunResults, EvalSuiteCardList, EvalSuiteDetail, 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 ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, 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, useEvalCases, useEvalProjects, useEvalRunStream, useEvalRuns, useEvalSuites, useLatticeChatShellContext, useTenants, useUsers };