Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
1.7 KB
Raw Blame

Google connector sweeps (key files cluster)

Subsystem index · Google connector + open-loop engine · Previous entries.

  • src/core/google/sweep-shared.ts — the per-run dependency bag (GoogleSyncDeps, GoogleSyncSummary) and the page write and delete primitives the contacts, calendar and Gmail sweeps share. importRendered sends a managed source's render to ManagedConnectorSync.importMarkdown and returns null when the session skipped it as purged content (purged: true, #8938), so the Gmail sweep derives no loops from it. On an unmanaged source it carries the stored fences into the render, then screens it against the source's page purge tombstones (intentCarriesPurgedContent, the content hash the import guard compares) and skips a match with one log line naming gbrain pages unpurge, before any drift check or file write, as the managed connector skips it. Otherwise replaceableFile (facts/file-body-guard.ts) decides whether the checkout file may be replaced; its alsoHeldAs callback gets each stored state and puts that state's own ## Facts fence back into a file that lacks one (the live row stores the fence without the withdrawal overlay a page read adds, versions store the overlaid view), so a file missing only gbrain's fence is replaceable and any other file edit refuses file_database_drift. The render is written to a private temporary file, imported, checked against the compared bytes and renamed over the page. deletePageByRelPath deletes by recorded source path inside the source directory. Tests: test/google-classic-purged-item-8644.test.ts, test/google-withdrawn-fence-carry-8645.test.ts, test/google-connector-facts-fence-7292.test.ts.