export interface ConversationTurnHookSummary {
    hook_event_count: number;
    tool_invocation_count: number;
    store_structured_calls: number;
    retrieve_calls: number;
    stored_entity_count: number;
    retrieved_entity_count: number;
    neotoma_tool_failures: number;
}
export interface ConversationTurnSummary {
    entity_id: string;
    turn_key: string;
    session_id: string | null;
    turn_id: string | null;
    conversation_id: string | null;
    harness: string | null;
    harness_version: string | null;
    model: string | null;
    status: string | null;
    cwd: string | null;
    working_directory: string | null;
    git_branch: string | null;
    active_file_refs: string[];
    context_source: string | null;
    hook_events: string[];
    missed_steps: string[];
    tool_invocation_count: number;
    store_structured_calls: number;
    retrieve_calls: number;
    neotoma_tool_failures: number;
    retrieved_entity_ids: string[];
    stored_entity_ids: string[];
    injected_context_chars: number | null;
    failure_hint_shown: boolean | null;
    safety_net_used: boolean | null;
    started_at: string | null;
    ended_at: string | null;
    activity_at: string;
    latest_write_provenance: Record<string, unknown> | null;
    hook_summary: ConversationTurnHookSummary;
}
export interface ConversationTurnRelatedEntity {
    entity_id: string;
    entity_type: string | null;
    canonical_name: string | null;
    title: string | null;
    relationship_type: string;
    direction: "outgoing" | "incoming";
    role: "stored" | "retrieved" | "related";
}
export interface ConversationTurnMessageRelatedEntity {
    entity_id: string;
    entity_type: string | null;
    canonical_name: string | null;
    title: string | null;
    relationship_type: string;
}
export interface ConversationTurnMessage {
    message_id: string;
    canonical_name: string | null;
    role: string | null;
    sender_kind: string | null;
    content: string | null;
    turn_key: string | null;
    activity_at: string;
    related_entities: ConversationTurnMessageRelatedEntity[];
    hook_summary: ConversationTurnHookSummary | null;
}
export interface ConversationTurnDetail extends ConversationTurnSummary {
    related_entities: ConversationTurnRelatedEntity[];
    messages: ConversationTurnMessage[];
}
export interface ConversationTurnsFilters {
    harness?: string | null;
    status?: string | null;
    activity_after?: string | null;
    activity_before?: string | null;
    agent_key?: string | null;
}
export declare function listConversationTurns(userId: string, limit: number, offset: number, filters?: ConversationTurnsFilters | null): {
    items: ConversationTurnSummary[];
    has_more: boolean;
    limit: number;
    offset: number;
};
export declare function getConversationTurn(userId: string, turnKey: string): ConversationTurnDetail | null;
/**
 * Build a lightweight hook summary for a set of turn_keys,
 * used to enrich recent_conversations messages.
 */
export declare function listHookSummariesByTurnKeys(userId: string, turnKeys: string[]): Map<string, ConversationTurnHookSummary>;
//# sourceMappingURL=conversation_turn.d.ts.map