okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
425bca719
main
1/** 2* How far a local engine has got, as a short text that changes whenever it makes progress. The agent's stall watchdog 3* compares it with the last one it saw: while a long prompt is read the Harness hears nothing for minutes, but the 4* engine's /metrics (polled every 2 s) shows `live.prompt_read` moving (#3623). Null when the engine is idle or says nothing. 5*/ 6export function engineProgressMark ( instance ) { 7const live = instance ?. metrics ?. live ; 8if ( ! live || live . state === 'idle' || live . state === 'unloaded' ) return null ; 9const slots = Array . isArray ( live . slots ) ?live . slots . map ( s => ` ${ s ?. state } : ${ s ?. prompt_read ?? '' } : ${ s ?. generated ?? '' } ` ). join ( ',' ) :'' ; 10return ` ${ live . state } | ${ live . prompt_read ?? '' } | ${ live . generated ?? '' } | ${ slots } ` ; 11}