26 lines
2.0 KiB
Python
26 lines
2.0 KiB
Python
"""Explicit, reviewable catalogue of Redis-backed read APIs."""
|
|
|
|
API_CACHE_CATALOG = (
|
|
("agents", "智能体列表", ["/api/agents"], "按用户、权限及筛选条件隔离"),
|
|
("skills", "技能列表", ["/api/skills"], "按用户、权限及筛选条件隔离"),
|
|
("sensitive_words", "展示脱敏词", ["/api/sensitive-words"], "全局配置"),
|
|
("user_preferences", "个人偏好", ["/api/user-preferences"], "按用户隔离"),
|
|
("user_prompts", "常用提示词", ["/api/user-prompts"], "按用户隔离"),
|
|
("recommended_questions", "推荐问题", ["/api/recommended-questions"], "按用户及筛选条件隔离"),
|
|
("light_apps", "轻应用目录", ["/api/light-apps", "/api/light-apps/sidebar", "/api/light-apps/{app_id}"], "全局共享;按类型、菜单、搜索及标签筛选隔离"),
|
|
("menu_overrides", "完整菜单配置", ["/api/menu-overrides"], "按用户及管理员角色隔离"),
|
|
("compact_menu_overrides", "简洁菜单配置", ["/api/compact-menu-overrides"], "按用户、管理员角色及 A/B 菜单类型隔离"),
|
|
("task_buttons", "任务跳转按钮", ["/api/task-buttons"], "全局配置"),
|
|
("business_mapping", "业务智能体映射", ["/api/business-mapping"], "全局配置"),
|
|
(
|
|
"html_templates", "HTML 模板目录",
|
|
["/api/html-templates", "/api/html-templates/{template_id}", "/api/html-templates/{template_id}/content", "/api/scheduled-tasks/html-templates"],
|
|
"全局共享;分别缓存列表、详情和正文",
|
|
),
|
|
("models", "模型能力目录", ["/api/models", "/api/models/{model_name}"], "仅缓存数据库能力目录;模型配置实时读取"),
|
|
("tags", "标签目录", ["/api/tags", "/api/tags/assignments/{target_type}/{target_id}"], "全局共享;按标签类型及目标资源隔离"),
|
|
("browser_status", "浏览器状态", ["/api/browser-context/status"], "全局配置;访问开关优先"),
|
|
)
|
|
|
|
API_READ_CACHE_COLLECTIONS = tuple(item[0] for item in API_CACHE_CATALOG)
|