CheckpointMaintenance
Defined in: packages/core/src/history/checkpointRetention.ts:730
The maintenance commands’ handle on one store, or null when there is nothing there. Fail-soft
in the same shape as openHistoryStore / openCheckpointSaver, and it never CREATES a store:
gth history prune on a machine with no history should say there is none, not leave an empty
store behind. It does split a single-file store, like every other open.
Methods
Section titled “Methods”bytesOf()
Section titled “bytesOf()”bytesOf(
threadIds):number
Defined in: packages/core/src/history/checkpointRetention.ts:762
Bytes stored under exactly these threads — what removing them would reclaim.
Parameters
Section titled “Parameters”threadIds
Section titled “threadIds”readonly string[]
Returns
Section titled “Returns”number
close()
Section titled “close()”close():
void
Defined in: packages/core/src/history/checkpointRetention.ts:771
Returns
Section titled “Returns”void
diskBytes()
Section titled “diskBytes()”diskBytes():
number
Defined in: packages/core/src/history/checkpointRetention.ts:767
The bytes the store occupies on disk, for the before/after of a prune.
Returns
Section titled “Returns”number
prunable()
Section titled “prunable()”prunable(
bounds):PrunableConversation[]
Defined in: packages/core/src/history/checkpointRetention.ts:744
Parameters
Section titled “Parameters”bounds
Section titled “bounds”Returns
Section titled “Returns”remove()
Section titled “remove()”remove(
threadIds):ReclaimSummary
Defined in: packages/core/src/history/checkpointRetention.ts:757
Parameters
Section titled “Parameters”threadIds
Section titled “threadIds”readonly string[]
Returns
Section titled “Returns”stats()
Section titled “stats()”stats(
topN?):CheckpointStoreStats
Defined in: packages/core/src/history/checkpointRetention.ts:740
Parameters
Section titled “Parameters”number = DEFAULT_TOP_THREADS
Returns
Section titled “Returns”unaddressable()
Section titled “unaddressable()”unaddressable(
options?):string[]
Defined in: packages/core/src/history/checkpointRetention.ts:748
Parameters
Section titled “Parameters”options?
Section titled “options?”graceMs?
Section titled “graceMs?”number
number
Returns
Section titled “Returns”string[]
writeOnly()
Section titled “writeOnly()”writeOnly(
options?):string[]
Defined in: packages/core/src/history/checkpointRetention.ts:753
GS2-108 — threads holding pending writes and no checkpoint, which only a prune reclaims.
Parameters
Section titled “Parameters”options?
Section titled “options?”excludeThreadIds?
Section titled “excludeThreadIds?”readonly string[]
Returns
Section titled “Returns”string[]
open()
Section titled “open()”
staticopen(storePath):CheckpointMaintenance|null
Defined in: packages/core/src/history/checkpointRetention.ts:733
Parameters
Section titled “Parameters”storePath
Section titled “storePath”string
Returns
Section titled “Returns”CheckpointMaintenance | null