TWO CRITICAL FIXES:
1. Tool Output Processing:
- Raised pass-through threshold from 2KB to 5KB
- Medium outputs (5-20KB) now use hierarchical extraction instead of truncation
- Prevents data loss in service lists and medium-sized outputs
- Full data is analyzed before responding
2. SSH Tool Confusion:
- AI was trying to call non-existent 'ssh()' tool
- Updated system prompt to explicitly state SSH commands use execute_command
- Added examples: execute_command('ssh rhiannon systemctl status ollama')
- Made it clear there is NO separate 'ssh' tool
- Applied same clarification to 'nh' commands
Benefits:
- No more missing services due to truncation
- No more tool calling errors for SSH
- Clear guidance on how to use remote commands
- Consistent command execution
CRITICAL FIX: SSH keys were not being auto-loaded, causing connection failures.
Changes:
- tools.py: SSH commands now include -i /var/lib/macha/.ssh/id_ed25519
- remote_monitor.py: Use explicit key path instead of sudo ssh
- system_discovery.py: Added explicit key path to all SSH calls
- system_prompt.txt: Document automatic SSH key loading
- DESIGN.md: Clarify CRITICAL requirement for explicit key paths
All SSH operations now explicitly specify:
-i /var/lib/macha/.ssh/id_ed25519 -o StrictHostKeyChecking=no
This ensures Macha can reliably connect to remote hosts without
depending on SSH agent or automatic key discovery.
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.