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:
@@ -66,6 +66,7 @@ def setting_rows(data):
|
||||
for key in (
|
||||
"decay", "truncation", "pasteurization", "unitHandling",
|
||||
"nanHandling", "language", "visualization", "maxTrade", "maxPosition",
|
||||
"selectionHandling", "selectionLimit", "componentActivation",
|
||||
):
|
||||
definition = children.get(key)
|
||||
if not isinstance(definition, dict):
|
||||
@@ -200,11 +201,15 @@ class ResearchMetadata:
|
||||
raise HTTPException(502, "算子分页提前结束")
|
||||
raise HTTPException(502, "算子分页超过本地限制,未发布新快照")
|
||||
|
||||
async def operators(self, q="", category=None, favorite=False, limit=25, offset=0):
|
||||
async def operators(self, q="", category=None, favorite=False, limit=25, offset=0, stage=None):
|
||||
snapshot = await self.get("operators")
|
||||
notes = {r.name: r for r in await self.db.scalars(select(OperatorNote))}
|
||||
rows = []
|
||||
for item in snapshot["content"].get("items", []):
|
||||
scopes = item.get("scope") or []
|
||||
scopes = scopes if isinstance(scopes, list) else [scopes]
|
||||
if stage and stage.upper() not in [str(s).upper() for s in scopes]:
|
||||
continue
|
||||
note = notes.get(item["name"])
|
||||
if q.lower() not in json.dumps(item, ensure_ascii=False).lower() or (
|
||||
category and item["category"] != category
|
||||
|
||||
@@ -18,11 +18,12 @@ async def operators(
|
||||
q: str = "",
|
||||
category: str | None = None,
|
||||
favorite: bool = False,
|
||||
stage: str | None = None,
|
||||
limit: int = Query(25, ge=1, le=100),
|
||||
offset: int = Query(0, ge=0),
|
||||
):
|
||||
async with request.app.state.sessions() as db:
|
||||
return await ResearchMetadata(db).operators(q, category, favorite, limit, offset)
|
||||
return await ResearchMetadata(db).operators(q, category, favorite, limit, offset, stage)
|
||||
|
||||
|
||||
@router.post("/operators/refresh")
|
||||
|
||||
Reference in New Issue
Block a user