From d5584a04b461509a142d6543b21ebe431b18b700 Mon Sep 17 00:00:00 2001 From: zumayaaustin-creator Date: Tue, 23 Jun 2026 08:59:27 -0700 Subject: [PATCH 1/2] docs: add Windows prerequisites --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index cc209ea..a720645 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ chmod +x install.sh && ./install.sh ## πŸ“‹ Prerequisites +### Linux/macOS + | Tool | Required? | Install | |------|-----------|---------| | Python 3.10+ | βœ… Required | `sudo apt install python3 python3-pip` | @@ -111,8 +113,20 @@ chmod +x install.sh && ./install.sh | Hermes Agent | ⚠ For memory/scheduling | `curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh \| bash` | | Gemini CLI | ⚠ For Google AI | `npm install -g @google/gemini-cli` | +### Windows + +| Tool | Required? | Install | Verify / Next Step | +|------|-----------|---------|--------------------| +| Python 3.10+ | βœ… Required | Install from [python.org/downloads/windows](https://www.python.org/downloads/windows/) and enable **β€œAdd python.exe to PATH”** during setup. | `python --version` | +| Node.js 18+ | ⚠ For opencode and Gemini CLI | Install from [nodejs.org](https://nodejs.org/). | `node --version` and `npm --version` | +| opencode | ⚠ For code tasks | `npm install -g @opencode/cli` | Confirm the CLI is available in a new terminal session. | +| Gemini CLI | ⚠ For Google AI | `npm install -g @google/gemini-cli` | Run `gemini auth login` and complete OAuth in the browser. | +| Hermes Agent | ⚠ For memory/scheduling | Windows support must be verified separately if the upstream installer remains Bash-only. | Check the upstream Hermes Agent install docs before relying on native Windows support. | + > ⚠ = Optional β€” the dashboard works with any subset of installed agents. +> **PowerShell execution policy:** if you use PowerShell scripts, allow local scripts for your user with `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`, or run a single installer invocation with `powershell -ExecutionPolicy Bypass -File .\install.ps1`. + --- ## πŸ”§ Configuration From b3f2ee5a0616c5759a6a805c25a0730677efebf4 Mon Sep 17 00:00:00 2001 From: zumayaaustin-creator Date: Tue, 23 Jun 2026 08:59:48 -0700 Subject: [PATCH 2/2] Configure CORS origins from dashboard settings --- server.py | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index ca97124..839da22 100644 --- a/server.py +++ b/server.py @@ -21,6 +21,8 @@ from fastapi.responses import HTMLResponse, JSONResponse, Response from fastapi.staticfiles import StaticFiles from pydantic import BaseModel +BASE_DIR = Path(__file__).parent.resolve() + app = FastAPI(title="Agentic OS", version="1.1.0") # Load OpenRouter API key from Hermes .env @@ -33,16 +35,44 @@ if HERMES_ENV.exists(): if k == "OPENROUTER_API_KEY": os.environ[k] = v # last value wins (matches shell sourcing) +def get_cors_origins() -> list[str]: + """Return local dashboard origins allowed to call the API.""" + port = 8080 + settings_file = BASE_DIR / "data" / "settings.json" + + if settings_file.exists(): + try: + settings = json.loads(settings_file.read_text(encoding="utf-8")) + port = int(settings.get("dashboard", {}).get("port", port)) + except (json.JSONDecodeError, OSError, TypeError, ValueError): + port = 8080 + + origins = { + "http://127.0.0.1:8080", + "http://localhost:8080", + f"http://127.0.0.1:{port}", + f"http://localhost:{port}", + } + + extra_origins = os.environ.get("AGENTIC_OS_CORS_ORIGINS", "") + origins.update( + origin.strip() + for origin in extra_origins.split(",") + if origin.strip() + ) + + return sorted(origins) + + # CORS for local dev app.add_middleware( CORSMiddleware, - allow_origins=["http://127.0.0.1:8080", "http://localhost:8080"], + allow_origins=get_cors_origins(), allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) -BASE_DIR = Path(__file__).parent.resolve() # ─── Models ───────────────────────────────────────────────────────