Creator App Tests / PR Spam Gate (push) Skipped
Frontend Tests / PR Spam Gate (push) Skipped
NPM Format (website & console) / PR Spam Gate (push) Skipped
Pre-commit Checks / PR Spam Gate (push) Skipped
QwenPaw Creator Plugin Release / check-version (push) Canceled after 0s
QwenPaw Creator Plugin Release / upload-oss (push) Canceled after 0s
Tests / PR Spam Gate (push) Skipped
CodeQL / CodeQL (python) (push) Canceled after 0s
CodeQL / CodeQL (typescript) (push) Canceled after 0s
Creator App Tests / Creator Backend Tests (push) Canceled after 0s
Creator App Tests / Creator UI Build & Tests (push) Canceled after 0s
E2E Smoke Tests / Playwright UI Smoke (push) Canceled after 0s
Frontend Tests / Detect console changes (push) Canceled after 0s
NPM Format (website & console) / website format check (push) Canceled after 0s
NPM Format (website & console) / console format check (push) Canceled after 0s
Pre-commit Checks / Pre-commit (push) Canceled after 0s
QwenPaw Data Plugin Release / check-version (push) Canceled after 0s
Tests / Detect code changes (push) Canceled after 0s
Frontend Tests / Vitest Unit Tests (push) Canceled after 0s
Frontend Tests / Frontend Summary (push) Canceled after 0s
QwenPaw Data Plugin Release / upload-oss (push) Canceled after 0s
Tests / Maintainer Approval (push) Canceled after 0s
Tests / Unit Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - fallback (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p2 (push) Canceled after 0s
Tests / Coverage Report (push) Canceled after 0s
Tests / Test Summary (push) Canceled after 0s
79 lines
2.7 KiB
Python
79 lines
2.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
# flake8: noqa: E501
|
|
"""Composition root for the unique Creator API.
|
|
|
|
Routes in this router intentionally begin at ``/projects``. The QwenPaw host
|
|
mounts the router at ``/qwenpaw-creator`` and standalone development mounts it at
|
|
``/api/qwenpaw-creator``.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from fastapi import APIRouter, Depends
|
|
from services.project_files.facade import CreatorFileServices
|
|
from services.runtime_files.runtime_dependencies import (
|
|
creator_runtime_dependency_health,
|
|
)
|
|
|
|
from .file_asset_routes import router as file_assets_router
|
|
from .example_routes import router as examples_router
|
|
from .file_execution_routes import router as file_execution_router
|
|
from .file_media_routes import router as file_media_router
|
|
from .file_session_routes import router as file_sessions_router
|
|
from .file_source_intelligence_routes import (
|
|
router as file_source_intelligence_router,
|
|
)
|
|
from .model_routes import bind_creator_tool_config
|
|
from .model_routes import router as model_router
|
|
from .observability_routes import router as observability_router
|
|
from .project_file_routes import router as project_files_router
|
|
from .project_routes import router as projects_router
|
|
from .work_graph_routes import router as work_graph_router
|
|
from .dependencies import (
|
|
CreatorErrorRoute,
|
|
bind_creator_trace_request,
|
|
project_file_services,
|
|
)
|
|
|
|
router = APIRouter(
|
|
dependencies=[
|
|
Depends(bind_creator_trace_request),
|
|
Depends(bind_creator_tool_config),
|
|
],
|
|
route_class=CreatorErrorRoute,
|
|
)
|
|
router.include_router(projects_router)
|
|
router.include_router(examples_router)
|
|
router.include_router(project_files_router)
|
|
router.include_router(file_assets_router)
|
|
router.include_router(file_source_intelligence_router)
|
|
router.include_router(file_sessions_router)
|
|
router.include_router(file_execution_router)
|
|
router.include_router(file_media_router)
|
|
router.include_router(work_graph_router)
|
|
router.include_router(model_router)
|
|
router.include_router(observability_router)
|
|
|
|
|
|
@router.get("/health", tags=["infrastructure"])
|
|
async def health(
|
|
services: CreatorFileServices = Depends(project_file_services),
|
|
) -> dict[str, Any]:
|
|
project_errors = len(services.startup_recovery.integrity_errors)
|
|
review_errors = len(services.startup_review_recovery.integrity_errors)
|
|
dependencies = creator_runtime_dependency_health()
|
|
return {
|
|
"status": (
|
|
"ok"
|
|
if project_errors + review_errors == 0
|
|
and dependencies["status"] == "ok"
|
|
else "degraded"
|
|
),
|
|
"runtime": "creator-filesystem",
|
|
"projectRecoveryErrors": project_errors,
|
|
"reviewRecoveryErrors": review_errors,
|
|
"dependencies": dependencies,
|
|
}
|