@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 1.16 kB
TypeScript
import { type HostMemoryReading } from "./host-memory-sampler.ts";
import { ZeroSessionTrimmer } from "./host-zero-session-trim.ts";
import type { SessionCommandRouter } from "./session-command-router.ts";
import type { SessionEventWriter } from "./session-event-writer.ts";
/**
* Arm the host's self-observation: event-loop stall detection with per-session
* attribution, and RSS reporting that tightens idle parking under pressure. Both run on
* unref'd timers, and neither refuses, aborts or kills anything (#2207); a host that drops to zero
* sessions, or a 2 GB+ host whose session count drops, collects once and reports it (`host_trimmed`).
*/
export declare function startHostObservers(router: SessionCommandRouter, writer: SessionEventWriter, options: {
readonly trim: ZeroSessionTrimmer;
readonly onIdlePressure?: (reading: HostMemoryReading) => void;
}): {
stop: () => void;
};
/** Built before the host core so the registry can signal every open and close to it. */
export declare function createZeroSessionTrim(writer: SessionEventWriter, sessions: () => number): ZeroSessionTrimmer;
//# sourceMappingURL=host-observers.d.ts.map