Skip to content

Commit 5e71007

Browse files
authored
feat(js): expose real filesystem mounts with per-mount readOnly support (#1077)
## Summary - Add `MountConfig` napi object and `mounts` option to `BashOptions` for configuring real filesystem mounts at construction time (host path, optional VFS path, optional readOnly flag defaulting to true) - Add `mountReal(hostPath, vfsPath, readOnly?)` and `unmount(vfsPath)` runtime methods to both `Bash` and `BashTool` classes - Mount configs stored in `SharedState` and re-applied on `reset()` for consistency - Enable `realfs` feature in bashkit-js Cargo.toml dependency - Fix pre-existing broken code: add missing `shared_state_from_opts` function and fix stale `build_bash` reference in `BashTool::reset` - Add 3 integration tests for runtime mount/unmount (readonly, readwrite, unmount verification) Closes #1066 ## Test plan - [x] `cargo check -p bashkit-js` compiles cleanly - [x] `cargo fmt` passes - [x] 3 new `runtime_mount_*` / `runtime_unmount` tests pass in `realfs_tests.rs` - [ ] CI green
1 parent 4a787fa commit 5e71007

File tree

3 files changed

+339
-141
lines changed

3 files changed

+339
-141
lines changed

crates/bashkit-js/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repository.workspace = true
1414
crate-type = ["cdylib"]
1515

1616
[dependencies]
17-
bashkit = { path = "../bashkit", features = ["scripted_tool", "python"] }
17+
bashkit = { path = "../bashkit", features = ["scripted_tool", "python", "realfs"] }
1818
napi = { workspace = true }
1919
napi-derive = { workspace = true }
2020
serde = { workspace = true }

0 commit comments

Comments
 (0)