Expand description
Concrete AdvisorAgent adapter over crate::Agent.
The SDK exposes the AdvisorAgent trait (so tests/SDK consumers can
hand-roll a fake), but every real consumer that drives an oxicode_agent::Agent
repeats the same 5-method mapping. This adapter removes that boilerplate —
the host wiring and SDK consumers both use AgentAdvisor::new.
Method mapping (verified against Agent):
prompt→Agent::continue_with(preserves advisor context across turns;run_with_channelauto-resets the cancel flag, so a priorabortdoes not strand the next prompt)abort→Agent::cancelreset→Agent::resetrollback_to→Agent::update_state(|s| s.messages.truncate(count))message_count→Agent::state().messages.len()
Structs§
- Agent
Advisor - An
AdvisorAgentbacked by a concreteAgent.
Type Aliases§
- Advisor
Prompt Hook - Hook fired after each successful advisor prompt, with the advisor agent.
The host uses it to persist advisor turns to
<session>/__advisor.jsonl.