[PR #236] [MERGED] feat(deepagents): add local shell backend #287

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/236
Author: @christian-bromann
Created: 2/18/2026
Status: Merged
Merged: 2/18/2026
Merged by: @christian-bromann

Base: mainHead: cb/local-shell-backend


📝 Commits (7)

📊 Changes

25 files changed (+997 additions, -95 deletions)

View changed files

.changeset/ready-nails-open.md (+5 -0)
📝 .gitignore (+2 -1)
examples/backends/local-shell-backend.ts (+54 -0)
📝 internal/standard-tests/src/index.ts (+3 -6)
📝 internal/standard-tests/src/sandbox.ts (+1 -1)
📝 internal/standard-tests/src/tests/edit.ts (+7 -28)
📝 internal/standard-tests/src/tests/glob-info.ts (+2 -4)
📝 internal/standard-tests/src/tests/grep-raw.ts (+4 -14)
📝 internal/standard-tests/src/tests/initial-files.ts (+9 -12)
📝 internal/standard-tests/src/tests/integration.ts (+3 -9)
📝 internal/standard-tests/src/tests/lifecycle.ts (+6 -5)
📝 internal/standard-tests/src/tests/ls-info.ts (+3 -8)
📝 internal/standard-tests/src/tests/read.ts (+1 -1)
📝 internal/standard-tests/src/tests/write.ts (+1 -1)
📝 internal/standard-tests/src/types.ts (+1 -1)
📝 libs/deepagents/README.md (+10 -1)
📝 libs/deepagents/package.json (+1 -0)
📝 libs/deepagents/src/backends/filesystem.ts (+2 -2)
📝 libs/deepagents/src/backends/index.ts (+4 -0)
libs/deepagents/src/backends/local-shell.int.test.ts (+44 -0)

...and 5 more files

📄 Description

Summary

  • Adds LocalShellBackend, a new backend that extends FilesystemBackend with unrestricted local shell command execution via spawnSync() — porting the Python LocalShellBackend to JS
  • Supports configurable timeout, output truncation, custom environment variables, and inheritEnv for inheriting the parent process environment
  • Includes 18 unit tests covering execution, error handling, timeouts, truncation, env vars, filesystem integration, and virtual mode
  • Adds an example at examples/backends/local-shell-backend.ts

🔄 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/236 **Author:** [@christian-bromann](https://github.com/christian-bromann) **Created:** 2/18/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@christian-bromann](https://github.com/christian-bromann) **Base:** `main` ← **Head:** `cb/local-shell-backend` --- ### 📝 Commits (7) - [`88aff9e`](https://github.com/langchain-ai/deepagentsjs/commit/88aff9e353e290fe04fa30f6ae88dca1e68d314c) feat(deepagents): add local shell backend - [`87f8778`](https://github.com/langchain-ai/deepagentsjs/commit/87f877832e6a6257471bd7a95485f5d4627c6d87) format - [`c246660`](https://github.com/langchain-ai/deepagentsjs/commit/c246660754b250719da1c1431efe91264fe43889) make it async - [`475e631`](https://github.com/langchain-ai/deepagentsjs/commit/475e631e0c2d01921579803b3d42e81d28b5c727) update readme - [`d24152f`](https://github.com/langchain-ai/deepagentsjs/commit/d24152fa0a2d14fccdd45fcc4d0ae0f47d5723dd) add integration tests - [`8e4bf12`](https://github.com/langchain-ai/deepagentsjs/commit/8e4bf127013dfcbeb879f7d21d36687d388df872) format - [`ecc8da6`](https://github.com/langchain-ai/deepagentsjs/commit/ecc8da63eace20d3b707f3973d44da6f4a7ccc48) fix types ### 📊 Changes **25 files changed** (+997 additions, -95 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/ready-nails-open.md` (+5 -0) 📝 `.gitignore` (+2 -1) ➕ `examples/backends/local-shell-backend.ts` (+54 -0) 📝 `internal/standard-tests/src/index.ts` (+3 -6) 📝 `internal/standard-tests/src/sandbox.ts` (+1 -1) 📝 `internal/standard-tests/src/tests/edit.ts` (+7 -28) 📝 `internal/standard-tests/src/tests/glob-info.ts` (+2 -4) 📝 `internal/standard-tests/src/tests/grep-raw.ts` (+4 -14) 📝 `internal/standard-tests/src/tests/initial-files.ts` (+9 -12) 📝 `internal/standard-tests/src/tests/integration.ts` (+3 -9) 📝 `internal/standard-tests/src/tests/lifecycle.ts` (+6 -5) 📝 `internal/standard-tests/src/tests/ls-info.ts` (+3 -8) 📝 `internal/standard-tests/src/tests/read.ts` (+1 -1) 📝 `internal/standard-tests/src/tests/write.ts` (+1 -1) 📝 `internal/standard-tests/src/types.ts` (+1 -1) 📝 `libs/deepagents/README.md` (+10 -1) 📝 `libs/deepagents/package.json` (+1 -0) 📝 `libs/deepagents/src/backends/filesystem.ts` (+2 -2) 📝 `libs/deepagents/src/backends/index.ts` (+4 -0) ➕ `libs/deepagents/src/backends/local-shell.int.test.ts` (+44 -0) _...and 5 more files_ </details> ### 📄 Description ## Summary - Adds `LocalShellBackend`, a new backend that extends `FilesystemBackend` with unrestricted local shell command execution via `spawnSync()` — porting the Python `LocalShellBackend` to JS - Supports configurable timeout, output truncation, custom environment variables, and `inheritEnv` for inheriting the parent process environment - Includes 18 unit tests covering execution, error handling, timeouts, truncation, env vars, filesystem integration, and virtual mode - Adds an example at `examples/backends/local-shell-backend.ts` --- <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:22:31 -04:00
yindo closed this issue 2026-06-05 17:22:31 -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#287