import type { IncomingMessage, ServerResponse } from "node:http"; import type { JinnConfig, Session } from "../shared/types.js"; import type { TalkSessionRegistry } from "../talk/session/registry.js"; import type { TalkSession } from "../talk/session/types.js"; /** * `usage` is this turn's delta, not a session-to-date total: the provider's * `turn_done` event reports the running total, so the client subtracts before * posting. Spend goes through `recordTurnAccounting`, the single accounting * entry point, which is what puts a talk session in the cost report for free. */ export declare function recordTurn(req: IncomingMessage, res: ServerResponse, session: TalkSession, registry: TalkSessionRegistry): Promise; /** * One log entry per attempted write, refusals included: a write the operator * waved off is the decision the audit most needs to show, and it reaches the * gateway no other way because it performs no write. * * `id` and `at` are stamped by the registry rather than read from the body, for * the same reason comment authorship is: a caller that can name and date its own * entry can forge one over an earlier one. */ export declare function recordAction(req: IncomingMessage, res: ServerResponse, session: TalkSession, registry: TalkSessionRegistry): Promise; /** Spawn a normal text session with the talk session's row as its parent, so the * existing callback machinery reaches it without anyone polling. */ export declare function handOff(req: IncomingMessage, res: ServerResponse, session: TalkSession, config: JinnConfig, runHandoff?: (spawned: Session, prompt: string) => void): Promise; //# sourceMappingURL=talk-turn-api.d.ts.map