进程外插件改为只读环境变量和自身配置,避免读宿主 appsettings;宿主按 plugin.json 声明注入 LLM / OpenWeather 等凭据。
38 lines
966 B
JSON
38 lines
966 B
JSON
{
|
|
"id": "weather",
|
|
"name": "WeatherAgent",
|
|
"description": "按城市列表查询天气并汇总。",
|
|
"version": "1.0.0",
|
|
"protocolVersion": 1,
|
|
"timeoutSeconds": 180,
|
|
"launch": {
|
|
"command": "dotnet",
|
|
"args": ["WeatherPlugin.dll"]
|
|
},
|
|
"credentials": [
|
|
{
|
|
"name": "llm",
|
|
"type": "openai-compatible",
|
|
"required": true,
|
|
"description": "由宿主注入 OpenAI 兼容的 endpoint / apiKey / model,不要写进本文件。"
|
|
},
|
|
{
|
|
"name": "weather",
|
|
"type": "openweather",
|
|
"required": false,
|
|
"description": "仅当本插件 appsettings.json 的 Weather:Provider 为 OpenWeather 时需要。Wttr 免费接口不用填。"
|
|
}
|
|
],
|
|
"inputs": [
|
|
{
|
|
"name": "cities",
|
|
"type": "string[]",
|
|
"required": true,
|
|
"description": "要查询的城市名列表"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{ "name": "summary", "type": "string", "description": "天气汇总文本" }
|
|
]
|
|
}
|