MCPcopy
hub / github.com/callstack/agent-device / resolveDefaultDaemonStateDir

Function resolveDefaultDaemonStateDir

src/daemon/config.ts:50–57  ·  view source on GitHub ↗
(options: ResolveDaemonPathsOptions = {})

Source from the content-addressed store, hash-verified

48}
49
50function resolveDefaultDaemonStateDir(options: ResolveDaemonPathsOptions = {}): string {
51 const globalStateDir = path.join(expandUserHomePath('~', { env: options.env }), '.agent-device');
52 const projectRoot = options.projectRoot ?? findProjectRoot();
53 if (!isSourceCheckoutProjectRoot(projectRoot)) {
54 return globalStateDir;
55 }
56 return path.join(globalStateDir, 'dev', buildSourceCheckoutStateDirName(projectRoot));
57}
58
59function isSourceCheckoutProjectRoot(projectRoot: string): boolean {
60 return (

Callers 1

resolveStateDirFunction · 0.85

Calls 4

expandUserHomePathFunction · 0.90
findProjectRootFunction · 0.90

Tested by

no test coverage detected