chore(prep): shared groundwork for the parallel task batch

多 agent 并行批次的协调提交(消除全部共享文件冲突面):
- 迁移 0004:id_session + ob_event 两表(T3/T4 用,任务不再写迁移)
- ORM:UserSession / ObEvent;错误码:九个新码(40xxx/60006,含 meta)
- 配置:四档 tiers / refresh TTL / 任务奖励注册表 / 埋点上限 / COS 直传全套
- 骨架:packages/analytics + packages/storage + events/uploads 空路由(已注册)
- deps:AnalyticsServiceDep / StorageServiceDep;DailyBudgetGuard 接收 tiers
- uv add cos-python-sdk-v5;import-linter/CI/Makefile 纳入两个新包
This commit is contained in:
xsl
2026-08-14 16:02:54 +08:00
parent 2009aa938c
commit 9e7a886863
20 changed files with 380 additions and 6 deletions
Executable → Regular
+3 -2
View File
@@ -12,7 +12,7 @@ from contextlib import asynccontextmanager
from fastapi import FastAPI
from apps.api.deps import build_llm_gateway
from apps.api.routers import agent, auth, health, quota, tasks
from apps.api.routers import agent, auth, events, health, quota, tasks, uploads
from packages.shared.config import Settings, get_settings
from packages.shared.db import dispose_engine
from packages.shared.handlers import install_exception_handlers
@@ -69,7 +69,8 @@ def create_app(settings: Settings | None = None) -> FastAPI:
setup_tracing(app, cfg)
app.include_router(health.router)
for router in (auth.router, agent.router, quota.router, tasks.router):
routers = (auth.router, agent.router, quota.router, tasks.router, events.router, uploads.router)
for router in routers:
app.include_router(router, prefix=cfg.api_prefix)
return app