From 3eb6ff72ea3655db924b7fb33be9d7d3eb7386d5 Mon Sep 17 00:00:00 2001 From: TudorAndrei Date: Fri, 6 Nov 2026 12:56:09 +0200 Subject: [PATCH 1/3] feat(distribution): add native release packages and Homebrew updates --- .github/workflows/release.yml | 157 ++++++++++++++++++++++++++++++++++ packaging/README.md | 83 ++++++++++++++++++ scripts/release.py | 138 ++++++++++++++++++++++++++++++ 3 files changed, 378 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 packaging/README.md create mode 100644 scripts/release.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c14042d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,157 @@ +name: Release binaries + +on: + pull_request: + paths: + - "Cargo.*" + - "crates/**" + - "scripts/release.py" + - ".github/workflows/release.yml" + push: + tags: ["v*"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - runner: ubuntu-24.04 + target: x86_64-unknown-linux-gnu + - runner: ubuntu-24.04-arm + target: aarch64-unknown-linux-gnu + - runner: macos-15-intel + target: x86_64-apple-darwin + - runner: macos-15 + target: aarch64-apple-darwin + runs-on: ${{ matrix.runner }} + env: + TARGET: ${{ matrix.target }} + MACOSX_DEPLOYMENT_TARGET: "15.0" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Check tag version + shell: bash + run: | + version=$(python3 scripts/release.py version) + if [[ "$GITHUB_REF_TYPE" == tag && "$GITHUB_REF_NAME" != "v$version" ]]; then + echo "The tag must match workspace.package.version: v$version" >&2 + exit 1 + fi + - name: Install Rust + shell: bash + run: | + rustup toolchain install 1.98.0 --profile minimal + rustup default 1.98.0 + rustup target add "$TARGET" + - name: Install Debian packaging tools + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y dpkg-dev + - name: Build and check the binary + shell: bash + run: | + cargo build --release --locked -p aether --target "$TARGET" + "target/$TARGET/release/aether" --help + - name: Check Cargo installation + shell: bash + run: | + cargo install --path crates/aether --locked --target "$TARGET" --root "$RUNNER_TEMP/cargo-install" + "$RUNNER_TEMP/cargo-install/bin/aether" --help + - name: Package + shell: bash + run: python3 scripts/release.py package --target "$TARGET" --binary "target/$TARGET/release/aether" + - name: Check archive installation + shell: bash + run: | + mkdir "$RUNNER_TEMP/archive" + tar -xzf target/dist/*.tar.gz -C "$RUNNER_TEMP/archive" + "$RUNNER_TEMP/archive/aether" --help + - name: Check Debian installation + if: runner.os == 'Linux' + run: | + sudo apt-get install -y ./target/dist/*.deb + /usr/bin/aether --help + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: aether-${{ matrix.target }} + path: target/dist/* + if-no-files-found: error + + assemble: + needs: build + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + pattern: aether-* + path: target/dist + merge-multiple: true + - name: Create formula and checksums + run: | + python3 scripts/release.py finalize + cd target/dist + sha256sum --check SHA256SUMS + ruby -c aether.rb + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: release-assets + path: target/dist/* + if-no-files-found: error + + publish: + if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' + needs: assemble + runs-on: ubuntu-24.04 + permissions: + contents: write + steps: + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: release-assets + path: dist + - name: Publish release + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: | + gh release create "$GITHUB_REF_NAME" dist/* --verify-tag --generate-notes + + homebrew: + if: vars.HOMEBREW_TAP_REPOSITORY != '' + needs: publish + runs-on: ubuntu-24.04 + steps: + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: release-assets + path: dist + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: ${{ vars.HOMEBREW_TAP_REPOSITORY }} + token: ${{ secrets.HOMEBREW_TAP_TOKEN }} + path: tap + - name: Update Homebrew tap + run: | + mkdir -p tap/Formula + cp dist/aether.rb tap/Formula/aether.rb + cd tap + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add Formula/aether.rb + if ! git diff --cached --quiet; then + git commit -m "chore(homebrew): release aether $GITHUB_REF_NAME" + git push + fi diff --git a/packaging/README.md b/packaging/README.md new file mode 100644 index 0000000..6da7205 --- /dev/null +++ b/packaging/README.md @@ -0,0 +1,83 @@ +# Release packages + +`.github/workflows/release.yml` builds native binaries on Linux and macOS, +for x86-64 and Arm64. Pull requests that change Rust or packaging files run +the same build and package checks. A manual run makes CI artifacts without +publishing a release. + +## Make a release + +1. Set `workspace.package.version` in `Cargo.toml` and update `Cargo.lock`. +2. Merge the change after the release workflow passes on the pull request. +3. Create and push a tag that matches the version, for example `v0.3.1`. + +A tag push builds all four binaries with Rust 1.98.0 and `--locked`. Each +binary must pass `--help` before packaging. CI also installs the binary with Cargo, extracts and runs each +archive, then installs and runs each Debian package. `dpkg-shlibdeps` +sets the Debian shared-library requirements from the built binary. + +After all builds pass, CI creates `SHA256SUMS` and `aether.rb`. It then +publishes a GitHub release with four archives, two Debian packages, the +formula, and the checksums. The tag must match the Cargo workspace version. +Only stable versions in the form `MAJOR.MINOR.PATCH` are supported. +The workflow does not sign or notarize binaries. + +The GitHub release must not already exist. If publication fails, inspect +the release before a new attempt. Do not replace files in a published +release: a formula refers to their checksums. + +## Set up Homebrew once + +1. Create the public repository `flowcopilot/homebrew-tap`. Add an initial + commit, for example a README. +2. In the Aether repository, set the Actions variable + `HOMEBREW_TAP_REPOSITORY` to `flowcopilot/homebrew-tap`. +3. Add the Actions secret `HOMEBREW_TAP_TOKEN`. Use a token with Contents + write access only to that tap repository. + +After each release, CI copies the generated formula to `Formula/aether.rb` +in the tap and commits it. Without the variable, CI skips this step. The +release still contains the formula for manual use. If the tap update fails, +fix the cause and rerun only that job, or copy the release formula into the +tap yourself. Do not rerun the successful release publication job. + +The formula uses the binary archives and their SHA-256 checksums. It supports +macOS 15 or later and compatible Linux systems with glibc 2.39 or later. +Users can then run `brew install flowcopilot/tap/aether`. + +## Cargo and apt scope + +Cargo installation uses `--git` and needs no registry token. Publishing to +crates.io is a separate step. Check ownership of all three crate names, +add descriptions and version requirements to internal path dependencies, +and verify each package before publishing in dependency order: +`aether-core`, `aether-store`, then `aether`. Do not advertise +`cargo install aether` before the project owns and publishes that name. +See the [Cargo publishing guide](https://doc.rust-lang.org/cargo/reference/publishing.html). + +The Debian packages support `apt install ./package.deb`. They do not provide +an apt repository for automatic updates. That needs a package host, a +signing key, and a signed repository index. + +## Local package checks + +With Python 3.11 or later, package an existing binary: + +```sh +python3 scripts/release.py package --target aarch64-apple-darwin --binary path/to/aether +``` + +Linux packaging also needs `dpkg-dev`. Use the correct target for the binary. +After all four archives and both Debian packages are in `target/dist`: + +```sh +python3 scripts/release.py finalize +cd target/dist +sha256sum --check SHA256SUMS +ruby -c aether.rb +``` + +The native builds and installation checks follow the +[GitHub runner reference](https://docs.github.com/en/actions/reference/runners/github-hosted-runners). +The formula follows the +[Homebrew formula guide](https://docs.brew.sh/Formula-Cookbook). diff --git a/scripts/release.py b/scripts/release.py new file mode 100644 index 0000000..9165dad --- /dev/null +++ b/scripts/release.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python3 +"""Build release packages and a Homebrew formula using the standard library.""" + +import argparse +import hashlib +from pathlib import Path +import re +import shutil +import subprocess +import tarfile +import tempfile +import tomllib + +ROOT = Path(__file__).resolve().parent.parent +TARGETS = { + "x86_64-unknown-linux-gnu": ("linux", "amd64"), + "aarch64-unknown-linux-gnu": ("linux", "arm64"), + "x86_64-apple-darwin": ("macos", "amd64"), + "aarch64-apple-darwin": ("macos", "arm64"), +} + + +def version(): + return tomllib.loads((ROOT / "Cargo.toml").read_text())["workspace"]["package"]["version"] + + +def archive_name(release, target): + return f"aether-{release}-{target}.tar.gz" + + +def package(binary, target, output, release): + output.mkdir(parents=True, exist_ok=True) + system, arch = TARGETS[target] + with tempfile.TemporaryDirectory() as temp: + stage = Path(temp) + shutil.copy2(binary, stage / "aether") + (stage / "aether").chmod(0o755) + shutil.copy2(ROOT / "LICENSE", stage / "LICENSE") + shutil.copy2(ROOT / "README.md", stage / "README.md") + with tarfile.open(output / archive_name(release, target), "w:gz") as archive: + for name in ("aether", "LICENSE", "README.md"): + archive.add(stage / name, arcname=name) + if system == "linux": + deb = stage / "debian/aether" + (deb / "usr/bin").mkdir(parents=True) + (deb / "DEBIAN").mkdir() + shutil.copy2(stage / "aether", deb / "usr/bin/aether") + doc = deb / "usr/share/doc/aether" + doc.mkdir(parents=True) + shutil.copy2(ROOT / "LICENSE", doc / "copyright") + installed_size = sum( + (path.stat().st_size + 1023) // 1024 + for path in (deb / "usr").rglob("*") if path.is_file() + ) + control = ( + f"Package: aether\nVersion: {release}\nArchitecture: {arch}\n" + f"Installed-Size: {installed_size}\n" + "Maintainer: Aether contributors \n" + "Section: net\nPriority: optional\n" + "Homepage: https://github.com/flowcopilot/aether\n" + "Description: Share your personal AI agent with people you trust\n" + ) + # Resolve the actual shared-library requirements of this binary. + (stage / "debian/control").write_text("Source: aether\n\n" + control) + dependencies = subprocess.check_output( + ["dpkg-shlibdeps", "-O", "-edebian/aether/usr/bin/aether"], + cwd=stage, text=True + ).strip().removeprefix("shlibs:Depends=") + (deb / "DEBIAN/control").write_text(control + f"Depends: {dependencies}\n") + subprocess.run( + ["dpkg-deb", "--root-owner-group", "--build", str(deb), + str(output / f"aether_{release}_{arch}.deb")], check=True + ) + + +def finalize(output, release): + # Refuse to create a formula for an incomplete release. + for target in TARGETS: + if not (output / archive_name(release, target)).is_file(): + raise ValueError(f"Missing archive: {target}") + for arch in ("amd64", "arm64"): + if not (output / f"aether_{release}_{arch}.deb").is_file(): + raise ValueError(f"Missing Debian package: {arch}") + formula = [ + "class Aether < Formula", + ' desc "Share your personal AI agent with people you trust"', + ' homepage "https://github.com/flowcopilot/aether"', + f' version "{release}"', + ' license "Apache-2.0"', + ] + for system, suffix in (("macos", "apple-darwin"), ("linux", "unknown-linux-gnu")): + formula.append(f" on_{system} do") + if system == "macos": + formula.append(' depends_on macos: :sequoia') + for arch, cpu in (("arm", "aarch64"), ("intel", "x86_64")): + name = archive_name(release, f"{cpu}-{suffix}") + checksum = hashlib.sha256((output / name).read_bytes()).hexdigest() + formula.extend([ + f" on_{arch} do", + f' url "https://github.com/flowcopilot/aether/releases/download/v{release}/{name}"', + f' sha256 "{checksum}"', + " end", + ]) + formula.append(" end") + formula.extend([ + "", " def install", ' bin.install "aether"', " end", "", + " test do", ' assert_match "aether", shell_output("#{bin}/aether --help")', + " end", "end", "", + ]) + (output / "aether.rb").write_text("\n".join(formula)) + assets = sorted(p for p in output.iterdir() if p.suffix in (".gz", ".deb", ".rb")) + (output / "SHA256SUMS").write_text("".join( + f"{hashlib.sha256(asset.read_bytes()).hexdigest()} {asset.name}\n" for asset in assets + )) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("command", choices=("package", "finalize", "version")) + parser.add_argument("--target", choices=TARGETS) + parser.add_argument("--binary", type=Path) + parser.add_argument("--output", type=Path, default=ROOT / "target/dist") + args = parser.parse_args() + release = version() + if not re.fullmatch(r"\d+\.\d+\.\d+", release): + parser.error("Release version must have the form MAJOR.MINOR.PATCH") + if args.command == "version": + print(release) + elif args.command == "package": + if not args.target or not args.binary: + parser.error("package requires --target and --binary") + package(args.binary.resolve(strict=True), args.target, args.output.resolve(), release) + else: + finalize(args.output.resolve(), release) + + +if __name__ == "__main__": + main() From 25c19e8eae83ed4b57428fd73e6ed80e47b47be3 Mon Sep 17 00:00:00 2001 From: TudorAndrei Date: Fri, 6 Nov 2026 12:56:15 +0200 Subject: [PATCH 2/3] docs(installation): explain platform packages and Cargo installation --- .github/pull_request_template.md | 8 +- README.md | 32 +++----- docs/SUMMARY.md | 1 + docs/installation.md | 123 +++++++++++++++++++++++++++++++ docs/onboarding/human.md | 20 +---- 5 files changed, 142 insertions(+), 42 deletions(-) create mode 100644 docs/installation.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8358127..ba666c6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -86,11 +86,13 @@ they apply: diff --git a/README.md b/README.md index 7b88d91..bf279cb 100644 --- a/README.md +++ b/README.md @@ -15,34 +15,22 @@ network access, and the node removes the folder when the task ends. ## Install -You need macOS or Linux, [mise](https://mise.jdx.dev), and an agent: the -[Codex CLI](https://github.com/openai/codex) (the default), -[Hermes Agent](integrations/hermes-plugin/README.md) or -[OpenClaw](integrations/openclaw-plugin/README.md). +Aether runs on Linux and macOS, on Intel/AMD and Arm processors. +Choose an installation method in the [installation guide](docs/installation.md): +Homebrew, a Debian package with `apt`, a binary archive, Cargo, or a source +build with mise. Binary packages need a release made with the new workflow. -```sh -git clone https://github.com/flowcopilot/aether.git -cd aether -mise install -mise run install-aether -``` - -This builds the release binary and copies it to `~/.local/bin/aether`. Make -sure that `~/.local/bin` is on your `PATH`, then check the install: +To build and install the current source with Cargo: ```sh +cargo install --git https://github.com/flowcopilot/aether.git --locked aether aether --help ``` -On an Apple Silicon Mac, you can download the release binary instead: - -```sh -gh release download -R flowcopilot/aether -p aether-macos-arm64 -install -m 755 aether-macos-arm64 ~/.local/bin/aether -``` - -Version 0.2.9 and older cannot connect to a hub that uses the new protocol. -If the page shows "The hub cannot be reached now", build from source. +You need Rust 1.98 or later, Git, a C compiler, and CMake for this build. +A host also needs an agent: the [Codex CLI](https://github.com/openai/codex), +[Hermes Agent](integrations/hermes-plugin/README.md), or +[OpenClaw](integrations/openclaw-plugin/README.md). ## Start your node diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 7d65727..a286be5 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -9,6 +9,7 @@ # Guides +- [Installation](installation.md) - [Using Aether](usage.md) - [Configuration](configuration.md) - [The PACT gateway](pact.md) diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..a760dc3 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,123 @@ +# Install Aether + +Aether runs on Linux and macOS. A host also needs an agent. See +[Configuration](configuration.md) for agent setup. + +The release workflow builds these packages: + +- Linux, x86-64 and Arm64: a binary archive and a Debian package. The builds + use Ubuntu 24.04. Use Ubuntu 24.04 or a compatible system with glibc 2.39 + or later. Alpine Linux needs a source build with its own build tools. +- macOS 15 or later, Intel and Apple Silicon: a binary archive. + +Windows is not supported. The node and its agent adapters use Unix sockets. + +The commands below need a release made with the new release workflow. +For an older release, use the source build at the end of this page. + +## Homebrew + +After the maintainer has set up the `flowcopilot/homebrew-tap` repository: + +```sh +brew install flowcopilot/tap/aether +aether --help +``` + +To update: + +```sh +brew update +brew upgrade flowcopilot/tap/aether +``` + +The formula selects the archive for your processor and checks its SHA-256 +checksum. On Linux, the same glibc requirement applies as for direct downloads. + +## Debian and Ubuntu with apt + +Install the [GitHub CLI](https://cli.github.com/) first, or download the files +from the [release page](https://github.com/flowcopilot/aether/releases). +Run the following commands in an empty folder: + +```sh +arch=$(dpkg --print-architecture) +gh release download --repo flowcopilot/aether --pattern "aether_*_${arch}.deb" --pattern SHA256SUMS +sha256sum --check --ignore-missing SHA256SUMS +sudo apt install ./aether_*_"$arch".deb +aether --help +``` + +The supported Debian architecture names are `amd64` and `arm64`. The package +installs `/usr/bin/aether`. It does not start a service. To update, download +and install the package from the next release. There is no Aether apt +repository yet, so `apt update` does not find new Aether releases. + +## Binary archive + +Run the following commands in an empty folder. They need the GitHub CLI. + +```sh +case "$(uname -s)" in + Darwin) platform=apple-darwin ;; + Linux) platform=unknown-linux-gnu ;; + *) echo 'Unsupported operating system' >&2; exit 1 ;; +esac +case "$(uname -m)" in + arm64|aarch64) cpu=aarch64 ;; + x86_64) cpu=x86_64 ;; + *) echo 'Unsupported processor' >&2; exit 1 ;; +esac +gh release download --repo flowcopilot/aether --pattern "aether-*-${cpu}-${platform}.tar.gz" --pattern SHA256SUMS +``` + +Check the files on Linux: + +```sh +sha256sum --check --ignore-missing SHA256SUMS +``` + +Check the files on macOS: + +```sh +shasum -a 256 --check --ignore-missing SHA256SUMS +``` + +If the check succeeds, install the binary: + +```sh +tar -xzf aether-*.tar.gz +mkdir -p "$HOME/.local/bin" +install -m 755 aether "$HOME/.local/bin/aether" +``` + +Add `~/.local/bin` to `PATH`, then run `aether --help`. +The checksums detect damaged files. They are not release signatures. + +## Cargo + +Install Rust 1.98 or later, Git, a C compiler, and CMake. The build also +needs network access to download Rust dependencies and the Tailwind CLI. + +```sh +cargo install --git https://github.com/flowcopilot/aether.git --locked aether +aether --help +``` + +This installs the current default branch. To install a release, add its tag, +for example `--tag v0.3.0` when that tag is available. Cargo installs the +binary in `~/.cargo/bin` by default. Run the same command to update. + +Use the Git URL in the command. `cargo install aether` selects a package +from crates.io. This project does not yet publish packages there. + +## Build with mise + +```sh +git clone https://github.com/flowcopilot/aether.git +cd aether +mise install +mise run install-aether +``` + +This installs the binary in `~/.local/bin`. diff --git a/docs/onboarding/human.md b/docs/onboarding/human.md index 9c0429e..482062d 100644 --- a/docs/onboarding/human.md +++ b/docs/onboarding/human.md @@ -25,7 +25,6 @@ for another person. ## Step 2. Get the requirements - A computer with macOS or Linux. -- [mise](https://mise.jdx.dev). To check, run `mise --version`. - **Host only:** an agent. The default is the [Codex CLI](https://github.com/openai/codex). To check, run `codex --version`. For Hermes Agent or OpenClaw, see @@ -35,22 +34,9 @@ for another person. ## Step 3. Install Aether -```sh -git clone https://github.com/flowcopilot/aether.git -cd aether -mise install -mise run install-aether -``` - -This builds the binary and copies it to `~/.local/bin/aether`. Make sure that -`~/.local/bin` is on your `PATH`. - -On an Apple Silicon Mac, you can download the release binary instead: - -```sh -gh release download -R flowcopilot/aether -p aether-macos-arm64 -install -m 755 aether-macos-arm64 ~/.local/bin/aether -``` +Choose a method in the [installation guide](../installation.md): Homebrew, +a Debian package with `apt`, a binary archive, Cargo, or a source build. +Follow the requirements for that method. > **Check:** `aether --help` prints the list of commands. From c214b71ca765638745dee6f61717e31f251fe6fe Mon Sep 17 00:00:00 2001 From: TudorAndrei Date: Fri, 6 Nov 2026 13:23:28 +0200 Subject: [PATCH 3/3] fix(distribution): use a deploy key for Homebrew tap updates --- .github/workflows/release.yml | 2 +- packaging/README.md | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c14042d..c4bbdbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,7 +141,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: ${{ vars.HOMEBREW_TAP_REPOSITORY }} - token: ${{ secrets.HOMEBREW_TAP_TOKEN }} + ssh-key: ${{ secrets.HOMEBREW_TAP_DEPLOY_KEY }} path: tap - name: Update Homebrew tap run: | diff --git a/packaging/README.md b/packaging/README.md index 6da7205..1139843 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -32,8 +32,11 @@ release: a formula refers to their checksums. commit, for example a README. 2. In the Aether repository, set the Actions variable `HOMEBREW_TAP_REPOSITORY` to `flowcopilot/homebrew-tap`. -3. Add the Actions secret `HOMEBREW_TAP_TOKEN`. Use a token with Contents - write access only to that tap repository. +3. Create an Ed25519 SSH key pair. Add the public key to the tap repository + as a deploy key with write access. Save the private key in the Aether + Actions secret `HOMEBREW_TAP_DEPLOY_KEY`. The release workflow uses this + key to push formula updates. Delete the local key files after you save + the secret. After each release, CI copies the generated formula to `Formula/aether.rb` in the tap and commits it. Without the variable, CI skips this step. The