feat: add advisor recommendation review flow

This commit is contained in:
Windows
2026-09-11 15:33:27 +08:00
parent 13bb4f257d
commit e8ec0af398
9 changed files with 649 additions and 40 deletions
+10
View File
@@ -10,6 +10,7 @@ from app.core.errors import RecoverableAgentError
from app.core.fund_contracts import FundQuoteQuery
from app.core.investment_goal_contracts import InvestmentGoalQuery
from app.core.portfolio_analysis_contracts import PortfolioAnalysisQuery
from app.core.product_recommendation_contracts import ProductRecommendationQuery
from app.infrastructure.fund_quote_cache import FundQuoteCache
from app.infrastructure.memory_cache import MemoryCacheAdapter
from app.infrastructure.vector_memory import VectorMemoryAdapter
@@ -30,6 +31,7 @@ from app.service.model_gateway import (
ModelGenerationService,
)
from app.service.portfolio_analysis_service import portfolio_analysis_tool
from app.service.product_recommendation_service import product_recommendation_tool
from app.service.runtime_config_service import load_active_intent_configs
from app.service.suitability_service import SuitabilityToolInput, suitability_tool_handler
from app.service.tool_executor import ToolDefinition, ToolExecutor, ToolRegistry
@@ -173,6 +175,14 @@ def get_agent_factory() -> AgentFactory:
allowed_roles=("customer", "advisor", "operator", "admin"),
timeout_seconds=15,
))
registry.register(ToolDefinition(
name="recommend_products",
input_model=ProductRecommendationQuery,
handler=cast(Any, product_recommendation_tool),
required_permission="product-recommendation:generate:self",
allowed_roles=("customer", "advisor", "operator", "admin"),
timeout_seconds=15,
))
model_service = get_model_service()
endpoint_resolver = DatabaseModelEndpointResolver()
factory = AgentFactory(