Compare commits

...

5 Commits

2 changed files with 59 additions and 15 deletions

View 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()

View File

@@ -2,25 +2,41 @@
import json
import os
import sys
import requests
from pathlib import Path
# Sovereign Review Gate
# Aggregates remote state from Allegro's bridge for local Timmy judgment.
# Active Sovereign Review Gate
# Polling Gitea via Allegro's Bridge for local Timmy judgment.
GITEA_API = "https://forge.alexanderwhitestone.com/api/v1"
TOKEN = os.environ.get("GITEA_TOKEN") # Should be set locally
def get_pending_reviews():
if not TOKEN:
print("Error: GITEA_TOKEN not set.")
return []
# Poll for open PRs assigned to Timmy
url = f"{GITEA_API}/repos/Timmy_Foundation/timmy-home/pulls?state=open"
headers = {"Authorization": f"token {TOKEN}"}
res = requests.get(url, headers=headers)
if res.status_code == 200:
return [pr for pr in res.data if any(a['username'] == 'Timmy' for a in pr.get('assignees', []))]
return []
def main():
print("--- Timmy's Sovereign Review Gate ---")
print("Fetching pending artifacts from Allegro...")
# In a real scenario, this would call Allegro's GiteaBridge API
print("1. [PR #472] Sovereign Social (Evennia)")
print("2. [PR #417] Sovereign Health Dashboard")
print("3. [Issue #246] Gemma Scout Redaction")
print("\nPending Decision: PR #472")
print("Context: Multi-agent life in Evennia.")
print("Recommendation: APPROVE. Aligns with 'Agents play and live together' vision.")
# Decision logic would go here
print("\nDecision Record: Awaiting Timmy's local voice/input...")
print("--- Timmy's Active Sovereign Review Gate ---")
pending = get_pending_reviews()
if not pending:
print("No pending reviews found for Timmy.")
return
for pr in pending:
print(f"\n[PR #{pr['number']}] {pr['title']}")
print(f"Author: {pr['user']['username']}")
print(f"URL: {pr['html_url']}")
# Local decision logic would go here
print("Decision: Awaiting local voice input...")
if __name__ == "__main__":
main()