@@ -535,12 +535,16 @@ function mapCollabAgentEvent(
535535 // finding: progress rows renamed math_one to its UUID).
536536 const knownName = nickname ?? pathLeaf ;
537537 const title = knownName ?? agentThreadId ;
538+ const model = typeof payload . model === "string" ? payload . model . trim ( ) : "" ;
539+ const effort = typeof payload . effort === "string" ? payload . effort . trim ( ) : "" ;
538540 // Identity repeated on every status patch so rows are self-describing when
539541 // the start row ages out of activity retention (review finding: a
540542 // reconstructed agent had a UUID name and no role/path).
541- const statusLinkage = {
543+ const linkage = {
542544 role,
543545 ...( knownName ? { title : knownName } : { } ) ,
546+ ...( model ? { model } : { } ) ,
547+ ...( effort ? { effort } : { } ) ,
544548 ...( agentPath ? { agentPath } : { } ) ,
545549 timelineBypass : true ,
546550 } as const ;
@@ -555,23 +559,29 @@ function mapCollabAgentEvent(
555559 taskId,
556560 description : title ,
557561 title,
558- role,
559- ...( agentPath ? { agentPath } : { } ) ,
562+ ...linkage ,
560563 ...( typeof payload . parentThreadId === "string"
561564 ? { parentAgentId : payload . parentThreadId }
562565 : { } ) ,
563- timelineBypass : true ,
564566 } ,
565567 } ,
566568 ] ;
569+ case "collabAgent/metadataUpdated" :
570+ return [
571+ {
572+ ...base ,
573+ type : "task.updated" ,
574+ payload : { taskId, ...linkage } ,
575+ } ,
576+ ] ;
567577 case "collabAgent/activity" : {
568578 const activityKind = typeof payload . activityKind === "string" ? payload . activityKind : "" ;
569579 if ( activityKind === "interrupted" ) {
570580 return [
571581 {
572582 ...base ,
573583 type : "task.updated" ,
574- payload : { taskId, status : "interrupted" , ...statusLinkage } ,
584+ payload : { taskId, status : "interrupted" , ...linkage } ,
575585 } ,
576586 ] ;
577587 }
@@ -588,9 +598,7 @@ function mapCollabAgentEvent(
588598 taskId,
589599 description : title ,
590600 title,
591- role,
592- ...( agentPath ? { agentPath } : { } ) ,
593- timelineBypass : true ,
601+ ...linkage ,
594602 } ,
595603 } ,
596604 ] ;
@@ -604,7 +612,7 @@ function mapCollabAgentEvent(
604612 {
605613 ...base ,
606614 type : "task.updated" ,
607- payload : { taskId, status : "running" , ...statusLinkage } ,
615+ payload : { taskId, status : "running" , ...linkage } ,
608616 } ,
609617 ] ;
610618 case "collabAgent/turnCompleted" : {
@@ -624,7 +632,7 @@ function mapCollabAgentEvent(
624632 {
625633 ...base ,
626634 type : "task.updated" ,
627- payload : { taskId, status, ...statusLinkage } ,
635+ payload : { taskId, status, ...linkage } ,
628636 } ,
629637 ] ;
630638 }
@@ -640,7 +648,7 @@ function mapCollabAgentEvent(
640648 {
641649 ...base ,
642650 type : "task.updated" ,
643- payload : { taskId, status : "failed" , ...statusLinkage } ,
651+ payload : { taskId, status : "failed" , ...linkage } ,
644652 } ,
645653 ] ;
646654 }
@@ -653,7 +661,7 @@ function mapCollabAgentEvent(
653661 {
654662 ...base ,
655663 type : "task.updated" ,
656- payload : { taskId, status : waiting ? "waiting" : "running" , ...statusLinkage } ,
664+ payload : { taskId, status : waiting ? "waiting" : "running" , ...linkage } ,
657665 } ,
658666 ] ;
659667 }
@@ -662,7 +670,7 @@ function mapCollabAgentEvent(
662670 {
663671 ...base ,
664672 type : "task.updated" ,
665- payload : { taskId, status : "idle" , ...statusLinkage } ,
673+ payload : { taskId, status : "idle" , ...linkage } ,
666674 } ,
667675 ] ;
668676 }
@@ -709,9 +717,8 @@ function mapCollabAgentEvent(
709717 payload : {
710718 taskId,
711719 description : title ,
712- ...( knownName ? { title : knownName } : { } ) ,
720+ ...linkage ,
713721 typedUsage,
714- timelineBypass : true ,
715722 } ,
716723 } ,
717724 ] ;
@@ -741,9 +748,8 @@ function mapCollabAgentEvent(
741748 payload : {
742749 taskId,
743750 description : title ,
744- ...( knownName ? { title : knownName } : { } ) ,
751+ ...linkage ,
745752 summary,
746- timelineBypass : true ,
747753 } ,
748754 } ,
749755 ] ;
@@ -753,7 +759,7 @@ function mapCollabAgentEvent(
753759 {
754760 ...base ,
755761 type : "task.updated" ,
756- payload : { taskId, status : "interrupted" , ...statusLinkage } ,
762+ payload : { taskId, status : "interrupted" , ...linkage } ,
757763 } ,
758764 ] ;
759765 default :
0 commit comments