import { type Router } from 'express'; import type { EnvelopeAuthority } from '../envelope/authority.js'; import type { MemoryScope } from '../envelope/types.js'; interface RawQueryStatement { all: (...params: unknown[]) => unknown[]; get: (...params: unknown[]) => unknown; run: (...params: unknown[]) => unknown; } interface RawQueryAdapter { prepare: (sql: string) => RawQueryStatement; } interface RawQueryModule { searchRaw: (adapter: RawQueryAdapter, input: RawSearchInput) => RawSearchResult; searchAllRaw: (adapter: RawQueryAdapter, input: RawSearchInput) => RawSearchResult; getRawById: (adapter: RawQueryAdapter, rawId: string, visibility: Pick) => RawSearchHit | null; getRawWindow: (adapter: RawQueryAdapter, rawId: string, input: Pick & { before?: number; after?: number; }) => { target: RawSearchHit; items: RawSearchHit[]; } | null; } interface RawSearchInput { query: string; connectors?: string[]; scopes?: MemoryScope[]; fromMs?: number; toMs?: number; cursor?: string; limit?: number; } interface RawSearchHit { raw_id: string; connector: string; source_id: string; channel_id: string | null; author_label: string | null; created_at: string | null; content_preview: string; score: number; source_ref: string | null; metadata: Record; } interface RawSearchResult { hits: RawSearchHit[]; next_cursor: string | null; } export interface AgentRawRouterOptions { memoryDb: RawQueryAdapter; envelopeAuthority?: EnvelopeAuthority; rawQuery?: RawQueryModule; } export declare function createAgentRawRouter(options: AgentRawRouterOptions): Router; export {}; //# sourceMappingURL=agent-raw-handler.d.ts.map