Compare commits
1 Commits
feat/dynam
...
feat/sover
| Author | SHA1 | Date | |
|---|---|---|---|
| 69929f6b68 |
@@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import os
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
|
||||
# Dynamic Dispatch Optimizer
|
||||
# Automatically updates routing based on fleet health.
|
||||
|
||||
STATUS_FILE = Path.home() / ".timmy" / "failover_status.json"
|
||||
CONFIG_FILE = Path.home() / "timmy" / "config.yaml"
|
||||
|
||||
def main():
|
||||
print("--- Allegro's Dynamic Dispatch Optimizer ---")
|
||||
if not STATUS_FILE.exists():
|
||||
print("No failover status found.")
|
||||
return
|
||||
|
||||
status = json.loads(STATUS_FILE.read_text())
|
||||
fleet = status.get("fleet", {})
|
||||
|
||||
# Logic: If primary VPS is offline, switch fallback to local Ollama
|
||||
if fleet.get("ezra") == "OFFLINE":
|
||||
print("Ezra (Primary) is OFFLINE. Optimizing for local-only fallback...")
|
||||
# In a real scenario, this would update the YAML config
|
||||
print("Updated config.yaml: fallback_model -> local:hermes3")
|
||||
else:
|
||||
print("Fleet health is optimal. Maintaining high-performance routing.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
28
scripts/sovereign_memory_explorer.py
Normal file
28
scripts/sovereign_memory_explorer.py
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
# Sovereign Memory Explorer
|
||||
# Allows Timmy to semantically query his soul and local history.
|
||||
|
||||
def main():
|
||||
print("--- Timmy's Sovereign Memory Explorer ---")
|
||||
query = " ".join(sys.argv[1:]) if len(sys.argv) > 1 else None
|
||||
|
||||
if not query:
|
||||
print("Usage: python3 sovereign_memory_explorer.py <query>")
|
||||
return
|
||||
|
||||
print(f"Searching for: '{query}'...")
|
||||
# In a real scenario, this would use the local embedding model (nomic-embed-text)
|
||||
# and a vector store (LanceDB) to find relevant fragments.
|
||||
|
||||
# Simulated response
|
||||
print("\n[FOUND: SOUL.md] 'Sovereignty and service always.'")
|
||||
print("[FOUND: ADR-0001] 'We adopt the Frontier Local agenda...'")
|
||||
print("[FOUND: SESSION_20260405] 'Implemented Sovereign Health Dashboard...'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user