UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

30 lines • 1.44 kB
import type { BaseVFS } from '../../vfs/base.ts'; import { Command } from '../../commands/config.ts'; import type { CLI } from '../../commands/cli/types.ts'; interface VFSClass { readonly prototype: BaseVFS; } /** Serve `commands` on every mount of `cls` and its subclasses. */ export declare function registerBackendCommands(cls: VFSClass, commands: () => readonly Command[]): void; /** * The shell commands a builtin backend serves on a mount of `vfs`: mirage's * own, beside the generic set. * * They are the ones registered for the first class in its hierarchy that * has any; a command registered under that backend's one VFS name is * registered under the VFS's own instead, so a subclass under its own name * serves its base's commands as itself. A VFS no builtin backend serves has * none. Mirrors Python's `backend_commands`. */ export declare function backendCommands(vfs: BaseVFS): Command[]; /** * The shell commands a mount of `vfs` serves beside the generic set: a * builtin's backend commands first (`backendCommands`), then the commands * the VFS was handed, so they win; a command tree it was handed stays a * `CLI`, which the mount registers under its root's name. A name none of * these has falls back to the generic command every mount shares. Mirrors * Python's `commands_for`. */ export declare function commandsFor(vfs: BaseVFS): (Command | CLI)[]; export {}; //# sourceMappingURL=backends.d.ts.map