svn_health_check
Monitor and verify the health status of SVN systems and working copies, ensuring efficient repository management and troubleshooting.
Instructions
Verificar el estado de salud del sistema SVN y working copy
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/svn-service.ts:66-121 (handler)Core handler logic for SVN health check: validates SVN installation availability, retrieves version, checks working copy validity, and tests repository accessibility by attempting getInfo.async healthCheck(): Promise<SvnResponse<{ svnAvailable: boolean; version?: string; workingCopyValid?: boolean; repositoryAccessible?: boolean; }>> { try { // Verificar instalación de SVN const svnAvailable = await validateSvnInstallation(this.config); if (!svnAvailable) { return { success: false, error: 'SVN is not available in the system PATH', command: 'svn --version', workingDirectory: this.config.workingDirectory! }; } // Obtener versión de SVN const versionResponse = await executeSvnCommand(this.config, ['--version', '--quiet']); const version = versionResponse.data as string; // Verificar si estamos en un working copy const workingCopyValid = await isWorkingCopy(this.config.workingDirectory!); let repositoryAccessible = false; if (workingCopyValid) { try { await this.getInfo(); repositoryAccessible = true; } catch (error) { repositoryAccessible = false; } } return { success: true, data: { svnAvailable, version: version.trim(), workingCopyValid, repositoryAccessible }, command: 'health-check', workingDirectory: this.config.workingDirectory! }; } catch (error: any) { return { success: false, error: error.message, command: 'health-check', workingDirectory: this.config.workingDirectory! }; } }
- index.ts:37-65 (registration)MCP tool registration for 'svn_health_check' with no input parameters. Wrapper handler calls SvnService.healthCheck() and formats the result with emoji icons and Spanish status messages for display."svn_health_check", "Verificar el estado de salud del sistema SVN y working copy", {}, async () => { try { const result = await getSvnService().healthCheck(); const data = result.data; const statusIcon = data?.svnAvailable ? '✅' : '❌'; const wcIcon = data?.workingCopyValid ? '📁' : '📂'; const repoIcon = data?.repositoryAccessible ? '🔗' : '🔌'; const healthText = `${statusIcon} **Estado del Sistema SVN**\n\n` + `**SVN Disponible:** ${data?.svnAvailable ? 'Sí' : 'No'}\n` + `**Versión:** ${data?.version || 'N/A'}\n` + `${wcIcon} **Working Copy Válido:** ${data?.workingCopyValid ? 'Sí' : 'No'}\n` + `${repoIcon} **Repositorio Accesible:** ${data?.repositoryAccessible ? 'Sí' : 'No'}\n` + `**Directorio de Trabajo:** ${result.workingDirectory}`; return { content: [{ type: "text", text: healthText }], }; } catch (error: any) { return { content: [{ type: "text", text: `❌ **Error:** ${error.message}` }], }; } } );
- common/types.ts:271-286 (schema)TypeScript interface definitions for SvnHealthCheck and related SvnHealthIssue, providing structure for health check results including status, issues, and working copy/repository validation flags.export interface SvnHealthCheck { status: 'healthy' | 'warning' | 'error'; issues: SvnHealthIssue[]; workingCopyValid: boolean; repositoryAccessible: boolean; conflictsDetected: boolean; uncommittedChanges: boolean; lastUpdate: string; } export interface SvnHealthIssue { type: 'error' | 'warning' | 'info'; message: string; path?: string; suggestion?: string; }