From bc2c09d3f8459d37dab7911900d995dd83de6d67 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Feb 2026 00:35:33 +0000 Subject: [PATCH] feat: replace GitHub page with embedded Timmy chat interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the marketing landing page with a minimal, full-screen chat interface that connects to a running Timmy instance. Mobile-first design with single vertical scroll direction, looping scroll, no zoom, no buttons — just type and press Enter to talk to Timmy. - docs/index.html: full rewrite as a clean chat UI with dark terminal theme, looping infinite scroll, markdown rendering, connection status, and /connect, /clear, /help slash commands - src/dashboard/app.py: add CORS middleware so the GitHub Pages site can reach a local Timmy server cross-origin - src/config.py: add cors_origins setting (defaults to ["*"]) https://claude.ai/code/session_01AWLxg6KDWsfCATiuvsRMGr --- docs/index.html | 1274 +++++++++++++++--------------------------- src/config.py | 4 + src/dashboard/app.py | 9 + 3 files changed, 454 insertions(+), 833 deletions(-) diff --git a/docs/index.html b/docs/index.html index f3562842..515c5a28 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,926 +1,534 @@ - - - Timmy Time — Mission Control - - - + + + Timmy + + + - -
- - -
+
+ - -
-

Sovereign AI Agent System

-

Your agents.
Your hardware.
Your sats.

-

- A local-first AI command center. Talk to Timmy, coordinate your swarm, - gate API access with Bitcoin Lightning — no cloud AI, no telemetry, no compromise. -

-
- Full Test Suite Passing - FastAPI + HTMX - Lightning L402 - No Cloud AI - Multi-Agent Swarm - MIT License -
- -
+
- -
-
-
640+
-
Tests Passing
-
-
-
58
-
API Endpoints
-
-
-
15
-
Subsystems
-
-
-
0
-
Cloud AI Calls
+
+
-
+ diff --git a/src/config.py b/src/config.py index d145b0a0..231fb879 100644 --- a/src/config.py +++ b/src/config.py @@ -72,6 +72,10 @@ class Settings(BaseSettings): # Default is False (telemetry disabled) to align with sovereign AI vision. telemetry_enabled: bool = False + # CORS allowed origins for the web chat interface (GitHub Pages, etc.) + # Set CORS_ORIGINS as a comma-separated list, e.g. "http://localhost:3000,https://example.com" + cors_origins: list[str] = ["*"] + # Environment mode: development | production # In production, security settings are strictly enforced. timmy_env: Literal["development", "production"] = "development" diff --git a/src/dashboard/app.py b/src/dashboard/app.py index 17058f9f..0447f723 100644 --- a/src/dashboard/app.py +++ b/src/dashboard/app.py @@ -5,6 +5,7 @@ from contextlib import asynccontextmanager from pathlib import Path from fastapi import FastAPI, Request +from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates @@ -170,6 +171,14 @@ app = FastAPI( redoc_url="/redoc" if settings.debug else None, ) +app.add_middleware( + CORSMiddleware, + allow_origins=settings.cors_origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + templates = Jinja2Templates(directory=str(BASE_DIR / "templates")) app.mount("/static", StaticFiles(directory=str(PROJECT_ROOT / "static")), name="static")