feat: add Git operations tool for structured repository management

Implements #214 - Add git_operations tool that provides safe, parsed
git operations with JSON output and security policy integration.

Features:
- Operations: status, diff, log, branch, commit, add, checkout, stash
- Structured JSON output (parsed status, diff hunks, commit history)
- SecurityPolicy integration with autonomy-aware controls
- Command injection protection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Argenis 2026-02-16 05:53:29 -05:00 committed by GitHub
parent 2b04ebd2fb
commit 1530a8707d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 692 additions and 12 deletions

View file

@ -306,6 +306,8 @@ fn prune_conversation_rows(workspace_dir: &Path, retention_days: u32) -> Result<
}
let conn = Connection::open(db_path)?;
// Use WAL so hygiene pruning doesn't block agent reads
conn.execute_batch("PRAGMA journal_mode = WAL; PRAGMA synchronous = NORMAL;")?;
let cutoff = (Local::now() - Duration::days(i64::from(retention_days))).to_rfc3339();
let affected = conn.execute(