MCPcopy Create free account
hub / github.com/apache/maka / recordHistoryCompactCheckpoint

Method recordHistoryCompactCheckpoint

packages/runtime/src/agent-run.ts:495–519  ·  view source on GitHub ↗
(checkpoint: HistoryCompactCheckpoint)

Source from the content-addressed store, hash-verified

493 }
494
495 recordHistoryCompactCheckpoint(checkpoint: HistoryCompactCheckpoint): Promise<void> {
496 if (!this.input.runStore) return Promise.reject(new Error('AgentRun store is not configured'));
497 if (!this.runStoreAvailable) return Promise.reject(new Error('AgentRun store is unavailable'));
498 return this.enqueueRunStore(
499 'append history compact checkpoint',
500 async () => {
501 await this.input.runStore?.appendEvent(this.sessionId, this.runId, {
502 type: 'history_compact_checkpoint_recorded',
503 id: this.input.newId(),
504 runId: this.runId,
505 sessionId: this.sessionId,
506 turnId: this.turnId,
507 ts: this.input.now(),
508 data: {
509 checkpointId: checkpoint.checkpointId,
510 highWaterName: checkpoint.highWaterName,
511 highWaterSeq: checkpoint.highWaterSeq,
512 boundaryKind: 'historyCompact',
513 checkpoint,
514 },
515 });
516 },
517 { rethrow: true },
518 );
519 }
520
521 /**
522 * Durable read of this run's RuntimeEvent ledger for the mid-turn capacity

Callers 9

recordMethod · 0.80
sendMethod · 0.80
sendMethod · 0.80
sendMethod · 0.80
sendMethod · 0.80
sendMethod · 0.80
sendMethod · 0.80
sendMethod · 0.80
sendMethod · 0.80

Calls 5

enqueueRunStoreMethod · 0.95
rejectMethod · 0.65
appendEventMethod · 0.65
newIdMethod · 0.65
nowMethod · 0.65

Tested by 8

sendMethod · 0.64
sendMethod · 0.64
sendMethod · 0.64
sendMethod · 0.64
sendMethod · 0.64
sendMethod · 0.64
sendMethod · 0.64
sendMethod · 0.64