MCPcopy Create free account
hub / github.com/cursor/plugins / printLoopSummary

Function printLoopSummary

orchestrate/skills/orchestrate/scripts/core/loop.ts:262–291  ·  view source on GitHub ↗
(mgr: AgentManager)

Source from the content-addressed store, hash-verified

260}
261
262function printLoopSummary(mgr: AgentManager): void {
263 const counts = mgr.tasks.reduce<Record<string, number>>((acc, s) => {
264 acc[s.status] = (acc[s.status] ?? 0) + 1;
265 return acc;
266 }, {});
267 console.log("");
268 if (isAndonActive(mgr.state.andon)) {
269 console.log(
270 `>> ANDON ACTIVE - raised at ${mgr.state.andon.raisedAt} by ${mgr.state.andon.raisedBy ?? "unknown"}: ${truncate(mgr.state.andon.reason ?? "", 100)}`
271 );
272 } else if (mgr.andon.clearedDuringLoop && mgr.state.andon?.clearedAt) {
273 console.log(
274 `Andon cleared at ${mgr.state.andon.clearedAt} by ${mgr.state.andon.clearedBy ?? "unknown"}`
275 );
276 }
277 console.log(`orchestrate summary (${mgr.plan.rootSlug}):`);
278 for (const [status, n] of Object.entries(counts).sort()) {
279 console.log(` ${status}: ${n}`);
280 }
281 const handed = mgr.tasks.filter(s => s.status === "handed-off");
282 if (handed.length > 0) {
283 console.log(` handoffs written to: ${mgr.handoffsDir}`);
284 for (const s of handed) console.log(` - ${s.handoffPath}`);
285 }
286 if (mgr.state.attention.length > 0) {
287 console.log(
288 ` attention entries: ${mgr.state.attention.length} (see ${mgr.attentionLog})`
289 );
290 }
291}
292
293function planTasks(plan: Plan): PlanTask[] {
294 return plan.tasks ?? [];

Callers 1

runOrchestrateLoopFunction · 0.85

Calls 2

isAndonActiveFunction · 0.90
truncateFunction · 0.70

Tested by

no test coverage detected