@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 1.13 kB
TypeScript
/**
* The turns each session's own records have opened (`agent_start`) and not yet settled (`agent_settled`),
* counted exactly as the supervisor's lifecycle observer counts them.
*
* A session sealed mid-turn - closed, parked or released - never gets to publish the `agent_settled` of
* the turn its teardown aborts: every record after the seal is dropped. The observer's count for it then
* stays above zero for good and the host never idle-exits (worker sessions too: their `session_closed`
* goes to attached connections only, I4, so the observer never learns the session is gone). The writer
* asks this ledger, before it seals, how many settles the session still owes, and publishes them.
*/
export declare class SessionOpenTurns {
private readonly open;
/** Sessions whose last run settled but has not reached agent_idle yet. */
private readonly settling;
note(sessionId: string, type: unknown, reason?: unknown): void;
/** The settles a seal is about to strand; the session's count is forgotten either way. */
take(sessionId: string): number;
}
//# sourceMappingURL=session-open-turns.d.ts.map