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

Function formatLoop

scripts/loops.js:48–61  ·  view source on GitHub ↗
(loop)

Source from the content-addressed store, hash-verified

46}
47
48function formatLoop(loop) {
49 const status = loop.status || 'planned';
50 const terminal = isTerminalStatus(status) ? 'stopped' : 'active';
51 const cadence = loop.trigger?.cadence ? ` | ${loop.trigger.cadence}` : '';
52 const verifier = loop.verifier?.command || loop.verifier?.profile || 'none';
53 return [
54 `- ${loop.id} [${status}/${terminal}]`,
55 ` Type: ${loop.type || 'loop'}${cadence}`,
56 ` Title: ${loop.title || loop.id}`,
57 ` Verifier: ${verifier}`,
58 ` State: ${loop.statePath || '(unknown)'}`,
59 ` Source: ${loop.source || 'loop-registry'}`,
60 ].join('\n');
61}
62
63function renderList(loops) {
64 if (!loops.length) return 'No Citadel loops found.\n';

Callers 1

renderListFunction · 0.85

Calls 1

isTerminalStatusFunction · 0.85

Tested by

no test coverage detected