Skip to content

v0.21.0

Choose a tag to compare

@yuanhao yuanhao released this 27 Sep 16:46
· 254 commits to main since this release
06ffa04

Decision models (opt-in, decision feature — off by default, no new dependencies)

Ask a small decision model typed questions — yes/no (Noul), Choice, Score — about a text or JSON state. Nothing is sent until you construct a DecisionModel; an API key in the environment enables nothing.

  • Models: DecisionModel::jev() (TypeSafe), jev_opencode(), local(url) for self-hosted SystemOne servers, and logprobs(url, model) for any OpenAI-compatible endpoint that returns logprobs (vendor-neutral, open-weight models).
  • Agent::with_decision_model: advisory skill and tool hints; failures add nothing (fail open).
  • Agent::with_tool_gate(ToolGate::new(model)): denies tool calls judged destructive and not requested by the user. Fails closed.
  • with_input_guard(InputGuard::new(model)): screens input for prompt injection or harmful content. Fails closed by default.
  • Fallback chains (primary.or(backup)) with one overall deadline.
  • calibrate: accuracy, Brier score, ECE, thresholds and a fitted temperature over a labelled set.
  • Spend: decision spend is recorded in SessionStats::decision and counted in total_cost_usd.

Hooks (no feature needed)

  • ToolCallRequest::new builders for unit-testing middleware.
  • Structured user_request_parts().
  • AsyncInputFilter and TurnHook.
  • SubAgentTool::with_turn_hook and with_async_input_filter.

See CHANGELOG.md for the full list.