Skip to content

feat(js): expose real filesystem mounts with per-mount readOnly support#1077

Merged
chaliy merged 1 commit intomainfrom
fix/issue-1066-js-mounts
Apr 6, 2026
Merged

feat(js): expose real filesystem mounts with per-mount readOnly support#1077
chaliy merged 1 commit intomainfrom
fix/issue-1066-js-mounts

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 6, 2026

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

  • cargo check -p bashkit-js compiles cleanly
  • cargo fmt passes
  • 3 new runtime_mount_* / runtime_unmount tests pass in realfs_tests.rs
  • CI green

Add MountConfig napi object and mounts option to BashOptions for
configuring real filesystem mounts at construction time. Add mountReal()
and unmount() runtime methods to both Bash and BashTool classes. Mount
configs are stored in SharedState and re-applied on reset(). Also fixes
pre-existing broken code (missing shared_state_from_opts function and
stale build_bash references in BashTool::reset).

Closes #1066
@chaliy chaliy merged commit 5e71007 into main Apr 6, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-1066-js-mounts branch April 6, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JS bindings: expose real filesystem mounts with per-mount readOnly support

1 participant