Skip to content

v0.3.0

Choose a tag to compare

@WendellXY WendellXY released this 16 Mar 09:53
· 631 commits to main since this release
Immutable release. Only release title and notes can be modified.

v0.3.0 focuses on safer tool execution and better runtime resilience for agentic workflows.

Full Changelog: v0.2.0...v0.3.0

Highlights

  • Added a generic tool-authorization seam to the runtime
  • Added pre-execution tool authorization with structured input previews
  • Simplified runtime command-review behavior by removing shell review heuristics
  • Improved malformed tool-call handling so invalid tool JSON can recover instead of aborting the whole run
  • Expanded provider-neutral token usage reporting across built-in provider streams and runtime hooks

What’s New

Tool authorization

Mentra can now run a caller-provided authorization pass before a tool executes. This gives applications a clean integration point for:

  • LLM-based security review
  • human approval flows
  • custom policy engines
  • fail-closed blocking for risky tool calls

Authorization requests include structured previews so callers can make decisions on normalized tool input instead of raw prompt text.

Better malformed tool-call recovery

A malformed tool-call JSON payload no longer has to kill the entire run. Mentra now treats invalid tool input more gracefully and feeds retry guidance back into the conversation so the model can correct itself on the next round.

This makes tool-using agents more robust in quote-heavy or long-context flows where malformed function-call JSON occasionally happens.

Token usage reporting

Built-in provider streams now populate a shared token-usage model, and runtime hooks report model response usage more consistently across OpenAI, Anthropic, and Gemini integrations.

Behavioral changes

  • Tool authorization types now live under mentra::tool
  • Runtime command-review internals were simplified by removing shell review heuristics
  • If you were relying on older runtime re-exports for authorization-related types, you may need to update imports

Upgrade notes

If you are adopting tool authorization, check the README examples for the current import path and builder usage.

Typical usage now looks like:

  • define a ToolAuthorizer
  • return allow, prompt, or deny
  • install it with Runtime::builder().with_tool_authorizer(...)

If you previously worked around malformed tool-call JSON failures at the app layer, you may be able to remove some of that logic in 0.3.0.