@@ -34,6 +34,15 @@ pub struct AgentsConfig {
3434 pub windsurf : bool ,
3535}
3636
37+ /// ChatGPT Actions plugin metadata.
38+ #[ derive( Debug , Clone , Serialize , Deserialize , Default ) ]
39+ pub struct PluginConfig {
40+ pub name : Option < String > ,
41+ pub description : Option < String > ,
42+ pub contact_email : Option < String > ,
43+ pub public_url : Option < String > ,
44+ }
45+
3746/// HTTP REST API configuration.
3847#[ derive( Debug , Clone , Serialize , Deserialize ) ]
3948#[ serde( default ) ]
@@ -44,6 +53,8 @@ pub struct HttpConfig {
4453 pub rate_limit : u32 , // requests per minute per key, 0 = unlimited
4554 pub cors_origins : Vec < String > ,
4655 pub api_keys : Vec < ApiKeyConfig > ,
56+ #[ serde( default ) ]
57+ pub plugin : PluginConfig ,
4758}
4859
4960impl Default for HttpConfig {
@@ -55,6 +66,7 @@ impl Default for HttpConfig {
5566 rate_limit : 60 ,
5667 cors_origins : vec ! [ ] ,
5768 api_keys : vec ! [ ] ,
69+ plugin : PluginConfig :: default ( ) ,
5870 }
5971 }
6072}
@@ -356,4 +368,15 @@ permissions = "read"
356368 Some ( "hf:custom/model/embed.gguf" . into( ) )
357369 ) ;
358370 }
371+
372+ #[ test]
373+ fn test_config_with_plugin ( ) {
374+ let toml = r#"
375+ [http.plugin]
376+ name = "my-vault"
377+ public_url = "https://vault.example.com"
378+ "# ;
379+ let config: Config = toml:: from_str ( toml) . unwrap ( ) ;
380+ assert_eq ! ( config. http. plugin. name. as_deref( ) , Some ( "my-vault" ) ) ;
381+ }
359382}
0 commit comments