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

Function winList

scripts/local-schedule.js:96–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94
95function runJob(payload) {
96 if (!/^[a-zA-Z0-9_-]+$/.test(payload || '')) throw new Error('Invalid job payload.');
97 const { id, root } = JSON.parse(Buffer.from(payload, 'base64url').toString('utf8'));
98 if (typeof root !== 'string' || !path.isAbsolute(root)) throw new Error('Invalid project root.');
99 const file = recordPath(id, root);
100 // Removal deletes .citadel. Retained OS entries then become inert.
101 if (!fs.existsSync(file)) return;
102 const job = JSON.parse(fs.readFileSync(file, 'utf8'));
103 if (job.id !== id || job.projectRoot !== root || typeof job.command !== 'string' || !job.command.trim()) {
104 throw new Error('Invalid schedule record.');

Callers 1

local-schedule.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected