Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,36 @@

## 索引如何工作

这个仓库只存放一份索引文件 [`lithe-plugin-index.json`](lithe-plugin-index.json),列出社区插件、
这个仓库只存放一份索引文件 [`lithe-plugin-index.json`](lithe-plugin-index.json),列出插件、
它们的版本和每个平台的下载包;插件代码和安装包都留在各自作者的 GitHub 仓库里,通过 GitHub Releases 分发。

Lithe 会把仓库地址 `https://github.com/Lithe-IDEA/Lithe-store` 解析为
`https://raw.githubusercontent.com/Lithe-IDEA/Lithe-store/HEAD/lithe-plugin-index.json`,
索引缓存在本机缓存目录,不会写入应用安装包。

## 社区插件与官方插件
## 插件如何收录

| | 官方插件 | 社区插件(本仓库) |
Lithe 不再区分官方插件和普通插件:本仓库收录的每个插件都是普通插件,遵守同一套规则:

| | 规则 |
| --- | --- |
| ID 命名空间 | 不得使用 `dev.lithe.*`,Lithe 会直接拒绝;Lithe-IDEA 组织的插件使用 `io.github.lithe-idea.*` |
| 完整性 | 包内 `plugin.json` 声明 `vendor.signatureRequirement: "none"`,不带发布者签名;索引固定每个包的 SHA-256,安装后记录内容摘要并在每次加载时复查 |
| 安装前 | 弹窗列出权限、要运行的程序和来源仓库,用户确认后安装 |

区别只在收录方式:

| | Lithe-IDEA 组织插件 | 组织外插件 |
| --- | --- | --- |
| 索引位置 | Lithe 主仓库 `Plugins/marketplace/index.json`,随应用附带 | 本仓库,Lithe 预置为社区插件源(用户可停用或移除) |
| ID 命名空间 | `dev.lithe.*` | 不得使用 `dev.lithe.*`,Lithe 会直接拒绝 |
| 完整性 | Lithe 发布者 Ed25519 签名 | 索引固定每个包的 SHA-256,安装后记录内容摘要并在每次加载时复查 |
| 安装前 | 直接安装 | 弹窗列出权限、要运行的程序和来源仓库,用户确认后安装 |
| 范围 | Lithe-IDEA 组织下的公开 `lithe-plugin-*` 仓库(`lithe-plugin-docs` 除外) | 其他公开 GitHub 仓库 |
| 首次收录 | bot 发现带插件包的正式 Release 后自动收录,不需要提交 PR | 提 PR 或开“插件收录申请” issue,维护者按[审查清单](docs/maintainers.md#审查清单)审核后合并 |
| 新版本 | bot 开 PR,校验通过后自动合入 | bot 开 PR,维护者审核后合并 |

社区插件**由各自的开发者维护**。本仓库的审查只保证:索引格式正确、下载包与 SHA-256 一致、
两种插件都**由各自的开发者维护**。本仓库的校验和审查只保证:索引格式正确、下载包与 SHA-256 一致、
包内 `plugin.json` 与索引条目一致、来源仓库真实存在且公开。它不代表对插件代码的安全审计。

Lithe 主仓库仍内置少量迁移前的 `dev.lithe.*` 插件,它们正在逐个迁出为 Lithe-IDEA 组织插件,迁出后同样由本仓库收录。

## 文档

| 文档 | 内容 |
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1>Lithe Store</h1>

<p><strong><a href="https://github.com/1lck/Lithe-IDEA">Lithe</a> 的社区插件市场</strong></p>
<p><strong><a href="https://github.com/1lck/Lithe-IDEA">Lithe</a> 的插件市场</strong></p>

<p>
<a href="#-插件总览"><b>🧩 浏览插件</b></a> ·
Expand All @@ -22,7 +22,7 @@

## 🧩 插件总览

社区插件**由各自的开发者维护**。收录审查只核对索引格式、下载包 SHA-256 和包内清单,**不代表对插件代码做过安全审计**,安装前请先看代码。
所有插件**由各自的开发者维护**。收录审查只核对索引格式、下载包 SHA-256 和包内清单,**不代表对插件代码做过安全审计**,安装前请先看代码。
插件本身的问题请提到插件自己的仓库。

<!-- plugins:start (generated by scripts/render-readme.mjs, do not edit) -->
Expand Down Expand Up @@ -132,7 +132,7 @@

## ⬇️ 在 Lithe 中安装

需要 Lithe 0.6.1 或更新版本(目前插件市场只在 macOS 提供)。Lithe 已预置本仓库作为社区插件源,
需要 Lithe 0.6.1 或更新版本(目前插件市场只在 macOS 提供)。Lithe 已预置本仓库作为插件源,
打开 **设置 → 插件 → 插件市场** 即可浏览和安装;安装前会弹窗列出插件权限、要运行的程序和来源仓库。

如果之前移除了 Lithe Store,在 **设置 → 插件 → ⚙ → 管理插件仓库…** 中重新添加
Expand Down
2 changes: 1 addition & 1 deletion docs/maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bot 首次收录的组织插件(组织 PR 描述里的“首次收录”)合
`Track plugin releases` 每 6 小时运行一次,也可在 Actions 中对 `main` 手动运行(可只指定一个插件 ID;从其他分支启动不会执行)。
它扫描已收录插件的 Release,以及 Lithe-IDEA 组织下尚未收录的公开 `lithe-plugin-*` 仓库
(`lithe-plugin-docs` 不发布插件,固定排除),只收录正式 Release;新插件的条目生成规则见
[发布社区插件的首次收录](publishing.md#3-首次收录)。手动运行时指定的插件 ID 可以是已收录插件,
[发布插件的首次收录](publishing.md#3-首次收录)。手动运行时指定的插件 ID 可以是已收录插件,
也可以是组织中尚未收录的插件。

扫描按插件仓库的所有者分两轮,先组织插件、后组织外插件,每轮维护一个 bot PR:
Expand Down
6 changes: 3 additions & 3 deletions docs/publishing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 发布社区插件
# 发布插件

这份文档面向插件作者:从打包到被 Lithe 用户看到的完整流程。

Expand All @@ -21,11 +21,11 @@

插件包遵守 Lithe 插件契约 v1
([`shared/contracts/plugins/v1/README.md`](https://github.com/1lck/Lithe-IDEA/blob/preview/shared/contracts/plugins/v1/README.md))。
社区插件额外要求:
收录到本仓库的插件额外要求:

- `plugin.json` 的 `id` 使用你自己的反向域名,例如 `io.github.<你的用户名>.zig-support`;
**不能**使用 `dev.lithe` 或 `dev.lithe.*`。
- `vendor.signatureRequirement` 必须是 `"none"`(社区包不带 Lithe 签名)。
- `vendor.signatureRequirement` 必须是 `"none"`(插件包不带发布者签名)。
- `version` 是 `MAJOR.MINOR.PATCH`,每次发布都必须递增,已发布的版本号不能复用。
- `pluginAPIVersion: 3` 必须有非空 `requires`,逐项声明包实际使用的能力及其契约版本。
例如只使用声明式构建系统的包为 `"requires": { "buildSystems": 1 }`;不要无故增加
Expand Down
Loading