# AI Gateway Go 0.10.0 clean deployment bundle Generated on 2026-08-11 from `/home/ben/ai-gateway-go`. Included: - Go backend and worker source - 21 PostgreSQL migrations - Admin and portal Art Design Pro source - OpenAPI contract, operations documents and legacy migration tools - Local and production Docker Compose definitions Excluded: - `node_modules`, frontend `dist`, Go binaries and caches - local `.env`, `deploy/production.env`, logs and coverage output - database volumes, Redis data and all runtime credentials Start with `deploy/PRODUCTION.md`. Verify the accompanying ZIP checksum before copying the bundle to a deployment host. ## 0.11.2 — 旗舰版第三轮完善 发布时间:2026-08-13 新增功能: - **门户通用聊天**:门户工作台新增「通用聊天」页面,选择已批准模型直接对话, 支持会话管理(新建/改名/删除/历史)。模型权限申请审批通过后,系统自动为该 用户开通一把 gateway API Key(加密落库 `portal_user_runtime_credentials`, 限额取批准申请值),聊天调用经受管网关执行,认证/限流/配额/审计与外部 API Key 完全同权;会话消息沿用哈希链完整性校验与 busy 租约防并发。 - **企微/钉钉/飞书扫码登录**:`identity_providers` 表扩展 wecom/dingtalk/feishu kind,管理端「账号与权限 → 扫码登录」配置身份源(AppID/AppSecret/AgentID、 回调 URL、自动开户、默认部门)。登录页自动展示已启用身份源按钮,回调经 one-time state 防 CSRF,支持三种平台 code 换取身份协议;未绑定账号默认 需先在「账号安全」扫码绑定(同一平台账号全局唯一绑定),可开启自动开户。 - **个人安全策略**:门户「账号安全」页面提供登录设备管理(IP/UA/时间,可 吊销任意非当前会话)、新设备登录提醒开关(默认开启,经 outbox → 站内信, 可单独关闭)、扫码登录绑定/解绑。 迁移:000038_portal_chat / 000039_social_login / 000040_security_prefs / 000041_inbox_security_category(共 41 个迁移)。 安全要点: - 扫码登录 state 为 128-bit 一次性令牌(5 分钟),回调原子消费; provider_uid 全局唯一,防止平台账号同时绑定多个本系统账号。 - 会话索引只存令牌 SHA-256 摘要,列表时惰性清理过期项;当前会话不可吊销。 - 登录提醒事件只落站内信,不包含凭据;开关按账号独立生效。