From e611d5393ad82798e635aa5767e74a9731f96886 Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Wed, 4 Nov 2026 22:04:36 +0800 Subject: [PATCH] =?UTF-8?q?release:=20=E5=8F=91=E5=B8=83=20Docker=200.1.2?= =?UTF-8?q?=20=E9=A2=84=E8=A7=88=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plugin.json、backend/Cargo.toml、Cargo.lock 升到 0.1.2,新增 docs/releases/v0.1.2.md。release.yml 增加 PRERELEASE_TAGS(v0.1.2), 端到端验证按 README 要求固定到包含宿主日志 API 的 preview 提交 4dd3165。 README 说明 0.1.2 需要 litheLogging 1、稳定版继续用 0.1.1。 --- .github/workflows/release.yml | 18 +++++++- README.md | 8 +++- backend/Cargo.lock | 2 +- backend/Cargo.toml | 2 +- docs/releases/v0.1.2.md | 83 +++++++++++++++++++++++++++++++++++ plugin.json | 2 +- 6 files changed, 108 insertions(+), 7 deletions(-) create mode 100644 docs/releases/v0.1.2.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 57e1a54..0c1872c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,8 @@ # community package without a Lithe signature: Lithe Store lists the # release's archive by its SHA-256, and its release tracker picks up later # versions on its own. +# Tags listed in PRERELEASE_TAGS are published as pre-releases, which the +# tracker skips. name: Release on: @@ -17,6 +19,13 @@ concurrency: group: release cancel-in-progress: false +env: + # v0.1.2 needs a host offering litheLogging 1, which stable Lithe 0.6.7 + # lacks. Space-separated tags. + PRERELEASE_TAGS: v0.1.2 + # Exact preview commit containing the litheLogging 1 host API (1lck/Lithe-IDEA#1699). + CORE_REF: 4dd3165912a7ef4ccfd7240890a33b63751c9b3e + jobs: release: name: Release ${{ github.ref_name }} @@ -59,7 +68,7 @@ jobs: run: | find "$HOME/.colima" -type f \( -name 'ha.stderr.log' -o -name 'serial*.log' -o -name 'qemu.stderr.log' \) -print -exec tail -n 150 {} \; - name: Run the backend through Rust Core and Docker - run: node scripts/e2e.mjs --source https://github.com/1lck/Lithe-IDEA.git --ref preview + run: node scripts/e2e.mjs --source https://github.com/1lck/Lithe-IDEA.git --ref "$CORE_REF" - name: Stop the test engine if: always() run: colima stop || true @@ -77,8 +86,13 @@ jobs: GH_TOKEN: ${{ github.token }} run: | archive=$(ls dist/*-darwin.zip) + release_flags=() + for tag in $PRERELEASE_TAGS; do + if [[ "$tag" == "$GITHUB_REF_NAME" ]]; then release_flags+=(--prerelease); fi + done # Published assets are never replaced: Lithe Store pins their SHA-256. gh release create "$GITHUB_REF_NAME" "$archive" "$archive.sha256" \ --verify-tag \ --title "Docker $GITHUB_REF_NAME" \ - --notes-file "docs/releases/$GITHUB_REF_NAME.md" + --notes-file "docs/releases/$GITHUB_REF_NAME.md" \ + "${release_flags[@]}" diff --git a/README.md b/README.md index ff5ba47..8351347 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,14 @@ [下载最新版 macOS 安装包](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases/latest) (Apple silicon / Intel 通用;发布页附 SHA-256 校验文件)。 +0.1.2 是预发布版本,需要提供结构化插件诊断(`litheLogging` 1)的 Lithe preview 开发版; +稳定版 Lithe 0.6.7 没有该能力,后端无法启动,请继续使用 0.1.1。0.1.2 暂不收录 Lithe Store, +请在 [Releases](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases) 下载。 + 在 Lithe 的「设置 → 插件 → 从磁盘安装」中选择构建产物: ```text -dist/docker-0.1.1-darwin.zip +dist/docker-0.1.2-darwin.zip ``` 也可以选择解压后的 `dist/io.github.lithe-idea.docker/` 目录。 @@ -183,5 +187,5 @@ License: Apache-2.0. 新的日志端到端验证要求 Core 已包含 `litheLogging` v1;`scripts/e2e.mjs` 必须显式传入 `--source` 和 `--ref`,不再默认运行旧的 `e2e/lithe-core.json` 基线。CI 明确选择主仓 -`preview`,需要先合并宿主日志 API;跨仓发布时再把验证引用固定到合并后的精确提交。 +`preview`;Release 工作流把验证引用固定到包含宿主日志 API 的精确 preview 提交(`CORE_REF`)。 宿主改动未合并时这项检查会真实失败,不跳过,也不把旧协议运行当作新 API 验收。 diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 6d97517..7be84f2 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -453,7 +453,7 @@ checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" [[package]] name = "lithe-docker-backend" -version = "0.1.1" +version = "0.1.2" dependencies = [ "base64 0.22.1", "lithe-plugin-sdk", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 0fee2dc..320c800 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lithe-docker-backend" description = "The plugin backend of the Lithe Docker plugin." -version = "0.1.1" +version = "0.1.2" edition = "2021" license = "Apache-2.0" publish = false diff --git a/docs/releases/v0.1.2.md b/docs/releases/v0.1.2.md new file mode 100644 index 0000000..99e5d7f --- /dev/null +++ b/docs/releases/v0.1.2.md @@ -0,0 +1,83 @@ +## 中文 + +Docker for Lithe 0.1.2 接入 Lithe 的结构化插件诊断(`litheLogging` 1)。这是预发布版本:需要提供 `litheLogging` 1 的 Lithe preview 开发版,稳定版 Lithe 0.6.7 无法启动此版本的后端,请在稳定版上继续使用 0.1.1。 + +### 下载 + +- [项目主页](https://github.com/Lithe-IDEA/lithe-plugin-docker) +- [macOS 安装包(Apple silicon / Intel 通用)](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases/download/v0.1.2/docker-0.1.2-darwin.zip) +- [SHA-256 校验文件](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases/download/v0.1.2/docker-0.1.2-darwin.zip.sha256) +- [全部下载文件](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases/tag/v0.1.2) + +### 重点更新 + +后端改用官方 Rust SDK 的结构化日志,诊断写入 Lithe 日志窗口中本次会话的 `plugins/io.github.lithe-idea.docker/host` 通道,级别、脱敏、轮转和保留由宿主统一决定。 + +#### ⚡ 改进 + +- 每个后端函数由 SDK 记录唯一的成功或失败终态,带函数 ID、耗时和稳定分类;列表、日志、统计、事件轮询、文件浏览和分块上传等高频请求的成功不再记 INFO。 +- Docker 引擎不可达时只记一次 WARN,并区分 context 不存在、宿主不支持、权限不足、连接中断和无法连接;恢复后记一次 recovered。 +- 自动拉取缺失镜像后创建容器成功、Compose 下线时网络仍被占用,各记一次 WARN。 +- 后端启动失败不再向 stderr 打印。 +- 官方 Rust SDK 改为仓库内的 vendor 副本,CI 与打包按逐文件 SHA-256 校验。 + +### 升级说明 + +- 需要提供 `litheLogging` 1 的 Lithe preview 开发版。稳定版 Lithe 0.6.7 没有该能力,能安装但后端无法启动,请继续使用 Lithe Store 中的 0.1.1。 +- 预发布版本会被 Lithe Store 自动追踪跳过,暂不收录 Store。下载本版本 ZIP,在「设置 → 插件」的 ⚙ 菜单中选择「从磁盘安装插件…」导入,替换 0.1.1。 +- 权限声明与 0.1.1 相同。 + +### 兼容性与已知问题 + +- 当前仅支持本机 macOS 和 Unix socket,不包含 Windows、远程工作区或 SSH/TLS/TCP 引擎支持。 +- 此包未附带 Lithe 发布者签名;后端的 ad hoc 签名不代表发布者认证,安装包在运行时保持只读。 +- Release 工作流用 Lithe preview `4dd3165` 的 Core 和真实 Docker 引擎运行端到端检查,并断言每次调用恰好产生一条日志终态;完整界面交互仍待目标 Lithe 宿主验收。 + +[查看完整变更](https://github.com/Lithe-IDEA/lithe-plugin-docker/compare/v0.1.1...v0.1.2) + +--- + +## English + +Docker for Lithe 0.1.2 adopts Lithe's structured plugin diagnostics (`litheLogging` 1). This is a pre-release: it needs a Lithe preview build that offers `litheLogging` 1. Stable Lithe 0.6.7 cannot start this version's backend; keep using 0.1.1 there. + +### Downloads + +- [Project homepage](https://github.com/Lithe-IDEA/lithe-plugin-docker) +- [macOS package (universal Apple silicon / Intel)](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases/download/v0.1.2/docker-0.1.2-darwin.zip) +- [SHA-256 checksum](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases/download/v0.1.2/docker-0.1.2-darwin.zip.sha256) +- [All downloads](https://github.com/Lithe-IDEA/lithe-plugin-docker/releases/tag/v0.1.2) + +### Highlights + +The backend now uses the official Rust SDK's structured logging. Diagnostics go to the current session's `plugins/io.github.lithe-idea.docker/host` channel in Lithe's log window; the host decides levels, redaction, rotation and retention. + +#### ⚡ Improvements + +- The SDK records exactly one success or failure for each backend function, with its function ID, duration and a stable category. Successful high-frequency requests (lists, logs, stats, event polling, file browsing and chunked uploads) no longer log INFO. +- An unreachable Docker engine logs one WARN, distinguishing a missing context, an unsupported host, denied permission, a lost connection and an unreachable engine; recovery logs one `recovered` entry. +- Creating a container after automatically pulling its missing image, and a Compose down that leaves a network in use, each log one WARN. +- Backend startup failures no longer print to stderr. +- The official Rust SDK is vendored in the repository; CI and packaging verify every file's SHA-256. + +### Upgrade instructions + +- Requires a Lithe preview build offering `litheLogging` 1. Stable Lithe 0.6.7 lacks it: the plugin installs but its backend cannot start, so keep 0.1.1 from Lithe Store there. +- Lithe Store's tracker skips pre-releases, so this version is not listed in the Store. Download this release's ZIP and import it with Install Plugin from Disk… in the ⚙ menu of Settings → Plugins, replacing 0.1.1. +- Permissions are unchanged from 0.1.1. + +### Compatibility and known issues + +- Local macOS and Unix sockets only; Windows, remote workspaces and SSH/TLS/TCP engines are not included. +- This package has no Lithe publisher signature. The backend's ad hoc signature is not publisher authentication; the installed package stays read-only at runtime. +- The release workflow runs end-to-end checks against Core from Lithe preview `4dd3165` and a real Docker engine, asserting exactly one terminal log entry per call; complete UI interaction still needs target-host acceptance. + +[Full changelog](https://github.com/Lithe-IDEA/lithe-plugin-docker/compare/v0.1.1...v0.1.2) + +### 🙌 感谢贡献者 + +感谢 [@xiaoyumuxi](https://github.com/xiaoyumuxi) 对本版本的贡献。 + +### 🙌 Contributors + +Thanks to [@xiaoyumuxi](https://github.com/xiaoyumuxi) for contributions to this release. diff --git a/plugin.json b/plugin.json index 2543f58..4e867cd 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "schemaVersion": 2, "id": "io.github.lithe-idea.docker", "displayName": "Docker", - "version": "0.1.1", + "version": "0.1.2", "pluginAPIVersion": 3, "requires": { "backend": 2,