@@ -23,6 +23,7 @@ use itertools::Itertools as _;
2323use serde:: { Deserialize , Serialize } ;
2424use std:: collections:: HashSet ;
2525use std:: { collections:: HashMap , fmt:: Display } ;
26+ use warp_cli:: agent:: Harness ;
2627
2728use super :: task_store:: TaskStore ;
2829use uuid:: Uuid ;
@@ -217,6 +218,8 @@ pub struct AIConversation {
217218 parent_agent_id : Option < String > ,
218219 /// The display name for this agent (e.g. "Agent 1"), assigned by the orchestrator.
219220 agent_name : Option < String > ,
221+ /// Harness used to render the child agent's shared agent/logo icon in orchestration UI.
222+ orchestration_harness_type : Option < String > ,
220223 /// The local conversation ID of the parent that spawned this child, if any.
221224 parent_conversation_id : Option < AIConversationId > ,
222225 /// True when this conversation is a placeholder for a child agent executing
@@ -282,6 +285,7 @@ impl AIConversation {
282285 artifacts : Vec :: new ( ) ,
283286 parent_agent_id : None ,
284287 agent_name : None ,
288+ orchestration_harness_type : None ,
285289 parent_conversation_id : None ,
286290 is_remote_child : false ,
287291 last_event_sequence : None ,
@@ -364,6 +368,7 @@ impl AIConversation {
364368 artifacts,
365369 parent_agent_id,
366370 agent_name,
371+ orchestration_harness_type,
367372 parent_conversation_id,
368373 is_remote_child,
369374 run_id,
@@ -388,6 +393,7 @@ impl AIConversation {
388393 . unwrap_or_default ( ) ;
389394 let parent_agent_id = data. parent_agent_id ;
390395 let agent_name = data. agent_name ;
396+ let orchestration_harness_type = data. orchestration_harness_type ;
391397 let parent_conversation_id = data
392398 . parent_conversation_id
393399 . and_then ( |id| AIConversationId :: try_from ( id) . ok ( ) ) ;
@@ -410,6 +416,7 @@ impl AIConversation {
410416 artifacts,
411417 parent_agent_id,
412418 agent_name,
419+ orchestration_harness_type,
413420 parent_conversation_id,
414421 is_remote_child,
415422 run_id,
@@ -426,6 +433,7 @@ impl AIConversation {
426433 None ,
427434 None ,
428435 None ,
436+ None ,
429437 false ,
430438 None ,
431439 AIConversationAutoexecuteMode :: default ( ) ,
@@ -470,6 +478,7 @@ impl AIConversation {
470478 artifacts,
471479 parent_agent_id,
472480 agent_name,
481+ orchestration_harness_type,
473482 parent_conversation_id,
474483 is_remote_child,
475484 last_event_sequence,
@@ -808,6 +817,24 @@ impl AIConversation {
808817 pub fn set_agent_name ( & mut self , name : String ) {
809818 self . agent_name = Some ( name) ;
810819 }
820+ pub fn orchestration_harness_type ( & self ) -> Option < & str > {
821+ self . orchestration_harness_type . as_deref ( )
822+ }
823+
824+ pub fn orchestration_harness ( & self ) -> Option < Harness > {
825+ self . orchestration_harness_type
826+ . as_deref ( )
827+ . map ( parse_orchestration_harness_type)
828+ . or_else ( || {
829+ self . server_metadata
830+ . as_ref ( )
831+ . map ( |metadata| Harness :: from ( metadata. harness ) )
832+ } )
833+ }
834+
835+ pub fn set_orchestration_harness ( & mut self , harness : Harness ) {
836+ self . orchestration_harness_type = Some ( harness. config_name ( ) . to_string ( ) ) ;
837+ }
811838
812839 pub fn parent_conversation_id ( & self ) -> Option < AIConversationId > {
813840 self . parent_conversation_id
@@ -2909,6 +2936,7 @@ impl AIConversation {
29092936 artifacts_json,
29102937 parent_agent_id : self . parent_agent_id . clone ( ) ,
29112938 agent_name : self . agent_name . clone ( ) ,
2939+ orchestration_harness_type : self . orchestration_harness_type . clone ( ) ,
29122940 parent_conversation_id : self . parent_conversation_id . map ( |id| id. to_string ( ) ) ,
29132941 is_remote_child : self . is_remote_child ,
29142942 run_id : self . task_id . map ( |id| id. to_string ( ) ) ,
@@ -3407,6 +3435,11 @@ impl AIConversation {
34073435 }
34083436}
34093437
3438+ fn parse_orchestration_harness_type ( value : & str ) -> Harness {
3439+ Harness :: from_config_name ( value)
3440+ . or_else ( || Harness :: parse_orchestration_harness ( value) )
3441+ . unwrap_or ( Harness :: Unknown )
3442+ }
34103443pub ( super ) fn update_todo_list_from_todo_op (
34113444 todo_lists : & mut Vec < AIAgentTodoList > ,
34123445 op : api:: message:: update_todos:: Operation ,
0 commit comments