Commit Graph

49 Commits

Author SHA1 Message Date
caoxiaozhu
d460ee0fe7 fix(agent): 修复规则中心表格版本和修改记录
补齐规则资产 JSON 读写接口和前端调用,修复 AuditView 导入缺失。

Excel 在线编辑改为比对所有页签并生成最近修改记录,版本快照统一保存到 rules/finance-rules/.versions。

隔离规则表测试存储,避免测试或旧入口写入真实规则目录与 storage/agent_assets。
2026-05-19 15:41:53 +00:00
caoxiaozhu
9902a3b968 test: 添加 OnlyOffice 回调摘要测试 2026-05-18 09:45:05 +00:00
caoxiaozhu
29df4eee3b test: 添加规则服务与电子表格变更记录的测试用例
- AgentAssetService 测试覆盖版本创建、送审、审核通过等流程
- 新增电子表格变更记录的前端测试
2026-05-18 09:44:04 +00:00
caoxiaozhu
9b97f456cf test: 添加资产和运行服务测试用例 2026-05-18 02:52:13 +00:00
caoxiaozhu
35a3783481 feat: 更新 user_agent 服务,增强用户代理功能 2026-05-18 02:50:32 +00:00
caoxiaozhu
4414ffb34c feat: 增强知识库功能,优化索引和RAG检索 2026-05-18 02:49:39 +00:00
caoxiaozhu
68f663f2f4 feat: 重构知识库系统,移除Hermes集成,增强RAG和同步功能
主要变更:
- 移除Hermes智能体及相关回调服务
- 新增知识库RAG、同步、调度、规范化和索引任务服务
- 重构orchestrator服务,增强运行时聊天功能
- 更新前端聊天、政策制度、设置等页面样式和逻辑
- 更新expense_claims和document_intelligence服务
- 删除llm_wiki相关服务和测试文件
- 更新docker-compose配置和启动脚本
2026-05-17 08:38:41 +00:00
caoxiaozhu
212c935308 feat: 集成Hermes智能体系统,增强聊天和差旅报销功能 2026-05-16 06:14:08 +00:00
caoxiaozhu
6793b6f832 feat(server): 重构知识库服务和路由配置,优化LLM维基知识管理接口,增强知识检索能力 2026-05-15 09:33:59 +00:00
caoxiaozhu
1d5d009bc7 feat(server): 新增系统日志服务模块,包含API端点、schema定义和服务实现,用于系统操作日志记录和查询 2026-05-15 09:33:20 +00:00
caoxiaozhu
ea339d883a feat(server): 新增LLM维基服务,实现大语言模型知识库管理和查询功能 2026-05-15 06:57:45 +00:00
caoxiaozhu
511337df95 feat(server): 更新用户代理服务,新增编排器服务测试用例,完善服务编排能力 2026-05-15 06:56:26 +00:00
caoxiaozhu
c9cc0b0641 feat(server): 扩展智能体基础服务,新增端点测试和资产服务测试用例 2026-05-15 06:56:14 +00:00
caoxiaozhu
68a448a551 feat(server): 优化费用报销服务,改进报销单创建和数据校验逻辑,增强单元测试覆盖 2026-05-15 06:56:00 +00:00
caoxiaozhu
c99a423f6a feat(server): 扩展文档智能识别服务,新增Azure Document Intelligence集成和测试用例 2026-05-14 15:42:29 +00:00
caoxiaozhu
e21f0d82e9 feat(server): 重构报销单服务,优化费用报销流程和数据校验逻辑,包含schema定义和服务实现 2026-05-14 15:42:45 +00:00
caoxiaozhu
ad16358e71 feat(server): 更新用户代理服务架构,增强用户行为追踪和会话管理功能,包含schema、service和单元测试 2026-05-14 15:42:33 +00:00
caoxiaozhu
32a43cf6bb feat(server): 新增编排器服务,实现服务间流程编排和任务调度功能 2026-05-14 12:34:12 +00:00
caoxiaozhu
b0fef46fc6 feat(server): 重构费用报销服务,优化报销单创建和审批流程逻辑 2026-05-14 09:32:36 +00:00
caoxiaozhu
8b39f48dec feat(server): 新增文档智能识别服务,扩展OCR接口支持 Azure Document Intelligence 2026-05-14 09:32:15 +00:00
caoxiaozhu
3c28cab288 test(backend): update auth and employee service tests
- tests/test_auth_service.py: update auth service tests
- tests/test_employee_service.py: update employee service tests
2026-05-14 02:57:00 +00:00
caoxiaozhu
3965c1ec42 test(backend): update employee service tests
- tests/test_employee_service.py: update employee service tests
2026-05-14 02:23:33 +00:00
caoxiaozhu
89f1bd613d test(backend): update orchestrator service tests
- tests/test_orchestrator_service.py: update orchestrator service tests
2026-05-13 15:43:56 +00:00
caoxiaozhu
98792c7584 refactor(backend): update expense claims service and tests
- services/expense_claims.py: update expense claims service
- tests/test_expense_claim_service.py: update expense claim service tests
2026-05-13 15:42:25 +00:00
caoxiaozhu
68a3907920 refactor(backend): update expense claims service and tests
- services/expense_claims.py: update expense claims service
- tests/test_orchestrator_service.py: update orchestrator service tests
2026-05-13 15:33:35 +00:00
caoxiaozhu
bc7aff8858 refactor(backend): update user agent service and tests
- services/user_agent.py: update user agent service
- tests/test_orchestrator_service.py: update orchestrator tests
2026-05-13 13:18:05 +00:00
caoxiaozhu
a6526c5159 test(backend): update orchestrator service tests
- test_orchestrator_service.py: update orchestrator service tests
2026-05-13 13:08:22 +00:00
caoxiaozhu
0f7bd43ce3 test(web): update travel request detail tests and styles
- test_reimbursement_endpoints.py: update reimbursement endpoint tests
- travel-request-detail-view.css: update travel request detail styles
- TravelRequestDetailView.vue: update travel request detail view
2026-05-13 06:56:30 +00:00
caoxiaozhu
13df8fc9dc test(backend): update and add service tests
Updated tests:
- test_ontology_service.py: update ontology service tests

New tests:
- test_expense_claim_service.py: add expense claim service tests
- test_reimbursement_endpoints.py: add reimbursement endpoint tests
2026-05-13 06:46:24 +00:00
caoxiaozhu
4db5e8ec16 refactor(backend): update services and tests
- services/expense_claims.py: update expense claims service
- services/user_agent.py: update user agent service
- tests/test_orchestrator_service.py: update orchestrator service tests
- tests/test_user_agent_service.py: update user agent service tests
2026-05-13 03:39:41 +00:00
caoxiaozhu
bc593d4473 test(backend): update service tests
- test_ontology_service.py: update ontology service tests
- test_orchestrator_service.py: update orchestrator service tests
- test_user_agent_service.py: update user agent service tests
2026-05-12 15:13:57 +00:00
caoxiaozhu
bff20d8eb3 test(backend): update service tests
- test_orchestrator_service.py: update orchestrator service tests
- test_user_agent_service.py: update user agent service tests
2026-05-12 07:20:59 +00:00
caoxiaozhu
e53c0aa5d1 test(backend): update service tests
- test_orchestrator_service.py: update orchestrator service tests
- test_settings_persistence.py: update settings persistence tests
- test_user_agent_service.py: update user agent service tests
2026-05-12 06:37:59 +00:00
caoxiaozhu
a3f3421ebc test(server): add OCR endpoint and service tests
New tests:
- server/tests/test_ocr_endpoints.py: OCR API endpoint tests
- server/tests/test_ocr_service.py: OCR service unit tests

Updated tests:
- server/tests/test_openapi_schema.py: update OpenAPI schema tests
- server/tests/test_orchestrator_service.py: update orchestrator service tests
2026-05-12 03:05:05 +00:00
caoxiaozhu
441e27145d refactor(backend): register ontology and orchestrator routers
- router.py: import and register ontology_router and orchestrator_router
- openapi.py: add ontology and orchestrator tags to OpenAPI documentation
- agent_runs.py: extend agent runs service with additional functionality
- test_openapi_schema.py: update OpenAPI schema tests
2026-05-12 01:26:13 +00:00
caoxiaozhu
22d47cbf2b feat(backend): add ontology and orchestrator API endpoints
New endpoints:
- server/src/app/api/v1/endpoints/ontology.py: ontology API
- server/src/app/api/v1/endpoints/orchestrator.py: orchestrator API

New schemas:
- server/src/app/schemas/ontology.py: ontology data schemas
- server/src/app/schemas/orchestrator.py: orchestrator data schemas
- server/src/app/schemas/user_agent.py: user agent data schemas

New services:
- server/src/app/services/ontology.py: ontology business logic
- server/src/app/services/orchestrator.py: orchestrator business logic
- server/src/app/services/runtime_chat.py: runtime chat service
- server/src/app/services/user_agent.py: user agent service

New tests:
- server/tests/test_ontology_service.py
- server/tests/test_orchestrator_service.py
- server/tests/test_user_agent_service.py
2026-05-12 01:24:39 +00:00
caoxiaozhu
321dd6fdaf feat: 完善后端 API OpenAPI 文档与统一错误响应 schema 2026-05-11 05:18:16 +00:00
caoxiaozhu
b2beeaa136 feat: deliver agent foundation day 1 2026-05-11 03:51:24 +00:00
caoxiaozhu
694ee42781 feat: 添加 Hermite 同步服务与导航优化 2026-05-09 09:14:04 +00:00
caoxiaozhu
4fbd313f35 feat: 支持 ONLYOFFICE 持久化配置管理
- 添加 SettingsRenderForm schema 和 renderForm 字段
- 实现数据库 schema 自动迁移(onlyoffice_enabled, onlyoffice_public_url, onlyoffice_jwt_secret_encrypted)
- 新增 resolve_onlyoffice_settings() 函数支持运行时配置解析
- 知识库服务改用数据库配置替代运行时配置
- 前端添加文件渲染配置页面,支持 JWT 密钥管理
- 完善相关测试覆盖
2026-05-09 08:02:01 +00:00
caoxiaozhu
94122fd34b feat: 完善知识库预览功能与配置管理优化 2026-05-09 07:29:49 +00:00
caoxiaozhu
d9133193e8 feat: 完善知识库、策略预览与OnlyOffice集成,增强后端启动依赖检查 2026-05-09 05:59:46 +00:00
caoxiaozhu
619281afc3 feat: 完善系统配置、安全增强与知识库功能
- .env.example: API基础路径改为相对路径 /api/v1,支持代理转发
- README.md: 完善项目结构与启动说明文档
- docker-compose.yml: 新增Docker编排配置,支持容器化部署
- docker/: 新增Docker部署相关文档与配置

- server_start.sh: 重构启动脚本,添加容器环境检测、隔离虚拟环境路径、环境变量覆盖机制
- deps.py: 完善API依赖注入,增强权限验证逻辑
- admin_secret.py: 优化管理员密钥加密存储与验证
- config.py: 扩展配置管理,支持多环境变量绑定
- security.py: 增强安全模块,完善加密与认证机制
- db/base.py: 优化数据库基础架构与连接管理
- main.py: 更新应用入口,整合新模块路由
- models/: 完善系统模型配置,支持模型设置持久化
- repositories/settings.py: 优化设置仓储层,增强数据持久化
- services/settings.py: 重构设置服务,精简代码结构
- router.py: 更新API路由配置

- endpoints/knowledge.py: 新增知识库API端点
- schemas/knowledge.py: 新增知识库数据模型
- services/knowledge.py: 新增知识库业务逻辑
- storage/knowledge/.index.json: 知识库索引存储

- api.js: 完善API服务层,增强错误处理
- bootstrap.js: 优化前端初始化与引导流程
- useSetupView.js / useSystemState.js: 重构组合式函数
- TopBar.vue: 优化顶部导航栏组件
- SettingsView.vue: 重构设置页面UI,增强用户体验
- SetupView.vue / SetupRouteView.vue: 完善引导流程页面
- PoliciesView.vue: 优化策略视图组件
- vite.config.js: 更新Vite构建配置
- web_start.sh: 完善前端启动脚本
- views/scripts/: 优化各业务视图JS逻辑

- settings-view.css: 重构设置页面样式
- setup-view.css: 完善引导页样式
- policies-view.css: 优化策略页样式

- test_auth_service.py: 完善认证服务测试
- test_settings_persistence.py: 增强设置持久化测试
- document/: 新增开发文档与工作日志
2026-05-09 03:04:40 +00:00
86568660a4 feat: 重构模型配置存储与 API Key 加密管理
主要修改点:

1. 遗留密码格式兼容 (server/src/app/core/admin_secret.py)
   - 新增 legacy_admin_secret_to_password_hash(): 将旧版 admin secret 记录转换为标准 scrypt 哈希格式

2. Scrypt 密码验证增强 (server/src/app/core/security.py)
   - verify_password(): 新增 scrypt$ 前缀检测,分流到专用验证函数
   - 新增 verify_scrypt_password(): 解析 scrypt$ 格式哈希并验证

3. 模型配置存储重构 (server/src/app/models/system_model_setting.py)
   - 新增 SystemModelSetting 模型(slot 为 PK)
   - 字段: slot, provider, model_name, endpoint, capability, priority, enabled, api_key_encrypted, created_at, updated_at

4. Settings Repository 扩展 (server/src/app/repositories/settings.py)
   - 新增 get_model_settings(): 获取所有模型配置
   - 新增 get_model_setting(slot): 按 slot 获取单个模型配置

5. Settings Service 重构 (server/src/app/services/settings.py)
   - 新增 ModelSlotConfig dataclass: 封装单个模型槽位的配置属性
   - 新增 MODEL_SLOT_CONFIGS 字典: main/backup/vlm/embedding 四个槽位配置
   - 重构 save_model_settings(): 批量保存模型配置到 SystemModelSetting 表
   - 新增 load_model_settings(): 从 SystemModelSetting 表加载所有模型配置
   - read_settings(): 整合 legacy secrets 与新的 SystemModelSetting 表数据
   - write_settings(): 拆分 model secrets 到 SystemModelSetting 表
   - decrypt_model_secret(): 新增从数据库读取加密的 API Key

6. 数据库模型注册 (server/src/app/db/base.py)
   - 注册 SystemModelSetting 模型

7. 前端 API URL 智能解析 (web/src/services/api.js)
   - 新增 isLoopbackHost(): 判断是否为回环地址
   - 新增 resolveBrowserReachableApiBaseUrl(): 当后端配置为回环地址但浏览器非回环时,自动替换为浏览器 host
   - 改进错误信息: "无法连接 FastAPI 后端服务,请确认后端已启动且浏览器可访问后端端口。"

8. 前端 Session 导航增强 (web/src/composables/useSystemState.js)
   - installSessionNavigation(): 调用 fetchBootstrapState 后设置运行时 API Base URL

9. Settings 视图增强 (web/src/views/SettingsView.vue)
   - API Key 输入框: 新增 @focus="clearModelSecretMask('xxx')" 清除遮罩
   - 新增 .secret-bound-state 提示: 显示"已从数据库加密加载,测试会使用已保存密钥"

10. Settings 脚本增强 (web/src/views/scripts/SettingsView.js)
    - 新增 clearModelSecretMask(slot): 清除指定槽位的 API Key 遮罩状态

11. CSS 样式 (web/src/assets/styles/views/settings-view.css)
    - 新增 .secret-bound-state 样式: 显示数据库已加载密钥的提示样式
2026-05-08 11:14:04 +08:00
adda87a01d feat: add system settings with model connectivity and encrypted storage 2026-05-08 08:56:52 +08:00
b8ba0ea6a0 feat: add auth module with login and access control 2026-05-07 14:34:42 +08:00
2d56bc2889 feat: enhance employee CRUD with search, filters, and security module 2026-05-07 13:48:00 +08:00
c00db75c13 feat: add employee management, backend health check, and UI improvements 2026-05-07 11:50:10 +08:00
83d7da3d62 feat: add FastAPI backend with PostgreSQL and start script fixes
- Add server/ directory with FastAPI backend
- Fix server/start.sh to properly handle venv on Windows/Git Bash
- Add alembic migrations and pyproject.toml
- Add server tests

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 17:43:47 +08:00