e873ee94b6
Client-side counterpart to [e2b-dev/infra#2982](https://github.com/e2b-dev/infra/pull/2982): adds an `allowNetworkMounts`/`allow_network_mounts` option to filesystem directory watching across the JS and Python (sync + async) SDKs, so clients can explicitly opt into watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE), which envd rejects by default. Events on network mounts may be unreliable or not delivered at all, hence the explicit opt-in. This regenerates the filesystem proto code from the updated spec and threads the flag through `watchDir`/`watch_dir` (streaming `WatchDir` and polling `CreateWatcher`). The option requires envd 0.6.4 (shipped by the infra PR); using it against an older sandbox throws a `TemplateError`/`TemplateException`. Default behavior is unchanged. Includes new watch tests for all three SDKs and a minor-bump changeset for `e2b` and `@e2b/python-sdk`. > Note: the new tests exercise the flag on a regular directory (a network mount can't be set up from SDK tests) and require envd 0.6.4, so this should land with/after the infra deploy. All pre-existing watch tests pass; the new ones currently fail with the expected `TemplateError` against the deployed envd. ### Usage **JavaScript** ```ts const handle = await sandbox.files.watchDir( '/mnt/nfs-share/my-dir', (event) => console.log(event.type, event.name), { allowNetworkMounts: true } ) ``` **Python (async)** ```python handle = await sandbox.files.watch_dir( "/mnt/nfs-share/my-dir", on_event=lambda e: print(e.type, e.name), allow_network_mounts=True, ) ``` **Python (sync)** ```python handle = sandbox.files.watch_dir("/mnt/nfs-share/my-dir", allow_network_mounts=True) for e in handle.get_new_events(): print(e.type, e.name) ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>