export declare const CONDUCTOR_SOURCE = "conductor"; export declare const CONDUCTOR_CHANNEL_ID = "conductor"; export declare const CONDUCTOR_SESSION_KEY = "conductor:main"; /** Pool identity: agent-loop derives it from (source, channelId). */ export declare const CONDUCTOR_POOL_KEY: string; export interface ConductorSessionPolicy { maxAgeMs: number; maxTurns: number; maxTokens: number; /** * Treat the session as expired after this much idle time. Must stay BELOW * the pool's own sessionTimeoutMs (30min default): the pool silently drops * idle entries, and a pool-expired session would otherwise get a warm turn * with no re-ground (review F11). Recycling first keeps the invariant. */ idleExpiryMs: number; } interface PoolLike { getTokenUsage(key: string): number; } export declare class ConductorSession { private readonly pool; private readonly now; private readonly policy; private bornAt; private turns; private lastRunAt; private suspicion; private regroundDue; constructor(pool: PoolLike, policy?: Partial, now?: () => number); noteTurn(): void; /** * Force a recycle on the next tick. No production detector calls this yet - * wiring one (denied-tool patterns, instruction-shaped batch lines) is named * S2 work. The recycle path itself is pinned by tests so the hook is live * the day a detector exists. */ flagSuspicion(reason: string): void; shouldRecycle(): string | null; recycle(reason: string): { needsReground: true; reason: string; }; /** Read-only: does the next run owe the board a re-ground? */ needsReground(): boolean; /** * Called ONLY after a successful re-grounded run. A failed run must not * consume the re-ground - the retry still owes the board its context * (review: consume-before-run dropped the re-ground on the floor when the * first run of a fresh session threw). */ markRegrounded(): void; } export {}; //# sourceMappingURL=conductor-session.d.ts.map