@@ -77,8 +77,23 @@ func (c *Conductor) SetProgressCallback(callback ProgressCallback) {
7777 c .progressCallback = callback
7878}
7979
80- // reportProgress sends progress to Live Dashboard via HTTP and WebSocket, and calls progress callback
81- func (c * Conductor ) reportProgress (phase string , details string ) {
80+ // ReportProgress sends progress to Live Dashboard via HTTP and WebSocket, and calls progress callback
81+ func (c * Conductor ) ReportProgress (phase string , details string ) {
82+ c .sendProgress (phase , details )
83+ }
84+
85+ // ReportError sends error to Live Dashboard
86+ func (c * Conductor ) ReportError (phase string , errMsg string ) {
87+ c .sendError (phase , errMsg )
88+ }
89+
90+ // ReportComplete sends completion to Live Dashboard
91+ func (c * Conductor ) ReportComplete (success bool , summary string ) {
92+ c .sendComplete (success , summary )
93+ }
94+
95+ // sendProgress internal helper
96+ func (c * Conductor ) sendProgress (phase string , details string ) {
8297 msg := phase + ": " + details
8398
8499 // Send via HTTP API (backup/reliability)
@@ -100,8 +115,8 @@ func (c *Conductor) reportProgress(phase string, details string) {
100115 }
101116}
102117
103- // reportError sends error to Live Dashboard
104- func (c * Conductor ) reportError (phase string , errMsg string ) {
118+ // sendError internal helper
119+ func (c * Conductor ) sendError (phase string , errMsg string ) {
105120 // Send via HTTP API
106121 if c .liveReportConfig != nil {
107122 c .liveReportConfig .Step (phase + ": ERROR - " + errMsg , "error" )
@@ -116,8 +131,8 @@ func (c *Conductor) reportError(phase string, errMsg string) {
116131 }
117132}
118133
119- // reportComplete sends completion to Live Dashboard
120- func (c * Conductor ) reportComplete (success bool , summary string ) {
134+ // sendComplete internal helper
135+ func (c * Conductor ) sendComplete (success bool , summary string ) {
121136 stepType := "complete"
122137 if ! success {
123138 stepType = "failed"
@@ -182,11 +197,11 @@ func (c *Conductor) ExecuteTask(ctx context.Context, task string, complexity str
182197 planner := agents .NewPlanner (planProvider , planModel )
183198
184199 fmt .Println ("Creating plan..." )
185- c .reportProgress ("planning" , "Creating plan" )
200+ c .ReportProgress ("planning" , "Creating plan" )
186201 start := time .Now ()
187202 plan , err := planner .CreatePlan (ctx , task , "" , nil )
188203 elapsed := time .Since (start )
189- c .reportProgress ("planning" , "Plan created" )
204+ c .ReportProgress ("planning" , "Plan created" )
190205 c .selector .RecordUsage (planBackend , planModel , err == nil , errorMsg (err ))
191206 if err != nil {
192207 return fmt .Errorf ("planning failed: %w" , err )
@@ -231,9 +246,9 @@ func (c *Conductor) ExecuteTask(ctx context.Context, task string, complexity str
231246 attempt := c .loopDetector .Iteration
232247 if attempt > 1 {
233248 fmt .Printf ("Retrying (attempt %d)...\n " , attempt )
234- c .reportProgress ("retry" , fmt .Sprintf ("Attempt %d" , attempt ))
249+ c .ReportProgress ("retry" , fmt .Sprintf ("Attempt %d" , attempt ))
235250 } else {
236- c .reportProgress ("editing" , "Starting code changes" )
251+ c .ReportProgress ("editing" , "Starting code changes" )
237252 }
238253
239254 // Select model for editing
@@ -258,11 +273,11 @@ func (c *Conductor) ExecuteTask(ctx context.Context, task string, complexity str
258273
259274 // Execute with editor
260275 fmt .Println ("Executing changes..." )
261- c .reportProgress ("editing" , "Executing code changes" )
276+ c .ReportProgress ("editing" , "Executing code changes" )
262277 start = time .Now ()
263278 result , modifiedFiles , err := editor .Execute (ctx , history , nil )
264279 elapsed = time .Since (start )
265- c .reportProgress ("editing" , fmt .Sprintf ("Completed - %d files changed" , len (modifiedFiles )))
280+ c .ReportProgress ("editing" , fmt .Sprintf ("Completed - %d files changed" , len (modifiedFiles )))
266281 c .selector .RecordUsage (editBackend , editModel , err == nil , errorMsg (err ))
267282 if err != nil {
268283 // LoopDetector will handle max iterations check on next iteration
@@ -350,11 +365,11 @@ func (c *Conductor) ExecuteTask(ctx context.Context, task string, complexity str
350365
351366 // Validate
352367 fmt .Println ("Validating..." )
353- c .reportProgress ("validation" , "Running tests and checks" )
368+ c .ReportProgress ("validation" , "Running tests and checks" )
354369 start = time .Now ()
355370 review , err := reviewer .Review (ctx , plan , modifiedFiles , nil )
356371 elapsed = time .Since (start )
357- c .reportProgress ("validation" , "Validation complete" )
372+ c .ReportProgress ("validation" , "Validation complete" )
358373 c .selector .RecordUsage (reviewBackend , reviewModel , err == nil , errorMsg (err ))
359374 if err != nil {
360375 // LoopDetector will handle max iterations check on next iteration
0 commit comments