@@ -208,24 +208,12 @@ async function main() {
208208 const harness = new Harness ( cfg ) ;
209209
210210 harness . events . on ( ( e ) => {
211- if ( e . type === "phase" ) {
212- if ( harness . phase !== "idle" ) {
213- console . log ( `\n[phase] ${ e . phase . toUpperCase ( ) } ${ e . detail || "" } ` ) ;
211+ if ( e . type === "agent_log" ) {
212+ if ( e . line . kind === "say" ) {
213+ process . stdout . write ( e . line . text ) ;
214+ } else if ( e . line . kind === "error" ) {
215+ console . log ( `\nError: ${ e . line . text } ` ) ;
214216 }
215- } else if ( e . type === "agent_log" && e . line . kind !== "say" ) {
216- if ( harness . phase !== "idle" ) {
217- console . log ( `[${ e . agent } ] ${ e . line . kind } : ${ e . line . text } ` ) ;
218- }
219- } else if ( e . type === "agent_log" && e . line . kind === "say" ) {
220- process . stdout . write ( e . line . text ) ;
221- } else if ( e . type === "bus" ) {
222- if ( harness . phase !== "idle" ) {
223- console . log (
224- `[bus] ${ e . message . from } -> ${ e . message . to } [${ e . message . kind } ] ${ e . message . title } ` ,
225- ) ;
226- }
227- } else if ( e . type === "system" ) {
228- console . log ( `[system] ${ e . text } ` ) ;
229217 } else if ( e . type === "plan" ) {
230218 console . log ( `\n=================== PLAN ===================` ) ;
231219 console . log ( `Title: ${ e . plan . title } ` ) ;
@@ -237,16 +225,8 @@ async function main() {
237225 console . log ( `=============================================\n` ) ;
238226 } else if ( e . type === "final" ) {
239227 console . log ( "\n=== READY ===\n" + e . text ) ;
240- } else if ( e . type === "swarm" ) {
241- if ( harness . phase !== "idle" ) {
242- console . log ( `[swarm] ${ e . action } ${ e . workerId } active=${ e . active } ` ) ;
243- }
244228 } else if ( e . type === "approval_request" ) {
245- if ( cfg . autoApprove ) harness . resolveApproval ( e . id , true ) ;
246- else {
247- console . log ( `[approval] denied (use -y/--yolo or autoApprove): ${ e . agent } ${ e . tool } ` ) ;
248- harness . resolveApproval ( e . id , false ) ;
249- }
229+ harness . resolveApproval ( e . id , true ) ;
250230 }
251231 } ) ;
252232
0 commit comments