feat(mcp): add native installs and resource discovery

This commit is contained in:
t8y2 committed 2026-09-25 12:37:26 +08:00
1 parent 3144762194
commit b8274363b8
36 files changed
+1934 -103

No files matched your search

+2
View File
@@ -921,7 +921,9 @@ export const deleteHistoryEntry = forward("deleteHistoryEntry");
// Updates
export const checkMcpServerStatus = forward("checkMcpServerStatus");
export const installMcpServer = forward("installMcpServer");
export const installNativeMcpServer = forward("installNativeMcpServer");
export const uninstallMcpServer = forward("uninstallMcpServer");
export const uninstallNpmMcpServer = forward("uninstallNpmMcpServer");
export const loadMcpHttpServerSettings = forward("loadMcpHttpServerSettings");
export const saveMcpHttpServerSettings = forward("saveMcpHttpServerSettings");
export const mcpHttpServerStatus = forward("mcpHttpServerStatus");
+10
View File
@@ -5200,7 +5200,9 @@ export async function fetchChangelog(lang?: string): Promise<import("@/lib/app/c
export async function checkMcpServerStatus(): Promise<import("@/lib/backend/tauri").McpServerStatus> {
return {
installed: false,
installation_source: null,
npm_available: false,
npm_installed: false,
node_path: null,
node_version: null,
current_version: null,
@@ -5221,10 +5223,18 @@ export async function installMcpServer(): Promise<string> {
throw new Error("MCP Server installation is only available in the desktop app.");
}
export async function installNativeMcpServer(): Promise<string> {
throw new Error("Native MCP Server installation is only available in the desktop app.");
}
export async function uninstallMcpServer(): Promise<string> {
throw new Error("MCP Server uninstallation is only available in the desktop app.");
}
export async function uninstallNpmMcpServer(): Promise<string> {
throw new Error("MCP Server npm fallback removal is only available in the desktop app.");
}
export async function getSystemProxyUrl(): Promise<string | null> {
return null;
}
+10
View File
@@ -2968,7 +2968,9 @@ export interface UpdateDownloadProgress {
export interface McpServerStatus {
installed: boolean;
installation_source: "native" | "homebrew" | "npm" | null;
npm_available: boolean;
npm_installed: boolean;
node_path: string | null;
node_version: string | null;
current_version: string | null;
@@ -2992,10 +2994,18 @@ export async function installMcpServer(): Promise<string> {
return invoke("install_mcp_server");
}
export async function installNativeMcpServer(): Promise<string> {
return invoke("install_native_mcp_server");
}
export async function uninstallMcpServer(): Promise<string> {
return invoke("uninstall_mcp_server");
}
export async function uninstallNpmMcpServer(): Promise<string> {
return invoke("uninstall_npm_mcp_server");
}
export async function checkForUpdates(locale?: string, source?: UpdateDownloadSource): Promise<UpdateInfo> {
return invoke("check_for_updates", { locale, source });
}