/** * GitHub MCP Tools — local store and `gh`/`git` command helpers. * Extracted from github-tools.ts. */ export interface RepoInfo { owner: string; name: string; branch: string; lastAnalyzed?: string; metrics?: { commits: number; branches: number; contributors: number; openIssues: number; openPRs: number; }; } export interface GitHubStore { repos: Record; prs: Record; issues: Record; version: string; } export declare function loadGitHubStore(): GitHubStore; export declare function saveGitHubStore(store: GitHubStore): void; /** Run a trusted static shell command (no user input), return stdout or null on failure */ export declare function run(cmd: string, cwd?: string): string | null; /** Run a command with user-provided args as separate array elements (no shell injection) */ export declare function runSafe(cmd: string, args: string[], cwd?: string): string | null; /** Result of a gh CLI invocation that preserves whether it actually ran and failed. */ type GhResult = { ok: true; stdout: string; } | { ok: false; error: string; }; /** Run a `gh` command and preserve the real failure reason instead of collapsing to null. */ export declare function runSafeResult(cmd: string, args: string[], cwd?: string): GhResult; /** Check if gh CLI is available */ export declare function hasGhCli(): boolean; /** * Validate that a MCP input value is a safe positive integer suitable for use * as a GitHub PR/issue number in CLI arguments. Returns the integer value on * success, or null if the input is missing, non-finite, negative, zero, or * non-integer. Using this guard before string-interpolating the value into a * command template prevents argument-injection attacks where an MCP client * sends a non-numeric string (e.g. "1 --label evil") that gets split into * extra CLI flags when `run()` tokenises the command on whitespace. */ export declare function safeGitHubNumber(raw: unknown): number | null; export {}; //# sourceMappingURL=github-tools-store.d.ts.map