MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / api_list_bundles

Function api_list_bundles

backend/app/routes/tool/plugin.py:19–46  ·  view source on GitHub ↗
(
    request: Request,
    data: BundleListRequest = Depends(),
    auth_info: Dict = Depends(auth_info_required),
)

Source from the content-addressed store, hash-verified

17 response_model=BaseListResponse,
18)
19async def api_list_bundles(
20 request: Request,
21 data: BundleListRequest = Depends(),
22 auth_info: Dict = Depends(auth_info_required),
23):
24 bundles, total, has_more = list_bundles(
25 limit=data.limit,
26 offset=data.offset,
27 )
28
29 bundle_registered_dict = await get_bundle_registered_dict(
30 bundle_ids=[bundle.bundle_id for bundle in bundles],
31 )
32
33 results = []
34 for bundle in bundles:
35 plugins = list_plugins(bundle.bundle_id)
36 result = bundle.to_dict(data.lang)
37 result["registered"] = bundle_registered_dict.get(bundle.bundle_id, False)
38 result["plugins"] = [plugin.to_dict(data.lang) for plugin in plugins]
39 results.append(result)
40
41 return BaseListResponse(
42 data=results,
43 fetched_count=len(bundles),
44 total_count=total,
45 has_more=has_more,
46 )
47
48
49@router.get(

Callers

nothing calls this directly

Calls 6

BaseListResponseClass · 0.90
list_bundlesFunction · 0.50
list_pluginsFunction · 0.50
to_dictMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected