Files
Shadowbroker/backend/services/schemas.py
T
Shadowbroker cfbeabda1e Feat/gt analytics openclaw (#392)
* feat(telegram): auto-translate OSINT channel posts to English

Cherry-picked from @Bobpick PR #391 (telegram-only slice): server-side translation during fetch, SHOW ORIGINAL toggle in TelegramOsintPopup, and on-demand /api/telegram-feed?lang=.

Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(gt): experimental Derived OSINT analytics with lean-node safeguards

Cherry-picked from @Bobpick PR #391 (GT + OpenClaw slice): Bayesian strategic-risk engine, map overlay, OpenClaw commands, and telegram_rhetoric watchdog. Off by default (GT_ANALYTICS_ENABLED=false, gt_risk layer false). 1 vCPU nodes get cgroup detection, UI warning on layer toggle, and lean profile that skips scheduled ingest/Louvain unless GT_ANALYTICS_ACK_LOW_CPU=true. Backtest HUD removed from dashboard (OpenClaw/API regression only).

Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 17:05:46 -06:00

39 lines
1.2 KiB
Python

from pydantic import BaseModel
from typing import Optional, Dict, List, Any
class HealthResponse(BaseModel):
status: str
version: str = ""
last_updated: Optional[str] = None
sources: Dict[str, int]
freshness: Dict[str, str]
uptime_seconds: int
# SLO status block — per-source red/yellow/green derived from the
# SLO registry. Keys are source names, values are status dicts
# ({status, age_s, row_count, slo, stale, empty, description}).
slo: Optional[Dict[str, Any]] = None
slo_summary: Optional[Dict[str, int]] = None
# Issue #258: AIS proxy status — currently exposes ``degraded_tls``
# (bool), true when ais_proxy.js fell back to the SPKI-pinned
# insecure-date path because the upstream Let's Encrypt cert is
# expired. Empty dict / null means no status reported yet.
ais_proxy: Optional[Dict[str, Any]] = None
runtime: Optional[Dict[str, Any]] = None
class RefreshResponse(BaseModel):
status: str
class AisFeedResponse(BaseModel):
status: str
ingested: int = 0
class RouteResponse(BaseModel):
orig_loc: Optional[list] = None
dest_loc: Optional[list] = None
origin_name: Optional[str] = None
dest_name: Optional[str] = None