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
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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[@]}"
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/` 目录。
Expand Down Expand Up @@ -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 验收。
2 changes: 1 addition & 1 deletion backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
83 changes: 83 additions & 0 deletions docs/releases/v0.1.2.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading