phase 3
This commit is contained in:
@@ -64,6 +64,22 @@ def list_profiles():
|
||||
return [{"name": name} for name in _PROFILES]
|
||||
|
||||
|
||||
@router.get("/config/profiles/{profile_name}/pipeline")
|
||||
def get_pipeline_config(profile_name: str):
|
||||
"""Return the pipeline composition for a profile."""
|
||||
from detect.profiles import get_profile
|
||||
from fastapi import HTTPException
|
||||
from dataclasses import asdict
|
||||
|
||||
try:
|
||||
profile = get_profile(profile_name)
|
||||
except ValueError:
|
||||
raise HTTPException(status_code=404, detail=f"Unknown profile: {profile_name}")
|
||||
|
||||
config = profile.pipeline_config()
|
||||
return asdict(config)
|
||||
|
||||
|
||||
@router.get("/config/stages", response_model=list[StageConfigInfo])
|
||||
def list_stage_configs():
|
||||
"""Return the stage palette with config field metadata for the editor."""
|
||||
|
||||
Reference in New Issue
Block a user