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

Function safeStaticPath

scripts/dashboard-server.js:330–335  ·  view source on GitHub ↗
(urlPath)

Source from the content-addressed store, hash-verified

328 filter: (name) => /^session-.*\.md$/i.test(name), midRun: Boolean(data.snapshot && data.snapshot.fleetSessions && data.snapshot.fleetSessions.length),
329 });
330 const forksState = inspectDirectory(projectRoot, '.planning/operation-forks', {
331 filter: (name) => !name.startsWith('.'), midRun: (data.forks || []).some((fork) => ['pending', 'running'].includes(fork.status)),
332 });
333 const loopsState = inspectDirectory(projectRoot, '.planning/loops', {
334 filter: (name) => name.endsWith('.json'), json: true,
335 midRun: (data.loops || []).some((loop) => !['done', 'stopped', 'verifier-passed'].includes(loop.status || (loop.state && loop.state.status))),
336 });
337 const hooksState = inspectDirectory(projectRoot, '.planning/telemetry', {
338 filter: (name) => /^(hook-timing|hook-errors|audit|agent-runs|task-events)\.jsonl$/.test(name), jsonl: true,

Callers 1

createServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected