feat(mcp): add front-end API wrappers and types
- Add McpServer and McpStatus types - Add window.api wrappers for MCP commands - Extend vite-env.d.ts global typings for MCP APIs
This commit is contained in:
12
src/vite-env.d.ts
vendored
12
src/vite-env.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
import { Provider, Settings, CustomEndpoint } from "./types";
|
||||
import { Provider, Settings, CustomEndpoint, McpStatus } from "./types";
|
||||
import { AppType } from "./lib/tauri-api";
|
||||
import type { UnlistenFn } from "@tauri-apps/api/event";
|
||||
|
||||
@@ -61,6 +61,16 @@ declare global {
|
||||
official: boolean;
|
||||
}) => Promise<boolean>;
|
||||
isClaudePluginApplied: () => Promise<boolean>;
|
||||
// Claude MCP
|
||||
getClaudeMcpStatus: () => Promise<McpStatus>;
|
||||
readClaudeMcpConfig: () => Promise<string | null>;
|
||||
setClaudeMcpEnableAllProjects: (enable: boolean) => Promise<boolean>;
|
||||
upsertClaudeMcpServer: (
|
||||
id: string,
|
||||
spec: Record<string, any>,
|
||||
) => Promise<boolean>;
|
||||
deleteClaudeMcpServer: (id: string) => Promise<boolean>;
|
||||
validateMcpCommand: (cmd: string) => Promise<boolean>;
|
||||
testApiEndpoints: (
|
||||
urls: string[],
|
||||
options?: { timeoutSecs?: number },
|
||||
|
||||
Reference in New Issue
Block a user