11use std:: collections:: BTreeMap ;
22use std:: sync:: LazyLock ;
33
4- use serde:: Deserialize ;
5- use serde:: Serialize ;
6-
74use crate :: codex:: Session ;
85use crate :: models:: FunctionCallOutputPayload ;
96use crate :: models:: ResponseInputItem ;
@@ -13,29 +10,13 @@ use crate::openai_tools::ResponsesApiTool;
1310use crate :: protocol:: Event ;
1411use crate :: protocol:: EventMsg ;
1512
16- // Types for the TODO tool arguments matching codex-vscode/todo-mcp/src/main.rs
17- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
18- #[ serde( rename_all = "snake_case" ) ]
19- pub enum StepStatus {
20- Pending ,
21- InProgress ,
22- Completed ,
23- }
13+ // Use the canonical plan tool types from the protocol crate to ensure
14+ // type-identity matches events transported via `codex_protocol`.
15+ pub use codex_protocol:: plan_tool:: PlanItemArg ;
16+ pub use codex_protocol:: plan_tool:: StepStatus ;
17+ pub use codex_protocol:: plan_tool:: UpdatePlanArgs ;
2418
25- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
26- #[ serde( deny_unknown_fields) ]
27- pub struct PlanItemArg {
28- pub step : String ,
29- pub status : StepStatus ,
30- }
31-
32- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
33- #[ serde( deny_unknown_fields) ]
34- pub struct UpdatePlanArgs {
35- #[ serde( default ) ]
36- pub explanation : Option < String > ,
37- pub plan : Vec < PlanItemArg > ,
38- }
19+ // Types for the TODO tool arguments matching codex-vscode/todo-mcp/src/main.rs
3920
4021pub ( crate ) static PLAN_TOOL : LazyLock < OpenAiTool > = LazyLock :: new ( || {
4122 let mut plan_item_props = BTreeMap :: new ( ) ;
0 commit comments