/**
 * Git Tools
 *
 * Provides git operations for the coding agent.
 * Tools are conditionally registered based on git/gh availability.
 *
 * Scope is intentionally narrow: the read-only inspectors (status/diff/log)
 * plus the staging/commit/PR flow that benefits from structured output and
 * approval gating. Rarer operations (push, pull, branch, stash, reset) are
 * left to execute_bash to keep the tool surface small.
 */
import { gitAddTool } from './git-add.js';
import { gitCommitTool } from './git-commit.js';
import { gitDiffTool } from './git-diff.js';
import { gitLogTool } from './git-log.js';
import { gitPrTool } from './git-pr.js';
import { gitStatusTool } from './git-status.js';
import { isGhAvailable, isGitAvailable, isInsideGitRepo } from './utils.js';
/**
 * Get all available git tools based on system capabilities.
 * Returns empty array if git is not installed.
 */
export function getGitTools() {
    // No git or not in a git repo, no git tools
    if (!isGitAvailable() || !isInsideGitRepo()) {
        return [];
    }
    // Core git tools (always available if git is installed)
    const tools = [
        gitStatusTool,
        gitDiffTool,
        gitLogTool,
        gitAddTool,
        gitCommitTool,
    ];
    // PR tool requires gh CLI
    if (isGhAvailable()) {
        tools.push(gitPrTool);
    }
    return tools;
}
//# sourceMappingURL=index.js.map