v0.9.1 — live tool sources in compose, end-turn safety net
v0.9.1 — live tool sources in compose, end-turn safety net
Two fixes that both started life as 0.8.0 follow-ups: compose now wraps live ToolSources instead of snapshotting the registry, and the loop refuses to dispatch the model when a mutator has left the transcript with nothing to respond to.
What's Changed
compose wraps live tool sources
ComposeTool::wrap(source) previously consumed a registry snapshot, which broke dynamic catalogs — MCP servers whose tool list changes at runtime, or any source emitting catalog events, would diverge from what compose advertised in its description. The wrapping is now structural: the wrapped source still advertises and executes its child tools directly, while compose delegates child lookups and catalog-change events to the wrapped source. The compose description regenerates from live output_schemas whenever the catalog changes.
use agentkit_tool_compose::ComposeTool;
// child_source can be an MCP-backed ToolSource — its catalog stays live.
let tools = ComposeTool::wrap(child_source);tool-compose README and the openrouter-codemod example are updated to use the new shape.
Loop ends the turn if nothing is driveable
A mutator (typically a compaction pass that summarised the latest user turn away) could leave the transcript ending in an assistant message or an empty trailing role, then the loop would still dispatch the model — every provider rejects that as an assistant-prefill request. LoopDriver::drive_turn now checks transcript_has_pending_input after running mutators and finishes the turn with FinishReason::Completed instead of dispatching:
fn transcript_has_pending_input(transcript: &[Item]) -> bool {
matches!(
transcript.last().map(|item| item.kind),
Some(ItemKind::User | ItemKind::Tool | ItemKind::Notification)
)
}drive_turn also takes its MutationPoint as a parameter now, so the resume path (AfterToolResult) and fresh-turn path (AfterTurnEnded) report the right point to mutators instead of inferring it from pending_round_resume. Tests cover the no-op finish and the point-reporting contract.
Commits
- Make compose wrap live tool sources (5436b96)
- fix(loop): end turn if not driveable (10468f1)
- chore(release): 0.9.1 (06844ad)
Full Changelog: v0.9.0...v0.9.1