feat: 将插件 stdin 协议定为 v1,并按声明注入凭据
进程外插件改为只读环境变量和自身配置,避免读宿主 appsettings;宿主按 plugin.json 声明注入 LLM / OpenWeather 等凭据。
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
# Weather 插件
|
||||
|
||||
独立进程。启动命令只看 `plugin.json` 的 `launch`。
|
||||
独立进程。启动命令只看 `plugin.json` 的 `launch`。`protocolVersion` 为 1。
|
||||
|
||||
## 输入 / 输出
|
||||
|
||||
- 输入 `cities`(字符串数组,与代码、清单同名)
|
||||
- 输出 `summary`
|
||||
|
||||
## 凭据
|
||||
## 凭据与配置
|
||||
|
||||
LLM 的 endpoint / apiKey 由宿主注入,不出现在流程图端口上。天气 HTTP 配置走宿主 `appsettings.json`(通过环境变量 `MAF1_CONTENT_ROOT` 定位)。
|
||||
- LLM:宿主注入 `OPENAI_*`,以及 stdin `credentials.llm`
|
||||
- OpenWeather(可选):宿主凭据类型 `openweather`,注入 `OPENWEATHER_API_KEY`。默认 Provider 是免费的 Wttr,不需要这个 Key
|
||||
- 天气 URL / 语言:读**本插件目录**的 `appsettings.json`,不读宿主配置
|
||||
|
||||
Reference in New Issue
Block a user