MCPcopy
hub / github.com/davebcn87/pi-autoresearch / sessionFilePath

Function sessionFilePath

extensions/pi-autoresearch/paths.ts:71–75  ·  view source on GitHub ↗
(dir: string, kind: SessionFileKind)

Source from the content-addressed store, hash-verified

69 * peers. Fall back to a legacy flat file only when no current layout exists.
70 */
71export function sessionFilePath(dir: string, kind: SessionFileKind): string {
72 const candidates = sessionFileCandidates(dir, kind);
73 if (currentLayoutExists(dir)) return candidates.current;
74 return fs.existsSync(candidates.legacy) ? candidates.legacy : candidates.current;
75}
76
77/** Effective path for a hook script, with the same layout choice as session files. */
78export function hookScriptPath(workDir: string, stage: HookStage): string {

Callers 8

paths.test.mjsFile · 0.90
autoresearchJsonlPathFunction · 0.90
autoresearchMdPathFunction · 0.90
autoresearchIdeasPathFunction · 0.90
autoresearchChecksPathFunction · 0.90
autoresearchScriptPathFunction · 0.90
autoresearchConfigPathFunction · 0.90

Calls 2

sessionFileCandidatesFunction · 0.85
currentLayoutExistsFunction · 0.85

Tested by

no test coverage detected