@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
23 lines • 1.34 kB
TypeScript
import { Codec } from '../hierarchy/codec.ts';
import { Scope, type ScopeMatch } from '../hierarchy/scope.ts';
import type { Leaf } from './types.ts';
/** The leaf a blob column renders as, one file per row. */
export declare function blobLeaf(ext: string): Leaf;
/**
* A mount's scope table, shaped by its config.
*
* The tree is a function of the mount config, not of the backend: a pinned
* table removes the leading table segment, every `groupBy` column adds one
* directory level, and each leaf adds one file per row. Group slots are named
* positionally (`g0`, `g1`, ...) so a column named `table` cannot collide with
* the table slot; `filtersOf` maps them back to column names. Every partial
* depth shares the one `group` kind, and its lister derives the depth from the
* slots, so the lister table stays static while the scope table varies per
* mount.
*/
export declare function rowScopes(pinned: boolean, groups: readonly Codec[], leaves: readonly Leaf[]): Scope[];
/** The table a match addresses: pinned, or the path's first slot. */
export declare function tableOf(pinned: string | null, match: ScopeMatch): string;
/** The match's group filters, keyed back to column names. */
export declare function filtersOf(groupBy: readonly string[], match: ScopeMatch): Record<string, string>;
//# sourceMappingURL=scope.d.ts.map