UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

18 lines • 1.04 kB
import type { Accessor } from '../../accessor/base.ts'; import type { FileStat, PathSpec } from '../../types.ts'; import { type DetectFn, type ScopeMatch } from './scope.ts'; export type DeleteFn<A extends Accessor> = (accessor: A, match: ScopeMatch, entry: FileStat) => Promise<void>; /** * Build a hierarchy unlink: classify, refuse, delete. * * A deleter owns only the backend delete call, handed the row the parent's * listing names; classification and the directory refusal happen here, * identically for every backend. The match rides along because a delete * addressed inside a container needs the container's slots (gcal deletes an * event from a calendar), while a globally-id-addressed backend just ignores * it. Mirrors `make_unlink` in `mirage/core/hierarchy/unlink.py`. */ export declare function makeUnlink<A extends Accessor>(detect: DetectFn, options: { deleters: Readonly<Record<string, DeleteFn<A>>>; }): (accessor: A, path: PathSpec, entry?: FileStat | null) => Promise<void>; //# sourceMappingURL=unlink.d.ts.map