Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
dee40cc
feat: ship standalone macos and linux agent archives
kevinjosethomas Sep 9, 2026
60afc26
ci: isolate standalone builds and support native Python setup
kevinjosethomas Sep 9, 2026
224d7ef
refactor: simplify standalone build inputs
kevinjosethomas Sep 9, 2026
85a9fa9
feat: default to verified compiled installations
kevinjosethomas Sep 9, 2026
c84c350
fix: validate the installer command basename
kevinjosethomas Sep 9, 2026
b949bb1
fix: preserve concurrent installs and repair native assets
kevinjosethomas Sep 9, 2026
b5de63f
fix: recheck public command ownership before activation
kevinjosethomas Sep 9, 2026
03834ad
fix: clean up interrupted installers and expose platform checks
kevinjosethomas Sep 9, 2026
59601c7
fix: create public native links without overwriting commands
kevinjosethomas Sep 9, 2026
b1a0b0f
fix: preserve installs of npm-only releases (fixes #2140)
kevinjosethomas Sep 10, 2026
e65d802
fix: retain rollback targets during interrupted activation (fixes #2140)
kevinjosethomas Sep 10, 2026
dace71f
fix: detect npm-only releases before native ownership checks (fixes #…
kevinjosethomas Sep 10, 2026
9af6bd0
fix: allow repeated Node fallback installs (fixes #2140)
kevinjosethomas Sep 11, 2026
4776940
fix: activate fresh installs before exposing command (fixes #2140)
kevinjosethomas Sep 11, 2026
ffe5b81
fix: require HTTPS for standalone downloads (fixes #2140)
kevinjosethomas Sep 11, 2026
ccbc3c9
test: name installer coverage by release format; fixes #2140
kevinjosethomas Sep 12, 2026
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
32 changes: 29 additions & 3 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ jobs:
echo "Production: $publish_production ${production_version:+v${production_version}}"
echo "Beta: $publish_beta ${beta_version:+v${beta_version}}"

standalone:
needs: release-context
uses: ./.github/workflows/standalone-binaries.yml

build:
runs-on: ubuntu-latest
needs: release-context
needs: [release-context, standalone]
permissions:
contents: read
env:
Expand Down Expand Up @@ -148,6 +152,22 @@ jobs:
- name: Check
run: npm run check

- name: Download tested standalone archives
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
pattern: standalone-*
path: standalone-artifacts

- name: Verify and stage standalone binaries
run: |
for platform in darwin-arm64 darwin-x64 linux-arm64 linux-x64; do
source_dir="standalone-artifacts/standalone-$platform"
(cd "$source_dir" && sha256sum --check SHA256SUMS)
destination="packages/coding-agent/binaries/$platform"
mkdir -p "$destination"
tar -xzf "$source_dir"/*.tar.gz -C "$destination"
done

- name: Pack production release
if: env.PUBLISH_PRODUCTION == 'true'
env:
Expand All @@ -158,6 +178,7 @@ jobs:
--channel stable \
--version "$PRODUCTION_VERSION" \
--base-url "$PRIME_AGENT_DOWNLOAD_BASE_URL" \
--binary-dir packages/coding-agent/binaries \
--out-dir packages/coding-agent/release/production

- name: Pack beta release
Expand All @@ -170,6 +191,7 @@ jobs:
--channel beta \
--version "$BETA_VERSION" \
--base-url "$PRIME_AGENT_DOWNLOAD_BASE_URL" \
--binary-dir packages/coding-agent/binaries \
--out-dir packages/coding-agent/release/beta

- name: Smoke test installer with npm 12
Expand Down Expand Up @@ -202,7 +224,9 @@ jobs:
curl -fsS --retry 5 --retry-connrefused "$SMOKE_BASE_URL/releases/v$SMOKE_VERSION/SHA256SUMS"
export NPM_CONFIG_PREFIX="$SMOKE_ROOT/npm-prefix"
PATH="$NPM_CONFIG_PREFIX/bin:$PATH" \
PRIME_AGENT_ALLOW_INSECURE_HTTP_FOR_TESTS=1 \
PRIME_AGENT_BOOTSTRAP_KERNEL_ON_INSTALL=0 \
PRIME_AGENT_INSTALL_METHOD=node \
PRIME_AGENT_INSTALLER_PLAIN=1 \
sh /tmp/prime-agent-npm12-install.sh "$SMOKE_VERSION"
test -x "$NPM_CONFIG_PREFIX/bin/prime-agent"
Expand Down Expand Up @@ -301,7 +325,8 @@ jobs:
test -n "$R2_BUCKET"
test -n "$R2_ENDPOINT_URL"

for artifact in "$PRODUCTION_DIR"/*.tgz; do
(cd "$PRODUCTION_DIR" && sha256sum --check SHA256SUMS)
for artifact in "$PRODUCTION_DIR"/*.tgz "$PRODUCTION_DIR"/*.tar.gz; do
aws s3 cp "$artifact" "s3://${R2_BUCKET}/${RELEASE_PREFIX}/$(basename "$artifact")" \
--endpoint-url "$R2_ENDPOINT_URL" \
--content-type application/gzip \
Expand Down Expand Up @@ -369,7 +394,8 @@ jobs:
test -n "$R2_BUCKET"
test -n "$R2_ENDPOINT_URL"

for artifact in "$BETA_DIR"/*.tgz; do
(cd "$BETA_DIR" && sha256sum --check SHA256SUMS)
for artifact in "$BETA_DIR"/*.tgz "$BETA_DIR"/*.tar.gz; do
aws s3 cp "$artifact" "s3://${R2_BUCKET}/${RELEASE_PREFIX}/$(basename "$artifact")" \
--endpoint-url "$R2_ENDPOINT_URL" \
--content-type application/gzip \
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,23 @@ jobs:
uv run --locked ruff format --check .
uv run --locked python -m unittest discover -s tests -v

standalone:
needs: trust
if: needs.trust.outputs.allowed == 'true'
uses: ./.github/workflows/standalone-binaries.yml

build-check-test:
name: build-check-test
if: always() && needs.trust.outputs.allowed == 'true'
needs: [trust, build-check, test]
needs: [trust, build-check, test, standalone]
runs-on: ubuntu-latest
steps:
- name: Verify CI results
env:
BUILD_CHECK_RESULT: ${{ needs.build-check.result }}
TEST_RESULT: ${{ needs.test.result }}
STANDALONE_RESULT: ${{ needs.standalone.result }}
run: |
test "$BUILD_CHECK_RESULT" = success
test "$TEST_RESULT" = success
test "$STANDALONE_RESULT" = success
82 changes: 82 additions & 0 deletions .github/workflows/standalone-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Standalone binaries

on:
workflow_call:

permissions:
contents: read

jobs:
build:
name: Standalone (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- platform: darwin-arm64
runner: macos-15
- platform: darwin-x64
runner: macos-15-intel
- platform: linux-arm64
runner: ubuntu-24.04-arm
- platform: linux-x64
runner: ubuntu-24.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
path: source

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'
package-manager-cache: false

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: '1.4.0'
no-cache: true

- uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
with:
version: '0.11.7'
enable-cache: false

- name: Install native development dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

- name: Install locked npm dependencies
working-directory: source
run: npm ci

- name: Compile standalone application
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
working-directory: source/packages/coding-agent
run: npm run build:binary

- name: Assemble native archive
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
working-directory: source
run: |
version=$(node -p "require('./package.json').version")
node scripts/assemble-release-archives.mjs packages/coding-agent/binaries "$RUNNER_TEMP/standalone" "$version"
echo "PRIME_AGENT_TEST_ARCHIVE=$RUNNER_TEMP/standalone/prime-agent-$version-${{ matrix.platform }}.tar.gz" >> "$GITHUB_ENV"
echo "PRIME_AGENT_TEST_UV=$(command -v uv)" >> "$GITHUB_ENV"

- name: Remove the build paths from the test machine
run: mv "$GITHUB_WORKSPACE/source" "$RUNNER_TEMP/standalone-source"

- name: Test extracted application without JavaScript runtimes on PATH
working-directory: ${{ runner.temp }}/standalone-source/packages/coding-agent
run: npx tsx ../../node_modules/vitest/dist/cli.js --run test/compiled-artifact.test.ts test/native-installer.test.ts

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: standalone-${{ matrix.platform }}
path: |
${{ runner.temp }}/standalone/*.tar.gz
${{ runner.temp }}/standalone/SHA256SUMS
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ out.jsonl
pi-*.html
out.html
packages/coding-agent/binaries/
packages/coding-agent/release/
todo.md
plans/
.prime/agent/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ Prime Agent combines a persistent Python control environment with durable harnes
Install the latest stable release on macOS or Linux:

```bash
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
curl --proto '=https' --proto-redir '=https' -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
```

The installer downloads a versioned release, verifies its SHA-256 checksum, installs the `prime-agent` command, and can prepare the Python runtime used by the agent.
The installer requires HTTPS for release downloads, checks the selected archive against the release origin's SHA-256 inventory, installs the `prime-agent` command, and can prepare the Python runtime used by the agent. The checksum detects corruption or an inconsistent transfer; because the inventory and archive come from the same origin, HTTPS is the authenticity boundary.

Start Prime Agent from the repository or directory you want it to work in:

Expand Down
Loading
Loading