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

Function renderInspect

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

Source from the content-addressed store, hash-verified

88}
89
90function renderInspect(loop) {
91 if (!loop) return 'Loop not found.\n';
92 return [
93 `Loop: ${loop.id}`,
94 `Status: ${loop.status} - ${stopSummary(loop.status)}`,
95 `Type: ${loop.type}`,
96 `Title: ${loop.title}`,
97 `Trigger: ${loop.trigger?.kind || 'manual'}${loop.trigger?.cadence ? ` (${loop.trigger.cadence})` : ''}`,
98 `Command: ${loop.trigger?.command || '(none)'}`,
99 `Verifier: ${loop.verifier?.command || loop.verifier?.profile || '(none)'}`,
100 `Budget: attempts=${loop.budget?.maxAttempts ?? 'n/a'} spend=${loop.budget?.maxSpend ?? 'n/a'}`,
101 `Stop conditions: ${(loop.stopConditions || []).join(', ')}`,
102 `State: ${loop.statePath || '(unknown)'}`,
103 `Runs: ${(loop.runs || []).length}`,
104 '',
105 ].join('\n');
106}
107
108function contractFromArgs() {
109 const template = arg('--template');

Callers 1

mainFunction · 0.85

Calls 1

stopSummaryFunction · 0.85

Tested by

no test coverage detected