MCPcopy
hub / github.com/garrytan/gstack / GbrainCheckpoint

Interface GbrainCheckpoint

bin/gstack-gbrain-sync.ts:165–171  ·  view source on GitHub ↗

* gbrain writes ~/.gbrain/import-checkpoint.json on every import run. If a * previous /sync-gbrain hit the timeout (SIGTERM = exit 143), the checkpoint * + its staging dir survive on disk. Detect both and let gbrain resume from * processedIndex+1 on the next run. If the staging dir is missing/emp

Source from the content-addressed store, hash-verified

163 * user sees we noticed. See #1611 + plan D1/C1.
164 */
165interface GbrainCheckpoint {
166 dir?: string;
167 totalFiles?: number;
168 processedIndex?: number;
169 completedFiles?: number;
170 timestamp?: string;
171}
172
173export function readGbrainCheckpoint(): GbrainCheckpoint | null {
174 // Read HOME from env so tests can redirect via process.env.HOME = ...

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected