Skip to content

feat(bindings): add Python/Node binding parity - #785

Merged
chaliy merged 2 commits into
mainfrom
claude/compare-bindings-parity-8TC6w
Mar 22, 2026
Merged

chaliy merged 2 commits into
mainfrom
claude/compare-bindings-parity-8TC6w

Conversation

@chaliy

@chaliy chaliy commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add python and external_functions options to Node binding (BashOptions), matching Python binding's constructor parameters
  • Add execute_or_throw / execute_sync_or_throw methods to Python binding (PyBash and BashTool), matching Node binding's error-throwing execution pattern
  • Add BashError exception class and get_version() to Python binding for parity
  • Add success field to Node ExecResult
  • Enable python Cargo feature in JS binding (was already enabled in Python binding)

Both bindings now expose python as an opt-in runtime option (defaults to false). The git feature is intentionally excluded from both bindings.

Test plan

  • cargo build — builds successfully
  • cargo test --all-features — all tests pass
  • cargo clippy --all-targets --all-features -- -D warnings — no warnings
  • cargo fmt --check — formatting clean
  • Verified python option defaults to false in both bindings
  • Verified git feature not compiled into either binding

chaliy added 2 commits March 22, 2026 21:08
Python additions:
- BashError exception class (raised by execute_*_or_throw)
- execute_sync_or_throw / execute_or_throw on Bash and BashTool
- get_version() module function

Node additions:
- ScriptedTool class (multi-tool orchestration via bash scripts)
- Python/Monty support (python option in BashOptions)
- external_functions config for embedded Python
- success field on ExecResult
- LangChain integration module (@everruns/bashkit/langchain)
- LangChain example (examples/langchain_integration.mjs)

Spec:
- Added binding parity checklist to 012-maintenance.md

CI:
- langchain_integration.mjs runs in JS workflow
Fixes mypy CI check by adding missing type stub entries for BashError
exception class, get_version function, and execute_or_throw methods.
Comment thread crates/bashkit-js/src/lib.rs Dismissed
@chaliy
chaliy merged commit 3e8b1d3 into main Mar 22, 2026
17 of 22 checks passed
@chaliy
chaliy deleted the claude/compare-bindings-parity-8TC6w branch March 22, 2026 22:01
yonas pushed a commit to yonasBSD/bashkit that referenced this pull request Mar 23, 2026
## Summary

Release v0.1.13 — patch release with 5 PRs since v0.1.12.

### Highlights

- **First contribution from @achicu!** Fixed `find` with multiple paths
silently discarding results when one path is missing (everruns#781)
- **Python/Node binding parity** — both bindings now expose the same API
surface (everruns#785)
- **Live mount/unmount** on running `Bash` instances for dynamic
filesystem composition (everruns#784)

### What's Changed

* fix(examples): exit langchain example to prevent NAPI event loop hang
(everruns#786) by @chaliy
* feat(bindings): add Python/Node binding parity (everruns#785) by @chaliy
* feat(fs): expose live mount/unmount on running Bash instance (everruns#784) by
@chaliy
* chore: add cargo-vet exemptions for jni-sys 0.3.1, 0.4.1 and
jni-sys-macros 0.4.1 (everruns#783) by @chaliy
* fix: find with multiple paths no longer discards results on missing
path (everruns#781) by @achicu
chaliy added a commit that referenced this pull request May 30, 2026
## Summary

- Add `python` and `external_functions` options to Node binding
(`BashOptions`), matching Python binding's constructor parameters
- Add `execute_or_throw` / `execute_sync_or_throw` methods to Python
binding (`PyBash` and `BashTool`), matching Node binding's
error-throwing execution pattern
- Add `BashError` exception class and `get_version()` to Python binding
for parity
- Add `success` field to Node `ExecResult`
- Enable `python` Cargo feature in JS binding (was already enabled in
Python binding)

Both bindings now expose `python` as an opt-in runtime option (defaults
to `false`). The `git` feature is intentionally excluded from both
bindings.

## Test plan

- [x] `cargo build` — builds successfully
- [x] `cargo test --all-features` — all tests pass
- [x] `cargo clippy --all-targets --all-features -- -D warnings` — no
warnings
- [x] `cargo fmt --check` — formatting clean
- [x] Verified `python` option defaults to `false` in both bindings
- [x] Verified `git` feature not compiled into either binding
chaliy added a commit that referenced this pull request May 30, 2026
## Summary

Release v0.1.13 — patch release with 5 PRs since v0.1.12.

### Highlights

- **First contribution from @achicu!** Fixed `find` with multiple paths
silently discarding results when one path is missing (#781)
- **Python/Node binding parity** — both bindings now expose the same API
surface (#785)
- **Live mount/unmount** on running `Bash` instances for dynamic
filesystem composition (#784)

### What's Changed

* fix(examples): exit langchain example to prevent NAPI event loop hang
(#786) by @chaliy
* feat(bindings): add Python/Node binding parity (#785) by @chaliy
* feat(fs): expose live mount/unmount on running Bash instance (#784) by
@chaliy
* chore: add cargo-vet exemptions for jni-sys 0.3.1, 0.4.1 and
jni-sys-macros 0.4.1 (#783) by @chaliy
* fix: find with multiple paths no longer discards results on missing
path (#781) by @achicu
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.

2 participants