Commit Graph
16 Commits
Author SHA1 Message Date
zhanghongyu_0626 48355cee8e feat(analytics): Enhance AnalystQueryPage with template and cache hit indicators
- Updated `AnalystQueryPage` to display tags for template hits and cache hits, improving user feedback on query performance.
- Adjusted SQL result label to streamline information presentation.
- Enhanced documentation to reflect the latest testing baseline with 804 passed tests, indicating improved stability and functionality across the application.

This update significantly enhances the user experience by providing clearer insights into query processing and results.
2026-09-10 15:31:20 +08:00
zhanghongyu_0626 21ced4d38f feat(report): Add battery report generation and update course documentation
- Introduced `battery_report.json` for local data analysis, excluding it from the database.
- Enhanced `AGENTS.md` to reflect updated test baseline with 795 passed tests.
- Added new metrics for trade flow in `dict_service.py`, improving transaction data analysis.
- Updated regex patterns in `guardrail.py` to better handle numeric extraction and prevent misinterpretation of tokens.
- Expanded course modules with new content on FR-8/9/10 capabilities and L3 role management.
- Improved concurrency handling in transaction processing to ensure accurate alert generation.

This update enhances data analysis capabilities and improves the overall structure and clarity of course materials.
2026-09-10 14:32:25 +08:00
zhanghongyu_0626 4b8e11c9bd feat(threshold): Implement customer loss threshold configuration and notification system
- Added `ThresholdRepository` for managing customer loss threshold configurations and notifications.
- Introduced `threshold_service` to handle loss threshold alerts based on customer portfolio performance.
- Enhanced `customer_prompts` to include new intent for querying product net values.
- Updated `customer_service` to integrate new threshold alert functionality into existing workflows.
- Implemented `sanitize_postprocess` for improved compliance handling in customer interactions.
- Enhanced course documentation to reflect updates in advisor training modules and interactive elements.

This update significantly improves the customer experience by providing proactive loss threshold notifications and enhancing the overall service framework.
2026-09-10 10:57:40 +08:00
zhanghongyu_0626 3ad244add0 feat(analyst): Enhance dashboard metrics and customer service interactions
- Updated the `dashboard` function in `analyst.py` to include additional metrics for different user roles, improving data visibility for analysts, customers, advisors, and risk officers.
- Introduced a new `prepare_customer_stream` function in `customer_service.py` to facilitate streaming responses for customer interactions, enhancing the chat experience.
- Added new API endpoints in `analyst.ts` for fetching dashboard metrics and managing analyst assets, streamlining data handling and user interactions.
- Updated frontend components to support new dashboard features and asset management, ensuring a cohesive user experience across the application.

This update significantly improves the functionality and usability of the analyst and customer service features, providing users with enhanced tools for data analysis and interaction.
2026-09-09 21:32:59 +08:00
zhanghongyu_0626 bf8f271840 feat(redis): Update Redis configuration and enhance compatibility with Docker
- Changed Redis port mapping in `docker-compose.yml` from `6379:6379` to `6380:6379` to avoid conflicts with Windows Redis.
- Updated `.env.example` to reflect the new Redis URL (`redis://127.0.0.1:6380/0`), ensuring proper configuration for Docker users.
- Enhanced Redis client initialization in `database.py` and `redis_gateway.py` to utilize a new `_redis_kwargs` function for improved compatibility with Windows Redis 3.x and Docker Redis 7.
- Added a new PowerShell script `start-redis.ps1` to facilitate starting Redis in Docker, providing a seamless setup experience for developers.

This update significantly improves the Redis integration, ensuring a smoother development process and better compatibility across environments.
2026-09-09 20:19:55 +08:00
zhanghongyu_0626 b841f68295 feat(visitor): Implement visitor chat functionality and enhance customer service interactions
- Added a new visitor chat API endpoint (`/api/chat/visitor`) to allow unauthenticated users to engage in conversations without requiring customer data.
- Introduced a visitor context dependency to manage visitor interactions seamlessly.
- Enhanced the chat API to support explicit session termination and improved response handling for customer service interactions.
- Updated the database configuration to include Redis client support for caching visitor data.
- Added a new customer note repository to persist user notes independently of the L1 profile slots.

This update significantly improves the customer service experience by enabling visitor interactions and ensuring efficient data handling for both registered and unregistered users.
2026-09-09 18:32:00 +08:00
zhanghongyu_0626 ad930c26b1 feat(frontend): Implement initial P0 scaffolding and enhance dashboard features
- Established the P0 scaffolding for the frontend, including login, layout, and routing for four roles.
- Integrated the Customer Wealth Dashboard, Advisor Clients Dashboard, Analyst Market Dashboard, and Risk Alerts Dashboard.
- Updated the API client to support fetching customer and product data, enhancing the overall functionality of the dashboard.
- Added error handling components to improve user experience during data fetching.
- Enhanced charting capabilities using Ant Design Charts for better data visualization.

This update lays the groundwork for further development of the frontend application, ensuring a robust structure for future features and integrations.
2026-09-09 15:50:33 +08:00
zhanghongyu_0626 f87e11f104 feat(merge): 完成 AL-09 合并接线,整合风控模块与宿主 Wave 0
- 合并 `risk-control-agent` 分支至 `merger`,实现 JWT 统一与模块 API 恢复。
- 更新 `auth_service` 和 `auth_adapter`,确保对外登录/token 统一。
- 增强 chat 模块,支持会话管理与流式对话(SSE)。
- 测试基线更新至 502 passed, 1 skipped,确保系统稳定性。

此更新标志着风控模块的成功集成,提升了系统的整体功能与可维护性。
2026-09-08 20:00:39 +08:00
GaoYiYuan_0626 1ac331b281 docs: 阶段一 AL-01~08 完成落账 + 文档同步——六件套反映换核完成(406 绿基线 425→406/SUIT-001~008 退役改 core_ro.check_suitability C×R 矩阵+JR-AST/FM 契约/risk_suitability_log 21 列/种子 33 客户 14 产品/risk-m1 已补打指向 3c07de6);TODO 进行中改阶段一验收门(唯一卡点=用户目视确认)+AL-09/10/11 待办;ITERATION 追加阶段一完成行;REQUIREMENTS R-02 换核标注;开发计划 M1 改已补打;入库存档《修改报告-对齐main基准.md》(阶段一执行依据)与《实现方案-风控追加需求v1.1-C4C6.md》(阶段二编码依据);吸收上会话遗留同步(分支口径 risk-control-agent/PRD v1.1 冻结标注/T-21 评审闭环/T-03/C1~C3 落账/交接文档指引) 2026-09-07 18:01:16 +08:00
GaoYiYuan_0626 5f32dd349c docs: T-03 文档同步(378 绿, 评审 PASS with findings P0=0)——TODO 勾选 + MEMORY/FRAMEWORK/REQUIREMENTS F-03 状态改为完成 + 下一步 T-21/前端 2026-09-07 11:18:28 +08:00
GaoYiYuan_0626 301c78edc3 feat: T-04 Core RO Tool 节点——chat Tool 接入+归属校验+agent_tool_call 落库
- app/tool/core_tools.py: 三只读 Tool(query_customer_profile/holdings/recent_trades, Core RO 仅 SELECT) + TOOL_REGISTRY 白名单(requires_customer); JSON 安全化(Decimal 两位/时间 isoformat)
- app/service/tool_service.py: match_intent 关键词意图(仅 customer/advisor; risk/analyst 空转归 C1/C2) + assert_tool_access 归属断言(customer 本人/advisor assigned/risk_officer 全量/其余拒, 口径对齐 deps.assert_customer_access) + run_tool 编排(白名单→校验→执行→agent_tool_call 落库, 落库失败降级 warning)
- agent_service: 图 START→tool→llm→guard; Tool 结果注入 LLM 上下文(SystemMessage); 降级回复带 Tool 摘要; chat() 可选 session 上下文(缺省空转, T-07 兼容)
- session_repository: insert_tool_call(message_id 一期 NULL, session_id+trace_id 可还原)
- 归属拒绝口径: Tool 层不抛 403 改 blocked 留痕(AUTH_403_* 同码), 对话内呈现——API 层 deny 铁律不变
- tests: test_chat_tools 20 例(三态+落库字段+降级+图注入) + test_chat 4 例(全链路/JWT 外 debug 通道), _ddl 补 agent_tool_call/core_holding, 297 绿
- 真库冒烟: uvicorn+真 MySQL/Redis chat 触发持仓查询 success 落痕 47ms, 现场已清理
2026-09-07 08:43:36 +08:00
GaoYiYuan_0626 b97e77747a docs: M2 收尾复核闭环(M4)+Wave 0 状态同步——M4 复核记录(任务映射/T-30~T-32 边界收口/成功体不包裹演进口径维持/agent_message.trace_id 请求级口径/会话枚举取舍登记), TODO(T-01/T-02/T-06/T-07 勾选+T-30~T-32 收口), MEMORY(§0 进度/仓库地图/下一步/273 绿), FLOW(§0 JWT 已做/§1 链路/§2 对话主链路状态), FRAMEWORK(能力模块+分层), REQUIREMENTS(F-01/F-02 完成/F-03 部分), 开发计划头注, 演示 SOP 补 JWT 通道签发演示 2026-09-07 03:08:27 +08:00
GaoYiYuan_0626 6195349dd6 feat: main 集成(路由挂载/trace 中间件/lifespan) + B7 挂账收口(引擎工厂/统一错误体/锁公共化/L3 缓存 DEL/死代码清理/处置原子事务/启动期 debug 校验, B7) 2026-09-06 20:48:50 +08:00
GaoYiYuan_0626 487b9da5b1 docs: 风控模块 PRD v1.0/规则附表/架构 v1.1/开发计划 v1.1 + 文档联动修正 2026-09-06 15:09:13 +08:00
zhanghongyu_0626 1ddd44a6cb Add core database support and enhance documentation
- Introduced `MYSQL_CORE_DATABASE` in `.env.example` and `settings.py` for core database configuration.
- Added `CoreReadOnlyRepository` for read-only access to the `jinrong_core` database.
- Updated `AGENTS.md`, `README.md`, and various documentation files to reflect new agent onboarding processes and project structure.
- Revised requirements in `requirements.txt` to include `langgraph` and `langchain-core`.
- Enhanced `FLOW.md` with local bootstrap instructions for setting up the core simulation environment.
- Added new scripts for database creation and seeding for the core simulation library.
- Improved overall documentation for clarity on project architecture and memory management.
- Updated `TODO.md` to reflect current development priorities and tasks.
2026-09-05 17:39:16 +08:00
zhanghongyu_0626 0374010b37 Implement initial project structure and setup 2026-09-05 17:09:21 +08:00