@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
19 lines • 1.1 kB
TypeScript
import type { GmailAccessor } from '../../accessor/gmail.ts';
import type { PathSpec } from '../../types.ts';
export declare const SYSTEM_LABELS: ReadonlySet<string>;
export declare const USER_LABEL: RegExp;
/**
* The message files under `under` whose text holds `text` in any case.
*
* Gmail's search reads a message's HTML part and can miss a word of the
* text/plain body a .gmail.json renders, such as one inside a link or one only
* that part holds, so it is not asked. The listing fetches every message in
* full anyway and, under a `walkLimit`, keeps each one's rendered text,
* lowercased, without its labels; the files are picked from that. null for a
* text that is not ASCII, whose case a lowercased copy may not keep, a text
* that may lie in a labels field (`inLabels`), which changes after the
* listing, when a listing kept no text, or when a listing fails. Mirrors
* Python's `files_containing`.
*/
export declare function filesContaining(accessor: GmailAccessor, text: string, under: readonly PathSpec[]): Promise<PathSpec[] | null>;
//# sourceMappingURL=search.d.ts.map