UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

30 lines • 1.91 kB
import { z } from 'zod'; import type { OpenStream } from '../../rs/stream.ts'; import type { JsonValue } from '../../types.ts'; import { type RgFlags, type Tally, type Totals } from './rg_search.ts'; declare const COMPILED: z.ZodObject<{ terms: z.ZodNullable<z.ZodObject<{ texts: z.ZodArray<z.ZodString>; whole_word: z.ZodBoolean; ignore_case: z.ZodBoolean; }, z.core.$strip>>; pcre: z.ZodBoolean; }, z.core.$strip>; export type SearchHints = NonNullable<z.infer<typeof COMPILED>['terms']>; export type Compiled = z.infer<typeof COMPILED>; export declare class RgProgram { readonly stream: OpenStream; constructor(stream: OpenStream); } export declare function latin1(text: string): string; export declare function streamConfig(pattern: string, neverMatch: boolean, f: RgFlags, regexSizeLimit?: number | null, dfaSizeLimit?: number | null): Record<string, JsonValue>; export declare function openRg(pattern: string, neverMatch: boolean, f: RgFlags, regexSizeLimit?: number | null, dfaSizeLimit?: number | null): Promise<RgProgram>; export declare function settle(stream: OpenStream, tally: Tally): void; export declare function formatMessage(message: Record<string, JsonValue>): Uint8Array; export declare function streamHaystack(source: AsyncIterable<Uint8Array>, program: RgProgram, f: RgFlags, name: string, label: string | null, tally: Tally, signal: AbortSignal | undefined, named: boolean, pipe: boolean): AsyncGenerator<Uint8Array>; export declare function formatOutput(program: RgProgram, message: Record<string, JsonValue>): Uint8Array; export declare function totalsConfig(totals: Totals): Record<string, JsonValue>; export declare function formatTotals(totals: Totals, kind: 'summary' | 'stats', total: number): Promise<Uint8Array>; export declare function compiledTerms(program: RgProgram): Compiled; export {}; //# sourceMappingURL=rg_stream.d.ts.map