just-bash-mcp 2.9.4 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,11 +7,14 @@ An MCP (Model Context Protocol) server that provides a sandboxed bash environmen
7
7
 
8
8
  Execute bash commands in a secure, isolated environment with an in-memory virtual filesystem.
9
9
 
10
- Built on top of [`just-bash`](https://github.com/vercel-labs/just-bash) v2.12.5.
10
+ Built on top of [`just-bash`](https://github.com/vercel-labs/just-bash) v3.0.1.
11
11
 
12
- ## What's New in v2.9.4
12
+ ## What's New in v3.0.0
13
13
 
14
- - **Synced with upstream `just-bash` v2.12.5** - Full upstream commands, APIs, and type exports
14
+ - **Synced with upstream `just-bash` v3.0.1** - Full upstream commands, APIs, and type exports
15
+ - **Byte-safe stdin handling** - Tracks the upstream v3 TypeScript-enforced stdin byte/UTF-8 model
16
+ - **Executor integration plumbing** - Includes upstream support for `js-exec` tool invocation hooks and executor package integration
17
+ - **ESM runtime fix** - Includes the upstream v3.0.1 dynamic `require("tty")`/`file` command crash fix
15
18
  - **Persistent sandbox tools** - `bash_sandbox_*` tools remain available for higher-level isolated workflows
16
19
  - **Defense-in-depth mode** - Opt-in monkey-patching of dangerous JS globals (`JUST_BASH_DEFENSE_IN_DEPTH=true`)
17
20
  - **Python support** - Python3 via the upstream emscripten CPython runtime (`JUST_BASH_ENABLE_PYTHON=true`)
@@ -28,6 +31,30 @@ Built on top of [`just-bash`](https://github.com/vercel-labs/just-bash) v2.12.5.
28
31
  - **MountableFS Support**: Mount multiple filesystems at different paths
29
32
  - **ReadWriteFS Support**: Direct read-write access to real directories
30
33
 
34
+ ## Synced Upstream Features
35
+
36
+ The current wrapper release tracks `just-bash` `v3.0.1`, which brings in the post-`v2.12.5` upstream feature set, including:
37
+
38
+ - Breaking v3 stdin byte/UTF-8 handling updates for custom commands
39
+ - Executor and `js-exec` integration plumbing
40
+ - ESM Node bundle dynamic-require fix for commands that load `tty` transitively
41
+ - `jq` control-character handling inside JSON strings
42
+ - Faster `grep` pattern matching via matcher reuse and literal pre-filtering
43
+ - AWK lexer fixes for POSIX multi-line statement continuation
44
+ - Bug fixes across network, sqlite3, xan, rg, terminal rendering, and CI
45
+ - Workspace/Changesets migration with unchanged public import paths and bin entries
46
+ - Defense-in-depth hardening across the runtime and filesystem layers
47
+ - Defense-in-depth enabled by default upstream, plus additional hardening passes
48
+ - Filesystem hardening for overlays, external filesystems, symlinks, and broken symlink handling
49
+ - Virtualized PID and shell security invariant improvements
50
+ - Updated `Sandbox.runCommand()` signature compatibility
51
+ - Python runtime migration from Pyodide to emscripten CPython
52
+ - Follow-up Python runtime hardening and cleanup
53
+ - UTF-8 handling and write-path fixes
54
+ - CommonJS compatibility improvements upstream
55
+ - `ls -F` / `--classify` support
56
+ - Additional cleanup and internal hardening work shipped through `v3.0.1`
57
+
31
58
  ## Installation
32
59
 
33
60
  ### From npm (recommended)
@@ -122,6 +149,8 @@ Add to your MCP settings:
122
149
  | `JUST_BASH_MAX_COMMAND_COUNT` | Maximum total commands per execution | `10000` |
123
150
  | `JUST_BASH_MAX_LOOP_ITERATIONS` | Maximum iterations per loop | `10000` |
124
151
  | `JUST_BASH_ENABLE_PYTHON` | Enable Python3 via emscripten CPython (`true`/`false`) | `false` |
152
+ | `JUST_BASH_ENABLE_JAVASCRIPT` | Enable upstream `js-exec` via QuickJS (`true`/`false`) | `false` |
153
+ | `JUST_BASH_JAVASCRIPT_BOOTSTRAP` | Bootstrap JavaScript code before each `js-exec` invocation | - |
125
154
  | `JUST_BASH_DEFENSE_IN_DEPTH` | Enable defense-in-depth mode (`true`/`false`) | `false` |
126
155
  | `JUST_BASH_DEFENSE_IN_DEPTH_AUDIT` | Audit mode: log violations but don't block | `false` |
127
156
  | `JUST_BASH_DEFENSE_IN_DEPTH_LOG` | Log violations to console | `false` |
@@ -134,6 +163,19 @@ Add to your MCP settings:
134
163
 
135
164
  ## Tools
136
165
 
166
+ ### `bash`
167
+
168
+ Execute bash commands in the sandbox environment. This is the upstream-compatible MCP exposure of the `just-bash`/`bash-tool` execute interface and accepts the same single `command` argument.
169
+
170
+ ```json
171
+ {
172
+ "name": "bash",
173
+ "arguments": {
174
+ "command": "ls -la && cat package.json | head -5"
175
+ }
176
+ }
177
+ ```
178
+
137
179
  ### `bash_exec`
138
180
 
139
181
  Execute a bash command in a sandboxed environment. Each execution is isolated.
@@ -193,7 +235,7 @@ Persistent isolated-environment helpers:
193
235
  `awk`, `base64`, `column`, `comm`, `cut`, `diff`, `expand`, `fold`, `grep` (+ `egrep`, `fgrep`), `head`, `join`, `md5sum`, `nl`, `od`, `paste`, `printf`, `rev`, `rg` (ripgrep), `sed`, `sha1sum`, `sha256sum`, `sort`, `strings`, `tac`, `tail`, `tr`, `unexpand`, `uniq`, `wc`, `xargs`
194
236
 
195
237
  ### Data Processing
196
- `jq` (JSON), `sqlite3` (SQLite), `xan` (CSV), `yq` (YAML/XML/TOML)
238
+ `jq` (JSON), `js-exec` (JavaScript/TypeScript via QuickJS when enabled), `sqlite3` (SQLite), `xan` (CSV), `yq` (YAML/XML/TOML)
197
239
 
198
240
  ### Compression & Archives
199
241
  `gzip` (+ `gunzip`, `zcat`), `tar`
@@ -272,7 +314,7 @@ Persistent isolated-environment helpers:
272
314
 
273
315
  ## Upstream API Coverage
274
316
 
275
- This wrapper integrates the full public API surface of `just-bash` v2.12.5:
317
+ This wrapper integrates the full public API surface of `just-bash` v3.0.1:
276
318
 
277
319
  | Category | Exports Used |
278
320
  |----------|-------------|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash-mcp",
3
- "version": "2.9.4",
3
+ "version": "3.0.0",
4
4
  "description": "MCP server providing a sandboxed bash environment using just-bash",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -21,6 +21,7 @@
21
21
  "scripts": {
22
22
  "start": "node src/index.ts",
23
23
  "dev": "node --watch src/index.ts",
24
+ "bench:stdio": "bash ./bench/hyperfine-stdin-vs-bash.sh",
24
25
  "lint": "oxlint --type-aware",
25
26
  "lint:fix": "oxlint --type-aware --fix",
26
27
  "typecheck": "oxlint --type-aware --type-check",
@@ -60,7 +61,7 @@
60
61
  "packageManager": "bun@1.3.8",
61
62
  "dependencies": {
62
63
  "@modelcontextprotocol/sdk": "^1.27.0",
63
- "just-bash": "^2.12.5",
64
+ "just-bash": "^3.0.1",
64
65
  "zod": "^4.3.6"
65
66
  },
66
67
  "devDependencies": {