@@ -382,13 +382,15 @@ pub struct AgentType {
382382 pub mode : AgentMode ,
383383 pub http_mount : Option < HttpMountDetails > ,
384384 pub snapshotting : Snapshotting ,
385+ pub config : Vec < ConfigKeyValueType > ,
385386}
386387
387388impl AgentType {
388389 pub fn normalized ( mut self ) -> Self {
389390 self . methods . sort_by ( |a, b| a. name . cmp ( & b. name ) ) ;
390391 self . dependencies
391392 . sort_by ( |a, b| a. type_name . cmp ( & b. type_name ) ) ;
393+ self . config . sort_by ( |a, b| a. key . cmp ( & b. key ) ) ;
392394
393395 Self {
394396 type_name : self . type_name ,
@@ -403,6 +405,7 @@ impl AgentType {
403405 mode : self . mode ,
404406 http_mount : self . http_mount ,
405407 snapshotting : self . snapshotting ,
408+ config : self . config ,
406409 }
407410 }
408411
@@ -1112,6 +1115,58 @@ pub struct SnapshottingEveryNInvocation {
11121115 pub count : u16 ,
11131116}
11141117
1118+ #[ derive( Debug , Clone , PartialEq , Eq , Serialize , Deserialize ) ]
1119+ #[ cfg_attr(
1120+ feature = "full" ,
1121+ derive( desert_rust:: BinaryCodec , poem_openapi:: Object , IntoValue , FromValue )
1122+ ) ]
1123+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
1124+ #[ cfg_attr( feature = "full" , oai( rename_all = "camelCase" ) ) ]
1125+ #[ serde( rename_all = "camelCase" ) ]
1126+ pub struct ConfigKeyValueType {
1127+ pub key : Vec < String > ,
1128+ pub value : ConfigValueType ,
1129+ }
1130+
1131+ #[ derive( Debug , Clone , PartialEq , Eq , Serialize , Deserialize ) ]
1132+ #[ cfg_attr(
1133+ feature = "full" ,
1134+ derive( desert_rust:: BinaryCodec , poem_openapi:: Union , IntoValue , FromValue )
1135+ ) ]
1136+ #[ cfg_attr( feature = "full" , oai( discriminator_name = "type" , one_of = true ) ) ]
1137+ #[ serde( tag = "type" ) ]
1138+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
1139+ pub enum ConfigValueType {
1140+ Local ( ConfigValueTypeLocal ) ,
1141+ Shared ( ConfigValueTypeShared ) ,
1142+ }
1143+
1144+ #[ derive( Debug , Clone , PartialEq , Eq , Serialize , Deserialize ) ]
1145+ #[ cfg_attr(
1146+ feature = "full" ,
1147+ derive( desert_rust:: BinaryCodec , poem_openapi:: Object , IntoValue , FromValue )
1148+ ) ]
1149+ #[ cfg_attr( feature = "full" , oai( rename_all = "camelCase" ) ) ]
1150+ #[ serde( rename_all = "camelCase" ) ]
1151+ #[ cfg_attr( feature = "full" , desert( transparent) ) ]
1152+ #[ cfg_attr( feature = "full" , wit_transparent) ]
1153+ pub struct ConfigValueTypeLocal {
1154+ pub value : AnalysedType ,
1155+ }
1156+
1157+ #[ derive( Debug , Clone , PartialEq , Eq , Serialize , Deserialize ) ]
1158+ #[ cfg_attr(
1159+ feature = "full" ,
1160+ derive( desert_rust:: BinaryCodec , poem_openapi:: Object , IntoValue , FromValue )
1161+ ) ]
1162+ #[ cfg_attr( feature = "full" , oai( rename_all = "camelCase" ) ) ]
1163+ #[ serde( rename_all = "camelCase" ) ]
1164+ #[ cfg_attr( feature = "full" , desert( transparent) ) ]
1165+ #[ cfg_attr( feature = "full" , wit_transparent) ]
1166+ pub struct ConfigValueTypeShared {
1167+ pub value : AnalysedType ,
1168+ }
1169+
11151170#[ derive( Debug , Clone , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
11161171#[ cfg_attr(
11171172 feature = "full" ,
0 commit comments