Files
99code-plugins/README.md
T

29 lines
1.2 KiB
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.
# 99code Java 插件商店
当前目录是生产后台“插件中心”的默认 Gitea 商店。`registry.json` 使用严格白名单字段;发布插件时应先上传 JAR 与清单,再向索引加入条目。
## 信任策略
插件与主应用运行在同一 JVM,必须满足以下任一条件:
1. JAR 的 SHA-256 位于生产环境变量 `PLUGIN_TRUSTED_SHA256`
2. 清单包含有效 Ed25519 签名,签名公钥通过 `PLUGIN_TRUSTED_ED25519_KEYS=keyId=X509Base64` 配置。
签名内容是 JAR 的 SHA-256 原始 32 字节,不是十六进制字符串。安装器还会校验清单大小、artifact 大小、JAR 条目数量、解压总量和路径穿越。
## registry.json 条目
```json
{
"id": "example-provider",
"name": "示例供应商插件",
"version": "1.0.0",
"description": "简短说明",
"manifest_url": "https://git.example/plugins/raw/branch/main/example-provider/manifest.json",
"platforms": ["openai"],
"sha256": "64 位小写 SHA-256"
}
```
凭据同步响应支持 `auth-revision`(同时兼容 `auth_revision`)和 `credentials`。敏感 token 只能出现在同步响应或后台的加密 `secrets` 输入中,不得写入清单、registry、普通配置或日志。