CRITICAL FIX: macha-chat was running as the invoking user (e.g., lily),
but SSH keys are stored at /var/lib/macha/.ssh/id_ed25519 which only
the macha user can access.
This caused password prompts when using SSH commands in macha-chat,
while macha-ask (which runs as macha user) worked correctly.
Changes:
- macha-chat now uses 'sudo -u macha' like macha-ask does
- Both interfaces now run with identical permissions
- Ensures consistent SSH key access and behavior
Now both macha-chat and macha-ask:
- Run as the macha user
- Have access to /var/lib/macha/.ssh/id_ed25519
- Use centralized command_patterns.py
- No password prompts for SSH!
CRITICAL FIX: chat.py had TWO execution paths causing inconsistent behavior:
1. Tool calling (correct) - used centralized command_patterns
2. Legacy JSON command parsing (broken) - bypassed SysadminTools
This caused macha-chat to fail SSH connections while macha-ask worked.
Changes:
- Rewrote chat.py to use ONLY tool-calling architecture
- All commands now go through SysadminTools.execute_command()
- SSH commands use centralized command_patterns.py
- conversation.py is now a lightweight wrapper for compatibility
- Both macha-chat and macha-ask use the same code path
- Updated module.nix to call chat.py directly
Benefits:
- Consistent behavior between macha-chat and macha-ask
- Single execution path = easier to maintain
- All SSH commands use explicit key paths
- No more password prompts
Fixes:
- SSH from macha-chat now works correctly
- Both interfaces use centralized command patterns
Macha is now a standalone NixOS flake that can be imported into other
systems. This provides:
- Independent versioning
- Easier reusability
- Cleaner separation of concerns
- Better development workflow
Includes:
- Complete autonomous system code
- NixOS module with full configuration options
- Queue-based architecture with priority system
- Chunked map-reduce for large outputs
- ChromaDB knowledge base
- Tool calling system
- Multi-host SSH management
- Gotify notification integration
All capabilities from DESIGN.md are preserved.