feat: Add evaluation hooks, skill adaptation and team pipeline config

- Add EvaluationHook for post-execution agent evaluation
- Add SkillAdaptationHook for dynamic skill adaptation
- Add team/ directory with team coordination logic
- Add TEAM_PIPELINE.yaml for smoke_fullstack pipeline config
- Update RuntimeView, TraderView and RuntimeSettingsPanel UI
- Add runtimeApi and websocket services
- Add runtime_state.json to smoke_fullstack state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 18:52:12 +08:00
parent f4a2b7f3af
commit 4b5ac86b83
87 changed files with 5042 additions and 744 deletions

View File

@@ -4,6 +4,7 @@
from __future__ import annotations
import asyncio
import logging
from concurrent.futures import ThreadPoolExecutor
from typing import Any
@@ -12,6 +13,8 @@ from pydantic import BaseModel, Field
from backend.config.env_config import canonicalize_model_provider, get_env_bool, get_env_str
from backend.llm.models import create_model
logger = logging.getLogger(__name__)
class EnrichedNewsItem(BaseModel):
"""Structured output schema for one enriched article."""
@@ -156,7 +159,8 @@ def analyze_news_row_with_llm(row: dict[str, Any]) -> dict[str, Any] | None:
]
try:
response = _run_async(model(messages=messages, structured_model=EnrichedNewsItem))
except Exception:
except Exception as e:
logger.warning(f"LLM enrichment failed: {e}")
return None
payload = _normalize_enrichment_payload(getattr(response, "metadata", None))
@@ -268,7 +272,8 @@ def analyze_range_with_llm(payload: dict[str, Any]) -> dict[str, Any] | None:
response = _run_async(
model(messages=messages, structured_model=RangeAnalysisPayload),
)
except Exception:
except Exception as e:
logger.warning(f"LLM enrichment failed: {e}")
return None
metadata = getattr(response, "metadata", None)