feat: add Super Alpha research, management and MCP workflows
Deploy production / deploy (push) Successful in 56s
Deploy production / deploy (push) Successful in 56s
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user