merge: integrate MCP research and key management
Deploy production / deploy (push) Successful in 1m5s

This commit is contained in:
yuxuanhui
2026-09-09 16:18:40 +08:00
47 changed files with 2642 additions and 44 deletions
+13
View File
@@ -81,6 +81,7 @@ def create_test_app():
_env_file=None,
database_url=f"sqlite+aiosqlite:///{temporary.name}/test.db",
admin_password=TEST_PASSWORD,
mcp_enabled=True,
encryption_key=Fernet.generate_key().decode(),
public_origin=os.environ.get("BROWSER_TEST_ORIGIN", "http://127.0.0.1:5179"),
)
@@ -206,6 +207,18 @@ def create_test_app():
application = create_app(
settings, WqClient(settings, transport=httpx.MockTransport(upstream)), ai_model_factory=fake_model
)
# Test-only fixture, excluded from production images by .dockerignore.
from fastapi import Depends
from app.mcp_api.auth import SCOPES, create_token
from app.security import require_auth
@application.post("/api/v1/test/mcp-token", dependencies=[Depends(require_auth)])
async def synthetic_token():
async with application.state.sessions.begin() as db:
_, token = await create_token(db, "browser-fixture", SCOPES)
return {"token": token}
original_lifespan = application.router.lifespan_context
@asynccontextmanager