MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / list_checkpoints

Function list_checkpoints

core/checkpoint.py:245–267  ·  view source on GitHub ↗

List recent checkpoints. Args: limit: Maximum number of checkpoints to return Returns: List of checkpoint info dicts

(limit: int = 10)

Source from the content-addressed store, hash-verified

243
244
245def list_checkpoints(limit: int = 10) -> List[Dict]:
246 """
247 List recent checkpoints.
248
249 Args:
250 limit: Maximum number of checkpoints to return
251
252 Returns:
253 List of checkpoint info dicts
254 """
255 state = get_state_store()
256 checkpoints = state.get_checkpoints(limit)
257
258 result = []
259 for cp in checkpoints:
260 result.append({
261 "id": cp["id"],
262 "created_at": cp["created_at"],
263 "reason": cp["reason"],
264 "git_commit": cp["git_commit_hash"][:8] if cp["git_commit_hash"] else None,
265 })
266
267 return result
268
269
270def get_latest_checkpoint() -> Optional[str]:

Callers

nothing calls this directly

Calls 3

get_state_storeFunction · 0.90
get_checkpointsMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected