Skip to main content

Module todo_policy

Module todo_policy 

Source
Expand description

Eager todo-list creation policy (first-turn prelude). Eager todo-list creation policy for the first agent turn. Ports the eager-prelude half of omp’s TodoTracker (todo-tracker.ts); the reminders/mid-run-nudge half lives in agent_loop/mod.rs next to build_stop_reminder/MidRunNudgeState to avoid a second todo-state owner.

Enums§

TodoEagerMode
Mirrors oxicode_cli’s Settings::TodoEagerMode without a crate dependency in the other direction; oxicode-cli converts when building AgentLoopConfig.

Functions§

build_eager_todo_prelude
Builds the first-turn eager-todo message + optional forced tool choice. Returns None when eager mode is off, a plan already exists, this is a sub-agent, or the prompt looks like a question rather than a task.
provider_supports_tool_choice
Whether a provider’s wire format supports native forced-tool-choice (ToolChoice::Named). The built-in JSON providers do; Ollama and owned (in-band XML) dialects don’t, so a Named choice degrades to Auto there.