feat: 将插件 stdin 协议定为 v1,并按声明注入凭据
进程外插件改为只读环境变量和自身配置,避免读宿主 appsettings;宿主按 plugin.json 声明注入 LLM / OpenWeather 等凭据。
This commit is contained in:
@@ -76,6 +76,20 @@ public sealed class PluginScanner(PluginOptions options)
|
||||
continue;
|
||||
}
|
||||
|
||||
int protocol = PluginProtocol.Normalize(manifest.ProtocolVersion);
|
||||
if (!PluginProtocol.IsSupported(manifest.ProtocolVersion))
|
||||
{
|
||||
issues.Add(new CatalogIssue
|
||||
{
|
||||
Level = "error",
|
||||
Source = manifest.Id,
|
||||
Message = $"plugin.json 的 protocolVersion={protocol} 不受支持。当前宿主只接受 1(缺省视为 1)。",
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
manifest.ProtocolVersion = protocol;
|
||||
|
||||
if (!ids.Add(manifest.Id))
|
||||
{
|
||||
issues.Add(new CatalogIssue
|
||||
|
||||
Reference in New Issue
Block a user