@context-sync/server
Version:
MCP server for AI context sync with persistent memory, workspace file access, and intelligent code operations
61 lines • 1.54 kB
TypeScript
export interface GitStatus {
branch: string;
modified: string[];
untracked: string[];
staged: string[];
ahead: number;
behind: number;
clean: boolean;
}
export interface GitBranchInfo {
current: string;
all: string[];
recent: Array<{
name: string;
lastCommit: string;
}>;
}
export declare class GitIntegration {
private workspacePath;
constructor(workspacePath: string);
/**
* Check if current workspace is a git repository
*/
isGitRepo(): boolean;
/**
* Get git status
*/
getStatus(): GitStatus | null;
/**
* Get diff for file(s)
*/
getDiff(filepath?: string, staged?: boolean): string | null;
/**
* Get current branch information
*/
getBranchInfo(action?: 'current' | 'list' | 'recent'): GitBranchInfo | string | null;
/**
* Suggest commit message based on changes
*/
suggestCommitMessage(files?: string[], convention?: string): string | null;
/**
* Get last N commits
*/
getRecentCommits(count?: number): Array<{
hash: string;
message: string;
author: string;
date: string;
}> | null;
/**
* Check if file is tracked by git
*/
isTracked(filepath: string): boolean;
private exec;
private analyzeChanges;
private generateConventionalCommit;
private generateSimpleCommit;
private generateDescriptiveCommit;
private generateDescription;
}
//# sourceMappingURL=git-integration.d.ts.map