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

Method build

backend/app/models/tool/bundle_instance.py:27–49  ·  view source on GitHub ↗
(row)

Source from the content-addressed store, hash-verified

25
26 @staticmethod
27 def build(row):
28 from app.services.tool import list_plugins, get_bundle
29
30 try:
31 plugins = list_plugins(bundle_id=row["bundle_id"])
32 except Exception as e:
33 plugins = []
34
35 bundle = get_bundle(row["bundle_id"])
36
37 return BundleInstance(
38 bundle_instance_id=row["bundle_instance_id"],
39 encrypted_credentials=load_json_attr(row, "encrypted_credentials", {}),
40 display_credentials=load_json_attr(row, "display_credentials", {}),
41 bundle_id=row["bundle_id"],
42 name=row["name"],
43 metadata=load_json_attr(row, "metadata", {}),
44 plugins=plugins,
45 description=bundle.description,
46 icon_url=bundle.icon_url,
47 created_timestamp=row["created_timestamp"],
48 updated_timestamp=row["updated_timestamp"],
49 )
50
51 def to_response_dict(self, **kwargs) -> Dict:
52 from app.services.tool import i18n_text

Callers

nothing calls this directly

Calls 4

list_pluginsFunction · 0.90
get_bundleFunction · 0.90
load_json_attrFunction · 0.90
BundleInstanceClass · 0.85

Tested by

no test coverage detected