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

Function syncedSet

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

Source from the content-addressed store, hash-verified

3539 b("name", "=", String(ref.name)),
3540 );
3541 const syncedSet = (row: ConnectionRow | null) => {
3542 const health = row ? Option.getOrNull(decodeLastHealth(row.last_health)) : null;
3543 return isToolSyncHealth(health)
3544 ? {
3545 tools_synced_at: Date.now(),
3546 last_health: null,
3547 updated_at: new Date(),
3548 }
3549 : { tools_synced_at: Date.now() };
3550 };
3551 // Every exit stamps the sync time — including the cleanup paths that
3552 // produce zero tools — so the stale-catalog check (`config_revised_at`
3553 // vs `tools_synced_at`) doesn't re-attempt this connection per read.

Callers 1

stampSyncedFunction · 0.85

Calls 1

isToolSyncHealthFunction · 0.90

Tested by

no test coverage detected