verbose live UI + tool-level SSE events + Groq default + regression tests

This commit is contained in:
2026-06-03 05:04:29 -03:00
parent 131f4d9b86
commit e124a8a7d9
69 changed files with 3030 additions and 137 deletions

27
api/analyses/base.py Normal file
View File

@@ -0,0 +1,27 @@
"""Analysis base class.
An Analysis is a self-contained mini-agent. It owns its reasoning pattern
(CoT, ReAct, plan-and-execute) and exposes a uniform external contract:
`run(args, question) -> Finding`. The runtime composes Analyses; it doesn't
know how each one thinks internally.
Public surface is framework-free — no langgraph types leak out.
"""
from __future__ import annotations
from typing import Any, ClassVar
from api.analyses.types import Finding
class Analysis:
"""Subclass and set `name`, `description`, `args_schema`; then implement run()."""
name: ClassVar[str] = ""
description: ClassVar[str] = ""
# JSON-schema-ish description of the args dict — the planner reads this.
args_schema: ClassVar[dict[str, Any]] = {}
async def run(self, args: dict[str, Any], question: str) -> Finding:
raise NotImplementedError