Yves Gugger 3485668b5e
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
feat: add Alpha Terminal HUNT/CFO modules and Analyze framework
Adds HUNT (Sniper/Trend/Forge), CFO dashboard (burn rate + kill list), and a plugin-based Analyze side panel with caching and SSRF hardening.
2025-12-15 16:15:58 +01:00

42 lines
969 B
Python

"""
Analyzer plugin interface (Alpha Terminal - Diligence).
Each analyzer contributes items to one or more quadrants:
authority | market | risk | value
"""
from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime
from typing import Protocol
from sqlalchemy.ext.asyncio import AsyncSession
from app.schemas.analyze import AnalyzeItem
from app.services.domain_checker import DomainCheckResult
@dataclass(frozen=True)
class AnalyzeContext:
db: AsyncSession
domain: str
computed_at: datetime
fast: bool
check: DomainCheckResult
health: object | None # DomainHealthReport or None (kept as object to avoid import cycles)
@dataclass(frozen=True)
class AnalyzerContribution:
quadrant: str # authority|market|risk|value
items: list[AnalyzeItem]
class Analyzer(Protocol):
key: str
ttl_seconds: int
async def analyze(self, ctx: AnalyzeContext) -> list[AnalyzerContribution]: ...