/** * Child recorder — handles child session recording extracted from index.ts. * * Owns the responsibility of capturing child session turns and journey * entries without creating directories. Child sessions write only to * their parent's child .json file (D-03, D-05). * * @module session-tracker/child-recorder */ import type { ChildWriter } from "./persistence/child-writer.js"; /** * Input from the chat.message hook for child recording. */ export interface ChildMessageInput { sessionID: string; agent?: string; model?: string | { providerID: string; modelID: string; }; messageID?: string; } /** * Output from the chat.message hook for child recording. */ export interface ChildMessageOutput { message: unknown; parts: unknown[]; } /** * Dependencies injected into the child recorder. */ export interface ChildRecorderDeps { /** Child writer for .json persistence. */ childWriter: ChildWriter; /** Set of bootstrapped session IDs (mutated by recorder). */ bootstrappedSessions: Set; /** Route establishment for child sessions. */ ensureChildRoute: (parentID: string, childSessionID: string) => Promise; } /** * Child recorder that captures child session messages to parent .json files. * * Extracted from index.ts to reduce LOC and isolate child-recording logic. * Child sessions never get their own directory (D-03, D-05). * * Usage: * ```typescript * const recorder = new ChildRecorder({ childWriter, bootstrappedSessions, ensureChildRoute }) * await recorder.recordChildMessage(parentID, input, output) * ``` */ export declare class ChildRecorder { private readonly childWriter; private readonly bootstrappedSessions; private readonly ensureChildRoute; /** * @param deps - Injected dependencies. */ constructor(deps: ChildRecorderDeps); /** * Records a child session message to the parent's child .json file. * * Skips ensureSessionReady entirely — no directory creation. * Captures both turn data and journey entries for assistant messages. * * @param parentID - The parent session ID to record under. * @param sessionID - The child session ID. * @param input - Hook input containing agent, model, messageID. * @param output - Hook output containing message and parts. */ recordChildMessage(parentID: string, sessionID: string, input: ChildMessageInput, output: ChildMessageOutput): Promise; } //# sourceMappingURL=child-recorder.d.ts.map