Complete uni-wizard implementation with unified tool registry: **Core Architecture:** - harness.py - Single entry point for all capabilities - tools/registry.py - Central tool registry with schema generation - Elegant routing: One harness, infinite capabilities **Tool Categories (13 tools total):** - System: system_info, process_list, service_status, service_control, health_check, disk_usage - Git: git_status, git_log, git_pull, git_commit, git_push, git_checkout, git_branch_list - Network: http_get, http_post, gitea_create_issue, gitea_comment, gitea_list_issues, gitea_get_issue **Daemons:** - health_daemon.py - HTTP endpoint on :8082, writes to ~/timmy/logs/health.json - task_router.py - Polls Gitea for assigned issues, routes to tools, posts results **Systemd Services:** - timmy-health.service - Health monitoring daemon - timmy-task-router.service - Gitea task router daemon **Testing:** - test_harness.py - Exercises all tool categories **Design Principles:** - Local-first: No cloud dependencies - Self-healing: Tools can restart, reconnect, recover - Unified: One consciousness, all capabilities Closes #76, #77, #78
Uni-Wizard Architecture
Vision
A single wizard harness that elegantly routes all API interactions through one unified interface. No more fragmented wizards - one consciousness, infinite capabilities.
Architecture
┌─────────────────────────────────────────────────────────────┐
│ UNI-WIZARD HARNESS │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ System │ │ Git │ │ Network │ │
│ │ Tools │◄──►│ Tools │◄──►│ Tools │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ └──────────────────┼──────────────────┘ │
│ ▼ │
│ ┌───────────────┐ │
│ │ Tool Router │ │
│ │ (Registry) │ │
│ └───────┬───────┘ │
│ │ │
│ ┌──────────────────┼──────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Local │ │ Gitea │ │ Relay │ │
│ │ llama.cpp │ │ API │ │ Nostr │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌───────────────┐
│ LLM (local) │
│ Hermes-3 8B │
└───────────────┘
Design Principles
- Single Entry Point: One harness, all capabilities
- Unified Registry: All tools registered centrally
- Elegant Routing: Tools discover and route automatically
- Local-First: No cloud dependencies
- Self-Healing: Tools can restart, reconnect, recover
Tool Categories
System Layer
system_info— OS, CPU, RAM, disk, uptimeprocess_manager— list, start, stop processesservice_controller— systemd service managementhealth_monitor— system health checks
Git Layer
git_operations— status, log, commit, push, pullrepo_manager— clone, branch, mergepr_handler— create, review, merge PRs
Network Layer
http_client— GET, POST, PUT, DELETEgitea_client— full Gitea API wrappernostr_client— relay communicationapi_router— generic API endpoint handler
File Layer
file_operations— read, write, append, searchdirectory_manager— tree, list, navigatearchive_handler— zip, tar, compress
Registry System
# tools/registry.py
class ToolRegistry:
def __init__(self):
self.tools = {}
def register(self, name, handler, schema):
self.tools[name] = {
'handler': handler,
'schema': schema,
'description': handler.__doc__
}
def execute(self, name, params):
tool = self.tools.get(name)
if not tool:
return f"Error: Tool '{name}' not found"
try:
return tool['handler'](**params)
except Exception as e:
return f"Error executing {name}: {str(e)}"
API Flow
- User Request → Natural language task
- LLM Planning → Breaks into tool calls
- Registry Lookup → Finds appropriate tools
- Execution → Tools run in sequence/parallel
- Response → Results synthesized and returned
Example Usage
# Single harness, multiple capabilities
result = harness.execute("""
Check system health, pull latest git changes,
and create a Gitea issue if tests fail
""")
This becomes:
system_info→ check healthgit_pull→ update reporun_tests→ execute testsgitea_create_issue→ report failures
Benefits
- Simplicity: One harness to maintain
- Power: All capabilities unified
- Elegance: Clean routing, no fragmentation
- Resilience: Self-contained, local-first