/** * Local record of how much of each Claude Code session has already been submitted, so re-running * `analyze-claude-sessions` does not resend a session unchanged — but DOES resend one whose transcript has * grown with new turns since last time. * * The server cannot deduplicate these logs itself (its dedup runs before a log is classified, and * matched logs are never re-checked), so the tool keeps this record and decides what to (re)send. * Keyed per client id, since the same session may legitimately be submitted to more than one client. * * We store a turn COUNT per session (not a yes/no flag): a chat transcript keeps growing, so a * boolean "already submitted?" silently drops later turns. Comparing the current turn count against * `turnsSubmitted` is what lets a grown session be re-submitted. */ export interface SubmittedSession { /** Number of assistant turns submitted the last time this session was sent. */ turnsSubmitted: number; } export interface CaptureState { version: number; /** ISO timestamp of the last Claude Code session sync; mtime cutoff for ~/.claude/projects. */ lastSyncAt?: string; /** ISO timestamp of the last Cowork session sync; mtime cutoff for local-agent-mode-sessions. */ coworkLastSyncAt?: string; submitted: Record>; } export declare function captureStatePath(): string; /** * Sentinel stored for sessions migrated from v1 (where only a boolean "submitted?" was tracked). * `run()` treats this as "already submitted, turn count unknown" — it records the actual count * without re-submitting, so subsequent runs can detect growth correctly. */ export declare const V1_MIGRATION_SENTINEL = -1; export declare function loadCaptureState(): Promise; /** Turns already submitted for this session/client, or 0 if it has never been submitted. */ export declare function getTurnsSubmitted(state: CaptureState, clientId: string, sessionId: string): number; /** Record that `turns` turns of this session have now been submitted for this client. */ export declare function recordSubmission(state: CaptureState, clientId: string, sessionId: string, turns: number): void; export declare function saveCaptureState(state: CaptureState): Promise; //# sourceMappingURL=capture-state.d.ts.map