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

Method checkInstall

src/mcp/daemon.ts:671–680  ·  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

669 * tests; the timer passes the real one.
670 */
671 checkInstall(
672 changed: () => string | null = () => installChangedReason(CodeGraphPackageJsonPath, CodeGraphPackageVersion),
673 ): boolean {
674 if (this.stopping) return false;
675 const reason = changed();
676 if (!reason) return false;
677 process.stderr.write(`[CodeGraph daemon] ${reason}; exiting so the next session starts a daemon from the current install.\n`);
678 void this.stop('install changed');
679 return true;
680 }
681
682 /**
683 * 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