@skippr/live-agent-sdk 0.1.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,5 @@
1
+ interface ChatHeaderProps {
2
+ onClose: () => void;
3
+ }
4
+ export declare function ChatHeader({ onClose }: ChatHeaderProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { Message } from '../types';
2
+ interface ChatMessageProps {
3
+ message: Message;
4
+ }
5
+ export declare function ChatMessage({ message }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ interface LiveAgentProps {
3
+ organizationId: string;
4
+ agentId: string;
5
+ defaultOpen?: boolean;
6
+ children?: ReactNode;
7
+ }
8
+ export declare function LiveAgent({ organizationId, agentId, defaultOpen, children, }: LiveAgentProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ interface MeetingControlsProps {
2
+ onHangUp: () => void;
3
+ }
4
+ export declare function MeetingControls({ onHangUp }: MeetingControlsProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Message } from '../types';
2
+ interface MessageListProps {
3
+ messages: Message[];
4
+ isStreaming: boolean;
5
+ }
6
+ export declare function MessageList({ messages, isStreaming }: MessageListProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ interface QuickActionsProps {
2
+ onStartSession: () => void;
3
+ isStarting?: boolean;
4
+ error?: string;
5
+ }
6
+ export declare function QuickActions({ onStartSession, isStarting, error }: QuickActionsProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { PhaseStatus } from '../hooks/usePhaseUpdates';
2
+ import type { QuestionStatus } from '../hooks/useQuestionUpdates';
3
+ interface SessionAgendaProps {
4
+ phases: PhaseStatus[];
5
+ questions?: QuestionStatus[];
6
+ }
7
+ export declare function SessionAgenda({ phases, questions }: SessionAgendaProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function Sidebar(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SidebarTrigger(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function TypingIndicator(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type ButtonHTMLAttributes } from 'react';
2
+ type ButtonVariant = 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost';
3
+ type ButtonSize = 'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg';
4
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: ButtonVariant;
6
+ size?: ButtonSize;
7
+ }
8
+ declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
9
+ export { Button, type ButtonProps };
@@ -0,0 +1,19 @@
1
+ export interface LiveAgentPublicValue {
2
+ isConnected: boolean;
3
+ isStarting: boolean;
4
+ error: string;
5
+ startSession: () => Promise<void>;
6
+ disconnect: () => Promise<void>;
7
+ isPanelOpen: boolean;
8
+ openPanel: () => void;
9
+ closePanel: () => void;
10
+ togglePanel: () => void;
11
+ }
12
+ export interface LiveAgentContextValue extends LiveAgentPublicValue {
13
+ connection: {
14
+ livekitUrl: string;
15
+ token: string;
16
+ } | null;
17
+ shouldConnect: boolean;
18
+ }
19
+ export declare const LiveAgentContext: import("react").Context<LiveAgentContextValue | null>;
@@ -0,0 +1 @@
1
+ export declare function useAgentState<T>(attributeKey: string, parse: (json: string) => T | null, initial: T): T;
@@ -0,0 +1,2 @@
1
+ import { type LiveAgentPublicValue } from '../context/LiveAgentContext';
2
+ export declare function useLiveAgent(): LiveAgentPublicValue;
@@ -0,0 +1,8 @@
1
+ export interface PhaseStatus {
2
+ name: string;
3
+ description: string;
4
+ status: 'pending' | 'active' | 'completed';
5
+ }
6
+ export declare function usePhaseUpdates(): {
7
+ phases: PhaseStatus[];
8
+ };
@@ -0,0 +1,11 @@
1
+ export interface QuestionStatus {
2
+ id: string;
3
+ text: string;
4
+ phaseName: string;
5
+ required: boolean;
6
+ status: 'unanswered' | 'answered';
7
+ answer: string | null;
8
+ }
9
+ export declare function useQuestionUpdates(): {
10
+ questions: QuestionStatus[];
11
+ };
@@ -0,0 +1,17 @@
1
+ interface LiveKitConnection {
2
+ livekitUrl: string;
3
+ token: string;
4
+ }
5
+ interface UseSessionParams {
6
+ organizationId: string;
7
+ agentId: string;
8
+ }
9
+ export declare function useSession({ organizationId, agentId }: UseSessionParams): {
10
+ connection: LiveKitConnection | null;
11
+ shouldConnect: boolean;
12
+ isStarting: boolean;
13
+ error: string;
14
+ startSession: () => Promise<void>;
15
+ disconnect: () => Promise<void>;
16
+ };
17
+ export {};
@@ -0,0 +1,6 @@
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
+ };
@@ -0,0 +1 @@
1
+ export declare const SIDEBAR_WIDTH = 600;
@@ -0,0 +1 @@
1
+ export declare function formatTime(seconds: number): string;
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,2 @@
1
+ export { LiveAgent } from './components/LiveAgent';
2
+ export { useLiveAgent } from './hooks/useLiveAgent';
@@ -0,0 +1,5 @@
1
+ export interface Message {
2
+ id: string;
3
+ role: 'user' | 'assistant';
4
+ content: string;
5
+ }
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@skippr/live-agent-sdk",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "dist/esm/lib-exports.js",
6
+ "module": "dist/esm/lib-exports.js",
7
+ "types": "dist/types/lib-exports.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types/lib-exports.d.ts",
11
+ "import": "./dist/esm/lib-exports.js"
12
+ },
13
+ "./styles": "./dist/skippr-sdk.css",
14
+ "./widget": "./dist/skippr-sdk.js"
15
+ },
16
+ "files": [
17
+ "dist/**/*",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "sideEffects": [
22
+ "*.css"
23
+ ],
24
+ "scripts": {
25
+ "build": "bun run scripts/build-sdk.ts",
26
+ "typecheck": "tsc --noEmit",
27
+ "check": "biome check .",
28
+ "check:fix": "biome check --write .",
29
+ "test": "bun test",
30
+ "ci": "bun run check && bun run typecheck && bun run test && bun run build",
31
+ "release": "release-it"
32
+ },
33
+ "dependencies": {
34
+ "clsx": "2.1.1",
35
+ "tailwind-merge": "3.4.0"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^18 || ^19",
39
+ "react-dom": "^18 || ^19",
40
+ "livekit-client": "^2.0.0",
41
+ "@livekit/components-react": "^2.0.0",
42
+ "lucide-react": ">=0.300.0 <1.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@biomejs/biome": "^2.3.13",
46
+ "@happy-dom/global-registrator": "20.3.7",
47
+ "@livekit/components-react": "2.9.19",
48
+ "@release-it/conventional-changelog": "^10.0.0",
49
+ "@tailwindcss/cli": "4.1.18",
50
+ "@testing-library/react": "16.3.2",
51
+ "@types/bun": "^1.3.8",
52
+ "@types/react": "19.2.9",
53
+ "@types/react-dom": "19.2.3",
54
+ "bun-plugin-tailwind": "0.1.2",
55
+ "livekit-client": "2.17.1",
56
+ "lucide-react": "0.563.0",
57
+ "react": "19.2.3",
58
+ "react-dom": "19.2.3",
59
+ "release-it": "^19.0.0",
60
+ "tailwindcss": "4.1.18",
61
+ "typescript": "5.9.3"
62
+ },
63
+ "publishConfig": {
64
+ "access": "public"
65
+ }
66
+ }