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
24 changes: 16 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,23 @@ jobs:
- name: Verify archives (checksum and plugin.json)
run: node scripts/validate-index.mjs lithe-plugin-index.json --verify-archives ${{ steps.base.outputs.args }}

- name: Check the schema copy matches Lithe
- name: Check the index contract has not changed
# validate-index.mjs follows the index rules of the Lithe plugin
# contract, published in lithe-plugin-docs. A different schema there
# means the rules changed; see docs/maintainers.md.
env:
SCHEMA_URL: https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-docs/main/contract/v1/plugin-index.schema.json
SCHEMA_SHA256: 6771cb0e8c1ba101e6fc90b436de1b74f057ff0d58cc90f92e669edc9a102fc6
run: |
url="https://raw.githubusercontent.com/1lck/Lithe-IDEA/preview/shared/contracts/plugins/v1/plugin-index.schema.json"
status=$(curl -sS -o "$RUNNER_TEMP/upstream-schema.json" -w '%{http_code}' "$url")
status=$(curl -sS -o "$RUNNER_TEMP/plugin-index.schema.json" -w '%{http_code}' "$SCHEMA_URL")
if [ "$status" = "404" ]; then
echo "::notice::Lithe preview does not publish plugin-index.schema.json yet; skipping drift check."
echo "::notice::lithe-plugin-docs does not publish plugin-index.schema.json yet; skipping contract check."
elif [ "$status" != "200" ]; then
echo "::warning::Could not fetch the upstream schema (HTTP $status)."
elif ! diff -u "$RUNNER_TEMP/upstream-schema.json" schema/plugin-index.schema.json; then
echo "::error::schema/plugin-index.schema.json differs from Lithe preview. Update the copy, the fixtures in scripts/fixtures and validate-index.mjs together."
exit 1
echo "::warning::Could not fetch the published schema (HTTP $status)."
else
actual=$(sha256sum "$RUNNER_TEMP/plugin-index.schema.json" | cut -d' ' -f1)
if [ "$actual" != "$SCHEMA_SHA256" ]; then
echo "::error::The published plugin-index.schema.json changed (SHA-256 $actual). Update validate-index.mjs, scripts/fixtures and SCHEMA_SHA256 together; see docs/maintainers.md."
exit 1
fi
fi
13 changes: 5 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
- 插件图标填在条目的 `icon` 字段,指向插件仓库内固定到提交的 SVG/PNG(`raw.githubusercontent.com/<owner>/<repo>/<commit>/…`);没有填写时 README 使用默认图标。
- 插件的 bug 与功能请求请提到插件自己的仓库,本仓库只处理收录相关事务。

第一次开发语言插件,先读[LSP 插件完整生命周期](docs/lsp-plugin-lifecycle.md),
再按[构建、运行与测试接入指南](docs/build-tool-integration.md)扩展能力,
最后按[发布文档](docs/publishing.md)提交收录。
怎么写插件(开发指南、LSP 与构建工具教程、插件契约和 SDK)见
[lithe-plugin-docs](https://github.com/Lithe-IDEA/lithe-plugin-docs);写好以后按[发布文档](docs/publishing.md)提交收录。

审查标准见 [docs/maintainers.md](docs/maintainers.md#审查清单)。

Expand Down Expand Up @@ -48,21 +47,19 @@ Lithe 会把仓库地址 `https://github.com/Lithe-IDEA/Lithe-store` 解析为

| 文档 | 内容 |
| --- | --- |
| [LSP 插件完整生命周期](docs/lsp-plugin-lifecycle.md) | 从 Lua 模板开始:清单、服务器打包、激活、状态目录、停止、升级与卸载 |
| [构建、运行与测试接入](docs/build-tool-integration.md) | 可用的执行提供者示例、工程后端边界,以及开发中的 API 3 状态 |
| [lithe-plugin-docs](https://github.com/Lithe-IDEA/lithe-plugin-docs) | 插件开发:开发指南、LSP 与构建工具教程、插件契约与 JSON Schema、SDK 下载 |
| [docs/publishing.md](docs/publishing.md) | 插件作者:如何打包、发布 Release、提交收录和发布新版本 |
| [docs/versioning-and-updates.md](docs/versioning-and-updates.md) | 版本号如何追踪、Lithe 如何选择可安装版本、用户如何更新/回退 |
| [docs/maintainers.md](docs/maintainers.md) | 维护者:审查清单、下架与撤回、同步 Lithe 契约 |
| [docs/maintainers.md](docs/maintainers.md) | 维护者:审查清单、下架与撤回、跟进插件契约变化 |

## 仓库结构

```text
lithe-plugin-index.json # 唯一的数据文件,Lithe 客户端读取它
schema/plugin-index.schema.json # 索引 JSON Schema(Lithe 契约 v1 的副本)
scripts/validate-index.mjs # 与 Lithe Rust Core 同规则的校验 + 下载包校验
scripts/track-releases.mjs # 追踪已收录插件的新 Release 并生成版本条目
scripts/render-readme.mjs # 根据索引生成 README 的插件总览
scripts/store.test.mjs # 校验脚本的测试(fixtures 复制自 Lithe 主仓库)
scripts/store.test.mjs # 校验脚本的测试(fixtures 复制自插件契约)
assets/ # README 用到的图片(无图标插件的默认图标)
.github/workflows/ # validate(PR/推送/每周)、track-releases(每 6 小时)、sync-readme(main 更新后同步 README)
```
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<p>
<a href="#-插件总览"><b>🧩 浏览插件</b></a> ·
<a href="#️-在-lithe-中安装"><b>⬇️ 安装方式</b></a> ·
<a href="https://github.com/Lithe-IDEA/lithe-plugin-docs"><b>📚 开发插件</b></a> ·
<a href="docs/publishing.md"><b>📤 发布插件</b></a> ·
<a href="CONTRIBUTING.md"><b>🤝 参与贡献</b></a>
</p>
Expand Down Expand Up @@ -91,7 +92,7 @@

## 🤝 参与贡献

想收录自己的插件、发布新版本或报告有问题的插件,请看 [CONTRIBUTING.md](CONTRIBUTING.md)。
想写插件,先看 [lithe-plugin-docs](https://github.com/Lithe-IDEA/lithe-plugin-docs)。想收录自己的插件、发布新版本或报告有问题的插件,请看 [CONTRIBUTING.md](CONTRIBUTING.md)。
上方的插件总览由 `scripts/render-readme.mjs` 根据 [`lithe-plugin-index.json`](lithe-plugin-index.json) 生成,索引合并到 main 后由 CI 自动同步。

## 📄 许可
Expand Down
188 changes: 0 additions & 188 deletions docs/build-tool-integration.md

This file was deleted.

Loading
Loading