auto-sync: 2026-05-29 21:10:38

This commit is contained in:
cfdaily
2026-05-29 21:10:38 +08:00
parent a85450e3f3
commit 3f9b6975a5
+17
View File
@@ -19,6 +19,23 @@ from src.blackboard.operations import Blackboard
from src.blackboard.queries import Queries
from src.utils import get_data_root
def _get_valid_agents() -> set:
"""从 config/default.yaml 读取有效 Agent ID 列表"""
config_path = Path(__file__).parent.parent / "config" / "default.yaml"
if config_path.exists():
import yaml
try:
with open(config_path) as f:
cfg = yaml.safe_load(f)
profiles = cfg.get("daemon", {}).get("agent_profiles", {})
if profiles:
return set(profiles.keys())
except Exception:
pass
# fallback:硬编码
return {"zhangfei-dev", "guanyu-dev", "zhaoyun-data", "jiangwei-infra", "pangtong-fujunshi", "simayi-challenger"}
router = APIRouter(prefix="/api/mail", tags=["mail"])
MAIL_PROJECT_ID = "_mail"