export interface TurnOutcome { /** A telegram reply tool_use appeared in the turn. */ replied: boolean; /** Text of the end_turn assistant message ('' when none / not yet reached). */ finalText: string; /** The turn reached an assistant end_turn. */ reachedEndTurn: boolean; } /** Fold one turn's JSONL line strings into the delivery decision. Pure. */ export declare function reduceTurnFromLines(lines: string[]): TurnOutcome; export type OnTurnEnd = (outcome: TurnOutcome) => void; /** * Walk `${CLAUDE_CONFIG_DIR}/projects//` for `${sessionId}.jsonl` (live * and archived). Returns the first match or null. Inlined from * whatsapp-channel/jsonl-watch.ts (itself inlined from * claude-session-manager/src/jsonl-path.ts) to avoid a cross-package dep. */ export declare function findJsonlForSessionId(sessionId: string, env?: NodeJS.ProcessEnv): string | null; /** * Tail `jsonlPath` from `startOffset` for the life of the session, invoking * `onTurnEnd` once for every assistant end_turn with that turn's outcome. It * segments the JSONL at each end_turn so a follow-on turn produced from a * mid-turn-queued message is reported too. The process dies with the session, * so there is no per-turn timeout; the promise resolves only when the file * becomes unreadable. Never rejects. (Mirror of the WhatsApp twin.) */ export declare function followTurnEnds(jsonlPath: string, startOffset: number, onTurnEnd: OnTurnEnd): Promise; //# sourceMappingURL=turn-follow.d.ts.map