@skippr/live-agent-sdk 0.7.0 → 0.9.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.
@@ -0,0 +1,6 @@
1
+ interface ChatInputProps {
2
+ sendChatMessage: (message: string) => Promise<unknown>;
3
+ isSendingChat: boolean;
4
+ }
5
+ export declare function ChatInput({ sendChatMessage, isSendingChat }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -2,8 +2,9 @@ import { type ReactNode } from 'react';
2
2
  interface LiveAgentProps {
3
3
  organizationId: string;
4
4
  agentId: string;
5
+ authToken?: string;
5
6
  defaultOpen?: boolean;
6
7
  children?: ReactNode;
7
8
  }
8
- export declare function LiveAgent({ organizationId, agentId, defaultOpen, children, }: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function LiveAgent({ organizationId, agentId, authToken, defaultOpen, children, }: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -2,6 +2,8 @@ import type { Message } from '../types';
2
2
  interface MessageListProps {
3
3
  messages: Message[];
4
4
  isStreaming: boolean;
5
+ sendChatMessage: (message: string) => Promise<unknown>;
6
+ isSendingChat: boolean;
5
7
  }
6
- export declare function MessageList({ messages, isStreaming }: MessageListProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function MessageList({ messages, isStreaming, sendChatMessage, isSendingChat, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -0,0 +1,6 @@
1
+ import type { Message } from '../types';
2
+ export declare function useChatMessages(): {
3
+ chatMessages: Message[];
4
+ sendChatMessage: (message: string) => Promise<unknown>;
5
+ isSendingChat: boolean;
6
+ };
@@ -0,0 +1,8 @@
1
+ import type { Message } from '../types';
2
+ export declare function mergeChatsIntoTranscripts(transcripts: Message[], chats: Message[]): Message[];
3
+ export declare function useCombinedMessages(): {
4
+ allMessages: Message[];
5
+ agentState: import("@livekit/components-react").AgentState;
6
+ sendChatMessage: (message: string) => Promise<unknown>;
7
+ isSendingChat: boolean;
8
+ };
@@ -5,8 +5,9 @@ interface LiveKitConnection {
5
5
  interface UseSessionParams {
6
6
  organizationId: string;
7
7
  agentId: string;
8
+ authToken?: string | undefined;
8
9
  }
9
- export declare function useSession({ organizationId, agentId }: UseSessionParams): {
10
+ export declare function useSession({ organizationId, agentId, authToken }: UseSessionParams): {
10
11
  connection: LiveKitConnection | null;
11
12
  shouldConnect: boolean;
12
13
  isStarting: boolean;
@@ -0,0 +1,4 @@
1
+ import type { Message } from '../types';
2
+ export declare function useStreamingTranscript(): {
3
+ transcriptMessages: Message[];
4
+ };
@@ -0,0 +1,2 @@
1
+ import type { Message } from '../types';
2
+ export declare function filterSystemMessages(messages: Message[]): Message[];
@@ -2,4 +2,6 @@ export interface Message {
2
2
  id: string;
3
3
  role: 'user' | 'assistant';
4
4
  content: string;
5
+ source: 'voice-transcript' | 'chat';
6
+ timestamp?: number;
5
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",
@@ -1,6 +0,0 @@
1
- import { useVoiceAssistant } from '@livekit/components-react';
2
- import type { Message } from '../types';
3
- export declare function useTranscriptMessages(): {
4
- messages: Message[];
5
- agentState: ReturnType<typeof useVoiceAssistant>['state'];
6
- };