Files
group_xinghuo_jinrong/AGENTS.md
T
zhanghongyu_0626 bf8f271840 feat(redis): Update Redis configuration and enhance compatibility with Docker
- Changed Redis port mapping in `docker-compose.yml` from `6379:6379` to `6380:6379` to avoid conflicts with Windows Redis.
- Updated `.env.example` to reflect the new Redis URL (`redis://127.0.0.1:6380/0`), ensuring proper configuration for Docker users.
- Enhanced Redis client initialization in `database.py` and `redis_gateway.py` to utilize a new `_redis_kwargs` function for improved compatibility with Windows Redis 3.x and Docker Redis 7.
- Added a new PowerShell script `start-redis.ps1` to facilitate starting Redis in Docker, providing a seamless setup experience for developers.

This update significantly improves the Redis integration, ensuring a smoother development process and better compatibility across environments.
2026-09-09 20:19:55 +08:00

44 lines
2.4 KiB
Markdown
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.
# Agent
**无上下文时先读** [docs/memory/MEMORY.md](docs/memory/MEMORY.md) **§0 交接清单**(5 分钟了解仓库地图、bootstrap、禁止项、下一步)。
## 阅读顺序
| 顺序 | 文件 | 何时 |
| --- | --- | --- |
| 1 | `docs/memory/MEMORY.md` | 每次任务 |
| 2 | `docs/memory/TODO.md` | 取当前待办 |
| 3 | `docs/memory/REQUIREMENTS.md` | 对照场景 ID(F/C/A/D/R) |
| 4 | `docs/memory/FRAMEWORK.md` | 分层、选型、**实现状态表** |
| 5 | `docs/memory/FLOW.md` | 端到端链路 + §0 bootstrap |
| 6 | `docs/memory/ENVIRONMENT.md` | As-Is;Core 为模拟库 |
## 原文与深度文档
- 业务需求:`docs/需求拆解/`
- **代销平台 API 契约:** `docs/项目框架设计/接口契约-代销平台API-v0.1.md`(canonical 路径 · 命名 · Agent 迁移表)
- **行情 Phase B(草案):** `docs/项目框架设计/接口契约-代销平台API-v0.2-行情扩展草案.md` · `docs/项目框架设计/C-05-行情数据源选型对比.md`
- 表结构 SQL:`docs/项目框架设计/表设计/`
- 技术选型 / JWT:`docs/项目框架设计/技术选型和版本/`
- Core 模拟底座:`docs/项目框架设计/Core模拟底座/`
- 业务记忆分层:`docs/业务记忆管理/业务记忆管理手册.md`
## 代码入口
```text
app/main.py # FastAPI:AL-09 已集成(宿主 TraceMiddleware + 模块 audit/trace + auth/chat/risk/simulate)
app/api/auth.py # Mock 登录;JWT 统一走 auth_service.issue_dev_token
app/api/auth_adapter.py # S2 接缝:module_auth_from_host(宿主 AuthContext → 模块 AuthContext)
app/api/chat.py # 对话:POST "" + sessions 三端点(B)+ POST /stream SSE(C)
app/api/deps.py # 模块鉴权工厂(Bearer 优先,dev debug 头兜底)+ 归属断言
app/gateway/ # 宿主 Wave 0 鉴权四件套(与 deps 双栈并存;模块禁止 import)
app/service/auth_service.py # Auth SDK:JWT 验签/吊销/签发
app/config/settings.py # 双库 + risk_* 阈值 + JWT(issuer/audience 统一)
app/repository/core_ro.py # Core 只读 + check_suitability(R-02)
scripts/core/reset.ps1 # 本地灌 Core 模拟库
```
**当前分支:** `merger` · **测试基线:** `python -m pytest` → 730 passed · **Redis:** Docker `6380` · **前端:** `cd web && npm run build/test`
技术选型硬阀门见 MEMORY 第 3、7 节。Cursor 以 `.cursor/rules/project-memory.mdc` 为准。