just-bash - एजेंट्स के लिए Bash सिम्युलेशन एनवायरनमेंट
(github.com/vercel-labs)- Vercel द्वारा बनाया गया "Bash for Agents"
- सुरक्षित और sandboxed bash environment की ज़रूरत वाले AI agents के लिए डिज़ाइन किया गया TypeScript-आधारित virtual Bash environment
- इन-मेमोरी virtual filesystem (InMemoryFs) पर चलता है, और यह sandboxed execution environment है जिसमें वास्तविक डिस्क तक पहुँच संभव नहीं है
- डिफ़ॉल्ट रूप से network access ब्लॉक रहती है, और आवश्यकता होने पर
curlके ज़रिए अनुमत URL-आधारित सुरक्षित network requests का समर्थन मिलता है - केवल दिए गए filesystem तक ही पहुँच संभव है, और infinite loop·recursive execution prevention फीचर शामिल है
- binary या WASM execution समर्थित नहीं है
- API usage में
exec()यूनिट के आधार पर isolation होता है, इसलिए environment variables, functions और working directory कॉल्स के बीच कायम नहीं रहते हैं (सिर्फ filesystem state बनी रहती है) - creation arguments के ज़रिए initial files, environment variables, working directory, execution limits आदि की बारीक settings संभव हैं
- Lazy file loading का समर्थन, जिससे ज़रूरत पड़ने पर ही file contents को synchronous/asynchronous function के रूप में बनाया जा सकता है
- user-defined commands (
defineCommand) फीचर के ज़रिए TypeScript-आधारित custom commands जोड़े जा सकते हैंCommandContextके माध्यम सेfs,cwd,env,stdin,execतक पहुँच का समर्थन
- filesystem implementations के 4 प्रकार उपलब्ध
- InMemoryFs: पूरी तरह memory-आधारित
- OverlayFs: read डिस्क से, write memory में
- ReadWriteFs: वास्तविक डिस्क पर read·write संभव
- MountableFs: कई filesystems को path के अनुसार mount करके unified namespace बनाना
- AI SDK integration tool के रूप में
bash-toolका समर्थनgenerateText()के साथ मिलाकर AI model को Bash commands सुरक्षित रूप से execute करने के लिए डिज़ाइन किया गया
- Vercel Sandbox-compatible API उपलब्ध
Sandboxclass के माध्यम से @vercel/sandbox के समान interface के साथ उपयोग संभव- आवश्यकता होने पर वास्तविक VM-आधारित sandbox में आसानी से स्विच किया जा सकता है
- CLI के रूप में
just-bashcommand उपलब्ध- OverlayFS के आधार पर रन होता है और execution के बाद सभी write contents memory से हटा दिए जाते हैं
--jsonoption के ज़रिए programmatic result output का समर्थन
- interactive shell mode (
pnpm shell) उपलब्ध- डिफ़ॉल्ट रूप से इंटरनेट access अनुमत,
--no-networkसे ब्लॉक किया जा सकता है
- डिफ़ॉल्ट रूप से इंटरनेट access अनुमत,
- समर्थित commands
- file manipulation, text processing, data processing, compression, network आदि के अधिकांश standard Bash commands शामिल
jq,sqlite3,python3(Pyodide-आधारित) जैसे data processing commands का वैकल्पिक समर्थन- shell features के रूप में pipes, redirection, conditionals, loops, functions, variables, glob patterns आदि अधिकांश Bash syntax implemented
- default directory structure में
/home/user,/bin,/usr/bin,/tmpआदि के साथ Unix-जैसा environment उपलब्ध - network access control URL·HTTP method-आधारित whitelist तरीके से
dangerouslyAllowFullInternetAccessoption के ज़रिए पूर्ण अनुमति संभव
- Python और SQLite support वैकल्पिक रूप से enable किए जा सकते हैं
- Pyodide-आधारित Python, WASM-आधारित SQLite (sql.js) के माध्यम से पूरी तरह sandboxed execution की गारंटी
- execution protection features के रूप में function depth, command count, loop iteration count आदि के लिए execution limits सेट किए जा सकते हैं
- Apache-2.0 लाइसेंस
अभी कोई टिप्पणी नहीं है.