feat: add Super Alpha research, management and MCP workflows
Deploy production / deploy (push) Successful in 56s

This commit is contained in:
yuxuanhui
2026-09-13 12:32:16 +08:00
parent 7c8188df9c
commit e256d6fef1
59 changed files with 3766 additions and 125 deletions
+9
View File
@@ -189,6 +189,10 @@ async def upsert_alpha(db, raw: dict):
def list_statement(filters):
query = select(Alpha, Research).join(Research, Research.alpha_id == Alpha.id)
if filters.management_scope == "super":
query = query.where(Alpha.alpha_type == "SUPER")
elif filters.management_scope == "non_super":
query = query.where(or_(Alpha.alpha_type != "SUPER", Alpha.alpha_type.is_(None)))
if filters.submission:
query = query.where(submission_condition(filters.submission))
if filters.submission_blocked is not None:
@@ -285,6 +289,11 @@ def summary(item: Alpha, research: Research):
result = {k: getattr(item, k) for k in keys}
result["failed_checks"] = failed_checks(item.checks)
result["expression_preview"] = (item.expression or item.selection or "")[:240]
result["selection_preview"], result["combo_preview"] = (item.selection or "")[:240], (item.combo or "")[:240]
if item.alpha_type == "SUPER":
from .superalpha.evidence import parse_components
components = parse_components(item.raw.get("components", item.raw.get("selectedAlphas")))
result["component_count"] = len(components["components"]) if components["complete"] else None
result["research"] = {
k: getattr(research, k) for k in ("note", "tags", "favorite", "state", "updated_at", "version")
}