Files
plugins/README.md
T

78 lines
3.7 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.
# Reims-Go Plugins Market / 插件市场索引仓库
本仓库是 [Reims-Go](https://github.com/Nwflower/Reims-Go) 的官方与社区插件市场静态索引仓库。
- **客户端主索引**:`https://raw.githubusercontent.com/reims-go/plugins/dist/index.json`
- **CDN 备选镜像**:`https://cdn.jsdelivr.net/gh/reims-go/plugins@dist/index.json`
- **仓库分工**:
- `main` 分支:存放人工维护的 [`registry.json`](registry.json)、[`withdrawn.json`](withdrawn.json) 与校验/构建脚本。
- `dist` 分支:由 GitHub Actions 自动构建发布的轻量静态 `index.json`(只读产物,客户端直接消费)。
- `.zip` 插件压缩包:**不存放在本仓库 Git 历史中**,由各插件作者托管在各自仓库的 GitHub Releases 上。
---
## 插件上架流程 / How to Submit a Plugin
### 1. 本地开发与标准打包
使用最新版 Reims-Go CLI 校验并生成合规压缩包(自动执行静态安全门禁并生成 `SHA256SUMS`):
```powershell
reims-go plugin doctor ./my-plugin
reims-go plugin pack ./my-plugin
```
命令会输出生成的 `<id>-<version>.zip` 路径及其 **64 位 SHA-256 哈希**。
### 2. 发布 GitHub Release
在你的开源插件仓库打 tag(例如 `v1.0.0`)并上传该 `.zip` 压缩包作为 Release 资产。
### 3. 向本仓库提 PR 登记到 `registry.json`
在 [`registry.json`](registry.json) 的 `plugins` 数组中添加一条记录:
```json
{
"id": "community.theme.example",
"repo": "your-name/reims-theme-example",
"kind": "theme",
"trust": "community",
"channel": "stable",
"version": "1.0.0",
"asset": "community.theme.example-1.0.0.zip",
"sha256": "<reims-go plugin pack 输出的 64 位小写 SHA-256>",
"tags": ["theme", "dark"],
"changelog": {
"zh-CN": "首个正式版本",
"en-US": "Initial stable release"
}
}
```
> 其余元数据(`name`、`description`、`publisher`、`license`、`engines`、`platforms`、`permissions`、`tier`)由 CI 直接从压缩包内的 `plugin.json` 自动提取,无需重复填写。
---
## 分级审核与市场红线 / Review Policy & Redlines
| 分级 | 类型 | 审核标准 |
| :--- | :--- | :--- |
| **L1** | 主题、语言包、VM 模板、运行时源、规则 Hook | 通过 `reims-go plugin doctor --json` 零硬拦截,许可证清晰;**严禁夹带任何可执行文件或系统脚本** |
| **L4 / `ui:script`** | `iframe` 面板、交互主题脚本 | 公开源码仓库,通过静态门禁(禁止 `window.go` / `window.runtime` / `eval` / 未声明联网等)并经人工代码复核 |
| **L3 Sidecar** | 原生可执行程序(如额外客体驱动) | **必须开源且由 GitHub Actions 从源码可复现构建**,禁止未声明额外二进制;客户端将向用户如实披露当前 Windows 账户完整权限与可执行文件 SHA-256 |
### 绝对红线(CI 与客户端双重硬拦截)
- 严禁包含任何 Apple 专有系统文件(`.ipsw`、`BaseSystem.dmg`、`InstallESD.dmg`)、闭源固件、SMC OSK 或真实 SMBIOS 序列号。
- 严禁在 `.svg` 中嵌入 `<script>`、内联 `on*=` 事件或 `javascript:` 链接。
- 严禁未声明的二进制/脚本文件或未经 `SHA256SUMS` 覆盖的隐藏文件。
- 第三方运行时包须遵守开源合规要求,同处提供对应源码包与完整许可证文本。
---
## 软撤回机制 / Soft Withdrawal
当插件发现安全问题、停止维护或已被新插件替代时,维护者会将其从 `registry.json` 移入 [`withdrawn.json`](withdrawn.json):
- 新用户将被阻止安装,并在界面/CLI 中看到撤回原因与推荐替代插件;
- 已安装用户不会在本地被静默删除,仍可继续使用并收到迁移提示。