MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / validateEntries

Function validateEntries

src/runtime/registry.ts:350–371  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

348 * Deeper health validation now lives in skillpack-node.
349 */
350export function validateEntries(): RegistryEntry[] {
351 const entries = readAll();
352 const now = new Date().toISOString();
353
354 for (const entry of entries) {
355 if (entry.status === "running" && entry.pid !== null && !isPidAlive(entry.pid)) {
356 writeEntryFile({
357 ...entry,
358 pid: null,
359 status: "stopped",
360 stoppedAt: now,
361 updatedAt: now,
362 });
363 }
364 }
365
366 const nextEntries = readAll();
367 if (entries.length === nextEntries.length && entries.every((entry, index) => entriesEqual(entry, nextEntries[index]!))) {
368 return entries;
369 }
370 return nextEntries;
371}

Callers

nothing calls this directly

Calls 4

readAllFunction · 0.85
isPidAliveFunction · 0.85
writeEntryFileFunction · 0.85
entriesEqualFunction · 0.85

Tested by

no test coverage detected