UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

24 lines • 1.3 kB
import type { MongoDBAccessor } from '../../accessor/mongodb.ts'; import type { PathSpec } from '../../types.ts'; export declare const RECORD_KEYS: ReadonlySet<string>; export declare const DEPTH = 8; type Expr = Record<string, unknown>; /** * A find filter for the documents whose line may hold one of `queries`: a key * or a string at any depth holds it in any case, a string holds a character * the line may spell as an escape, or a value is one the walk cannot see into. * Mirrors Python's `holds_filter`. */ export declare function holdsFilter(queries: readonly string[]): Expr; /** * The lines of a collection's or view's documents.jsonl that may hold `text`, * streamed in the `_id` order a plain read takes. MongoDB walks each * document's keys and strings on the server (`holdsFilter`), so only the * documents that may match are sent; grep matches each line itself. `text` * goes through `recordQueries` for the words of Extended JSON's wrappers and * for escapes. null for any other file and for a text that could match outside * a key or a string. Mirrors Python's `lines_containing`. */ export declare function linesContaining(accessor: MongoDBAccessor, path: PathSpec, text: string): Promise<AsyncIterable<Uint8Array> | null>; export {}; //# sourceMappingURL=search.d.ts.map