MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / list_projects

Function list_projects

server/routers/projects.py:116–145  ·  view source on GitHub ↗

List all registered projects.

()

Source from the content-addressed store, hash-verified

114
115@router.get("", response_model=list[ProjectSummary])
116async def list_projects():
117 """List all registered projects."""
118 _init_imports()
119 assert _check_spec_exists is not None # guaranteed by _init_imports()
120 (_, _, _, list_registered_projects, validate_project_path,
121 get_project_concurrency, _) = _get_registry_functions()
122
123 projects = list_registered_projects()
124 result = []
125
126 for name, info in projects.items():
127 project_dir = Path(info["path"])
128
129 # Skip if path no longer exists
130 is_valid, _ = validate_project_path(project_dir)
131 if not is_valid:
132 continue
133
134 has_spec = _check_spec_exists(project_dir)
135 stats = get_project_stats(project_dir)
136
137 result.append(ProjectSummary(
138 name=name,
139 path=info["path"],
140 has_spec=has_spec,
141 stats=stats,
142 default_concurrency=info.get("default_concurrency", 3),
143 ))
144
145 return result
146
147
148@router.post("", response_model=ProjectSummary)

Callers

nothing calls this directly

Calls 6

list_registered_projectsFunction · 0.90
validate_project_pathFunction · 0.90
_init_importsFunction · 0.85
_get_registry_functionsFunction · 0.85
get_project_statsFunction · 0.85
ProjectSummaryClass · 0.50

Tested by

no test coverage detected