MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / syncedSet

Function syncedSet

packages/core/sdk/src/executor.ts:2082–2087  ·  view source on GitHub ↗
(row: ConnectionRow | null)

Source from the content-addressed store, hash-verified

2080 const isToolSyncHealth = (health: HealthCheckResult | null): boolean =>
2081 health?.detail?.startsWith(toolSyncHealthDetailPrefix) === true;
2082 const syncedSet = (row: ConnectionRow | null) => {
2083 const health = row ? Option.getOrNull(decodeLastHealth(row.last_health)) : null;
2084 return isToolSyncHealth(health)
2085 ? { tools_synced_at: Date.now(), last_health: null, updated_at: new Date() }
2086 : { tools_synced_at: Date.now() };
2087 };
2088 // Every exit stamps the sync time — including the cleanup paths that
2089 // produce zero tools — so the stale-catalog check (`config_revised_at`
2090 // vs `tools_synced_at`) doesn't re-attempt this connection per read.

Callers 1

stampSyncedFunction · 0.85

Calls 1

isToolSyncHealthFunction · 0.85

Tested by

no test coverage detected