generated from coulomb/repo-seed
Implements the first live layer of the Custodian cognitive infrastructure: PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable Framework telemetry dashboard. - state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard) - 5 DB tables: topics, workstreams, tasks, decisions, progress_events - 11 MCP tools + 5 resources registered in .mcp.json - Observable dashboard: Overview, Workstreams, Decisions, Progress pages - CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual) - ~/.claude/CLAUDE.md: global cross-project reference to the hub - scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
452 B
Python
16 lines
452 B
Python
#!/usr/bin/env python3
|
|
"""Observable data loader: all decisions."""
|
|
import json
|
|
import os
|
|
import urllib.request
|
|
import urllib.error
|
|
|
|
API_BASE = os.environ.get("API_BASE", "http://127.0.0.1:8000").rstrip("/")
|
|
|
|
try:
|
|
with urllib.request.urlopen(f"{API_BASE}/decisions", timeout=10) as resp:
|
|
data = json.loads(resp.read())
|
|
print(json.dumps(data))
|
|
except urllib.error.URLError as e:
|
|
print(json.dumps({"error": str(e), "decisions": []}))
|