[PR #575] [MERGED] refactor(node-vfs): make VfsSandbox filesystem-only #574

Closed
opened 2026-06-05 17:23:48 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/575
Author: @hntrl
Created: 6/2/2026
Status: Merged
Merged: 6/2/2026
Merged by: @hntrl

Base: mainHead: hunter/remove-node-vfs-execute


📝 Commits (9)

  • 5257db9 refactor(node-vfs): remove shell execution from vfs backend
  • eb7c5c8 refactor(node-vfs): align VfsSandbox to BackendProtocolV2
  • c446ee2 refactor(node-vfs): rename sandbox module to backend
  • d6e176e test(node-vfs): rename sandbox tests to backend tests
  • 873978f fix(node-vfs): harden glob matching against ReDoS
  • b6eab4b refactor(node-vfs): introduce VfsBackend with sandbox aliases
  • 3b4f897 refactor(node-vfs): remove legacy sandbox aliases
  • d82fcd0 chore(examples): rename vfs sandbox example to vfs backend
  • a073463 cr

📊 Changes

10 files changed (+1515 additions, -1506 deletions)

View changed files

.changeset/calm-carrots-allow.md (+9 -0)
📝 examples/sandbox/vfs-backend.ts (+30 -37)
📝 libs/providers/node-vfs/README.md (+45 -55)
libs/providers/node-vfs/src/backend.int.test.ts (+223 -0)
📝 libs/providers/node-vfs/src/backend.test.ts (+18 -98)
libs/providers/node-vfs/src/backend.ts (+1172 -0)
📝 libs/providers/node-vfs/src/index.ts (+12 -12)
libs/providers/node-vfs/src/sandbox.int.test.ts (+0 -612)
libs/providers/node-vfs/src/sandbox.ts (+0 -679)
📝 libs/providers/node-vfs/src/types.ts (+6 -13)

📄 Description

Summary

This PR removes command-execution semantics from @langchain/node-vfs and aligns VfsSandbox with BackendProtocolV2 as a filesystem-only backend.

The provider no longer uses sandbox execution abstractions and now performs core file operations directly against the in-memory VFS.

Changes

Protocol alignment

  • VfsSandbox now implements BackendProtocolV2 directly instead of extending sandbox/base-execution abstractions.
  • Removed command execution from the provider surface (execute is no longer part of this backend implementation).
  • Removed timeout from VfsSandboxOptions and corresponding docs.

Runtime behavior

  • Added native backend implementations for:
    • read
    • readRaw
    • write
    • edit
    • ls
    • grep
    • glob
  • Kept upload/download support and added path confinement handling for invalid traversal paths.
  • Continued in-memory VFS-only operation (no temp-dir shell sync path).

Tests and docs

  • Updated unit and integration tests to remove execute-focused assertions and validate filesystem behavior.
  • Updated package docs to describe BackendProtocolV2 usage and removed execute/timeout references.
  • Added changeset for @langchain/node-vfs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/575 **Author:** [@hntrl](https://github.com/hntrl) **Created:** 6/2/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@hntrl](https://github.com/hntrl) **Base:** `main` ← **Head:** `hunter/remove-node-vfs-execute` --- ### 📝 Commits (9) - [`5257db9`](https://github.com/langchain-ai/deepagentsjs/commit/5257db9b404ec60cc59a2b691e0e9a299a53def1) refactor(node-vfs): remove shell execution from vfs backend - [`eb7c5c8`](https://github.com/langchain-ai/deepagentsjs/commit/eb7c5c85cfe675fef1c5326bf4a096f0d3990d7c) refactor(node-vfs): align VfsSandbox to BackendProtocolV2 - [`c446ee2`](https://github.com/langchain-ai/deepagentsjs/commit/c446ee2b431e67e935d15e437ede7d7d44bc7674) refactor(node-vfs): rename sandbox module to backend - [`d6e176e`](https://github.com/langchain-ai/deepagentsjs/commit/d6e176e876bb55ad6284031b8186ce92765b1a96) test(node-vfs): rename sandbox tests to backend tests - [`873978f`](https://github.com/langchain-ai/deepagentsjs/commit/873978ff302fd2b9b799bb24106b1a1774bbd5f3) fix(node-vfs): harden glob matching against ReDoS - [`b6eab4b`](https://github.com/langchain-ai/deepagentsjs/commit/b6eab4b237f1eb2622e9b19efd3ed21c26d9acd3) refactor(node-vfs): introduce VfsBackend with sandbox aliases - [`3b4f897`](https://github.com/langchain-ai/deepagentsjs/commit/3b4f8976b34a4f0b9685c59085172ce2073e4d44) refactor(node-vfs): remove legacy sandbox aliases - [`d82fcd0`](https://github.com/langchain-ai/deepagentsjs/commit/d82fcd019a5ca1bcbcdad8aac53d4481e5a3ff7d) chore(examples): rename vfs sandbox example to vfs backend - [`a073463`](https://github.com/langchain-ai/deepagentsjs/commit/a073463bfdb6286d0ca19468dade2d0a388b7ca9) cr ### 📊 Changes **10 files changed** (+1515 additions, -1506 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/calm-carrots-allow.md` (+9 -0) 📝 `examples/sandbox/vfs-backend.ts` (+30 -37) 📝 `libs/providers/node-vfs/README.md` (+45 -55) ➕ `libs/providers/node-vfs/src/backend.int.test.ts` (+223 -0) 📝 `libs/providers/node-vfs/src/backend.test.ts` (+18 -98) ➕ `libs/providers/node-vfs/src/backend.ts` (+1172 -0) 📝 `libs/providers/node-vfs/src/index.ts` (+12 -12) ➖ `libs/providers/node-vfs/src/sandbox.int.test.ts` (+0 -612) ➖ `libs/providers/node-vfs/src/sandbox.ts` (+0 -679) 📝 `libs/providers/node-vfs/src/types.ts` (+6 -13) </details> ### 📄 Description ## Summary This PR removes command-execution semantics from `@langchain/node-vfs` and aligns `VfsSandbox` with `BackendProtocolV2` as a filesystem-only backend. The provider no longer uses sandbox execution abstractions and now performs core file operations directly against the in-memory VFS. ## Changes ### Protocol alignment - `VfsSandbox` now implements `BackendProtocolV2` directly instead of extending sandbox/base-execution abstractions. - Removed command execution from the provider surface (`execute` is no longer part of this backend implementation). - Removed `timeout` from `VfsSandboxOptions` and corresponding docs. ### Runtime behavior - Added native backend implementations for: - `read` - `readRaw` - `write` - `edit` - `ls` - `grep` - `glob` - Kept upload/download support and added path confinement handling for invalid traversal paths. - Continued in-memory VFS-only operation (no temp-dir shell sync path). ### Tests and docs - Updated unit and integration tests to remove execute-focused assertions and validate filesystem behavior. - Updated package docs to describe `BackendProtocolV2` usage and removed execute/timeout references. - Added changeset for `@langchain/node-vfs`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:23:48 -04:00
yindo closed this issue 2026-06-05 17:23:48 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#574