@sciol/xyzen 0.3.5 → 0.3.7
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/App.d.ts +1 -1
- package/dist/app/AppFullscreen.d.ts +1 -1
- package/dist/app/AppSide.d.ts +6 -0
- package/dist/app/explore/AgentExploreContent.d.ts +3 -0
- package/dist/app/explore/AgentExploreTab.d.ts +2 -0
- package/dist/app/explore/McpExploreContent.d.ts +3 -0
- package/dist/app/explore/McpExploreTab.d.ts +2 -0
- package/dist/app/explore/page.d.ts +1 -0
- package/dist/components/animate-ui/components/buttons/button.d.ts +9 -0
- package/dist/components/animate-ui/components/buttons/github-stars.d.ts +10 -0
- package/dist/components/animate-ui/components/headless/checkbox.d.ts +11 -0
- package/dist/components/animate-ui/components/radix/dropdown-menu.d.ts +37 -0
- package/dist/components/animate-ui/components/radix/tooltip.d.ts +10 -0
- package/dist/components/animate-ui/primitives/animate/github-stars.d.ts +40 -0
- package/dist/components/animate-ui/primitives/animate/slot.d.ts +17 -0
- package/dist/components/animate-ui/primitives/buttons/button.d.ts +8 -0
- package/dist/components/animate-ui/primitives/buttons/liquid.d.ts +10 -0
- package/dist/components/animate-ui/primitives/effects/auto-height.d.ts +11 -0
- package/dist/components/animate-ui/primitives/effects/highlight.d.ts +92 -0
- package/dist/components/animate-ui/primitives/effects/particles.d.ts +25 -0
- package/dist/components/animate-ui/primitives/headless/checkbox.d.ts +16 -0
- package/dist/components/animate-ui/primitives/headless/dialog.d.ts +42 -0
- package/dist/components/{base/Modal.d.ts → animate-ui/primitives/headless/modal.d.ts} +1 -1
- package/dist/components/animate-ui/primitives/radix/dropdown-menu.d.ts +57 -0
- package/dist/components/animate-ui/primitives/radix/tabs.d.ts +32 -0
- package/dist/components/animate-ui/primitives/radix/tooltip.d.ts +21 -0
- package/dist/components/animate-ui/primitives/texts/sliding-number.d.ts +16 -0
- package/dist/components/base/Badge.d.ts +1 -1
- package/dist/components/charts/index.d.ts +2 -2
- package/dist/components/features/ExploreMcpCard.d.ts +6 -0
- package/dist/components/features/ExploreMcpListItem.d.ts +6 -0
- package/dist/components/layouts/ActivityBar.d.ts +8 -0
- package/dist/components/layouts/AgentExplorer.d.ts +1 -0
- package/dist/components/layouts/McpListModal.d.ts +1 -0
- package/dist/components/layouts/Workshop.d.ts +1 -0
- package/dist/components/layouts/WorkshopChat.d.ts +1 -0
- package/dist/components/layouts/XyzenAgent.d.ts +9 -3
- package/dist/components/shared/JsonDisplay.d.ts +1 -1
- package/dist/components/ui/3d-card.d.ts +23 -0
- package/dist/components/ui/3d-pin.d.ts +12 -0
- package/dist/components/ui/background-boxes.d.ts +7 -0
- package/dist/components/ui/background-gradient-animation.d.ts +16 -0
- package/dist/components/ui/bento-grid.d.ts +11 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/layout-text-flip.d.ts +5 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/shooting-stars.d.ts +14 -0
- package/dist/components/ui/spotlight-new.d.ts +13 -0
- package/dist/configs/chatThemes.d.ts +9 -0
- package/dist/hooks/use-auto-height.d.ts +10 -0
- package/dist/hooks/use-controlled-state.d.ts +8 -0
- package/dist/hooks/use-data-state.d.ts +4 -0
- package/dist/hooks/use-is-in-view.d.ts +12 -0
- package/dist/hooks/useWorkShopChat.d.ts +69 -0
- package/dist/hooks/useXyzenChat.d.ts +69 -0
- package/dist/lib/animations.d.ts +48 -0
- package/dist/lib/get-strict-context.d.ts +9 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/marketplace/components/McpActivationProgress.d.ts +10 -0
- package/dist/marketplace/components/McpServerCard.d.ts +9 -0
- package/dist/marketplace/components/McpServerDetail.d.ts +7 -0
- package/dist/marketplace/components/UnifiedMcpMarketList.d.ts +8 -0
- package/dist/marketplace/hooks/useBohriumMcp.d.ts +61 -0
- package/dist/marketplace/index.d.ts +12 -0
- package/dist/marketplace/services/bohriumService.d.ts +34 -0
- package/dist/marketplace/types/bohrium.d.ts +129 -0
- package/dist/marketplace/utils/starredApps.d.ts +37 -0
- package/dist/service/mcpService.d.ts +2 -2
- package/dist/store/slices/agentSlice.d.ts +16 -1
- package/dist/store/slices/mcpSlice.d.ts +3 -3
- package/dist/store/slices/uiSlice.d.ts +9 -0
- package/dist/types/chartTypes.d.ts +7 -7
- package/dist/types/mcp.d.ts +42 -2
- package/dist/utils/chartDetection.d.ts +1 -1
- package/dist/utils/chartThemes.d.ts +4 -4
- package/dist/utils/mcpConverters.d.ts +32 -0
- package/dist/xyzen.css +1 -1
- package/dist/xyzen.es.js +104127 -87034
- package/dist/xyzen.umd.js +223 -128
- package/package.json +18 -5
- package/dist/app/LlmProviders.d.ts +0 -1
- package/dist/app/Mcp.d.ts +0 -1
- package/dist/test-charts.d.ts +0 -6
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bohrium Marketplace Types
|
|
3
|
+
* 定义 Bohrium 平台相关的数据类型
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Bohrium 应用基础信息
|
|
7
|
+
*/
|
|
8
|
+
export interface BohriumApp {
|
|
9
|
+
id: number;
|
|
10
|
+
appKey: string;
|
|
11
|
+
appUuid: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
descriptionCn: string;
|
|
15
|
+
cover: string;
|
|
16
|
+
type: number;
|
|
17
|
+
machineType: string;
|
|
18
|
+
subscribeNum: number;
|
|
19
|
+
accessNum: number;
|
|
20
|
+
latestVersion?: string;
|
|
21
|
+
tags?: BohriumTag[];
|
|
22
|
+
authors?: BohriumAuthor[];
|
|
23
|
+
keywords?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Bohrium 应用详细信息
|
|
27
|
+
*/
|
|
28
|
+
export interface BohriumAppDetail extends BohriumApp {
|
|
29
|
+
latestDeploymentId: number;
|
|
30
|
+
readmeLink?: string;
|
|
31
|
+
readmeLinkCn?: string;
|
|
32
|
+
helpLink?: string;
|
|
33
|
+
helpLinkCn?: string;
|
|
34
|
+
createTime: string;
|
|
35
|
+
updateTime: string;
|
|
36
|
+
status: number;
|
|
37
|
+
spacePath: string;
|
|
38
|
+
changeLogs?: BohriumChangeLog[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Bohrium 标签
|
|
42
|
+
*/
|
|
43
|
+
export interface BohriumTag {
|
|
44
|
+
id: number;
|
|
45
|
+
name: string;
|
|
46
|
+
theme: string;
|
|
47
|
+
customTheme?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Bohrium 作者信息
|
|
51
|
+
*/
|
|
52
|
+
export interface BohriumAuthor {
|
|
53
|
+
userId: number;
|
|
54
|
+
userName: string;
|
|
55
|
+
avatarUrl?: string;
|
|
56
|
+
email?: string;
|
|
57
|
+
extId?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Bohrium 更新日志
|
|
61
|
+
*/
|
|
62
|
+
export interface BohriumChangeLog {
|
|
63
|
+
id: number;
|
|
64
|
+
version: string;
|
|
65
|
+
changelog: string;
|
|
66
|
+
createTime: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Bohrium API 响应
|
|
70
|
+
*/
|
|
71
|
+
export interface BohriumApiResponse<T> {
|
|
72
|
+
code: number;
|
|
73
|
+
data: T;
|
|
74
|
+
message?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Bohrium 应用列表响应
|
|
78
|
+
*/
|
|
79
|
+
export interface BohriumAppListResponse {
|
|
80
|
+
items: BohriumApp[];
|
|
81
|
+
total: number;
|
|
82
|
+
page: number;
|
|
83
|
+
pageSize: number;
|
|
84
|
+
totalPage: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Bohrium MCP 服务配置
|
|
88
|
+
*/
|
|
89
|
+
export interface BohriumMcpConfig {
|
|
90
|
+
mcpServers: {
|
|
91
|
+
[key: string]: {
|
|
92
|
+
url: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* MCP 激活状态
|
|
98
|
+
*/
|
|
99
|
+
export declare enum McpActivationStatus {
|
|
100
|
+
IDLE = "idle",
|
|
101
|
+
FETCHING_DETAIL = "fetching_detail",
|
|
102
|
+
ACTIVATING = "activating",
|
|
103
|
+
POLLING = "polling",
|
|
104
|
+
SUCCESS = "success",
|
|
105
|
+
ERROR = "error",
|
|
106
|
+
TIMEOUT = "timeout"
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* MCP 激活进度信息
|
|
110
|
+
*/
|
|
111
|
+
export interface McpActivationProgress {
|
|
112
|
+
status: McpActivationStatus;
|
|
113
|
+
message: string;
|
|
114
|
+
progress: number;
|
|
115
|
+
deploymentId?: number;
|
|
116
|
+
endpoint?: {
|
|
117
|
+
url: string;
|
|
118
|
+
token: string;
|
|
119
|
+
};
|
|
120
|
+
error?: string;
|
|
121
|
+
retryCount?: number;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Bohrium 认证配置
|
|
125
|
+
*/
|
|
126
|
+
export interface BohriumAuthConfig {
|
|
127
|
+
accessKey: string;
|
|
128
|
+
appKey: string;
|
|
129
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Starred Apps Local Storage Management
|
|
3
|
+
* 管理用户收藏的 Bohrium MCP 应用
|
|
4
|
+
*/
|
|
5
|
+
export interface StarredApp {
|
|
6
|
+
appId: string;
|
|
7
|
+
appName: string;
|
|
8
|
+
starredAt: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 获取所有收藏的应用
|
|
12
|
+
*/
|
|
13
|
+
export declare function getStarredApps(): StarredApp[];
|
|
14
|
+
/**
|
|
15
|
+
* 检查应用是否已收藏
|
|
16
|
+
*/
|
|
17
|
+
export declare function isAppStarred(appId: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 添加应用到收藏
|
|
20
|
+
*/
|
|
21
|
+
export declare function addStarredApp(appId: string, appName: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* 从收藏中移除应用
|
|
24
|
+
*/
|
|
25
|
+
export declare function removeStarredApp(appId: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* 切换应用收藏状态
|
|
28
|
+
*/
|
|
29
|
+
export declare function toggleStarredApp(appId: string, appName: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 获取收藏的应用 ID 列表
|
|
32
|
+
*/
|
|
33
|
+
export declare function getStarredAppIds(): string[];
|
|
34
|
+
/**
|
|
35
|
+
* 清空所有收藏
|
|
36
|
+
*/
|
|
37
|
+
export declare function clearStarredApps(): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { McpServer, McpServerCreate, McpServerUpdate } from '../types/mcp';
|
|
2
2
|
export declare const mcpService: {
|
|
3
3
|
getMcpServers(): Promise<McpServer[]>;
|
|
4
4
|
createMcpServer(server: McpServerCreate): Promise<McpServer>;
|
|
5
5
|
updateMcpServer(id: string, server: McpServerUpdate): Promise<McpServer>;
|
|
6
6
|
deleteMcpServer(id: string): Promise<void>;
|
|
7
7
|
refreshMcpServers(): Promise<void>;
|
|
8
|
-
getBuiltinMcpServers(): Promise<
|
|
8
|
+
getBuiltinMcpServers(): Promise<unknown[]>;
|
|
9
9
|
};
|
|
@@ -4,22 +4,37 @@ import { XyzenState } from '../types';
|
|
|
4
4
|
export interface AgentSlice {
|
|
5
5
|
agents: Agent[];
|
|
6
6
|
agentsLoading: boolean;
|
|
7
|
+
publishedAgents: Agent[];
|
|
8
|
+
publishedAgentsLoading: boolean;
|
|
9
|
+
officialAgents: Agent[];
|
|
10
|
+
officialAgentsLoading: boolean;
|
|
7
11
|
hiddenGraphAgentIds: string[];
|
|
12
|
+
systemAgents: Agent[];
|
|
13
|
+
systemAgentsLoading: boolean;
|
|
8
14
|
fetchAgents: () => Promise<void>;
|
|
15
|
+
fetchPublishedGraphAgents: () => Promise<void>;
|
|
16
|
+
fetchOfficialGraphAgents: () => Promise<void>;
|
|
17
|
+
fetchSystemAgents: () => Promise<void>;
|
|
18
|
+
getSystemChatAgent: () => Promise<Agent>;
|
|
19
|
+
getSystemWorkshopAgent: () => Promise<Agent>;
|
|
9
20
|
createAgent: (agent: Omit<Agent, "id">) => Promise<void>;
|
|
10
21
|
createGraphAgent: (graphAgent: GraphAgentCreate) => Promise<void>;
|
|
11
22
|
updateAgent: (agent: Agent) => Promise<void>;
|
|
12
23
|
updateAgentProvider: (agentId: string, providerId: string | null) => Promise<void>;
|
|
24
|
+
toggleGraphAgentPublish: (agentId: string) => Promise<void>;
|
|
25
|
+
setGraphAgentPublish: (agentId: string, isPublished: boolean) => Promise<void>;
|
|
13
26
|
deleteAgent: (id: string) => Promise<void>;
|
|
14
27
|
removeGraphAgentFromSidebar: (id: string) => void;
|
|
15
28
|
addGraphAgentToSidebar: (id: string) => void;
|
|
16
29
|
getRegularAgents: () => Agent[];
|
|
17
30
|
getGraphAgents: () => Agent[];
|
|
31
|
+
getSystemAgents: () => Agent[];
|
|
18
32
|
}
|
|
19
33
|
export interface GraphAgentCreate {
|
|
20
34
|
name: string;
|
|
21
35
|
description: string;
|
|
22
|
-
state_schema?:
|
|
36
|
+
state_schema?: Record<string, unknown>;
|
|
37
|
+
is_published?: boolean;
|
|
23
38
|
}
|
|
24
39
|
export declare const createAgentSlice: StateCreator<XyzenState, [
|
|
25
40
|
["zustand/immer", never]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BuiltinMcpData, ExplorableMcpServer, McpServer, McpServerCreate, McpServerUpdate } from '../../types/mcp';
|
|
2
2
|
import { StateCreator } from 'zustand';
|
|
3
3
|
import { XyzenState } from '../types';
|
|
4
4
|
export interface McpSlice {
|
|
5
5
|
mcpServers: McpServer[];
|
|
6
|
-
builtinMcpServers:
|
|
6
|
+
builtinMcpServers: ExplorableMcpServer<BuiltinMcpData>[];
|
|
7
7
|
lastFetchTime: number;
|
|
8
8
|
isEditMcpServerModalOpen: boolean;
|
|
9
9
|
editingMcpServer: McpServer | null;
|
|
@@ -11,7 +11,7 @@ export interface McpSlice {
|
|
|
11
11
|
fetchBuiltinMcpServers: () => Promise<void>;
|
|
12
12
|
refreshMcpServers: () => Promise<void>;
|
|
13
13
|
addMcpServer: (server: McpServerCreate) => Promise<void>;
|
|
14
|
-
quickAddBuiltinServer: (server:
|
|
14
|
+
quickAddBuiltinServer: (server: ExplorableMcpServer<BuiltinMcpData>) => Promise<void>;
|
|
15
15
|
editMcpServer: (id: string, server: McpServerUpdate) => Promise<void>;
|
|
16
16
|
removeMcpServer: (id: string) => Promise<void>;
|
|
17
17
|
updateMcpServerInList: (server: McpServer) => void;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { StateCreator } from 'zustand';
|
|
2
2
|
import { Theme, XyzenState, LayoutStyle, UiSettingType } from '../types';
|
|
3
|
+
export type ActivityPanel = "chat" | "explorer" | "workshop";
|
|
3
4
|
export interface UiSlice {
|
|
4
5
|
backendUrl: string;
|
|
5
6
|
isXyzenOpen: boolean;
|
|
6
7
|
panelWidth: number;
|
|
7
8
|
activeTabIndex: number;
|
|
9
|
+
activePanel: ActivityPanel;
|
|
8
10
|
theme: Theme;
|
|
9
11
|
layoutStyle: LayoutStyle;
|
|
12
|
+
isMcpListModalOpen: boolean;
|
|
13
|
+
isLlmProvidersModalOpen: boolean;
|
|
10
14
|
isAddMcpServerModalOpen: boolean;
|
|
11
15
|
isAddLlmProviderModalOpen: boolean;
|
|
12
16
|
isSettingsModalOpen: boolean;
|
|
@@ -19,9 +23,14 @@ export interface UiSlice {
|
|
|
19
23
|
closeXyzen: () => void;
|
|
20
24
|
setPanelWidth: (width: number) => void;
|
|
21
25
|
setTabIndex: (index: number) => void;
|
|
26
|
+
setActivePanel: (panel: ActivityPanel) => void;
|
|
22
27
|
setTheme: (theme: Theme) => void;
|
|
23
28
|
setLayoutStyle: (style: LayoutStyle) => void;
|
|
24
29
|
setBackendUrl: (url: string) => void;
|
|
30
|
+
openMcpListModal: () => void;
|
|
31
|
+
closeMcpListModal: () => void;
|
|
32
|
+
openLlmProvidersModal: () => void;
|
|
33
|
+
closeLlmProvidersModal: () => void;
|
|
25
34
|
openAddMcpServerModal: () => void;
|
|
26
35
|
closeAddMcpServerModal: () => void;
|
|
27
36
|
openAddLlmProviderModal: () => void;
|
|
@@ -7,7 +7,7 @@ export interface ChartDataPoint {
|
|
|
7
7
|
export interface SeriesData {
|
|
8
8
|
name: string;
|
|
9
9
|
data: number[] | ChartDataPoint[];
|
|
10
|
-
type?:
|
|
10
|
+
type?: "line" | "bar" | "pie" | "scatter" | "area";
|
|
11
11
|
}
|
|
12
12
|
export interface TimeSeriesPoint {
|
|
13
13
|
timestamp: string | Date;
|
|
@@ -15,16 +15,16 @@ export interface TimeSeriesPoint {
|
|
|
15
15
|
[key: string]: unknown;
|
|
16
16
|
}
|
|
17
17
|
export interface ChartConfig {
|
|
18
|
-
type:
|
|
18
|
+
type: "line" | "bar" | "pie" | "scatter" | "area" | "heatmap";
|
|
19
19
|
title?: string;
|
|
20
20
|
data: ChartDataPoint[] | SeriesData[] | TimeSeriesPoint[] | number[];
|
|
21
21
|
labels?: string[];
|
|
22
22
|
xAxis?: {
|
|
23
|
-
type?:
|
|
23
|
+
type?: "category" | "value" | "time";
|
|
24
24
|
name?: string;
|
|
25
25
|
};
|
|
26
26
|
yAxis?: {
|
|
27
|
-
type?:
|
|
27
|
+
type?: "category" | "value" | "log";
|
|
28
28
|
name?: string;
|
|
29
29
|
};
|
|
30
30
|
options?: Partial<EChartsOption>;
|
|
@@ -40,7 +40,7 @@ export interface ChartableOutput {
|
|
|
40
40
|
}
|
|
41
41
|
export interface ChartDetectionResult {
|
|
42
42
|
isChartable: boolean;
|
|
43
|
-
chartType: ChartConfig[
|
|
43
|
+
chartType: ChartConfig["type"] | null;
|
|
44
44
|
confidence: number;
|
|
45
45
|
data: ChartConfig | null;
|
|
46
46
|
reason?: string;
|
|
@@ -54,7 +54,7 @@ export interface ChartTheme {
|
|
|
54
54
|
}
|
|
55
55
|
export interface ChartRendererProps {
|
|
56
56
|
data: ChartConfig | EChartsOption;
|
|
57
|
-
theme?:
|
|
57
|
+
theme?: "light" | "dark";
|
|
58
58
|
height?: string | number;
|
|
59
59
|
width?: string | number;
|
|
60
60
|
className?: string;
|
|
@@ -63,7 +63,7 @@ export interface ChartRendererProps {
|
|
|
63
63
|
export interface ChartDisplayProps {
|
|
64
64
|
data: unknown;
|
|
65
65
|
compact?: boolean;
|
|
66
|
-
variant?:
|
|
66
|
+
variant?: "default" | "success" | "error";
|
|
67
67
|
className?: string;
|
|
68
68
|
fallbackToJson?: boolean;
|
|
69
69
|
}
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -11,14 +11,54 @@ export interface McpServer {
|
|
|
11
11
|
}[];
|
|
12
12
|
user_id: string;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* 内置 MCP Server 数据
|
|
16
|
+
*/
|
|
17
|
+
export interface BuiltinMcpData {
|
|
15
18
|
name: string;
|
|
16
19
|
module_name: string;
|
|
17
20
|
mount_path: string;
|
|
18
21
|
description: string;
|
|
19
|
-
is_builtin:
|
|
22
|
+
is_builtin: true;
|
|
20
23
|
requires_auth: boolean;
|
|
21
24
|
is_default?: boolean;
|
|
25
|
+
banner?: string;
|
|
22
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Bohrium MCP Server 数据
|
|
29
|
+
*/
|
|
30
|
+
export interface BohriumMcpData {
|
|
31
|
+
id: number;
|
|
32
|
+
appKey: string;
|
|
33
|
+
appUuid: string;
|
|
34
|
+
title: string;
|
|
35
|
+
description: string;
|
|
36
|
+
descriptionCn: string;
|
|
37
|
+
cover: string;
|
|
38
|
+
type: number;
|
|
39
|
+
subscribeNum: number;
|
|
40
|
+
accessNum: number;
|
|
41
|
+
tags?: Array<{
|
|
42
|
+
id: number;
|
|
43
|
+
name: string;
|
|
44
|
+
theme: string;
|
|
45
|
+
}>;
|
|
46
|
+
latestDeploymentId?: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 可探索的 MCP Server(统一类型)
|
|
50
|
+
*/
|
|
51
|
+
export interface ExplorableMcpServer<T = BuiltinMcpData | BohriumMcpData> {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
source: "official" | "bohrium" | string;
|
|
56
|
+
cover?: string;
|
|
57
|
+
data: T;
|
|
58
|
+
}
|
|
59
|
+
export declare function isBuiltinMcp(server: ExplorableMcpServer): server is ExplorableMcpServer<BuiltinMcpData>;
|
|
60
|
+
export declare function isBohriumMcp(server: ExplorableMcpServer): server is ExplorableMcpServer<BohriumMcpData>;
|
|
61
|
+
/** @deprecated Use ExplorableMcpServer instead */
|
|
62
|
+
export type BuiltinMcpServer = ExplorableMcpServer<BuiltinMcpData>;
|
|
23
63
|
export type McpServerCreate = Omit<McpServer, "id" | "status" | "tools" | "user_id">;
|
|
24
64
|
export type McpServerUpdate = Partial<Omit<McpServer, "id" | "tools" | "user_id">>;
|
|
@@ -10,4 +10,4 @@ export declare function validateChartData(config: ChartConfig): boolean;
|
|
|
10
10
|
/**
|
|
11
11
|
* Get chart type suggestions based on data characteristics
|
|
12
12
|
*/
|
|
13
|
-
export declare function suggestChartType(data: unknown): ChartConfig[
|
|
13
|
+
export declare function suggestChartType(data: unknown): ChartConfig["type"][];
|
|
@@ -3,16 +3,16 @@ import { EChartsOption } from 'echarts';
|
|
|
3
3
|
/**
|
|
4
4
|
* Chart themes matching the application's design system
|
|
5
5
|
*/
|
|
6
|
-
export declare const chartThemes: Record<
|
|
6
|
+
export declare const chartThemes: Record<"light" | "dark", ChartTheme>;
|
|
7
7
|
/**
|
|
8
8
|
* Generate ECharts theme configuration
|
|
9
9
|
*/
|
|
10
|
-
export declare function createEChartsTheme(theme:
|
|
10
|
+
export declare function createEChartsTheme(theme: "light" | "dark"): Partial<EChartsOption>;
|
|
11
11
|
/**
|
|
12
12
|
* Hook to detect system theme preference
|
|
13
13
|
*/
|
|
14
|
-
export declare function useSystemTheme():
|
|
14
|
+
export declare function useSystemTheme(): "light" | "dark";
|
|
15
15
|
/**
|
|
16
16
|
* Detect theme from DOM classes (common pattern in Tailwind apps)
|
|
17
17
|
*/
|
|
18
|
-
export declare function detectThemeFromDOM():
|
|
18
|
+
export declare function detectThemeFromDOM(): "light" | "dark";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BohriumApp } from '../marketplace/types/bohrium';
|
|
2
|
+
import { BohriumMcpData, BuiltinMcpData, ExplorableMcpServer } from '../types/mcp';
|
|
3
|
+
interface LegacyBuiltinServer {
|
|
4
|
+
name: string;
|
|
5
|
+
module_name: string;
|
|
6
|
+
mount_path: string;
|
|
7
|
+
description: string;
|
|
8
|
+
requires_auth?: boolean;
|
|
9
|
+
is_default?: boolean;
|
|
10
|
+
banner?: string;
|
|
11
|
+
data?: unknown;
|
|
12
|
+
source?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 将旧格式的 builtin server 数据转换为新的 ExplorableMcpServer 格式
|
|
16
|
+
* 兼容后端可能返回的多种格式
|
|
17
|
+
*/
|
|
18
|
+
export declare function convertToExplorableMcpServer(server: LegacyBuiltinServer | ExplorableMcpServer<BuiltinMcpData>): ExplorableMcpServer<BuiltinMcpData>;
|
|
19
|
+
/**
|
|
20
|
+
* 将 Bohrium App 转换为 ExplorableMcpServer 格式
|
|
21
|
+
*/
|
|
22
|
+
export declare function convertBohriumAppToMcpServer(app: BohriumApp): ExplorableMcpServer<BohriumMcpData>;
|
|
23
|
+
/**
|
|
24
|
+
* 批量转换 builtin servers
|
|
25
|
+
* 接受 unknown 类型以便从后端 API 直接使用
|
|
26
|
+
*/
|
|
27
|
+
export declare function convertBuiltinServers(servers: unknown): ExplorableMcpServer<BuiltinMcpData>[];
|
|
28
|
+
/**
|
|
29
|
+
* 批量转换 Bohrium apps
|
|
30
|
+
*/
|
|
31
|
+
export declare function convertBohriumApps(apps: BohriumApp[]): ExplorableMcpServer<BohriumMcpData>[];
|
|
32
|
+
export {};
|