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

Function serializeWorkQueue

core/fleet/session.js:109–130  ·  view source on GitHub ↗
(tasks)

Source from the content-addressed store, hash-verified

107 return wave === null || wave === undefined ? '-' : String(wave);
108}
109
110function serializeWorkQueue(tasks) {
111 const rows = [
112 '| # | Campaign | Scope | Deps | Status | Wave | Agent | Branch | Evidence |',
113 '|---|----------|-------|------|--------|------|-------|--------|----------|',
114 ];
115
116 for (const task of tasks) {
117 rows.push([
118 task.id || '',
119 task.campaign || '',
120 formatList(task.scope),
121 formatList(task.deps),
122 normalizeStatus(task.status),
123 formatWave(task.wave),
124 task.agent || '-',
125 task.branch || '-',
126 task.evidence || '-',
127 ].map((cell) => String(cell).replace(/\|/g, '/')).join(' | ').replace(/^/, '| ').replace(/$/, ' |'));
128 }
129
130 return rows.join('\n');
131}
132
133function updateWorkQueue(content, tasks) {

Callers 3

updateWorkQueueFunction · 0.85
collectFunction · 0.85

Calls 3

formatListFunction · 0.85
formatWaveFunction · 0.85
normalizeStatusFunction · 0.70

Tested by

no test coverage detected