MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / checkInstall

Method checkInstall

src/mcp/daemon.ts:547–556  ·  view source on GitHub ↗

* Exit once the install this daemon runs from has been upgraded or removed * (#2335; see installChangedReason). Its clients' proxies fall back * and reconnect, and the next launch starts a daemon from the current * install. Returns whether the daemon is exiting. The check is injecte

(
    changed: () => string | null = () => installChangedReason(CodeGraphPackageJsonPath, CodeGraphPackageVersion),
  )

Source from the content-addressed store, hash-verified

545 * tests; the timer passes the real one.
546 */
547 checkInstall(
548 changed: () => string | null = () => installChangedReason(CodeGraphPackageJsonPath, CodeGraphPackageVersion),
549 ): boolean {
550 if (this.stopping) return false;
551 const reason = changed();
552 if (!reason) return false;
553 process.stderr.write(`[CodeGraph daemon] ${reason}; exiting so the next session starts a daemon from the current install.\n`);
554 void this.stop('install changed');
555 return true;
556 }
557
558 /**
559 * Decide whether the inactivity backstop should reap the daemon right now.

Callers 2

startLivenessTimersMethod · 0.95

Calls 4

stopMethod · 0.95
installChangedReasonFunction · 0.85
changedFunction · 0.70
writeMethod · 0.65

Tested by

no test coverage detected