Commit Graph

3 Commits

Author SHA1 Message Date
Lily Miller
782dce4b2d Add action explanation and follow-up functionality to MachaChatSession
- Introduced `explain_action` method to provide detailed explanations for pending actions in the approval queue.
- Added `answer_action_followup` method to handle user follow-up questions regarding proposed actions.
- Updated `main` function to support discussion mode with action explanations and follow-ups.
- Refactored `conversation.py` to utilize the unified chat implementation from `chat.py`, enhancing compatibility and functionality.
- Enhanced error handling for file operations and user input validation in both new methods.
2025-10-09 16:42:28 -06:00
Lily Miller
b9a498a3fd Unify chat.py and conversation.py into single implementation
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
2025-10-06 16:19:57 -06:00
Lily Miller
22ba493d9e Initial commit: Split Macha autonomous system into separate flake
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.
2025-10-06 14:32:37 -06:00