█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Cloudflare Computer

Durable Object के अंदर बना एक वर्चुअल फ़ाइल सिस्टम, जो agent को Workers isolates और पूरे Linux containers में एक ही एक्ज़ीक्यूशन सरफ़ेस देता है

Code Sandboxes & Isolationओपन सोर्स
अपडेट किया गया
3 अग॰ 2026
भाषा
TypeScript
लाइसेंस
MIT
कवरेज
1 story
$npm install @cloudflare/computer

नया क्या है

3 अग॰ 2026

Cloudflare published @cloudflare/computer as a preview: a virtual filesystem in a Durable Object with a Workers-isolate backend for most tasks and a full Linux container backend for anything needing npm or native binaries.

ताज़ा खबरें

संक्षेप में

Cloudflare Computer क्या है?

Cloudflare Computer Durable Object के अंदर बना एक वर्चुअल फ़ाइल सिस्टम, जो agent को Workers isolates और पूरे Linux containers में एक ही एक्ज़ीक्यूशन सरफ़ेस देता है. यह Agents & Automation टूल्स की Code Sandboxes & Isolation श्रेणी में आता है; ओपन सोर्स है, TypeScript में लिखा गया है और MIT लाइसेंस के तहत है।

अपडेट किया गया Markdown वर्शन ↗

सारांश

Cloudflare Computer एक वर्चुअल फ़ाइल सिस्टम है, जो Durable Object के अंदर रहता है। यह Durable Object SQLite में प्रामाणिक (authoritative) state रखता है और एक प्लगेबल एक्ज़ीक्यूशन सरफ़ेस, `workspace.runtime`, देता है। काम चलाने के लिए एक ही entry point है, `workspace.runtime.exec(source, { backend })`, और चुना गया backend तय करता है कि `source` एक shell command है या ECMAScript module। एक Workspace कई backends को स्थिर IDs के तहत register कर सकता है, उन्हें पहली बार इस्तेमाल होने पर lazily connect करता है, और इसे बिना किसी backend के भी बनाया जा सकता है, जिससे आपको सिर्फ़ फ़ाइल सिस्टम मिलता है।

इसमें तीन backends आते हैं। container backend SQLite state को एक sandbox container में असली FUSE mount के रूप में दिखाता है, जहाँ `computerd` नाम का sandbox-side daemon state को mount करता है और capnweb RPC channel के ज़रिए बदलावों को वापस sync करता है। इसमें पूरा Linux userland है, असली binaries हैं और असली network है। isolate-shell backend एक Dynamic Worker में just-bash चलाता है और Workers RPC के ज़रिए प्रामाणिक Workspace से बात करता है, इसलिए कोई दूसरा store या sync round trip नहीं होता। isolate-JavaScript backend एक नए Dynamic Worker में ECMAScript module चलाता है, जिसमें structured input और results, टिकाऊ relative imports, configured libraries, Workspace-backed `node:fs/promises`, और भरोसेमंद `ws:git` तथा `ws:artifacts` modules शामिल हैं।

यह repository एक छोटा monorepo है: `@cloudflare/dofs` Durable Object SQLite फ़ाइल सिस्टम और सिंक प्रोटोकॉल है, `@cloudflare/computer-rpc` Durable Object और daemon के बीच साझा होने वाले capnweb wire types ले जाता है, `@cloudflare/computerd` container में चलने वाला FUSE-mounting daemon है, और `@cloudflare/computer` वह top-level पैकेज है जिसे Durable Objects इस्तेमाल करते हैं। Cloudflare इस पैकेज को केवल preview के लिए बताता है: APIs अस्थिर (unstable) हैं, `docs/` के अंतर्गत दी गई specification भविष्य की मंशा है, कोड का वर्णन नहीं, और यह अभी production के लिए साफ़ तौर पर उपयुक्त नहीं है। यह project issues और design proposals स्वीकार करता है, लेकिन बिना माँगे आए pull requests नहीं।

यह क्या करता है

  • Durable Object के अंदर एक SQLite-backed वर्चुअल फ़ाइल सिस्टम, जो agent के काम की प्रामाणिक state के रूप में रहता है
  • हर रजिस्टर्ड backend पर एक ही एक्ज़ीक्यूशन एंट्री पॉइंट: workspace.runtime.exec(source, { backend })
  • Container backend: computerd workspace को sandbox में एक असली FUSE फ़ाइल सिस्टम के रूप में mount करता है, जिसमें पूरा Linux userland और network है
  • Isolate shell backend, जो Dynamic Worker में just-bash चलाता है और Workers RPC के ज़रिए Workspace से बात करता है, बिना किसी दूसरे store के
  • Isolate JavaScript backend, जिसमें structured input/results, टिकाऊ relative imports, Workspace-backed node:fs/promises और भरोसेमंद ws:git व ws:artifacts modules हैं
  • MCP, egress policies, artifacts publishing, Workers AI assets और container बनाम isolate runtime की side-by-side तुलना के लिए चलाने योग्य उदाहरण

शुरू करें

सबसे ऊपर वाले @cloudflare/computer पैकेज के साथ शुरू करें और entrypoint map व fs/runtime के उदाहरणों के लिए उसका README देखें; examples डायरेक्टरी में चलाने योग्य Worker workspaces हैं, जिन्हें आप कॉपी कर सकते हैं।

पैकेज इंस्टॉल करें

@cloudflare/computer वह पैकेज है जिसे Durable Objects इस्तेमाल करते हैं; इसके इंस्टॉलेशन के चरण और entrypoint map इसके अपने README में दिए गए हैं।

bashbash
npm install @cloudflare/computer

एक एक्ज़ीक्यूशन backend चुनें

exec एकमात्र entry point है। आप कौन-सा backend चुनते हैं, यह तय करता है कि source एक shell command है या ECMAScript module; backends पहली बार इस्तेमाल होने पर lazily connect होते हैं।

tsts
await workspace.runtime.exec(source, { backend })

एक चलने योग्य उदाहरण से शुरू करें

examples/ के अंतर्गत हर डायरेक्टरी का अपना README वाला Worker workspace है; container और worker-shell एक ही write/read/exec HTTP surface देते हैं, इसलिए backends की तुलना के लिए ये सबसे आसान तरीका हैं।

bashbash
git clone https://github.com/cloudflare/computer.git
cd computer/examples/worker-shell

Design spec को सही अपेक्षाओं के साथ पढ़ें

docs/ डायरेक्टरी एक भविष्य-उन्मुख specification है; इसे मंशा समझने के लिए पढ़ें, आज के कोड का वर्णन मानकर नहीं। docs/19_performance.md में fs-bench के आँकड़े हैं, जिसमें cloudflare/sandbox-sdk में npm install के साथ तुलना भी शामिल है।

टेक्स्टटेक्स्ट
docs/README.md
docs/19_performance.md

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • एक agent को टिकाऊ वर्किंग डायरेक्टरी देना, जिसकी state turns और sessions के बीच बची रहे
  • ज़्यादातर agent का काम सस्ते Workers isolate में चलाना, और केवल वे चरण जिन्हें npm या native binaries चाहिए, Linux container में भेजना
  • stateless sandbox के बजाय टिकाऊ workspace पर आधारित एक Code Mode MCP tool उपलब्ध कराना
  • हर execution पर egress policy लागू करना — कोई नहीं, सभी, या कस्टम allowlist — shell, JavaScript और container backends में

How Cloudflare Computer compares

Cloudflare Computer alongside other open-source code sandboxes & isolation tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Daytona★ 71.2kAI-जनरेटेड कोड चलाने के लिए सुरक्षित, लचीले सैंडबॉक्स
NVIDIA NemoClaw★ 23.1kNVIDIA का रेफ़रेंस स्टैक, जिससे तीसरे-पक्ष के एजेंट OpenShell सैंडबॉक्स के अंदर चलाए जा सकते हैं
OpenShell★ 22.1kNVIDIA का ओपन सोर्स, नीति-आधारित sandbox रनटाइम, जो AI एजेंट्स के पूरे बेड़े को सुरक्षित रूप से चलाता है
OpenSandbox★ 18.1kAI-जनित कोड को अलग-अलग कंटेनर में चलाने वाला सामान्य-उद्देश्य सैंडबॉक्स प्लेटफ़ॉर्म
E2B★ 15.1kसुरक्षित, अलग-थलग cloud sandboxes में AI-generated कोड चलाएं
AX (Agent Executor)★ 15kGoogle का डिक्लेरेटिव ऑर्केस्ट्रेटर, जो Kubernetes क्लस्टर पर सैंडबॉक्स में अविश्वसनीय agent टास्क चलाता है
AWS Emulator★ 10.4kAWS APIs का मुफ़्त लोकल स्टैंड-इन, टेस्ट, CI और AI coding agents के लिए
Cloudflare Computer★ 10kDurable Object के अंदर बना एक वर्चुअल फ़ाइल सिस्टम, जो agent को Workers isolates और पूरे Linux containers में एक ही एक्ज़ीक्यूशन सरफ़ेस देता है