@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
16 lines • 797 B
TypeScript
import { type FsCondition } from './types.ts';
/**
* Name the condition an error reports, if the vocabulary names one.
*
* The one classifier: every boundary (the fuse-native adapter, the
* quickjs wasi shim, the monty encoders, pyodide's errno lookup) calls
* this and then renders the condition through its own number table.
* Keys on the stamped `code` (python's twin keys on exception class),
* plus the registry's unstamped no-mount refusal, which is a miss.
* Null means "no named condition" and the caller keeps its own
* fallback, because a code outside the vocabulary is a passthrough,
* not a translation.
*/
export declare function classify(err: unknown): FsCondition | null;
export declare function isEntryError(err: unknown): boolean;
//# sourceMappingURL=classify.d.ts.map