Repository navigation
Feat: Release Windows builds of agentop and cortex as .zip #2049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
725dcc2
72c74b8
8fbd841
1c47a2d
7e70a80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,7 +135,7 @@ jobs: | |
| with: | ||
| go-version-file: cmd/cortex/go.mod | ||
|
|
||
| - name: Build binaries (linux/darwin, amd64/arm64) | ||
| - name: Build binaries (linux/darwin/windows, amd64/arm64) | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p dist | ||
|
|
@@ -151,35 +151,46 @@ jobs: | |
| ":${full_tags}" | ||
| ) | ||
|
|
||
| # pack <os> <archive-without-extension> <binary>: a .tar.gz, or on Windows a | ||
| # .zip of the .exe (#1520), the format a Windows user can open without tools. | ||
| pack() { | ||
| local os="$1" archive="$2" bin="$3" | ||
| if [ "${os}" = windows ]; then | ||
| ( cd dist && zip -q "${archive#dist/}.zip" "${bin}" ) | ||
| else | ||
| tar -C dist -czf "${archive}.tar.gz" "${bin}" | ||
| fi | ||
| rm -f "dist/${bin}" | ||
| } | ||
|
|
||
| build_proxy() { | ||
| local variant="$1" tags="$2" os="$3" arch="$4" | ||
| local suffix=""; [ -n "${variant}" ] && suffix="-${variant}" | ||
| local bin="cortex"; [ "${os}" = windows ] && bin="cortex.exe" | ||
| # ${TAG}, not ${VERSION}: the filename has to match the download URL the | ||
| # installer builds from the release tag. They are the same string for a | ||
| # v* tag and differ only on the rolling channel release. | ||
| local archive="dist/cortex${suffix}_${TAG}_${os}_${arch}.tar.gz" | ||
| echo "==> cortex${suffix} ${os}/${arch}" | ||
| ( cd cmd/cortex && \ | ||
| GOWORK=off CGO_ENABLED=0 GOOS="${os}" GOARCH="${arch}" \ | ||
| go build -trimpath \ | ||
| -tags "${tags}" \ | ||
| -ldflags "-s -w -X main.version=${VERSION}" \ | ||
| -o "${GITHUB_WORKSPACE}/dist/cortex" . ) | ||
| tar -C dist -czf "${archive}" cortex | ||
| rm -f dist/cortex | ||
| -o "${GITHUB_WORKSPACE}/dist/${bin}" . ) | ||
| pack "${os}" "dist/cortex${suffix}_${TAG}_${os}_${arch}" "${bin}" | ||
| } | ||
|
|
||
| for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64; do | ||
| for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64; do | ||
| os="${target%/*}"; arch="${target#*/}" | ||
| bin="agentop"; [ "${os}" = windows ] && bin="agentop.exe" | ||
|
|
||
| echo "==> agentop ${os}/${arch}" | ||
| ( cd cmd/agentop && \ | ||
| GOWORK=off CGO_ENABLED=0 GOOS="${os}" GOARCH="${arch}" \ | ||
| go build -trimpath \ | ||
| -ldflags "-s -w -X main.version=${VERSION}" \ | ||
| -o "${GITHUB_WORKSPACE}/dist/agentop" . ) | ||
| tar -C dist -czf "dist/agentop_${TAG}_${os}_${arch}.tar.gz" agentop | ||
| rm -f dist/agentop | ||
| -o "${GITHUB_WORKSPACE}/dist/${bin}" . ) | ||
| pack "${os}" "dist/agentop_${TAG}_${os}_${arch}" "${bin}" | ||
|
|
||
| for entry in "${proxy_variants[@]}"; do | ||
| build_proxy "${entry%%:*}" "${entry#*:}" "${os}" "${arch}" | ||
|
|
@@ -191,7 +202,9 @@ jobs: | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | ||
| with: | ||
| name: dist-go | ||
| path: dist/*.tar.gz | ||
| path: | | ||
| dist/*.tar.gz | ||
| dist/*.zip | ||
| if-no-files-found: error | ||
| retention-days: 1 | ||
|
|
||
|
|
@@ -313,10 +326,11 @@ jobs: | |
| # main-latest the prune below deletes whatever dist/ lacks, so a silent gap | ||
| # here would also remove the previous build's asset from the release. | ||
| missing="" | ||
| for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64; do | ||
| for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64; do | ||
| os="${target%/*}"; arch="${target#*/}" | ||
| ext="tar.gz"; [ "${os}" = windows ] && ext="zip" | ||
| for name in agentop cortex; do | ||
| f="dist/${name}_${TAG}_${os}_${arch}.tar.gz" | ||
| f="dist/${name}_${TAG}_${os}_${arch}.${ext}" | ||
| [ -s "${f}" ] || missing="${missing} ${f}" | ||
| done | ||
| done | ||
|
|
@@ -336,7 +350,7 @@ jobs: | |
| p="${TAG}_${target%/*}_${target#*/}.tar.gz" | ||
| cp "dist/cortex_${p}" "dist/cortex-cpex_${p}" | ||
| done | ||
| ( cd dist && sha256sum ./*.tar.gz > checksums.txt ) | ||
| ( cd dist && sha256sum ./*.tar.gz ./*.zip > checksums.txt ) | ||
| ls -l dist | ||
| cat dist/checksums.txt | ||
|
|
||
|
|
@@ -345,7 +359,9 @@ jobs: | |
| if: github.event_name == 'push' | ||
| uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 | ||
| with: | ||
| subject-path: dist/*.tar.gz | ||
| subject-path: | | ||
| dist/*.tar.gz | ||
| dist/*.zip | ||
|
|
||
| - name: Publish to GitHub Release | ||
| # A main push publishes too, which is the whole point of the channel; the | ||
|
|
@@ -392,7 +408,8 @@ jobs: | |
| echo "::warning::Could not list the changes since the previous release; publishing ${TAG} without them." | ||
| fi | ||
| fi | ||
| add 'Prebuilt `agentop` and `cortex` binaries for linux and macOS (amd64/arm64).' | ||
| add 'Prebuilt `agentop` and `cortex` binaries for linux and macOS (amd64/arm64),' | ||
| add 'and a Windows preview (see below).' | ||
| # The laptop cpex build is gone. Drop this, and the cortex-cpex_* copies above, | ||
| # once no supported release ships a cpex laptop build. | ||
| add 'The laptop cpex build is removed. `cortex-cpex_*` is a copy of `cortex_*`,' | ||
|
|
@@ -407,8 +424,8 @@ jobs: | |
| add '`cortex-gateway_*` is the praxis-mode gateway (static on linux).' | ||
| add 'Install it with `install.sh --praxis`.' | ||
| fi | ||
| add 'Every tarball carries build provenance:' | ||
| add '`gh attestation verify <tarball> --repo rossoctl/cortex`.' | ||
| add 'Every archive (`.tar.gz` and `.zip`) carries build provenance:' | ||
| add '`gh attestation verify <archive> --repo rossoctl/cortex`.' | ||
| add '' | ||
| # The rename shipped with no alias, so it has to be said somewhere a v0.7.0 | ||
| # user will look. Drop this once no supported release predates it. | ||
|
|
@@ -418,8 +435,9 @@ jobs: | |
| add '`authbridge-*`); image and container names are unchanged. Setup removes the old' | ||
| add 'binary once the service no longer runs it. Stop a proxy you started by hand first.' | ||
| add '' | ||
| add 'Verify downloads with `sha256sum -c checksums.txt`. On macOS, clear the' | ||
| add 'Gatekeeper quarantine after extracting: `xattr -dr com.apple.quarantine ./agentop`.' | ||
| add 'Verify downloads with `sha256sum -c checksums.txt`, which lists the `.zip` files too.' | ||
| add 'On macOS, clear the Gatekeeper quarantine after extracting:' | ||
| add '`xattr -dr com.apple.quarantine ./agentop`.' | ||
| # Whoever is asked to try a release candidate lands on this page, and the | ||
| # one-liner they already know will not install it. | ||
| if [ -n "${prerelease}" ]; then | ||
|
|
@@ -440,6 +458,18 @@ jobs: | |
| add 'Each binary reports its own build (`agentop --version` -> `main-<sha>`). For a' | ||
| add 'supported install, use the plain one-liner, which installs the newest stable release.' | ||
| fi | ||
| # Windows (#1520), after the channel-specific block above, which replaces the notes | ||
| # on main-latest: every release with Windows archives keeps this guidance. | ||
| add '' | ||
| add '## Windows (preview)' | ||
| add '' | ||
| add '`agentop_*_windows_*.zip` and `cortex_*_windows_*.zip` (amd64/arm64). No installer' | ||
| add 'runs on Windows yet: check each `.zip` with' | ||
| add '`(Get-FileHash <file> -Algorithm SHA256).Hash.ToLower()` against `checksums.txt`,' | ||
| add 'run `Unblock-File <file>` on it (the binaries are unsigned, so SmartScreen may block' | ||
| add 'them otherwise), and extract both onto your PATH. Then, in a NEW terminal (an open one' | ||
| add 'keeps the old PATH), run `cortex --local`, and `agentop observe` in another. `agentop service`, `setup`, `uninstall`' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: This |
||
| add 'and `update` are not supported there yet. See docs/getting-started.md.' | ||
| if gh release view "${TAG}" >/dev/null 2>&1; then | ||
| # Uploading assets does not move the tag, so on a REUSED tag the release | ||
| # would keep pointing at its first-publish commit forever: the "Source | ||
|
|
@@ -451,7 +481,7 @@ jobs: | |
| gh api --method PATCH "repos/${GITHUB_REPOSITORY}/git/refs/tags/${TAG}" \ | ||
| -f sha="${GITHUB_SHA}" -F force=true >/dev/null | ||
| fi | ||
| gh release upload "${TAG}" dist/*.tar.gz dist/checksums.txt --clobber | ||
| gh release upload "${TAG}" dist/*.tar.gz dist/*.zip dist/checksums.txt --clobber | ||
| # --clobber replaces same-named assets but never deletes others, so every | ||
| # name this build stops producing lingers on the rolling release: frozen at | ||
| # its last build, and missing from checksums.txt, so nothing can verify it. | ||
|
|
@@ -489,7 +519,7 @@ jobs: | |
| # built. Usually the same on a main push, but it is exactly the drift the | ||
| # PATCH above exists to prevent — and it made the FIRST publish create the | ||
| # tag at the wrong commit, so the two paths disagreed. | ||
| gh release create "${TAG}" dist/*.tar.gz dist/checksums.txt \ | ||
| gh release create "${TAG}" dist/*.tar.gz dist/*.zip dist/checksums.txt \ | ||
| --target "${GITHUB_SHA}" \ | ||
| --title "${TAG}" --notes "${notes}" ${prerelease} | ||
| fi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,21 @@ curl -fsSL https://www.rossoctl.dev/cortex/install.sh | sh -s -- --yes | |
|
|
||
| When setup is done, open a new terminal. The new terminal reads the new `PATH`. | ||
|
|
||
| ### Windows (preview) | ||
|
|
||
| `install.sh` and `agentop setup` don't run on Windows yet (#1520). Install by hand: | ||
|
|
||
| 1. From the [releases page](https://github.com/rossoctl/cortex/releases), download `agentop_<version>_windows_amd64.zip` and `cortex_<version>_windows_amd64.zip` (`arm64` on an Arm PC), and `checksums.txt`. | ||
| 2. Check them in PowerShell. `checksums.txt` has lower-case hashes, and `Get-FileHash` prints upper case, so compare `(Get-FileHash .\agentop_<version>_windows_amd64.zip -Algorithm SHA256).Hash.ToLower()` with the line for that file, and the same for `cortex`. | ||
| 3. Unblock both: `Unblock-File .\agentop_<version>_windows_amd64.zip`, and the same for `cortex`. The binaries are not signed yet, and a downloaded `.zip` passes its "from the internet" mark on to what it holds, so without this SmartScreen may block them. | ||
| 4. Unzip both into one folder, for example `$HOME\.local\bin`, and add that folder to your user `PATH`. Then open a new terminal: a terminal that is already open keeps the old `PATH`. | ||
| 5. In that new terminal, run the proxy: `cortex --local`. It writes `~/.cortex/config.yaml` on first run. Stop it with `Ctrl-C`. If it says it can't parse `~/.cortex/config.yaml`, a file written by an earlier Windows build, delete that file and run it again: Cortex writes a fresh one. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: The proxy doesn't actually say "can't parse". It exits with |
||
| 6. In a second new terminal, run `agentop observe`. | ||
|
|
||
| Then connect Claude Code with `agentop configure claude-code enable`, or run one session through Cortex with `agentop exec -- claude`. | ||
|
|
||
| Not on Windows yet: `agentop service`, `setup`, `uninstall` and `update` (they refuse and say so), so the proxy runs only while its terminal is open. Tools other than Node (`git`, `curl`, Python) inside a session don't trust the TLS bridge yet. | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| ## Connect your agent | ||
|
|
||
| Connect each agent that you use. Do this one time per agent. | ||
|
|
@@ -126,4 +141,11 @@ To remove Cortex, run `agentop uninstall`. It asks once. | |
| Uninstall disconnects Claude Code, OpenCode, IBM Bob and Pi. | ||
| It does not disconnect Codex. If you use Codex, run `agentop configure codex disable` first. | ||
|
|
||
| On Windows, `agentop uninstall` is not supported yet (#1520). Remove Cortex by hand: | ||
|
|
||
| 1. Disconnect each agent you connected: `agentop configure <agent> disable`. Then restart the agent. | ||
| 2. Stop the proxy: `Ctrl-C` in its terminal. | ||
| 3. Delete `agentop.exe` and `cortex.exe`, and remove their folder from your user `PATH` if you added it only for them. | ||
| 4. Optional, and separate: delete `~/.cortex`. That deletes everything Cortex kept, including the session archive, the cost ledger and the TLS bridge's CA. | ||
|
|
||
| For more detail, read [Remove it](laptop-service.md#remove-it). | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
.github/CLAUDE.mddescribes this workflow, and this PR makes that description stale. Its "Release binaries" section says the workflow buildscortexandagentop"for linux/darwin × amd64/arm64 and attaches tarballs". It also sayspublish"refuses to publish unless every expected tarball arrived" and "attests every tarball's build provenance". Theci.yamlrow in its table says that the Windows job "builds core andcmd/cortex". Agents read this file before they change CI, so please add windows/amd64 and windows/arm64, the.ziparchives and the newgo-ci-windowsbuild step there.