@marketrix.ai/widget 3.8.455 → 3.8.457
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/src/components/base/Stack.d.ts +3 -15
- package/dist/src/components/base/icons.d.ts +0 -32
- package/dist/src/components/blocks/HeaderBar.d.ts +2 -2
- package/dist/src/components/blocks/WidgetFab.d.ts +2 -15
- package/dist/src/components/chat/MessageList.d.ts +3 -7
- package/dist/src/components/chat/SuggestedActions.d.ts +3 -9
- package/dist/src/components/chat/TaskStatusIcon.d.ts +4 -5
- package/dist/src/components/navigation/MessengerShell.d.ts +1 -21
- package/dist/src/components/views/ChatView.d.ts +6 -18
- package/dist/src/components/views/HomeView.d.ts +0 -3
- package/dist/src/context/ChatContext.d.ts +3 -11
- package/dist/src/context/UIStateContext.d.ts +2 -9
- package/dist/src/context/sseReducer.d.ts +2 -2
- package/dist/src/design-system/component-tokens.d.ts +1 -8
- package/dist/src/hooks/useResize.d.ts +1 -3
- package/dist/src/hooks/useWidget.d.ts +27 -32
- package/dist/src/sdk/contract.d.ts +0 -10
- package/dist/src/sdk/contracts/activityLog.d.ts +0 -30
- package/dist/src/sdk/contracts/entities.d.ts +0 -15
- package/dist/src/sdk/index.d.ts +0 -10
- package/dist/src/services/ApiService.d.ts +4 -4
- package/dist/src/services/BrowserToolService.d.ts +0 -1
- package/dist/src/services/ChatService.d.ts +7 -19
- package/dist/src/services/ChatSessionManager.d.ts +2 -7
- package/dist/src/services/DomService.d.ts +4 -23
- package/dist/src/services/ShowModeService.d.ts +2 -2
- package/dist/src/services/StorageService.d.ts +14 -14
- package/dist/src/services/StreamClient.d.ts +1 -8
- package/dist/src/services/WidgetService.d.ts +4 -0
- package/dist/src/types/index.d.ts +3 -10
- package/dist/src/utils/bootstrap.d.ts +6 -8
- package/dist/src/utils/chat.d.ts +5 -1
- package/dist/src/utils/color.d.ts +0 -2
- package/dist/src/utils/suggestedActions.d.ts +0 -3
- package/dist/src/utils/widgetPositioning.d.ts +18 -0
- package/dist/widget.mjs +63 -60
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/src/services/ConfigManager.d.ts +0 -10
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { type LayoutProps } from './layoutProps';
|
|
5
|
-
import { type SurfaceBackground, type SurfacePadding } from './Surface';
|
|
6
|
-
export interface StackProps extends LayoutProps, Omit<ComponentPropsWithRef<'div'>, 'className'> {
|
|
7
|
-
background?: SurfaceBackground;
|
|
8
|
-
elevation?: ShadowToken;
|
|
9
|
-
paddingPreset?: SurfacePadding;
|
|
10
|
-
radius?: RadiusToken;
|
|
11
|
-
/** @internal blocks/ only */
|
|
12
|
-
className?: string;
|
|
13
|
-
children?: ReactNode;
|
|
14
|
-
}
|
|
15
|
-
export declare function Stack(props: StackProps): import("react").JSX.Element;
|
|
1
|
+
import { type FlexProps } from './Flex';
|
|
2
|
+
export type StackProps = Omit<FlexProps, 'direction'>;
|
|
3
|
+
export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -35,20 +35,6 @@ export declare const icons: {
|
|
|
35
35
|
readonly fill: "currentColor";
|
|
36
36
|
}];
|
|
37
37
|
};
|
|
38
|
-
readonly timesCircle: {
|
|
39
|
-
readonly viewBox: "0 0 512 512";
|
|
40
|
-
readonly paths: [{
|
|
41
|
-
readonly d: "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z";
|
|
42
|
-
readonly fill: "currentColor";
|
|
43
|
-
}];
|
|
44
|
-
};
|
|
45
|
-
readonly ban: {
|
|
46
|
-
readonly viewBox: "0 0 512 512";
|
|
47
|
-
readonly paths: [{
|
|
48
|
-
readonly d: "M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z";
|
|
49
|
-
readonly fill: "currentColor";
|
|
50
|
-
}];
|
|
51
|
-
};
|
|
52
38
|
readonly arrowUp: {
|
|
53
39
|
readonly viewBox: "0 0 448 512";
|
|
54
40
|
readonly paths: [{
|
|
@@ -63,24 +49,6 @@ export declare const icons: {
|
|
|
63
49
|
readonly fill: "currentColor";
|
|
64
50
|
}];
|
|
65
51
|
};
|
|
66
|
-
readonly x: {
|
|
67
|
-
readonly viewBox: "0 0 24 24";
|
|
68
|
-
readonly paths: [{
|
|
69
|
-
readonly d: "M18 6L6 18";
|
|
70
|
-
readonly fill: "none";
|
|
71
|
-
readonly stroke: "currentColor";
|
|
72
|
-
readonly strokeWidth: 2;
|
|
73
|
-
readonly strokeLinecap: "round";
|
|
74
|
-
readonly strokeLinejoin: "round";
|
|
75
|
-
}, {
|
|
76
|
-
readonly d: "M6 6L18 18";
|
|
77
|
-
readonly fill: "none";
|
|
78
|
-
readonly stroke: "currentColor";
|
|
79
|
-
readonly strokeWidth: 2;
|
|
80
|
-
readonly strokeLinecap: "round";
|
|
81
|
-
readonly strokeLinejoin: "round";
|
|
82
|
-
}];
|
|
83
|
-
};
|
|
84
52
|
readonly chatBubble: {
|
|
85
53
|
readonly viewBox: "0 0 512 512";
|
|
86
54
|
readonly paths: [{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface HeaderBarProps {
|
|
3
3
|
title: string;
|
|
4
4
|
subtitle?: string;
|
|
5
|
-
minimized?: boolean;
|
|
6
5
|
onClose: () => void;
|
|
7
6
|
controls?: React.ReactNode;
|
|
8
7
|
}
|
|
9
8
|
export declare const HeaderBar: React.FC<HeaderBarProps>;
|
|
9
|
+
export {};
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WidgetPosition } from '../../types';
|
|
3
|
-
|
|
4
|
-
open: boolean;
|
|
5
|
-
processing?: boolean;
|
|
6
|
-
error?: boolean;
|
|
7
|
-
taskRunning?: boolean;
|
|
8
|
-
onClick: () => void;
|
|
9
|
-
onStop?: () => void;
|
|
10
|
-
accentColor?: string;
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
borderRadius?: string;
|
|
13
|
-
tooltipBgColor?: string;
|
|
14
|
-
tooltipTextColor?: string;
|
|
15
|
-
zIndex?: number;
|
|
16
|
-
position: WidgetPosition;
|
|
3
|
+
interface WidgetFabProps {
|
|
17
4
|
onDrag: (position: WidgetPosition) => void;
|
|
18
|
-
isPreviewMode?: boolean;
|
|
19
5
|
}
|
|
20
6
|
export declare const WidgetFab: React.FC<WidgetFabProps>;
|
|
7
|
+
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ChatMessage, MarketrixConfig } from '../../types';
|
|
3
2
|
interface MessageListProps {
|
|
4
|
-
messages: ChatMessage[];
|
|
5
3
|
messagesEndRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onScreenAccessDeny?: () => void;
|
|
9
|
-
onClearChat?: () => void | Promise<void>;
|
|
4
|
+
onScreenAccessAllow: () => void;
|
|
5
|
+
onScreenAccessDeny: () => void;
|
|
10
6
|
}
|
|
11
|
-
export declare const MessageList: ({
|
|
7
|
+
export declare const MessageList: ({ messagesEndRef, onScreenAccessAllow, onScreenAccessDeny }: MessageListProps) => React.JSX.Element;
|
|
12
8
|
export {};
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
text: string;
|
|
5
|
-
icon: React.ReactElement;
|
|
6
|
-
type: 'tell' | 'show' | 'do';
|
|
7
|
-
isShow: boolean;
|
|
8
|
-
}
|
|
2
|
+
import type { SuggestedActionItem } from '../../utils/suggestedActions';
|
|
9
3
|
interface SuggestedActionsProps {
|
|
10
|
-
actions:
|
|
11
|
-
onActionClick: (action:
|
|
4
|
+
actions: SuggestedActionItem[];
|
|
5
|
+
onActionClick: (action: SuggestedActionItem, event: React.MouseEvent) => Promise<void>;
|
|
12
6
|
}
|
|
13
7
|
export declare const SuggestedActions: React.FC<SuggestedActionsProps>;
|
|
14
8
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {};
|
|
2
|
+
import type { ChatMessage } from '../../types';
|
|
3
|
+
export declare const TaskStatusIcon: React.FC<{
|
|
4
|
+
status: NonNullable<ChatMessage['taskStatus']>;
|
|
5
|
+
}>;
|
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export interface MessengerShellProps {
|
|
4
|
-
config: MarketrixConfig;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
isMinimized: boolean;
|
|
7
|
-
messages: ChatMessage[];
|
|
8
|
-
currentMode: InstructionType;
|
|
9
|
-
isTaskRunning?: boolean;
|
|
10
|
-
activeView: WidgetView;
|
|
11
|
-
onClose: () => void;
|
|
12
|
-
onSendMessage: (message: string, mode?: InstructionType, skipUserMessage?: boolean) => void;
|
|
13
|
-
onSetMode: (mode: InstructionType) => void;
|
|
14
|
-
onAddMessage: (message: ChatMessage) => void;
|
|
15
|
-
onUpdateMessage: (messageId: string, updates: Partial<ChatMessage>) => void;
|
|
16
|
-
onRemoveMessage?: (messageId: string) => void;
|
|
17
|
-
onStopTask?: () => void;
|
|
18
|
-
onClearChat?: () => void | Promise<void>;
|
|
19
|
-
onScreenSharingChange?: (isSharing: boolean) => void;
|
|
20
|
-
setActiveView: (view: WidgetView) => void;
|
|
21
|
-
}
|
|
22
|
-
export declare const MessengerShell: React.FC<MessengerShellProps>;
|
|
2
|
+
export declare const MessengerShell: React.FC;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
currentMode: InstructionType;
|
|
8
|
-
isTaskRunning?: boolean;
|
|
9
|
-
onSendMessage: (message: string, mode?: InstructionType, skipUserMessage?: boolean) => void;
|
|
10
|
-
onSetMode: (mode: InstructionType) => void;
|
|
11
|
-
onAddMessage: (message: ChatMessage) => void;
|
|
12
|
-
onUpdateMessage: (messageId: string, updates: Partial<ChatMessage>) => void;
|
|
13
|
-
onRemoveMessage?: (messageId: string) => void;
|
|
14
|
-
onStopTask?: () => void;
|
|
15
|
-
onClearChat?: () => void | Promise<void>;
|
|
16
|
-
onScreenSharingChange?: (isSharing: boolean) => void;
|
|
17
|
-
onStartScreenShareRef?: React.MutableRefObject<(() => void) | null>;
|
|
18
|
-
onStopScreenShareRef?: React.MutableRefObject<(() => void) | null>;
|
|
19
|
-
messageInputRef?: React.RefObject<HTMLTextAreaElement | null>;
|
|
2
|
+
interface ChatViewProps {
|
|
3
|
+
onScreenSharingChange: (isSharing: boolean) => void;
|
|
4
|
+
onStartScreenShareRef: React.MutableRefObject<(() => void) | null>;
|
|
5
|
+
onStopScreenShareRef: React.MutableRefObject<(() => void) | null>;
|
|
6
|
+
messageInputRef: React.RefObject<HTMLTextAreaElement | null>;
|
|
20
7
|
}
|
|
21
8
|
export declare const ChatView: React.FC<ChatViewProps>;
|
|
9
|
+
export {};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ChatMessage, MarketrixConfig } from '../../types';
|
|
3
2
|
import { type SuggestedActionItem } from '../../utils/suggestedActions';
|
|
4
3
|
interface HomeViewProps {
|
|
5
|
-
config: MarketrixConfig;
|
|
6
|
-
messages: ChatMessage[];
|
|
7
4
|
onNavigateToChat: () => void;
|
|
8
5
|
onChipClick: (action: SuggestedActionItem) => void;
|
|
9
6
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ChatMessage, InstructionType } from '../types';
|
|
3
|
+
import { type TaskState } from './sseReducer';
|
|
3
4
|
import type { UIStateActions } from './UIStateContext';
|
|
4
|
-
export interface TaskState {
|
|
5
|
-
activeTaskId: string | null;
|
|
6
|
-
isTaskRunning: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface ChatState {
|
|
9
|
-
messages: ChatMessage[];
|
|
10
|
-
}
|
|
11
5
|
export interface ChatActions {
|
|
12
6
|
addMessage: (message: ChatMessage) => void;
|
|
13
7
|
updateMessage: (messageId: string, updates: Partial<ChatMessage>) => void;
|
|
@@ -24,7 +18,7 @@ export interface TaskActions {
|
|
|
24
18
|
stopTask: () => Promise<void>;
|
|
25
19
|
}
|
|
26
20
|
interface ChatContextType {
|
|
27
|
-
|
|
21
|
+
messages: ChatMessage[];
|
|
28
22
|
chatActions: ChatActions;
|
|
29
23
|
taskState: TaskState;
|
|
30
24
|
taskActions: TaskActions;
|
|
@@ -33,9 +27,7 @@ interface ChatProviderProps {
|
|
|
33
27
|
children: React.ReactNode;
|
|
34
28
|
previewMode?: boolean;
|
|
35
29
|
currentMode: InstructionType;
|
|
36
|
-
uiActions: Pick<UIStateActions, 'setLoading' | '
|
|
37
|
-
initialMessages?: ChatMessage[];
|
|
38
|
-
initialTask?: TaskState;
|
|
30
|
+
uiActions: Pick<UIStateActions, 'setLoading' | 'setError'>;
|
|
39
31
|
}
|
|
40
32
|
export declare const ChatProvider: React.FC<ChatProviderProps>;
|
|
41
33
|
export declare const useChatContext: () => ChatContextType;
|
|
@@ -2,10 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { InstructionType, WidgetView } from '../types';
|
|
3
3
|
export interface UIState {
|
|
4
4
|
isOpen: boolean;
|
|
5
|
-
isMinimized: boolean;
|
|
6
5
|
activeView: WidgetView;
|
|
7
6
|
currentMode: InstructionType;
|
|
8
|
-
agentAvailable: boolean;
|
|
9
7
|
isLoading: boolean;
|
|
10
8
|
error?: string;
|
|
11
9
|
}
|
|
@@ -15,7 +13,6 @@ export interface UIStateActions {
|
|
|
15
13
|
closeWidget: () => void;
|
|
16
14
|
setMode: (mode: InstructionType) => void;
|
|
17
15
|
setLoading: (loading: boolean) => void;
|
|
18
|
-
setAgentAvailable: (available: boolean) => void;
|
|
19
16
|
setError: (error: string | undefined) => void;
|
|
20
17
|
clearError: () => void;
|
|
21
18
|
applyState: (payload: Partial<UIState>) => void;
|
|
@@ -24,12 +21,8 @@ interface UIStateContextType {
|
|
|
24
21
|
uiState: UIState;
|
|
25
22
|
uiActions: UIStateActions;
|
|
26
23
|
}
|
|
27
|
-
|
|
24
|
+
export declare const UIStateProvider: React.FC<{
|
|
28
25
|
children: React.ReactNode;
|
|
29
|
-
|
|
30
|
-
initialIsOpen?: boolean;
|
|
31
|
-
initialIsMinimized?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export declare const UIStateProvider: React.FC<UIStateProviderProps>;
|
|
26
|
+
}>;
|
|
34
27
|
export declare const useUIStateContext: () => UIStateContextType;
|
|
35
28
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { WidgetEvent } from '../sdk';
|
|
2
2
|
import type { ChatMessage, InstructionType } from '../types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface TaskState {
|
|
4
4
|
activeTaskId: string | null;
|
|
5
5
|
isTaskRunning: boolean;
|
|
6
6
|
}
|
|
7
7
|
export interface SseState {
|
|
8
8
|
messages: ChatMessage[];
|
|
9
|
-
task:
|
|
9
|
+
task: TaskState;
|
|
10
10
|
}
|
|
11
11
|
export type SseEffect = {
|
|
12
12
|
type: 'executeTool';
|
|
@@ -7,14 +7,7 @@ export type NotificationTone = 'info' | 'error';
|
|
|
7
7
|
export declare const radiusClasses: Record<RadiusToken, string>;
|
|
8
8
|
export declare const textToneClasses: Record<TextTone, string>;
|
|
9
9
|
export declare const textLeadingClasses: Record<TextLeading, string>;
|
|
10
|
-
export declare const
|
|
11
|
-
header: {
|
|
12
|
-
height: number;
|
|
13
|
-
};
|
|
14
|
-
tabBar: {
|
|
15
|
-
height: number;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
10
|
+
export declare const TAB_BAR_HEIGHT = 48;
|
|
18
11
|
export declare const notificationToneStyles: Record<NotificationTone, {
|
|
19
12
|
background: string;
|
|
20
13
|
border: string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export type ResizeCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
2
|
-
export declare function useResize(settingsWidth: string | undefined, settingsHeight: string | undefined, workspaceId: string,
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
2
|
+
export declare function useResize(settingsWidth: string | undefined, settingsHeight: string | undefined, workspaceId: string, isPreviewMode: boolean): {
|
|
5
3
|
widthPx: string;
|
|
6
4
|
heightPx: string;
|
|
7
5
|
onResizeStart: (corner: ResizeCorner) => (e: React.MouseEvent) => void;
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MarketrixConfig, WidgetSettingsData, WidgetState } from '../types';
|
|
2
2
|
export type ValidWidgetConfig = MarketrixConfig & Required<Pick<MarketrixConfig, keyof WidgetSettingsData>>;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
setActiveView: (view: WidgetView) => void;
|
|
8
|
-
toggleWidget: () => void;
|
|
9
|
-
closeWidget: () => void;
|
|
10
|
-
setMode: (mode: InstructionType) => void;
|
|
11
|
-
setLoading: (loading: boolean) => void;
|
|
12
|
-
setAgentAvailable: (available: boolean) => void;
|
|
13
|
-
setError: (error: string | undefined) => void;
|
|
14
|
-
clearError: () => void;
|
|
15
|
-
setTaskState: (payload: {
|
|
16
|
-
activeTaskId: string | null;
|
|
17
|
-
isTaskRunning: boolean;
|
|
18
|
-
}) => void;
|
|
19
|
-
addMessage: (message: ChatMessage) => void;
|
|
20
|
-
updateMessage: (messageId: string, updates: Partial<ChatMessage>) => void;
|
|
21
|
-
removeMessage: (messageId: string) => void;
|
|
22
|
-
setMessages: (messages: ChatMessage[]) => void;
|
|
23
|
-
stopTask: () => Promise<void>;
|
|
24
|
-
clearChatHistory: () => void;
|
|
25
|
-
messageDispatch: (content: string, mode?: InstructionType, skipUserMessage?: boolean) => Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export declare const useWidget: ({ config }?: UseWidgetProps) => {
|
|
3
|
+
/** Every setting resolved: API settings plus the position and script-tag overrides MarketrixWidget layers on top. */
|
|
4
|
+
export declare const WidgetConfigContext: import("react").Context<ValidWidgetConfig | null>;
|
|
5
|
+
export declare const useWidgetConfig: () => ValidWidgetConfig;
|
|
6
|
+
export declare const useWidget: () => {
|
|
28
7
|
state: WidgetState;
|
|
29
|
-
actions:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
8
|
+
actions: {
|
|
9
|
+
clearChatHistory: () => void;
|
|
10
|
+
addMessage: (message: import("..").ChatMessage) => void;
|
|
11
|
+
updateMessage: (messageId: string, updates: Partial<import("..").ChatMessage>) => void;
|
|
12
|
+
removeMessage: (messageId: string) => void;
|
|
13
|
+
setMessages: (messages: import("..").ChatMessage[]) => void;
|
|
14
|
+
clearMessages: () => void;
|
|
15
|
+
messageDispatch: (content: string, mode?: import("..").InstructionType, skipUserMessage?: boolean) => Promise<void>;
|
|
16
|
+
setTaskState: (payload: {
|
|
17
|
+
activeTaskId: string | null;
|
|
18
|
+
isTaskRunning: boolean;
|
|
19
|
+
}) => void;
|
|
20
|
+
stopTask: () => Promise<void>;
|
|
21
|
+
setActiveView: (view: import("../types").WidgetView) => void;
|
|
22
|
+
toggleWidget: () => void;
|
|
23
|
+
closeWidget: () => void;
|
|
24
|
+
setMode: (mode: import("..").InstructionType) => void;
|
|
25
|
+
setLoading: (loading: boolean) => void;
|
|
26
|
+
setError: (error: string | undefined) => void;
|
|
27
|
+
clearError: () => void;
|
|
28
|
+
applyState: (payload: Partial<import("../context/UIStateContext").UIState>) => void;
|
|
29
|
+
};
|
|
34
30
|
};
|
|
35
|
-
export {};
|
|
@@ -13,11 +13,6 @@ export declare const widgetContract: {
|
|
|
13
13
|
target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
14
14
|
target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
15
|
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
-
assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
-
new_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
-
previous_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
-
workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
-
workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
16
|
ip_address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
17
|
user_agent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
18
|
widget_type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -127,11 +122,6 @@ export declare const widgetContract: {
|
|
|
127
122
|
target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
128
123
|
target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
129
124
|
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
130
|
-
assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
|
-
new_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
|
-
previous_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
133
|
-
workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
-
workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
|
|
135
125
|
ip_address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
126
|
user_agent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
137
127
|
widget_type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -19,11 +19,6 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
|
|
|
19
19
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
20
20
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
21
21
|
reason: z.ZodOptional<z.ZodString>;
|
|
22
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
23
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
24
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
25
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
26
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
27
22
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
28
23
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
29
24
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -133,11 +128,6 @@ export declare const activityLogCreate: import("@orpc/contract").ContractProcedu
|
|
|
133
128
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
134
129
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
135
130
|
reason: z.ZodOptional<z.ZodString>;
|
|
136
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
137
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
138
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
139
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
140
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
141
131
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
142
132
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
143
133
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -255,11 +245,6 @@ export declare const activityLogSearch: import("@orpc/contract").ContractProcedu
|
|
|
255
245
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
256
246
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
257
247
|
reason: z.ZodOptional<z.ZodString>;
|
|
258
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
259
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
260
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
261
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
262
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
263
248
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
264
249
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
265
250
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -285,11 +270,6 @@ export declare const activityLogRoutes: {
|
|
|
285
270
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
286
271
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
287
272
|
reason: z.ZodOptional<z.ZodString>;
|
|
288
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
289
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
290
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
291
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
292
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
293
273
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
294
274
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
295
275
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -399,11 +379,6 @@ export declare const activityLogRoutes: {
|
|
|
399
379
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
400
380
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
401
381
|
reason: z.ZodOptional<z.ZodString>;
|
|
402
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
403
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
404
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
405
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
406
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
407
382
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
408
383
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
409
384
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -521,11 +496,6 @@ export declare const activityLogRoutes: {
|
|
|
521
496
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
522
497
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
523
498
|
reason: z.ZodOptional<z.ZodString>;
|
|
524
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
525
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
526
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
527
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
528
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
529
499
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
530
500
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
531
501
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -306,11 +306,6 @@ export declare const ActivityLogMetadataSchema: z.ZodObject<{
|
|
|
306
306
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
307
307
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
308
308
|
reason: z.ZodOptional<z.ZodString>;
|
|
309
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
310
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
311
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
312
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
313
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
314
309
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
315
310
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
316
311
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -375,11 +370,6 @@ export declare const ActivityLogEntitySchema: z.ZodObject<{
|
|
|
375
370
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
376
371
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
377
372
|
reason: z.ZodOptional<z.ZodString>;
|
|
378
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
379
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
380
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
381
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
382
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
383
373
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
384
374
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
385
375
|
widget_type: z.ZodOptional<z.ZodString>;
|
|
@@ -401,11 +391,6 @@ export declare const ActivityLogCreateSchema: z.ZodObject<{
|
|
|
401
391
|
target_user_id: z.ZodOptional<z.ZodNumber>;
|
|
402
392
|
target_user_email: z.ZodOptional<z.ZodString>;
|
|
403
393
|
reason: z.ZodOptional<z.ZodString>;
|
|
404
|
-
assigned_role: z.ZodOptional<z.ZodString>;
|
|
405
|
-
new_role: z.ZodOptional<z.ZodString>;
|
|
406
|
-
previous_role: z.ZodOptional<z.ZodString>;
|
|
407
|
-
workspace_name: z.ZodOptional<z.ZodString>;
|
|
408
|
-
workspace_slug: z.ZodOptional<z.ZodString>;
|
|
409
394
|
ip_address: z.ZodOptional<z.ZodString>;
|
|
410
395
|
user_agent: z.ZodOptional<z.ZodString>;
|
|
411
396
|
widget_type: z.ZodOptional<z.ZodString>;
|
package/dist/src/sdk/index.d.ts
CHANGED
|
@@ -15,11 +15,6 @@ export declare const sdk: {
|
|
|
15
15
|
target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
16
16
|
target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
17
|
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
-
assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
-
new_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
-
previous_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
-
workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
-
workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
18
|
ip_address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
19
|
user_agent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
20
|
widget_type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -129,11 +124,6 @@ export declare const sdk: {
|
|
|
129
124
|
target_user_id: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
130
125
|
target_user_email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
126
|
reason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
|
-
assigned_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
133
|
-
new_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
-
previous_role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
135
|
-
workspace_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
|
-
workspace_slug: import("zod").ZodOptional<import("zod").ZodString>;
|
|
137
127
|
ip_address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
138
128
|
user_agent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
139
129
|
widget_type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
export declare function messageDispatch(config: MarketrixConfig,
|
|
1
|
+
import { type InstructionType } from '../sdk';
|
|
2
|
+
import type { MarketrixConfig } from '../types';
|
|
3
|
+
/** The reply does not come back from here — it arrives asynchronously as a chat/response event on the stream. */
|
|
4
|
+
export declare function messageDispatch(config: MarketrixConfig, message: string, mode: InstructionType, requestId: string): Promise<void>;
|
|
@@ -74,7 +74,6 @@ export interface ExtractParams {
|
|
|
74
74
|
}
|
|
75
75
|
export declare class BrowserToolService {
|
|
76
76
|
executeTool(browserToolName: string, args: Record<string, unknown>, mode?: string, explanation?: string): Promise<ToolExecutionResult<unknown>>;
|
|
77
|
-
private requiresHighlight;
|
|
78
77
|
private navigate;
|
|
79
78
|
private search;
|
|
80
79
|
private clickElement;
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
import type { ChatMessage, InstructionType } from '../types';
|
|
2
|
-
|
|
3
|
-
messages: ChatMessage[];
|
|
4
|
-
isTaskRunning: boolean;
|
|
5
|
-
activeTaskId: string | null;
|
|
6
|
-
currentMode: InstructionType;
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
isMinimized: boolean;
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
}
|
|
2
|
+
import { type ChatSnapshot } from './StorageService';
|
|
11
3
|
export declare class ChatService {
|
|
12
|
-
private
|
|
13
|
-
initError: Error | null;
|
|
14
|
-
initialize(chatId: string | null): void;
|
|
15
|
-
createInitialContext(chatId: string): void;
|
|
16
|
-
getInitError(): Error | null;
|
|
4
|
+
private restored;
|
|
17
5
|
restore(): ChatSnapshot;
|
|
18
6
|
persist(snapshot: ChatSnapshot): void;
|
|
19
7
|
}
|
|
20
8
|
export declare const chatService: ChatService;
|
|
21
|
-
export declare
|
|
22
|
-
export declare
|
|
23
|
-
export declare
|
|
24
|
-
export declare
|
|
25
|
-
export declare
|
|
9
|
+
export declare const createUserMessage: (content: string, mode?: InstructionType, idPrefix?: string) => ChatMessage;
|
|
10
|
+
export declare const createAgentMessage: (content: string) => ChatMessage;
|
|
11
|
+
export declare const createSystemMessage: (content: string, mode: InstructionType, sender: "user" | "agent", idPrefix: string) => ChatMessage;
|
|
12
|
+
export declare const createScreenAccessRequestMessage: (mode?: InstructionType) => ChatMessage;
|
|
13
|
+
export declare const createScreenshareMessage: (stream: MediaStream, mode?: InstructionType) => ChatMessage;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
declare class ChatSessionManager {
|
|
2
|
-
private
|
|
3
|
-
|
|
4
|
-
constructor();
|
|
5
|
-
getChatId(): string | null;
|
|
6
|
-
/** Promise-based lock: concurrent callers all await the same creation promise. */
|
|
2
|
+
private creation;
|
|
3
|
+
/** Promise-based lock: concurrent callers all await the same creation. */
|
|
7
4
|
getOrCreateChatId(): Promise<string>;
|
|
8
5
|
private createChatId;
|
|
9
|
-
private getStoredChatId;
|
|
10
|
-
private storeChatId;
|
|
11
6
|
}
|
|
12
7
|
export declare const chatSessionManager: ChatSessionManager;
|
|
13
8
|
export {};
|