feat(agents): Phase3.2 Agent凭据Fernet加密存储 写入加密+调用点解密+返回脱敏+主密钥持久化防竞态 [v2026.07.19.7]
CI / gate (push) Has been cancelled

This commit is contained in:
QihuAI Design committed 2026-07-19 15:27:15 +08:00
1 parent 0600c37b9e
commit 3b34ba78b8
6 files changed
+1073 -946

No files matched your search

+2 -1
View File
@@ -5,6 +5,7 @@ AIFlow 数据库模型定义 - SQLAlchemy ORM
import uuid
from datetime import datetime, date
from sqlalchemy import (
Text,
Column, String, Integer, BigInteger, Float, Boolean,
DateTime, Date, Text, Enum, ForeignKey, Index, JSON,
DECIMAL, UniqueConstraint
@@ -299,7 +300,7 @@ class MarketApp(Base):
platform = Column(String(20), default=None, comment="Agent 接入平台:dify/n8n/coze")
capability = Column(String(20), default=None, comment="能力分类:text/thinking/vision/tool/image/audio/asr/ocr/embedding/rerank/video")
agent_endpoint = Column(String(500), default=None)
agent_api_key = Column(String(500), default=None, comment="单个Agent接入的API Key")
agent_api_key = Column(Text, default=None, comment="Agent 接入 API Key(3.2 起 Fernet 加密存储)")
tool_policy = Column(JSON, default=None, comment="Agent 工具/MCP 权限沙箱策略(3.1)")
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)