MCPcopy Create free account
hub / github.com/FareedKhan-dev/ai-long-task / _artifact_deserializer

Method _artifact_deserializer

data/database.py:2428–2432  ·  view source on GitHub ↗

JSON deserializer for artifacts that handles bytes

(self, dct)

Source from the content-addressed store, hash-verified

2426 raise TypeError(f"Object of type {type(obj)} is not JSON serializable")
2427
2428 def _artifact_deserializer(self, dct):
2429 """JSON deserializer for artifacts that handles bytes"""
2430 if "__bytes__" in dct:
2431 return base64.b64decode(dct["__bytes__"])
2432 return dct
2433
2434 def _create_artifact_dir(self, program_id: str) -> str:
2435 """Create artifact directory for a program"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected