bashkit

Migrating to bashkit-scripted-tool#

ScriptedTool, ToolDef, ToolRegistry, and everything built on them moved out of the bashkit crate into bashkit-scripted-tool. It is published to crates.io and released in lockstep with bashkit (same version number). bashkit keeps the interpreter and the BashTool contract.

The scripted_tool feature of bashkit is gone (removed after 0.18.2). Behavior is unchanged: same types, same builders, same logic-only shell, same security defaults.

Rust#

1. Cargo.toml#

Before:

bashkit = { version = "0.18.2", features = ["scripted_tool", "python", "typescript", "jq"] }

After:

bashkit = { version = "0.18.2", features = ["python", "typescript", "jq"] }
bashkit-scripted-tool = { version = "0.18.2", features = ["python", "typescript", "jq"] }

Keep bashkit only if you use it directly (Bash, BashTool, the Tool trait). bashkit-scripted-tool features:

FeatureEffect
pythontools.* in embedded Python for ToolRegistry::install (enables bashkit/python)
typescripttools.* in embedded TypeScript for ToolRegistry::install (enables bashkit/typescript)
jqjq available inside the logic-only shell (enables bashkit/jq)
tracingDebug logs for sanitized callback errors

2. Imports#

Moved types now come from bashkit_scripted_tool. Core types (Bash, BashTool, Tool, ExecutionLimits, …) stay in bashkit.

Before:

use bashkit::{ScriptedTool, Tool, ToolArgs, ToolDef, ToolRegistry};

After:

use bashkit::Tool;
use bashkit_scripted_tool::{ScriptedTool, ToolArgs, ToolDef, ToolRegistry};

Moved: ScriptedTool, ScriptedToolBuilder, ScriptingToolSet, ScriptingToolSetBuilder, DiscoveryMode, DiscoverTool, ToolDef, ToolArgs, ToolImpl, ToolCallback, AsyncToolCallback, SyncToolExec, AsyncToolExec, CallbackKind, ToolDefExtension, ToolDefExtensionBuilder, ToolDefInvocationTrace, ScriptedExecutionTrace, ScriptedCommandInvocation, ScriptedCommandKind, ToolRegistry, ToolRegistryBuilder, ToolCall, ToolCallDecision, ToolCallRequest, ToolCallSurface.

3. Registry installation#

BashBuilder::tool_registry is replaced by ToolRegistry::install, which takes and returns the builder.

Before:

let bash = Bash::builder().limits(limits).tool_registry(registry).build();

After:

let bash = registry.install(Bash::builder().limits(limits)).build();

Configure limits on the builder before install: Python and TypeScript tool bridges read the builder’s execution profile at install time.

Python#

Import from bashkit.scripted:

# Before
from bashkit import ScriptedTool

# After
from bashkit.scripted import ScriptedTool

The old import still works for now and emits a FutureWarning. Run your tests with -W error::FutureWarning to find the remaining call sites. The class, its methods, and bashkit.langchain.create_scripted_tool are unchanged.

JavaScript and TypeScript#

Import from the @everruns/bashkit/scripted entry:

// Before
import { ScriptedTool } from "@everruns/bashkit";

// After
import { ScriptedTool } from "@everruns/bashkit/scripted";

The root export is kept as a @deprecated alias of the same class, so instanceof checks keep working, and editors flag the old import. The ScriptedToolOptions and ToolCallback types move the same way. createScriptedTool stays in @everruns/bashkit/langchain.

See also#