Commit graph

10 commits

Author SHA1 Message Date
autocommit
6d79bc2753 deps-upgrade(deps): ⬆️ Update dependencies to latest stable versions in pyproject.toml
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-17 21:20:13 -07:00
Natalie
783c0117e4 feat(@ml): add menu-bar tray agent for local commits
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-12 19:43:37 -07:00
Lilith
81c66c1991 refactor(database): simplify to SQLite-only storage
Removed PostgreSQL support and dependencies for single source of truth:
- Removed all PostgreSQL fallback logic from connection.py
- Removed asyncpg dependency (keeping only aiosqlite)
- Simplified database URL to direct SQLite path
- Updated config: database_path now points to file, not directory
- Default location: ~/.cache/commits/auto_commit.db (not nested in postgres/)
- Cleaner get_database_size_mb() using direct file stat
- Simplified VACUUM logic (SQLite-only)

Benefits:
- No fallback complexity or environment variable checks
- Single dependency (aiosqlite) instead of two (asyncpg + aiosqlite)
- Clearer configuration (file path vs directory path)
- Less code, less maintenance, no tech debt
- Same rolling data retention features (500MB limit, 90 day retention)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 11:08:38 -08:00
Lilith
0ea54d2c1a feat(database): add PostgreSQL storage with 500MB rolling data retention
- Created database module with DatabaseManager, models, and repositories
- SQLAlchemy async support with PostgreSQL (asyncpg) and SQLite (aiosqlite) fallback
- Database stored in ~/.cache/commits/postgres (or auto_commit.db for SQLite)
- Automatic size monitoring and pruning every 5 minutes
- Configurable retention: 500MB max size, 90 days default data retention
- Rolling window: auto-prunes oldest commits/cycles/errors when threshold reached
- Models: Commit, Cycle, Error, RepositoryStatus with proper indexes
- Repository pattern for clean database operations
- Integrated into app lifespan (connects on startup, disconnects on shutdown)
- Updated daemon to accept db_manager parameter

Database features:
- Size limit enforcement (default: 500MB)
- Automatic VACUUM after pruning
- Time-based retention (default: 90 days)
- Background pruning task (every 5 minutes)
- Comprehensive error logging and categorization
- Repository status tracking with consecutive error counts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 11:02:09 -08:00
Lilith
023a134967 fix(core): fix ASGI 'coroutine not callable' error
- Made main() async and properly awaited create_auto_commit_service()
- Changed to manual uvicorn.Server() instead of uvicorn.run() factory mode
- Fixed TypeError that caused 500 errors on all HTTP requests
- Updated llama_service_url default from port 8000 to 8100
- Removed DependencyStartupConfig to avoid lilith-service-addresses dependency

This resolves the critical bug preventing daemon startup and HTTP operations.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 10:48:13 -08:00
Lilith
5296724334 feat(@ml): add auto-commit pipeline integration 2026-01-13 05:27:37 -08:00
Lilith
d9e7f6fef0 feat(cli): add commits CLI for multi-daemon management
Merged the bash commits CLI into the auto-commit-service as a proper
Python CLI module using typer.

Features:
- start/stop/status: Manage daemon lifecycle
- once: Refresh repos and trigger immediate cycle
- report: Comprehensive daemon reporting
- trigger/enable/disable: Manual daemon control
- logs/list: Daemon monitoring
- install-systemd: Systemd user service installation

New files:
- src/auto_commit_service/cli/__init__.py - Typer app and commands
- src/auto_commit_service/cli/registry.py - Multi-daemon registry
- src/auto_commit_service/cli/utils.py - CLI utilities

Entry point: `commits` command (via pyproject.toml scripts)
Version: 0.1.1 -> 0.2.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:41:35 -08:00
Lilith
91b3b3979a chore(@ml/auto-commit-service): 📦 bump version to 0.1.1
- Fix CRASHED status handling to attempt recovery instead of giving up
- Daemon now auto-starts llama-service after reboot when stale PID detected
2026-01-09 11:08:18 -08:00
Lilith
2d0ae9d5e4 Add new files 2026-01-05 15:24:28 -08:00
Lilith
7bb415783e chore(@ml/auto-commit-service): 🛠 update package.json and README.md 2026-01-04 21:50:37 -08:00