UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

28 lines • 1.83 kB
import type { LanceDBAccessor } from '../../accessor/lancedb.ts'; import type { PathSpec } from '../../types.ts'; import type { resolveLanceDBConfig } from '../../vfs/lancedb/config.ts'; import type { Row } from '../vector/types.ts'; export declare const CARD_WORDS: ReadonlySet<string>; /** * A row's card path below its table: its group values as the listing names * them, then `<id>.md`. Mirrors Python's `card_path`. */ export declare function cardPath(config: ReturnType<typeof resolveLanceDBConfig>, row: Row): string[]; /** A ranked row's path below its table, and its card. */ export declare function hit(accessor: LanceDBAccessor, row: Row): [string[], Uint8Array]; /** * The cards under `under` whose row holds `text` in a string column. * * A card is `column: value` lines, so a line grep matches holds the text in * one value, unless it reaches into the column's name, the title's `# ` or the * separator: the text is asked only when `recordQueries` passes it with every * rendered column's name and `CARD_WORDS` as keys, it does not start with a * space, and no column's name or the blob line's extension holds it. A value that is not a string spells only digits and signs, or one of * `CARD_WORDS`; a table that renders a list, struct or bytes column reads every * card, as does a scope inside a card. The title column is searched even when it * is the vector or blob column, since the title line renders it. More rows * holding the text than a listing shows (`maxRows`) reads every card too, rather * than fetching rows the walk never reaches. Mirrors Python's `files_containing`. */ export declare function filesContaining(accessor: LanceDBAccessor, text: string, under: readonly PathSpec[], wholeWord: boolean, ignoreCase: boolean): Promise<PathSpec[] | null>; //# sourceMappingURL=search.d.ts.map