feat: 将插件 stdin 协议定为 v1,并按声明注入凭据
进程外插件改为只读环境变量和自身配置,避免读宿主 appsettings;宿主按 plugin.json 声明注入 LLM / OpenWeather 等凭据。
This commit is contained in:
@@ -7,7 +7,7 @@ using MAF1.Utils;
|
||||
PluginRequest request = await PluginStdio.ReadRequestAsync();
|
||||
PluginStdio.ApplyCredentialsToEnvironment(request.Credentials);
|
||||
|
||||
AgentFactory factory = new(AgentFactory.Load(PluginStdio.LoadHostConfiguration()));
|
||||
AgentFactory factory = new(AgentFactory.LoadFromEnvironment());
|
||||
var result = await FileCityAgent.RunAsync(FileCityAgent.Create(factory), request.Inputs);
|
||||
await PluginStdio.WriteOutputsAsync(result.Outputs);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user