Skip to main content

Module binding

Module binding 

Source
Expand description

Binding abstraction.

A Binding is how a tool’s semantics are realized — native in-process (wrapping a Tool impl), CLI subprocess, and later MCP/REST/AppFunction. Dispatch resolves tool_id to a (Tool, Binding) pair and invokes Binding::call; NativeBinding simply delegates back to the Tool, so all 9 existing tools keep working with zero behavior change.

Structs§

CliBinding
Spawn a subprocess to realize the tool. Demonstrates that dispatch can route a single tool_id to an external program without the Tool impl carrying the execution logic.
NativeBinding
Default binding: delegate directly to the Tool::call implementation. Assigned to every tool registered via Registry::register; the 9 built-in tools continue to run through it.

Traits§

Binding
A tool’s execution binding. name() returns a short discriminator ("native", "cli", "mcp", …) used by observability hooks and tests.

Type Aliases§

BindingFuture
Boxed future returned by Binding::call. Shape mirrors registry::CallFuture so the two can be freely composed.