UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 849 B
import{canUseRootFileOpen,matchRootFileOpenFailure,openRootFileSync,readFileDescriptorBounded,readFileDescriptorBoundedSync}from"@openclaw/fs-safe/advanced";import{FsSafeError}from"@openclaw/fs-safe/errors"; //!src/infra/boundary-file-read.ts function preserveOpenClawOverflowError(e,t){if(e instanceof FsSafeError&&e.code===`too-large`)throw new RangeError(`File exceeds ${t} bytes`,{cause:e});throw e}async function readFileDescriptorBounded$1(e,t){try{return await readFileDescriptorBounded(e,t)}catch(e){return preserveOpenClawOverflowError(e,t)}}function readFileDescriptorBoundedSync$1(e,t){try{return readFileDescriptorBoundedSync(e,t)}catch(e){return preserveOpenClawOverflowError(e,t)}}export{readFileDescriptorBoundedSync$1 as a,readFileDescriptorBounded$1 as i,matchRootFileOpenFailure as n,openRootFileSync as r,canUseRootFileOpen as t};