@sciol/xyzen 0.1.8 → 0.1.9
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/app/Mcp.d.ts +1 -0
- package/dist/assets/ProfileIcon.d.ts +3 -0
- package/dist/components/base/Input.d.ts +4 -0
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/layouts/XyzenAgent.d.ts +12 -0
- package/dist/components/layouts/components/ChatBubble.d.ts +2 -2
- package/dist/components/modals/AddAgentModal.d.ts +7 -0
- package/dist/components/modals/EditAgentModal.d.ts +9 -0
- package/dist/service/mcpService.d.ts +7 -0
- package/dist/service/websocketService.d.ts +8 -0
- package/dist/store/xyzenStore.d.ts +23 -22
- package/dist/types/mcp.d.ts +14 -0
- package/dist/xyzen.es.js +15773 -13769
- package/dist/xyzen.umd.js +83 -63
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Mcp(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Input';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type Agent = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
prompt: string;
|
|
6
|
+
mcp_servers: {
|
|
7
|
+
id: number;
|
|
8
|
+
}[];
|
|
9
|
+
mcp_server_ids?: number[];
|
|
10
|
+
user_id: string;
|
|
11
|
+
};
|
|
12
|
+
export default function XyzenAgent(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface Message {
|
|
3
3
|
id: string;
|
|
4
|
-
|
|
4
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
5
5
|
content: string;
|
|
6
|
-
|
|
6
|
+
created_at: string;
|
|
7
7
|
avatar?: string;
|
|
8
8
|
isCurrentUser?: boolean;
|
|
9
9
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Agent } from '../layouts/XyzenAgent';
|
|
3
|
+
interface EditAgentModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
agent: Agent | null;
|
|
7
|
+
}
|
|
8
|
+
declare const EditAgentModal: React.FC<EditAgentModalProps>;
|
|
9
|
+
export default EditAgentModal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { McpServer, McpServerCreate } from '../types/mcp';
|
|
2
|
+
export declare const mcpService: {
|
|
3
|
+
getMcpServers(): Promise<McpServer[]>;
|
|
4
|
+
createMcpServer(server: McpServerCreate): Promise<McpServer>;
|
|
5
|
+
updateMcpServer(id: number, server: Partial<McpServerCreate>): Promise<McpServer>;
|
|
6
|
+
deleteMcpServer(id: number): Promise<void>;
|
|
7
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { McpServer, McpServerCreate } from '../types/mcp';
|
|
2
|
+
import { Agent } from '../components/layouts/XyzenAgent';
|
|
1
3
|
export interface Message {
|
|
2
4
|
id: string;
|
|
3
5
|
content: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
7
|
+
created_at: string;
|
|
8
|
+
sender?: "user" | "assistant" | "system";
|
|
9
|
+
timestamp?: string;
|
|
8
10
|
}
|
|
9
11
|
export interface ChatChannel {
|
|
10
12
|
id: string;
|
|
@@ -23,11 +25,6 @@ export interface ChatHistoryItem {
|
|
|
23
25
|
lastMessage?: string;
|
|
24
26
|
isPinned: boolean;
|
|
25
27
|
}
|
|
26
|
-
export interface Assistant {
|
|
27
|
-
id: string;
|
|
28
|
-
title: string;
|
|
29
|
-
description: string;
|
|
30
|
-
}
|
|
31
28
|
export interface User {
|
|
32
29
|
username: string;
|
|
33
30
|
avatar: string;
|
|
@@ -44,7 +41,10 @@ interface XyzenState {
|
|
|
44
41
|
chatHistory: ChatHistoryItem[];
|
|
45
42
|
chatHistoryLoading: boolean;
|
|
46
43
|
channels: Record<string, ChatChannel>;
|
|
47
|
-
|
|
44
|
+
agents: Agent[];
|
|
45
|
+
agentsLoading: boolean;
|
|
46
|
+
mcpServers: McpServer[];
|
|
47
|
+
mcpServersLoading: boolean;
|
|
48
48
|
toggleXyzen: () => void;
|
|
49
49
|
openXyzen: () => void;
|
|
50
50
|
closeXyzen: () => void;
|
|
@@ -55,29 +55,30 @@ interface XyzenState {
|
|
|
55
55
|
setBackendUrl: (url: string) => void;
|
|
56
56
|
fetchChatHistory: () => Promise<void>;
|
|
57
57
|
togglePinChat: (chatId: string) => void;
|
|
58
|
-
activateChannel: (topicId: string) => void
|
|
58
|
+
activateChannel: (topicId: string) => Promise<void>;
|
|
59
59
|
connectToChannel: (sessionId: string, topicId: string) => void;
|
|
60
60
|
disconnectFromChannel: () => void;
|
|
61
61
|
sendMessage: (message: string) => void;
|
|
62
|
-
createDefaultChannel: () => Promise<void>;
|
|
62
|
+
createDefaultChannel: (agentId?: string) => Promise<void>;
|
|
63
|
+
fetchAgents: () => Promise<void>;
|
|
64
|
+
createAgent: (agent: Omit<Agent, "id">) => Promise<void>;
|
|
65
|
+
updateAgent: (agent: Agent) => Promise<void>;
|
|
66
|
+
deleteAgent: (id: string) => Promise<void>;
|
|
67
|
+
fetchMcpServers: () => Promise<void>;
|
|
68
|
+
addMcpServer: (server: McpServerCreate) => Promise<void>;
|
|
69
|
+
editMcpServer: (id: number, server: Partial<McpServerCreate>) => Promise<void>;
|
|
70
|
+
removeMcpServer: (id: number) => Promise<void>;
|
|
71
|
+
updateMcpServerInList: (server: McpServer) => void;
|
|
63
72
|
}
|
|
64
73
|
export declare const useXyzen: import('zustand').UseBoundStore<Omit<Omit<import('zustand').StoreApi<XyzenState>, "persist"> & {
|
|
65
74
|
persist: {
|
|
66
|
-
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<XyzenState,
|
|
67
|
-
panelWidth: number;
|
|
68
|
-
isXyzenOpen: boolean;
|
|
69
|
-
theme: Theme;
|
|
70
|
-
}>>) => void;
|
|
75
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<XyzenState, unknown>>) => void;
|
|
71
76
|
clearStorage: () => void;
|
|
72
77
|
rehydrate: () => Promise<void> | void;
|
|
73
78
|
hasHydrated: () => boolean;
|
|
74
79
|
onHydrate: (fn: (state: XyzenState) => void) => () => void;
|
|
75
80
|
onFinishHydration: (fn: (state: XyzenState) => void) => () => void;
|
|
76
|
-
getOptions: () => Partial<import('zustand/middleware').PersistOptions<XyzenState,
|
|
77
|
-
panelWidth: number;
|
|
78
|
-
isXyzenOpen: boolean;
|
|
79
|
-
theme: Theme;
|
|
80
|
-
}>>;
|
|
81
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<XyzenState, unknown>>;
|
|
81
82
|
};
|
|
82
83
|
}, "setState"> & {
|
|
83
84
|
setState(nextStateOrUpdater: XyzenState | Partial<XyzenState> | ((state: import('immer').WritableDraft<XyzenState>) => void), shouldReplace?: false): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface McpServer {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
url: string;
|
|
6
|
+
token: string;
|
|
7
|
+
status: "online" | "offline" | string;
|
|
8
|
+
tools?: {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}[];
|
|
12
|
+
user_id?: string;
|
|
13
|
+
}
|
|
14
|
+
export type McpServerCreate = Omit<McpServer, "id" | "status" | "tools">;
|