import type { Machine, Message, Session, SessionContentImport, SessionLookupOptions, ToolCall } from "../types/index.js"; import type { SearchHit, ToolCallHit } from "../lib/search.js"; import type { Entity, EntityType, RelatedSession, SessionGraph } from "../lib/graph.js"; import type { RecallOptions, RecallResponse } from "../lib/recall.js"; import type { EmbedResult, Embedder } from "../lib/embeddings.js"; import * as cloud from "../db/cloud/store.js"; export interface ListOptions { source?: string; project_path?: string; machine?: string; limit?: number; } export interface SearchHitDto { session: Session; match: string; snippet?: string; } export interface Stats { session_count: number; message_count: number; tool_call_count: number; by_source: { source: string; sessions: number; }[]; projects: { project_name: string | null; project_path: string | null; session_count: number; }[]; } export interface DataSource { readonly mode: "local" | "cloud"; list(opts: ListOptions): Promise; recent(limit: number): Promise; get(idOrPrefix: string, opts?: SessionLookupOptions): Promise; search(query: string, opts: ListOptions): Promise; machines(): Promise; stats(): Promise; create(input: cloud.UpsertSessionInput): Promise; importContent(input: SessionContentImport): Promise; remove(id: string): Promise; rename(idOrPrefix: string, title: string, opts?: SessionLookupOptions): Promise; relocatePaths(oldPath: string, newPath: string): Promise<{ rowsUpdated: number; }>; messages(sessionId: string): Promise; toolCalls(sessionId: string): Promise; searchContent(query: string, opts: ListOptions): Promise; searchToolCalls(query: string, opts: ListOptions): Promise; semanticSearch(query: string, opts: ListOptions): Promise; hybridSearch(query: string, opts: ListOptions): Promise; recall(query: string, opts: RecallOptions): Promise; embed(opts: { limit?: number; }): Promise; recomputeMachines(): Promise; graphEntities(type?: EntityType): Promise; graphRelated(type: EntityType, name: string, limit: number): Promise; graphSession(idOrPrefix: string, opts?: SessionLookupOptions): Promise; } export declare function setTestEmbedder(embedder: Embedder | null): void; /** Resolve the active data source for the current storage mode (memoized). */ export declare function getDataSource(): DataSource; /** Test hook: reset the memoized data source. */ export declare function resetDataSource(): void; //# sourceMappingURL=data-source.d.ts.map