feat(advisor-agent): Introduce advisor agent functionalities with compliance, KYC, and script templates

- Added new modules for advisor compliance, KYC sessions, and script templates, enhancing the advisor agent's capabilities.
- Implemented a comprehensive API structure under the `/api/advisor-agent` prefix, ensuring clear organization and access to new features.
- Established database models and repositories for compliance rules and KYC sessions, facilitating robust data management.
- Integrated exception handling and response models to improve error management and user feedback.
- Updated settings to include new configurations for compliance and KYC features, ensuring flexibility and adaptability.

This update significantly expands the advisor agent's functionality, providing essential tools for compliance and customer interaction while maintaining a structured API design.
This commit is contained in:
2026-09-12 16:33:07 +08:00
parent 282f21932c
commit 70aa861983
74 changed files with 2516 additions and 813 deletions
+60 -30
View File
@@ -1,30 +1,60 @@
# 口径字典 + 问数模板种子(本机 MySQL jinrong_agent)␍
param(␍
[ValidateSet("Auto", "Docker", "Local")]␍
[string]$RestartBackend = "Local",␍
[switch]$SkipRestart␍
)␍
$ErrorActionPreference = "Stop"␍
$Root = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)␍
$AgentDir = Join-Path $Root "scripts\agent"␍
␍
Write-Host "Seeding analyst metric dict..."␍
Get-Content (Join-Path $AgentDir "seed-analyst-metric-dict.sql") -Raw | mysql -u root jinrong_agent␍
␍
Write-Host "Seeding analyst query templates..."␍
Get-Content (Join-Path $AgentDir "seed-analyst-query-templates.sql") -Raw | mysql -u root jinrong_agent␍
␍
Write-Host "Seeding analyst few-shots (D-11 published)..."␍
Get-Content (Join-Path $AgentDir "seed-analyst-few-shots.sql") -Raw | mysql -u root jinrong_agent␍
␍
Write-Host "Done."␍
␍
if (-not $SkipRestart) {␍
$RestartScript = Join-Path $Root "scripts\dev\restart-dev.ps1"␍
if (Test-Path $RestartScript) {␍
Write-Host "Restarting backend after seed ($RestartBackend)..." -ForegroundColor Cyan␍
& $RestartScript -Backend $RestartBackend -SkipFrontend␍
} else {␍
Write-Host "WARN: restart-dev.ps1 not found; skip backend restart." -ForegroundColor Yellow␍
}␍
}␍
# 口径字典 + 问数模板种子(本机 MySQL jinrong_agent)
param(
[ValidateSet("Auto", "Docker", "Local")]
[string]$RestartBackend = "Local",
[switch]$SkipRestart
)
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
$AgentDir = Join-Path $Root "scripts\agent"
Write-Host "Seeding analyst metric dict..."
Get-Content (Join-Path $AgentDir "seed-analyst-metric-dict.sql") -Raw | mysql -u root jinrong_agent
Write-Host "Seeding analyst query templates..."
Get-Content (Join-Path $AgentDir "seed-analyst-query-templates.sql") -Raw | mysql -u root jinrong_agent
Write-Host "Seeding analyst few-shots (D-11 published)..."
Get-Content (Join-Path $AgentDir "seed-analyst-few-shots.sql") -Raw | mysql -u root jinrong_agent
Write-Host "Done."
if (-not $SkipRestart) {
$RestartScript = Join-Path $Root "scripts\dev\restart-dev.ps1"
if (Test-Path $RestartScript) {
Write-Host "Restarting backend after seed ($RestartBackend)..." -ForegroundColor Cyan
& $RestartScript -Backend $RestartBackend -SkipFrontend
} else {
Write-Host "WARN: restart-dev.ps1 not found; skip backend restart." -ForegroundColor Yellow
}
}