diff --git a/services/mcp-server/src/modules/a2a/social-fast-coordinator-pipeline.ts b/services/mcp-server/src/modules/a2a/social-fast-coordinator-pipeline.ts index 1b911dca..031026da 100644 --- a/services/mcp-server/src/modules/a2a/social-fast-coordinator-pipeline.ts +++ b/services/mcp-server/src/modules/a2a/social-fast-coordinator-pipeline.ts @@ -83,9 +83,10 @@ async function notifyMembers( }); } - // If session has a current stage, fire stage_transition milestone push - const stage = (session as unknown as Record)?.['currentStage']; - if (stage && typeof stage === 'string') { + // If session has stage entries (fast is progressing), fire stage_transition milestone push + const hasStages = + session !== null && Array.isArray(session.stages) && session.stages.length > 0; + if (hasStages) { try { await nomgapPushFire({ type: 'stage_transition', userId }, opts); results.push({ userId, type: 'stage_transition', outcome: 'fired' }); @@ -128,9 +129,10 @@ async function sendWeeklyDigestAndReport( const fired = notifications.filter(n => n.outcome === 'fired').length; const failed = notifications.filter(n => n.outcome === 'failed').length; const stage = - ((session as unknown as Record)?.['currentStage'] as string | null) ?? null; - const protocolId = - ((session as unknown as Record)?.['protocolId'] as string | null) ?? null; + session && Array.isArray(session.stages) && session.stages.length > 0 + ? `stage_${session.stages.length}` + : null; + const protocolId = session?.protocolId ?? null; const summary = memberUserIds.length === 0