UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

38 lines • 2.21 kB
import type { GCalAccessor } from '../../accessor/gcal.ts'; import { DirListing, FileStat, type JsonValue, type PathSpec } from '../../types.ts'; export declare const FREE_BUSY_ROLE = "freeBusyReader"; export type CalendarEntryRow = Record<string, JsonValue>; /** Render the per-calendar metadata file. */ export declare function calendarPayload(entry: CalendarEntryRow, tz: string): Uint8Array; /** Split a path into `[mount prefix, mount-relative key, virtual key]`. */ export declare function normalize(path: PathSpec): [string, string, string]; /** Map each calendar's directory name to its calendarList entry. */ export declare function calendarIndex(accessor: GCalAccessor): Promise<Map<string, CalendarEntryRow>>; /** * The one zone every day directory on this mount is bucketed in. * * Defaults to the primary calendar's zone, matching how the Calendar UI * draws its grid: bucketing each calendar in its own zone would make the * same directory name mean different 24-hour windows on different * calendars, so a cross-calendar free/busy comparison would be wrong. */ export declare function bucketZone(accessor: GCalAccessor, calendars: Map<string, CalendarEntryRow>): string; /** * The days of a bucket directory inside the configured mount scope. * * A name off this mount's grid is absent, as is a bucket wholly outside the * scope: direct paths are bounded exactly as listings are. The days come * back ascending and consecutive. */ export declare function scopedBucket(accessor: GCalAccessor, name: string, tz: string, virtual: string): string[]; /** * What an event's file holds beyond the plain words Calendar's search reads, * lowercased: its JSON with the summary, description and location emptied, * then each of their words that is not plain (a link, an address, markup, an * entity, a hyphenated or non-ASCII word), which the search may split * otherwise than grep -w. Mirrors Python's `unsearched_text`. */ export declare function unsearchedText(event: CalendarEntryRow): string; /** List one level of the calendar tree. */ export declare function readdir(accessor: GCalAccessor, path: PathSpec): Promise<FileStat[] | DirListing>; //# sourceMappingURL=readdir.d.ts.map