UNPKG

remcode

Version:

Turn your AI assistant into a codebase expert. Intelligent code analysis, semantic search, and software engineering guidance through MCP integration.

98 lines (97 loc) 2.43 kB
/** * Possible reasons for setup requirements */ export declare enum SetupReason { SETUP_COMPLETE = "Setup complete", NO_GIT_REPO = "No Git repository detected", NO_GITHUB_REPO = "No GitHub repository detected", NO_REMCODE_FILE = "No .remcode configuration file found", NO_WORKFLOW = "No GitHub Actions workflow found", INVALID_CONFIG = "Invalid .remcode configuration file", NO_REQUIRED_SECRETS = "Missing required GitHub secrets", NEEDS_UPDATE = "Remcode configuration needs to be updated" } /** * Git remote information */ export interface GitRemoteInfo { exists: boolean; url: string; owner?: string; repo?: string; isGitHub: boolean; defaultBranch?: string; } /** * Detailed setup status information */ export interface SetupStatus { needsSetup: boolean; hasRemcodeFile: boolean; hasGitRepo: boolean; hasGitHubRepo: boolean; hasWorkflow: boolean; hasRequiredSecrets: boolean; hasValidConfig: boolean; reason: SetupReason; gitInfo?: GitRemoteInfo; configVersion?: string; workflowVersion?: string; remcodeVersion?: string; detectionTimestamp: string; } /** * Class to detect repository setup requirements for Remcode */ export declare class SetupDetector { private repoPath; /** * Constructor * @param repoPath Path to the repository to analyze */ constructor(repoPath?: string); /** * Detect all setup requirements */ detectSetupNeeds(): Promise<SetupStatus>; /** * Check if directory is a Git repository */ private hasGitRepository; /** * Check if .remcode configuration file exists */ private hasRemcodeFile; /** * Check if GitHub workflow file exists */ private hasGitHubWorkflow; /** * Get Git remote information */ private getGitRemoteInfo; /** * Validate .remcode configuration file */ private validateRemcodeConfig; /** * Get .remcode configuration version */ private getConfigVersion; /** * Get GitHub workflow version */ private getWorkflowVersion; /** * Get current remcode version */ private getRemcodeVersion; /** * Check if required GitHub secrets are set */ private checkRequiredSecrets; /** * Determine the reason for setup requirements */ private getSetupReason; }