UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

38 lines • 1.65 kB
type Dialect = 'shell' | 'python'; /** One compiled pattern. Offsets count supplied characters, including lone surrogates. */ export declare class Glob { private readonly stream; private subject; private readonly budget; constructor(pattern: string, extglob?: boolean, period?: boolean, dialect?: Dialect, signal?: AbortSignal); close(): void; private prepare; private run; private runAsync; matchesAsync(name: string): Promise<boolean>; end(name: string, start: number, longest?: boolean): number | null; suffix(name: string, longest?: boolean): number | null; extent(name: string, prefix: boolean, longest: boolean): Promise<number | null>; spans(name: string, all: boolean, anchor: string | null): Promise<[number, number][]>; shape(): string; parts(): string[]; } /** * One compiled pattern asked whether whole names match, one Wasm call per name, * or none where the grammar reads the pattern as plain text and the name is * compared with it here. Mirrors Python's GlobMatcher. */ export declare class GlobMatcher { private readonly stream; private readonly literal; constructor(pattern: string, extglob?: boolean, period?: boolean, dialect?: Dialect); matches(name: string): boolean; } /** * A compiled GlobMatcher, shared by every caller asking the same; the pattern * compiled first leaves first. A hit is one lookup, since a filter asks once * per name. Mirrors Python's glob_matcher. */ export declare function globMatcher(pattern: string, extglob?: boolean, period?: boolean, dialect?: Dialect): GlobMatcher; export {}; //# sourceMappingURL=glob.d.ts.map