/**
 * Git Agent
 * Handles: git-operation
 */
import path from 'path';
import { execCommand } from './utils.js';

export default {
  name: 'git',
  actions: {
    'git-operation': async (params) => {
      const { gitCommand, cwd } = params;
      const resolvedCwd = cwd ? path.resolve(cwd) : process.cwd();
      const result = await execCommand('git', [gitCommand], { cwd: resolvedCwd });
      return { stdout: result };
    },
  },
};
