Update app.py
Browse files
app.py
CHANGED
|
@@ -168,7 +168,16 @@ class OpenFloorAgent:
|
|
| 168 |
|
| 169 |
if manifests and len(manifests) > 0:
|
| 170 |
self.manifest = manifests[0]
|
| 171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
print(f"✅ DEBUG: Successfully loaded manifest with {len(self.capabilities)} capabilities")
|
| 173 |
return True
|
| 174 |
else:
|
|
|
|
| 168 |
|
| 169 |
if manifests and len(manifests) > 0:
|
| 170 |
self.manifest = manifests[0]
|
| 171 |
+
# Capabilities might be a single dict or list of dicts
|
| 172 |
+
raw_capabilities = self.manifest.get("capabilities", [])
|
| 173 |
+
if isinstance(raw_capabilities, dict):
|
| 174 |
+
# Single capability dict - wrap in list
|
| 175 |
+
self.capabilities = [raw_capabilities]
|
| 176 |
+
elif isinstance(raw_capabilities, list):
|
| 177 |
+
# Already a list
|
| 178 |
+
self.capabilities = raw_capabilities
|
| 179 |
+
else:
|
| 180 |
+
self.capabilities = []
|
| 181 |
print(f"✅ DEBUG: Successfully loaded manifest with {len(self.capabilities)} capabilities")
|
| 182 |
return True
|
| 183 |
else:
|