export interface RecallScoreFilterRow { readonly score?: number; readonly supplementary?: boolean; } export interface RecallPartitionableRow { readonly supplementary?: boolean; } export interface RecallRow extends RecallPartitionableRow { readonly id?: string; readonly content?: string; readonly created_at?: string; readonly score?: number; readonly source?: string; readonly source_id?: string; readonly source_path?: string; readonly who?: string; readonly type?: string; readonly tags?: string | null; readonly pinned?: boolean | number; readonly project?: string | null; readonly importance?: number; readonly already_recalled?: boolean; readonly temporal_facet?: TemporalFacet; readonly temporal_start_at?: string; readonly temporal_end_at?: string | null; readonly subject_type?: string; readonly subject_id?: string; } export interface RecallMeta { readonly totalReturned: number; readonly hasSupplementary: boolean; readonly noHits: boolean; readonly temporal?: RecallTemporalMeta; readonly dedupe?: { readonly enabled: boolean; readonly contextEpoch?: number; readonly suppressed: number; readonly repeatedReturned: number; }; } export type AggregateRecallBudget = "small" | "medium" | "large"; export type TemporalFacet = "captured" | "session" | "source" | "observed" | "occurred" | "valid"; export interface RecallTimeOptions { readonly start?: string; readonly end?: string; readonly facets?: readonly TemporalFacet[]; readonly mode?: "auto" | "timeline" | "filter"; } export interface RecallTemporalMeta { readonly mode: "timeline" | "filter"; readonly source: "query" | "request"; readonly originalQuery: string; readonly contentQuery: string; readonly start: string; readonly end: string; readonly facets: readonly TemporalFacet[]; } export interface AggregateRecallMeta { readonly savedMemoryId: string | null; readonly saved: boolean; readonly deduped: boolean; readonly budget: AggregateRecallBudget; readonly queries: readonly string[]; readonly sourceMemoryIds: readonly string[]; readonly stoppedReason: "complete" | "no_evidence" | "router_unavailable" | "synthesis_failed"; readonly partial?: boolean; readonly message?: string; readonly usage?: AggregateRecallUsage; } export interface AggregateRecallUsage { readonly inputTokens: number | null; readonly outputTokens: number | null; readonly cacheReadTokens: number | null; readonly cacheCreationTokens: number | null; readonly totalCost: number | null; readonly totalDurationMs: number | null; readonly stages: readonly AggregateRecallUsageStage[]; } export interface AggregateRecallUsageStage { readonly name: "planning" | "synthesis"; readonly targetRef: string | null; readonly attemptCount: number; readonly fallbackCount: number; readonly inputTokens: number | null; readonly outputTokens: number | null; readonly cacheReadTokens: number | null; readonly cacheCreationTokens: number | null; readonly totalCost: number | null; readonly totalDurationMs: number | null; } export interface RecallPayload { readonly query?: string; readonly method?: string; readonly results?: ReadonlyArray; readonly meta?: Partial; readonly aggregate?: AggregateRecallMeta; readonly memories?: ReadonlyArray; readonly count?: number; readonly message?: string; } export interface RecallRequestOptions { readonly keywordQuery?: string; readonly keyword_query?: string; readonly limit?: number; readonly project?: string; readonly type?: string; readonly tags?: string; readonly who?: string; readonly pinned?: boolean; readonly importance_min?: number; readonly since?: string; readonly until?: string; readonly time?: RecallTimeOptions; readonly expand?: boolean; readonly agentId?: string; readonly agent_id?: string; readonly contextAgentId?: string; readonly sessionKey?: string; readonly session_key?: string; readonly includeRecalled?: boolean; readonly include_recalled?: boolean; /** Exact daemon memory-scope string; agent/session isolation use their dedicated fields. */ readonly scope?: string; readonly sourceOnly?: boolean; readonly source_only?: boolean; readonly aggregate?: boolean; readonly aggregateBudget?: AggregateRecallBudget; readonly aggregate_budget?: AggregateRecallBudget; readonly saveAggregate?: boolean; readonly save_aggregate?: boolean; } export interface RememberRequestOptions { readonly type?: string; readonly importance?: number; readonly tags?: string | readonly string[]; readonly who?: string; readonly pinned?: boolean; readonly sourceType?: string; readonly sourceId?: string; readonly sourcePath?: string; readonly createdAt?: string; readonly occurredAt?: string; readonly observedAt?: string; readonly validFrom?: string; readonly validUntil?: string; readonly sourceCreatedAt?: string; readonly hints?: readonly string[]; readonly transcript?: string; readonly structured?: unknown; readonly agentId?: string; readonly visibility?: "global" | "private" | "archived"; readonly mode?: "auto" | "sync" | "async"; readonly idempotencyKey?: string; readonly runtimePath?: string; readonly harness?: string; readonly source?: string; } export declare function partitionRecallRows(rows: ReadonlyArray): { readonly primary: T[]; readonly supporting: T[]; }; export declare function parseRecallMeta(raw: unknown, fallbackCount: number): RecallMeta; export declare function parseRecallPayload(raw: unknown): { readonly query?: string; readonly method?: string; readonly rows: RecallRow[]; readonly meta: RecallMeta; readonly message?: string; }; export declare function applyRecallScoreThreshold(raw: unknown, minScore?: number): unknown; export declare function formatRecallText(raw: unknown): string; export declare function buildRecallRequestBody(query: string, options?: RecallRequestOptions): Record; export declare function normalizeStructuredMemoryPayload(value: unknown): unknown; export declare function buildRememberRequestBody(content: string, options?: RememberRequestOptions): Record; export declare function withHookRecallCompat; }>(result: T): T & { readonly memories: T["results"]; readonly count: number; readonly message: string; }; export declare function emptyHookRecallResponse(query: string, extras?: { readonly bypassed?: boolean; readonly internal?: boolean; }): { readonly results: []; readonly memories: []; readonly count: 0; readonly query: string; readonly method: "hybrid"; readonly meta: RecallMeta; readonly message: string; readonly bypassed?: boolean; readonly internal?: boolean; }; //# sourceMappingURL=recall.d.ts.map