Files
MAF1/Plugins/README.md
T
2026-08-26 18:06:02 +08:00

21 lines
959 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 插件目录
每个子文件夹是一个插件。软件启动后扫描**执行目录**下的 `plugins/`(即 `MAF1.exe` 旁边),不是源码目录。
## 必备文件
- `plugin.json`:id、启动命令、凭据声明、inputs、outputs
- `README.md`:给使用者看的说明
- 可执行文件 / 脚本 / 源码:由 `launch.command` + `launch.args` 原样启动
## 凭据(不要写进 plugin.json
n8n / Dify 一类产品把 API Key 放在宿主凭据库,节点只声明「我需要哪种凭据」。本项目同样:
- Key 和 endpoint 配在宿主的环境变量或 `appsettings.json`
- 节点可选 `credentialId`(默认 `llm-default`
- 启动子进程时注入环境变量,并在 stdin JSON 的 `credentials` 里再传一份
- 浏览器和流程图 JSON **不会**包含 apiKey
第三方若要用自己的模型,可在插件目录放 `.env`(不要提交)。节点选中的宿主凭据会覆盖其中的同名变量。