MCPcopy Create free account
hub / github.com/SethGammon/Citadel / latestSession

Function latestSession

scripts/fleet-steward.js:59–70  ·  view source on GitHub ↗
(projectRoot)

Source from the content-addressed store, hash-verified

57}
58
59function latestSession(projectRoot) {
60 const dir = path.join(projectRoot, '.planning', 'fleet');
61 if (!fs.existsSync(dir)) return null;
62 const files = fs.readdirSync(dir)
63 .filter((file) => /^session-.*\.md$/i.test(file))
64 .map((file) => {
65 const fullPath = path.join(dir, file);
66 return { fullPath, mtimeMs: fs.statSync(fullPath).mtimeMs };
67 })
68 .sort((left, right) => right.mtimeMs - left.mtimeMs);
69 return files.length ? files[0].fullPath : null;
70}
71
72function resolveSessionPath(args) {
73 if (args.session) {

Callers 1

resolveSessionPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected