UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

27 lines • 1.52 kB
import type { RedirectResult } from '../../../../context/session_context.ts'; import type { DispatchFn } from '../../../../runtime/types.ts'; import { type PathSpec } from '../../../../types.ts'; import type { SessionState } from '../../../session/session.ts'; /** * A `-v` value as setfattr stores it, or null when it is malformed. `0x` * is hex and `0s` base64, whitespace ignored. Anything else is text: * surrounding double quotes are dropped when both ends have one, and * `\ooo`, `\\` and `\"` are decoded while any other backslash stays as * typed. Mirrors Python's `decode_value`. */ export declare function decodeValue(text: string): Uint8Array | null; /** * setfattr: set or remove one extended attribute on each path. * * Debian's attr 2.5.2, pinned in docker: `-n NAME [-v VALUE]` sets it (no * `-v` is the empty value) and `-x NAME` removes it; exactly one of the * two, with `-v` only beside `-n`, or the usage block and exit 2. A * malformed hex or base64 value is `bad input encoding`, exit 1. A * failure on one path is reported and the rest are still written. The * attribute lands on the dispatcher's node table, which takes any name on * any path (a link's own with `-h`), as macOS does; linux refuses a name * outside its namespaces and a user attribute on a link. Mirrors * Python's `handle_setfattr`. */ export declare function handleSetfattr(dispatch: DispatchFn, session: SessionState, args: (string | PathSpec)[]): Promise<RedirectResult>; //# sourceMappingURL=setfattr.d.ts.map