Files
xiaoyin-gateway/.gitignore
T
jidekin 09b79c1306 feat(calllog): 调用日志落地(SQLite / 90 天 / 管理员可查全部)
- app/calllog.py:SQLite 表 api_calls(21 列,含提示词与回复)+ 异步批量写 + 双向握手
  (流式请求的访问日志条目比响应晚到也能落库)+ 早失败补记 + 失败也记 Key 前 8 位
- 新增 4 个仅管理员端点:/logs/calls、/logs/calls/stats、/logs/calls/{id}、/logs/calls/export
- 前端:日志页新增「实时 / 调用日志」页签,新组件 CallLogs.vue(筛选/分页/详情/CSV 导出)
- 保留 90 天;队列满丢弃计数,不反压请求;零新依赖
- docs:新增 docs/call-log-design.md(方案对比与三个关键设计)
- 版本 2.7.3 → 2.8.0
2026-10-23 10:02:07 +08:00

66 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ── 缓存 / 构建产物 ──
__pycache__/
*.pyc
*.pyo
.pytest_cache/
.venv/
venv/
*.log
# ── 本地敏感文件 ──
.env
.env.*
!.env.example
# 账号体系数据:密码哈希 + API Key 哈希,属凭证材料,不入库
data/users.json
# 前端历史(提示词/回答正文属隐私)
data/history.json
# 意见反馈(正文 + 图片,属隐私)
data/feedback.json
data/feedback_media/
# 单测运行时会往项目根写这几个临时数据文件(test_gateway.py 用),别入库
.test_users.json
.test_history.json
.test_feedback.json
.test_feedback_media/
.test_sessions.json
.test_video_owners.json
.test_env
# 运行期状态(第三十轮):会话落盘 / 视频归属落盘 —— 都是运行数据,且含账号名与凭证哈希,
# 属"可重新生成、不该进版本库"的一类(重启后从空开始,语义上无害)
data/sessions.json
data/video_owners.json
# 智能体运行记录(第三十八轮):运行时数据(谁在什么时候用了哪个智能体),
# 与 sessions.json 同理 —— 可重新生成、不该进版本库。
# 注意 data/agents.yaml 是**配置**(不含秘密),按计划 ⑯ **要入库**。
data/agent_runs.json
data/agents.yaml.bak
# 配置自动备份(每存一次网关配置就多一对):不该跟着源码走,也不该在仓库里堆历史版本
data/*.bak
# 说明:data/gateway.yaml 不含明文 Key —— 三家供应商密钥统一在 .env(已被上面忽略),
# 由 yaml 各供应商的 token_env 引用。只要 .env 不提交,密钥就不会进版本库。
# ── 设计稿(不入库,历史上从未入库)──────────────────────────────────
# design/v1、v2、v3 是"出设计图"用的脚本 + 渲染出的 PNG(约 11MB)。
# 它们与产品构建、网关运行完全无关,且 2026-09-13 曾被清理归档到
# /root/.trash/2026-09-13-api-gateway-cleanup/design/(cp -a 可恢复)。
# 需要时本地恢复即可,不进版本库。
design/
# ── 依赖与构建产物(不入库,均可重新生成:npm ci && npm run build)──
node_modules/
frontend/node_modules/
frontend/dist/
dist/
*.egg-info/
.DS_Store
# 调用日志数据库(2026-10-23 落地方案):运行时生成,不入库
data/calllog.db
data/calllog.db-wal
data/calllog.db-shm