pub enum PlanRequest {
Ready(Plan),
NotReady(String),
WrongPlan {
reason: String,
},
}Expand description
Outcome of a MissionEngine::request_plan turn.
“Not ready to emit, wants to keep talking” is a normal conversational
state during planning — the orchestrator may still have open questions —
so it is a variant here, not an EngineError. Only genuine transport/
session failures surface as Err.
Variants§
Ready(Plan)
The plan parsed; returned unapproved.
NotReady(String)
Neither the plan turn nor the JSON-only retry produced parseable plan JSON. Carries the orchestrator’s reply text (scrubbed): the retry turn’s text, or the first turn’s when the retry’s is empty — so the caller can show the user what the model actually said.
WrongPlan
The orchestrator CAN plan but believes the plan is likely WRONG — the
goal is misframed, the premise is broken, the spec is confidently
off. A planner-initiated escalation only: it arrives exclusively as an
explicit {"wrongPlan": "…"} JSON reply and is never inferred from
prose. Carries the one-paragraph reason.