MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / readPendingRestartNotifications

Function readPendingRestartNotifications

src/cli.ts:926–939  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

924}
925
926function readPendingRestartNotifications(filePath: string): PendingRestartNotification[] {
927 if (!fs.existsSync(filePath)) {
928 return [];
929 }
930 try {
931 const parsed = JSON.parse(fs.readFileSync(filePath, 'utf8'));
932 if (!Array.isArray(parsed)) {
933 return [];
934 }
935 return parsed.filter((item) => item && typeof item.externalScopeId === 'string' && typeof item.content === 'string');
936 } catch {
937 return [];
938 }
939}
940
941function writePendingRestartNotifications(filePath: string, items: PendingRestartNotification[]) {
942 fs.mkdirSync(path.dirname(filePath), { recursive: true });

Callers 3

cli.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected