3 Commits

Author SHA1 Message Date
Lily Miller
1ff07fb2d1 Fix tool output processing and clarify SSH usage in system prompt
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
2025-10-06 17:03:43 -06:00
Lily Miller
ab72a98849 Fix: Always use explicit SSH key path for all SSH operations
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.
2025-10-06 15:04:51 -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