Skip to content

Commit 9ce41bc

Browse files
committed
refactor: consolidate snapshot functionality into Store interface
The standalone Checkpointer module was designed but never integrated into the Agent runtime. All snapshot/fork operations already use Store directly: - Agent.snapshot() -> Store.saveSnapshot() - Agent.fork() -> Store.loadSnapshot() This simplifies the codebase by removing the unused abstraction layer, making it clearer for developers which API to use. Removed: - src/core/checkpointer.ts (MemoryCheckpointer) - src/core/checkpointers/ (FileCheckpointer, RedisCheckpointer) - Related tests and exports Updated documentation to reflect the actual API (snapshot vs checkpoint).
1 parent 4fbd2a7 commit 9ce41bc

9 files changed

Lines changed: 6 additions & 522 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ On crash: Resume from last safe breakpoint, auto-seal incomplete tool calls
145145
### 3. Fork & Trajectory Exploration
146146

147147
```typescript
148-
// Create a checkpoint at current state
149-
const checkpointId = await agent.checkpoint('before-decision');
148+
// Create a snapshot at current state
149+
const snapshotId = await agent.snapshot('before-decision');
150150

151151
// Fork to explore different paths
152-
const explorerA = await agent.fork(checkpointId);
153-
const explorerB = await agent.fork(checkpointId);
152+
const explorerA = await agent.fork(snapshotId);
153+
const explorerB = await agent.fork(snapshotId);
154154

155155
await explorerA.chat('Try approach A');
156156
await explorerB.chat('Try approach B');

docs/ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
| Multi-provider | Stable | Anthropic, OpenAI, Gemini, DeepSeek, Qwen, GLM... |
1818
| Tool System | Stable | Built-in + MCP protocol |
1919
| AgentPool | Stable | Up to 50 agents per process |
20-
| Checkpointer | Stable | Memory, File, Redis implementations |
20+
| Snapshot/Fork | Stable | Explore different agent trajectories |
2121
| Context Compression | Stable | Automatic history management |
2222
| Hook System | Stable | Pre/post model and tool hooks |
2323

src/core/checkpointer.ts

Lines changed: 0 additions & 164 deletions
This file was deleted.

src/core/checkpointers/file.ts

Lines changed: 0 additions & 135 deletions
This file was deleted.

src/core/checkpointers/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)