Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Update docs
Tomas Valenta79b9dbaaa320
diff --git a/apps/web/src/app/(docs)/docs/legacy/guide/beta-migration/page.mdx b/apps/web/src/app/(docs)/docs/legacy/guide/beta-migration/page.mdxindex ce32eb652..2a1a75666 100644--- a/apps/web/src/app/(docs)/docs/legacy/guide/beta-migration/page.mdx+++ b/apps/web/src/app/(docs)/docs/legacy/guide/beta-migration/page.mdx@@ -280,7 +280,7 @@ You execute processes by calling `.commands.run()` method. By default, the methoYou can specify the timeout for the command execution by passing `timeoutMs`/`timeout` option. The default timeout is 60 seconds.-If the command fails with a non-zero exit it will raise `ProcessExitError` in Javascript, or `ProcessExitException` in Python, and you can catch and inspect the error for more info.+If the command fails with a non-zero exit it will raise `CommandExitError` in Javascript, or `CommandExitException` in Python, and you can catch and inspect the error for more info.<CodeGroup isRunnable={false}>```js@@ -388,7 +388,7 @@ import Sandbox from 'e2b'// Nowconst sandbox = await Sandbox.create()-await sandbox.files.watch('/path/in/sandbox', (event) => console.log(event))+await sandbox.files.watchDir('/path/in/sandbox', (event) => console.log(event))``````pythonfrom e2b import Sandbox@@ -402,7 +402,7 @@ from e2b import Sandbox# Nowsandbox = Sandbox()-watcher = sandbox.files.watch("/path/in/sandbox")+watcher = sandbox.files.watch_dir("/path/in/sandbox")for event in watcher:print(event)@@ -656,7 +656,7 @@ from e2b import Sandbox# Sync# sandbox = Sandbox()-# watcher = sandbox.files.watch("/path/in/sandbox")+# watcher = sandbox.files.watch_dir("/path/in/sandbox")# for event in watcher:# print(event)@@ -664,7 +664,7 @@ from e2b import Sandbox# Asyncsandbox = await AsyncSandbox.create()-await sandbox.files.watch("/path/in/sandbox", lambda event: print(event))+await sandbox.files.watch_dir("/path/in/sandbox", lambda event: print(event))```</CodeGroup>diff --git a/apps/web/src/app/(docs)/docs/quickstart/migrating-from-v0/page.mdx b/apps/web/src/app/(docs)/docs/quickstart/migrating-from-v0/page.mdxindex 51ce6b721..e9d5b4849 100644--- a/apps/web/src/app/(docs)/docs/quickstart/migrating-from-v0/page.mdx+++ b/apps/web/src/app/(docs)/docs/quickstart/migrating-from-v0/page.mdx@@ -66,19 +66,19 @@ pattern e2b_v0_to_v1_js() {} => `$sbx.commands.run($cmd, {$params})` where $params += `backgrund: true`,`const $watcher = $sbx.filesystem.watchDir($path)` => `` where {$program <: contains `$watcher.addEventListener($body)` => .,- $program <: contains `await $watcher.start()` => `await $sbx.files.watch($path, $body)`+ $program <: contains `await $watcher.start()` => `await $sbx.files.watchDir($path, $body)`},`let $watcher = $sbx.filesystem.watchDir($path)` => `` where {$program <: contains `$watcher.addEventListener($body)` => .,- $program <: contains `await $watcher.start()` => `await $sbx.files.watch($path, $body)`+ $program <: contains `await $watcher.start()` => `await $sbx.files.watchDir($path, $body)`},`var $watcher = $sbx.filesystem.watchDir($path)` => `` where {$program <: contains `$watcher.addEventListener($body)` => .,- $program <: contains `await $watcher.start()` => `await $sbx.files.watch($path, $body)`+ $program <: contains `await $watcher.start()` => `await $sbx.files.watchDir($path, $body)`},`$watcher = $sbx.filesystem.watchDir($path)` => `` where {$program <: contains `$watcher.addEventListener($body)` => .,- $program <: contains `await $watcher.start()` => `await $sbx.files.watch($path, $body)`+ $program <: contains `await $watcher.start()` => `await $sbx.files.watchDir($path, $body)`},`$sbx.id` => `$sbx.sandboxId`,`$sbx.fileURL` => `$sbx.uploadUrl()`,@@ -128,7 +128,7 @@ pattern e2b_v0_to_v1_py() {} => `$sbx.commands.run($cmd, $params, background=True)`,`watcher = $sbx.filesystem.watch_dir($path)` => `` where {$program <: contains `watcher.add_event_listener($body)` => .,- $program <: contains `await watcher.start()` => `await $sbx.files.watch($path, $body)`+ $program <: contains `await watcher.start()` => `await $sbx.files.watch_dir($path, $body)`},`$sbx.id` => `$sbx.sandbox_id`,`$sbx.file_url` => `$sbx.upload_url`,