v0.13.0
Highlights
Programmatic Tool Calling (PTC) — LLMs can write Python code that orchestrates multiple tool calls in a single block, with full permission enforcement and execution tracing.
registry = ToolRegistry()
registry.register(search)
registry.register(summarize)
registry.ptc.enable()
# LLM generates: tool_use("programmatic_tool_call", {code: "..."})Added
registry.ptccontroller — always-present sub-object for PTC lifecycle managementregistry.ptc.enable(timeout=30)/registry.ptc.disable()registry.ptc.enabled/registry.ptc.last_invocation_id- Runtime injection:
registry.ptc.enable(runtime=custom_runtime) - Two-layer isolation: ThreadBackend (outer) + IpcSubprocessRuntime (inner)
registry.invoke(tool_name, kwargs)— single-tool execution with full pipeline (permissions, logging)- Invocation tracking —
invocation_idon all execution log entriestr_bat_(batch execute_tool_calls),tr_ptc_(PTC),tr_sig_(single invoke)- Query:
log.get_entries(invocation_id="tr_ptc_...")
ToolMetadata.force_thread— forces ThreadBackend for tools needing main-process accessruntimes/bridge layer —ToolProjection,DirectProjection,PtcControllerfor codecell integrationcodecell>=0.2.1as optional[ptc]dependency
Changed
- Unified execution helpers —
_check_tool_access()and_log_tool_result()shared byinvoke()andexecute_tool_calls() runtimes/delegates code execution to thecodecellpackage
Fixed
- MCP/OpenAPI wrappers survive cloudpickle serialization via
__getstate__/__setstate__ - PTC tool forced to ThreadBackend to prevent registry pickle issues
Install
pip install toolregistry==0.13.0
# With PTC support:
pip install toolregistry[ptc]==0.13.0Full Changelog: v0.12.0...v0.13.0