♻️ Unify external tool invocations behind shared ExternalTool trait#117
Merged
renardeinside merged 4 commits intomainfrom Feb 21, 2026
Merged
♻️ Unify external tool invocations behind shared ExternalTool trait#117renardeinside merged 4 commits intomainfrom
renardeinside merged 4 commits intomainfrom
Conversation
… API across all tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ExternalTooltrait andcrates/core/src/external/module with per-tool implementations (Uv,UvTool,Bun,Git,Gh,DatabricksCli)UvCommand,BunCommand,ApxCommandstructs and rawCommand::new()calls across ~20 files with consistent abstractionsCommandOutputvalue type andCommandErrorenum (viathiserror) replacing repeated stdout/stderr destructuring and ad-hoc error stringsget_databricks_sdk_version()/get_databricks_sdk_version_for_project()into a single function with optionalproject_dirparameterChanges
UvCommand/BunCommand/ApxCommand+ rawCommand::new()ExternalTooltrait + per-tool structsResult<_, String>,FeedbackError, raw status checksCommandErrorenum withNotFound,Spawn,Failed,TimeoutvariantsString::from_utf8_lossy(&output.stdout)repeated 15+ timesCommandOutputwith.check()and.into_stdout()helpersCommand::new("git")+ helper functionsGitstruct withinit(),add(),commit(),is_inside_work_tree()DatabricksCli::apps_logs()+ thin handlerget_databricks_sdk_version(project_dir: Option<&Path>)New files
crates/core/src/external/mod.rs—CommandOutput,CommandError,ExternalTooltrait,run_command/run_command_synccrates/core/src/external/uv.rs—Uv,UvTool,ApxToolcrates/core/src/external/bun.rs—Buncrates/core/src/external/git.rs—Gitcrates/core/src/external/gh.rs—Ghcrates/core/src/external/databricks.rs—DatabricksCli,AppsLogsArgs,AppsLogsResultTest plan
cargo build --workspace— compiles cleanlycargo clippy --workspace— no warningscargo test --workspace— all 337 tests passcargo fmt --all -- --check— formatted🤖 Generated with Claude Code