Skip to content

Commit a9cf279

Browse files
author
hzq
committed
Document verified cross-platform release builds from a Mac
Link the native package and image runs, distinguish runner checks from manual desktop testing, and correct the Linux desktop bundle description.
1 parent b075c93 commit a9cf279

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎docs/releasing.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ instead. Quit with ⌘Q and delete the temporary folder afterwards. What the iso
6060
4. **First-launch dialog**: on the very first start of a new `OAA_DESKTOP_HOME` folder a sheet titled "First launch: set up for you" must appear once. It lists `agent/sample`, the engines found on this Mac (or says none was found) and where to turn one off; "Show Execution Machines" opens that page. After ⌘Q and a second start with the same folder it must not appear again.
6161
5. **Language**: switch System Settings › Language & Region so Chinese is first, restart the app: menus, About, the status menu and the dialogs are Chinese; with English first, they are English. The console's own language (Settings) is unaffected by the app. About shows the version of `package.json`.
6262

63-
**What has been done.** On 2026-11-14 the project owner ran this once, by hand, on an Apple silicon Mac, as an isolated run of a release-mode package, and confirmed: the console opens already connected with no connection dialog (part of 1); the first-launch sheet appears (the first half of 4); the console is still connected after ⌘R (the first part of 3); About shows the right version; and the menus and dialogs follow the system language (5, but only the owner's current system language was seen). On 2026-11-18, automated Playwright desktop E2E verification (`npm run desktop:smoke:matrix`, against both source and packaged `/Applications/Open Agent API.app`) plus a mounted `0.0.70` `--release` `.dmg` `scripts/smoke-release.mjs` run completed on Apple silicon macOS, closing: second-start `.seeded` non-repetition (the rest of 4), orphan gateway attachment, Disconnect + reload recovery and same-folder restart (the rest of 3), console `zh`/`en` reload preservation, live `#workbench` + Tray quick approval + macOS Dock badge, and the `portHeldByOther` / `portHeldByGateway` / `invalidConfigPort` error probes (2). **Not yet checked**: OS-level System Settings › Language & Region switching across desktop restarts (the rest of 5); the Intel package; interactive QA on a normal, non-isolated installation (default data folder, port 8787) beyond health/console startup; OS approval notification toast clicks; and the bilingual messages of the Windows launcher (no Windows machine is available; CI only checks the PowerShell syntax) or Windows/Linux physical-device UI acceptance. Repeat any checks that a future release changes before publishing.
63+
**What has been done.** On 2026-11-14 the project owner ran this once, by hand, on an Apple silicon Mac, as an isolated run of a release-mode package, and confirmed: the console opens already connected with no connection dialog (part of 1); the first-launch sheet appears (the first half of 4); the console is still connected after ⌘R (the first part of 3); About shows the right version; and the menus and dialogs follow the system language (5, but only the owner's current system language was seen). On 2026-11-18, automated Playwright desktop E2E verification (`npm run desktop:smoke:matrix`, against both source and packaged `/Applications/Open Agent API.app`) plus a mounted `0.0.70` `--release` `.dmg` `scripts/smoke-release.mjs` run completed on Apple silicon macOS, closing: second-start `.seeded` non-repetition (the rest of 4), orphan gateway attachment, Disconnect + reload recovery and same-folder restart (the rest of 3), console `zh`/`en` reload preservation, live `#workbench` + Tray quick approval + macOS Dock badge, and the `portHeldByOther` / `portHeldByGateway` / `invalidConfigPort` error probes (2). **Not yet checked**: OS-level System Settings › Language & Region switching across desktop restarts (the rest of 5); hands-on Intel Mac desktop QA; interactive QA on a normal, non-isolated installation (default data folder, port 8787) beyond health/console startup; OS approval notification toast clicks; and manual review of the bilingual Windows launcher messages or Windows/Linux physical-device UI acceptance (the release runners start the packaged desktop and check its behavior automatically). Repeat any checks that a future release changes before publishing.
6464

6565
## Local development packaging vs release packaging
6666

@@ -150,13 +150,13 @@ CI (`.github/workflows/ci.yml`) runs the full `npm run verify` on Ubuntu and mac
150150

151151
## The Linux package, the npm package and the Docker image
152152

153-
- **Linux package** (`scripts/package-all.mjs linux`, templates in `scripts/package-linux.mjs`): `Open-Agent-API-<version>-linux-<x64|arm64>.tar.gz`, which unpacks to `Open-Agent-API-linux-<arch>/`: `oaa` (a POSIX sh launcher that follows symlinks and prefers `runtime/bin/node`), `app/`, `runtime/` (the official Node), `install.sh` and `README-LINUX.txt`. There is no desktop shell. `scripts/install.sh` is the installer meant for `curl | sh` (download, verify `SHA256SUMS`, unpack to `~/.local/share/open-agent-api`, put a symlink at `~/.local/bin/oaa`; `--version`, `--prefix`, `--uninstall`). Its body is entirely inside functions and its last line is `{ main "$@"; }`, so when a download is cut short the shell refuses the incomplete syntax and runs nothing (a test truncates it at every line boundary and every prefix of the last line). The copy inside the package and the one on the release page are stamped with the version by `scripts/stamp-install.mjs` and install only their own version; an unstamped copy from the source tree resolves the latest published tag instead.
153+
- **Linux package** (`scripts/package-all.mjs linux`, templates in `scripts/package-linux.mjs`): `Open-Agent-API-<version>-linux-<x64|arm64>.tar.gz`, which unpacks to `Open-Agent-API-linux-<arch>/`: `oaa` (a POSIX sh launcher that follows symlinks and prefers `runtime/bin/node`), `app/`, `runtime/` (the official Node), `install.sh` and `README-LINUX.txt`. `open-agent-api-desktop` starts the bundled Electron executable in `desktop/`. `scripts/install.sh` is the installer meant for `curl | sh` (download, verify `SHA256SUMS`, unpack to `~/.local/share/open-agent-api`, put a symlink at `~/.local/bin/oaa`; `--version`, `--prefix`, `--uninstall`). Its body is entirely inside functions and its last line is `{ main "$@"; }`, so when a download is cut short the shell refuses the incomplete syntax and runs nothing (a test truncates it at every line boundary and every prefix of the last line). The copy inside the package and the one on the release page are stamped with the version by `scripts/stamp-install.mjs` and install only their own version; an unstamped copy from the source tree resolves the latest published tag instead.
154154
- **npm package**: `npm pack` produces `open-agent-api-<version>.tgz` (`package.json` stays `private: true`, so it cannot be published to the official npm registry by accident; whether to publish is the owner's decision), and `prepack` first removes `dist/` and rebuilds it. The `npm-package` job in `release.yml` packs, installs it with `npm install -g --prefix` into a temporary directory, runs the same smoke test, and then runs `npx --package <tgz> oaa --help` to check that it also starts when its dependencies are hoisted next to the package; the tgz is uploaded as a release artifact and written into `SHA256SUMS`. Users install with `npm install -g <URL of the tgz on the release page>`.
155155
- **Docker image**: `Dockerfile` (multi-stage, `node:24-slim`, the non-root `node` user, the `/data` volume, a `HEALTHCHECK` on `/healthz`, no proprietary SDK among the production dependencies), `.dockerignore`, `docker-compose.yml` (the port is published only on the host's loopback `127.0.0.1:8787`), and `scripts/docker-entrypoint.mjs` (inside the container the gateway listens on `0.0.0.0`, which the port mapping needs; the default `allowedHosts` holds only the loopback names, so the Host check passes for `http://127.0.0.1:8787` from the host, and exposure to the outside is limited only by compose's loopback mapping; the first start initializes the data directory, publishes the offline sample agent, writes the caller key file and prints only where the files are). `.github/workflows/docker.yml`: on `release: published` or a manual run it pushes `linux/amd64` + `linux/arm64`; on `push` and `pull_request` it builds amd64 only and runs a container smoke test (first start, key files, API call, no key in the log, Host check, idempotent restart, exit code 0 on `docker stop`); the push happens only after the smoke test passes.
156156

157157
## What to watch the first time Release runs on GitHub
158158

159-
The Release workflow has run on GitHub for v0.0.64 only: macOS arm64, macOS x64 and Windows x64 (the Windows zip was extracted to a path with spaces and Chinese characters and run through `oaa.cmd`), and it created the draft Release. It has **not** run yet with the Linux x64 and arm64 jobs, the `npm-package` job, or the step that stamps `install.sh` and adds the new files to `SHA256SUMS`; the first release that includes them is the first run. The Linux package and `install.sh` have had an equivalent dry run on a developer machine (on macOS the Linux package was unpacked with a stub node and smoke-tested), and the offline tests cover `install.sh` and the package layout. After pushing a tag, read the logs in the order below, and fix whichever step goes red:
159+
You can release from a Mac without installing Windows or Linux locally. The [v0.0.73 Release run](https://github.com/jiangxingfan1-coder/Open-Agent-API/actions/runs/45842577793) built all five desktop packages on their target OS and architecture. It started the packaged desktop, CLI and gateway, exercised `install.sh` on both Linux architectures, and installed the npm tarball. The [published assets](https://github.com/jiangxingfan1-coder/Open-Agent-API/releases/tag/v0.0.73) include the checksums. These are automated runner results, not manual testing on a consumer Windows desktop. For a new version, inspect its own jobs:
160160

161161
| Step | What the log looks like on failure | Cause and fix |
162162
| --- | --- | --- |
@@ -180,7 +180,7 @@ The Release workflow has run on GitHub for v0.0.64 only: macOS arm64, macOS x64
180180

181181
### Docker first-run checklist
182182

183-
The Docker route cannot be built on the developer machine (there is no Docker there); `docker.yml` builds the amd64 image and runs the container smoke test on every push and pull request, and that passed on GitHub's Ubuntu runner on 2026-11-14. The steps that only run when a release is published (the arm64 build under QEMU, the push to ghcr) have not run yet. If the `Docker` workflow fails, read its log in this order:
183+
On pushes and pull requests, `docker.yml` builds and smoke-tests the amd64 image without publishing. The [v0.0.73 release image job](https://github.com/jiangxingfan1-coder/Open-Agent-API/actions/runs/45848870225) also built and pushed linux/amd64 and linux/arm64 to GHCR. Its runtime smoke test covered amd64, not arm64. For a failed Docker job, read the log in this order:
184184

185185
| Step | What the log looks like on failure | Cause and fix |
186186
| --- | --- | --- |

0 commit comments

Comments
 (0)