- Add /mcp-servers/ to .gitignore for MCP server installations - Extend mcp_installations table with status, logs, and validation fields - Refactor MCP install route to support custom configs, enable logs, and async installation - Improve MCPSyncService with promise-based syncing to prevent concurrent operations This update improves MCP management by adding robust installation tracking, custom configuration support, and better error handling for a more reliable user experience.
66 lines
1.3 KiB
TypeScript
66 lines
1.3 KiB
TypeScript
/**
|
|
* Tipos e interfaces para o sistema de instalação MCP
|
|
*/
|
|
|
|
export type PackageRegistry = "npm" | "pypi" | "cargo" | "other" | null;
|
|
|
|
export enum MCPInstallationStatus {
|
|
PENDING = "pending",
|
|
CHECKING_DEPENDENCIES = "checking_dependencies",
|
|
DOWNLOADING = "downloading",
|
|
INSTALLING = "installing",
|
|
TESTING = "testing",
|
|
READY = "ready",
|
|
FAILED = "failed",
|
|
}
|
|
|
|
export interface InstallationProgress {
|
|
status: MCPInstallationStatus;
|
|
message: string;
|
|
percentage: number;
|
|
logs?: string[];
|
|
}
|
|
|
|
export interface MCPEnvironment {
|
|
type: "npm" | "python" | "rust";
|
|
path: string;
|
|
executable: string;
|
|
args?: string[];
|
|
env?: Record<string, string>;
|
|
}
|
|
|
|
export interface ValidationResult {
|
|
success: boolean;
|
|
protocol: "mcp" | "unknown";
|
|
tools: Array<{
|
|
name: string;
|
|
description?: string;
|
|
inputSchema?: any;
|
|
}>;
|
|
resources?: Array<{
|
|
uri: string;
|
|
name: string;
|
|
description?: string;
|
|
}>;
|
|
error?: string;
|
|
capabilities?: any;
|
|
}
|
|
|
|
export interface SystemDependencies {
|
|
node: boolean;
|
|
npm: boolean;
|
|
python: boolean;
|
|
pip: boolean;
|
|
cargo: boolean;
|
|
git: boolean;
|
|
}
|
|
|
|
export interface InstallationConfig {
|
|
mcpId: string;
|
|
packageName: string;
|
|
packageRegistry: PackageRegistry;
|
|
repositoryUrl?: string;
|
|
config: any;
|
|
enableLogs: boolean;
|
|
}
|