List recent checkpoints. Args: limit: Maximum number of checkpoints to return Returns: List of checkpoint info dicts
(limit: int = 10)
| 243 | |
| 244 | |
| 245 | def 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 | |
| 270 | def get_latest_checkpoint() -> Optional[str]: |
nothing calls this directly
no test coverage detected