@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
23 lines • 1.42 kB
TypeScript
import type { RAMAccessor } from '../../accessor/ram.ts';
import type { PathSpec } from '../../types.ts';
import { type FsError } from '../../errors/types.ts';
export declare function checkDestParents(accessor: RAMAccessor, dst: PathSpec, d: string): void;
export declare function checkRename(accessor: RAMAccessor, src: PathSpec, s: string, dst: PathSpec, d: string): void;
export declare function lookupError(accessor: RAMAccessor, spec: PathSpec, key: string): FsError;
export declare function checkWriteTarget(accessor: RAMAccessor, spec: PathSpec, key: string): void;
export declare function checkMkdirTarget(accessor: RAMAccessor, spec: PathSpec, key: string, parents: boolean): void;
/**
* Throw EDQUOT for a key growing to `size` bytes past its store's capacity,
* or past what its workspace's `max_memory` has left; an uncapped store in an
* uncapped workspace takes any size. Called just before the change, with no
* await between, so the check and the change run as one step. Mirrors
* Python's `check_capacity`.
*/
export declare function checkCapacity(accessor: RAMAccessor, spec: PathSpec, key: string, size: number): void;
/**
* Throw EDQUOT for `growth` more bytes past what the running workspace's
* `max_memory` has left; zero or less always passes. Mirrors Python's
* `check_room`.
*/
export declare function checkRoom(spec: PathSpec, growth: number): void;
//# sourceMappingURL=dest.d.ts.map