UNPKG

codecrucible-synth

Version:

Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability

204 lines 4.79 kB
declare class BaseMCPServer { id: string; description: string; protected tools: Record<string, (...args: any[]) => any>; constructor(id: string, description: string); } import { ApprovalManager } from '../core/approval/approval-manager.js'; export interface GitStatus { branch: string; staged: string[]; modified: string[]; untracked: string[]; ahead: number; behind: number; clean: boolean; } export interface GitCommitInfo { hash: string; author: string; date: string; message: string; files: string[]; } export interface GitDiffResult { file: string; additions: number; deletions: number; patch: string; } export interface CommitArgs { message: string; files?: string[]; amend?: boolean; signoff?: boolean; } export interface BranchArgs { name: string; checkout?: boolean; delete?: boolean; remote?: string; } export interface MergeArgs { branch: string; strategy?: 'merge' | 'rebase' | 'squash'; noFastForward?: boolean; } export interface TagArgs { name: string; message?: string; delete?: boolean; push?: boolean; } export interface ToolResult { success: boolean; data?: any; error?: string; warning?: string; suggestion?: string; } /** * Git operations MCP server with approval workflow integration * Provides safe Git operations with user confirmation for destructive actions */ export declare class GitMCPServer extends BaseMCPServer { private approvalManager; private workspaceRoot; constructor(approvalManager: ApprovalManager, workspaceRoot: string); /** * Get Git repository status */ handleGitStatus(): Promise<ToolResult>; /** * Get Git diff */ handleGitDiff(args: { files?: string[]; staged?: boolean; commit?: string; }): Promise<ToolResult>; /** * Get Git log */ handleGitLog(args: { limit?: number; since?: string; author?: string; grep?: string; }): Promise<ToolResult>; /** * Add files to Git staging area */ handleGitAdd(args: { files: string[]; all?: boolean; }): Promise<ToolResult>; /** * Commit changes */ handleGitCommit(args: CommitArgs): Promise<ToolResult>; /** * Push changes to remote */ handleGitPush(args: { remote?: string; branch?: string; force?: boolean; setUpstream?: boolean; }): Promise<ToolResult>; /** * Pull changes from remote */ handleGitPull(args: { remote?: string; branch?: string; rebase?: boolean; }): Promise<ToolResult>; /** * Branch operations */ handleGitBranch(args: BranchArgs): Promise<ToolResult>; /** * Checkout branch or commit */ handleGitCheckout(args: { target: string; createBranch?: boolean; force?: boolean; }): Promise<ToolResult>; /** * Reset repository state */ handleGitReset(args: { mode?: 'soft' | 'mixed' | 'hard'; target?: string; }): Promise<ToolResult>; /** * Handle Git merges */ handleGitMerge(args: MergeArgs): Promise<ToolResult>; /** * Handle Git rebase */ handleGitRebase(args: { target: string; interactive?: boolean; abort?: boolean; continue?: boolean; }): Promise<ToolResult>; /** * Handle Git tags */ handleGitTag(args: TagArgs): Promise<ToolResult>; /** * Handle Git remote operations */ handleGitRemote(args: { action: 'add' | 'remove' | 'list' | 'show'; name?: string; url?: string; }): Promise<ToolResult>; /** * Handle Git stash operations */ handleGitStash(args: { action: 'save' | 'pop' | 'list' | 'show' | 'drop'; message?: string; index?: number; }): Promise<ToolResult>; /** * Handle Git clean operations */ handleGitClean(args: { dryRun?: boolean; directories?: boolean; ignored?: boolean; force?: boolean; }): Promise<ToolResult>; /** * Check if current directory is a Git repository */ private isGitRepository; /** * Get comprehensive Git status */ private getGitStatus; /** * Parse Git diff output */ private parseDiffOutput; /** * Parse Git log output */ private parseLogOutput; /** * Extract commit hash from git commit output */ private extractCommitHash; /** * Generate session ID for approval tracking */ private generateSessionId; } export {}; //# sourceMappingURL=git-mcp-server.d.ts.map