@@ -303,7 +303,7 @@ struct SessionListProseSession {
303303 #[ serde( default ) ]
304304 event_count : u64 ,
305305 #[ serde( default ) ]
306- harness_type : String ,
306+ mode : String ,
307307}
308308
309309#[ derive( Clone ) ]
@@ -387,15 +387,15 @@ impl AppState {
387387 "tools" : [
388388 {
389389 "name" : "search" ,
390- "description" : "BM25 lexical search over Moraine indexed conversation events." ,
390+ "description" : "BM25 lexical search over Moraine indexed conversation events. Bag-of-words ranking: no phrase matching, no stemming. Word order does not matter. " ,
391391 "inputSchema" : {
392392 "type" : "object" ,
393393 "properties" : {
394394 "query" : { "type" : "string" } ,
395395 "limit" : { "type" : "integer" , "minimum" : limit_min, "maximum" : limit_max } ,
396396 "session_id" : { "type" : "string" } ,
397397 "min_score" : { "type" : "number" } ,
398- "min_should_match" : { "type" : "integer" , "minimum" : 1 } ,
398+ "min_should_match" : { "type" : "integer" , "minimum" : 1 , "description" : "Minimum number of query terms that must match. Values exceeding the number of query terms are clamped." } ,
399399 "include_tool_events" : { "type" : "boolean" } ,
400400 "event_kind" : {
401401 "oneOf" : [
@@ -452,7 +452,7 @@ impl AppState {
452452 "query" : { "type" : "string" } ,
453453 "limit" : { "type" : "integer" , "minimum" : limit_min, "maximum" : limit_max } ,
454454 "min_score" : { "type" : "number" } ,
455- "min_should_match" : { "type" : "integer" , "minimum" : 1 } ,
455+ "min_should_match" : { "type" : "integer" , "minimum" : 1 , "description" : "Minimum number of query terms that must match. Values exceeding the number of query terms are clamped." } ,
456456 "from_unix_ms" : { "type" : "integer" } ,
457457 "to_unix_ms" : { "type" : "integer" } ,
458458 "mode" : {
@@ -483,7 +483,8 @@ impl AppState {
483483 "to_unix_ms" : { "type" : "integer" } ,
484484 "mode" : {
485485 "type" : "string" ,
486- "enum" : [ "web_search" , "mcp_internal" , "tool_calling" , "chat" ]
486+ "enum" : [ "web_search" , "mcp_internal" , "tool_calling" , "chat" ] ,
487+ "description" : SEARCH_CONVERSATIONS_MODE_DOC
487488 } ,
488489 "verbosity" : {
489490 "type" : "string" ,
@@ -665,7 +666,7 @@ impl AppState {
665666 "assistant_messages" : summary. assistant_messages,
666667 "tool_calls" : summary. tool_calls,
667668 "tool_results" : summary. tool_results,
668- "harness_type " : summary. mode. as_str( ) ,
669+ "mode " : summary. mode. as_str( ) ,
669670 } )
670671 } )
671672 . collect :: < Vec < _ > > ( ) ;
@@ -991,17 +992,17 @@ fn format_session_list_prose(payload: &Value) -> Result<String> {
991992 }
992993
993994 for ( idx, session) in parsed. sessions . iter ( ) . enumerate ( ) {
994- let harness = if session. harness_type . is_empty ( ) {
995+ let mode = if session. mode . is_empty ( ) {
995996 "chat"
996997 } else {
997- session. harness_type . as_str ( )
998+ session. mode . as_str ( )
998999 } ;
9991000
10001001 out. push_str ( & format ! (
1001- "\n {}) session={} harness ={} events={}\n " ,
1002+ "\n {}) session={} mode ={} events={}\n " ,
10021003 idx + 1 ,
10031004 session. session_id,
1004- harness ,
1005+ mode ,
10051006 session. event_count
10061007 ) ) ;
10071008 out. push_str ( & format ! (
@@ -1380,15 +1381,15 @@ mod tests {
13801381 "end_time" : "2026-01-02 12:05:00" ,
13811382 "end_unix_ms" : 1767355500000_i64 ,
13821383 "event_count" : 22_u64 ,
1383- "harness_type " : "web_search"
1384+ "mode " : "web_search"
13841385 }
13851386 ] ,
13861387 "next_cursor" : "cursor-token"
13871388 } ) ;
13881389
13891390 let text = format_session_list_prose ( & payload) . expect ( "format" ) ;
13901391 assert ! ( text. contains( "session=sess-1" ) ) ;
1391- assert ! ( text. contains( "harness =web_search" ) ) ;
1392+ assert ! ( text. contains( "mode =web_search" ) ) ;
13921393 assert ! ( text. contains( "next_cursor: cursor-token" ) ) ;
13931394 }
13941395}
0 commit comments