-
Notifications
You must be signed in to change notification settings - Fork 0
deployment release pipeline
Every package shares one version (lockstep versioning), and every release moves all of them together. There are no major releases: release:patch covers bug fixes and new features, and release:minor covers API breaking changes. This page describes the release mechanics, the packaging and publishing flow, and the current state of the CI release workflows.
The root package.json defines the shared version and the release scripts. All of packages/ai, packages/agent, packages/tui, and packages/coding-agent publish at the same version, and their inter-package dependencies are kept in sync by scripts/sync-versions.js, which verifies all package versions are identical (it exits non-zero if not) and rewrites every inter-package dependencies and devDependencies range to match.
The version-bump scripts are:
-
npm run version:patch,npm version patch -ws --no-git-tag-version, thennode scripts/sync-versions.js, then a clean reinstall (shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install). -
npm run version:minor, same flow for a minor bump. -
npm run version:major, defined but not used (there are no major releases).
scripts/release.mjs (npm run release:patch / npm run release:minor) runs the whole release:
- Fail if the working tree has uncommitted changes.
- Bump the version via
npm run version:patch/version:minor, or set an explicitx.y.zthat must be strictly greater than the current version. - Finalize each package
CHANGELOG.md, replacing the## [Unreleased]heading with## [<version>] - <date>. - Stage and commit (
Release v<version>), then create av<version>git tag. - Publish with
npm run publish. - Add a fresh
## [Unreleased]section to each changelog and commit it (Add [Unreleased] section for next cycle). - Push
mainand the new tag to the remote.
Two packaging paths exist.
scripts/pack-prime-agent-release.mjs (npm run release:pack) creates the Qredence-branded public artifact and its private workspace dependency tarballs for R2 distribution:
- It reads the four source packages and requires each to be built (it fails if any
distis missing). - It also requires the packaged web runtime:
packages/coding-agent/dist/web/launcher.mjsanddist/web/client, which come fromnpm run build:web:release. - It rewrites each release
package.json: keeps dependency keys on the source package names so compiled imports keep resolving, deletesdevDependencies/overrides/private, rewrites internal dependency ranges to absolute tarball URLs under the given--base-url, and brands the publiccoding-agentpackage with abin(prime-agent->dist/bundle/cli.js), apiConfig, and Qredence repository metadata. - It
npm packs each package into<out-dir>/artifacts/asprime-agent-<version>.tgz,prime-agent-ai-<version>.tgz,prime-agent-core-<version>.tgz, andprime-agent-tui-<version>.tgz, writes aSHA256SUMSmanifest, a channel pointer file, and alatest.json(stable) orbeta.json(beta) manifest.--channelisstableorbeta;--base-urlorPRIME_AGENT_DOWNLOAD_BASE_URLis required.
scripts/build-binaries.sh builds self-contained pi binaries for several platforms with bun build --compile against packages/coding-agent/dist/bun/cli.js (targets darwin-arm64, darwin-x64, linux-x64, linux-arm64, windows-x64). It externalizes koffi to avoid embedding all platform .node files (koffi is used only on Windows for VT input and has a try/catch fallback; the Windows build copies the matching .node alongside the binary), installs cross-platform native bindings for clipboard and sharp, copies shared assets (theme, assets, export-html, docs, examples, skills, the photon wasm), and emits .tar.gz archives for Unix and a .zip for Windows under packages/coding-agent/binaries/.
npm run publish runs npm run prepublishOnly followed by npm publish -ws --access public. The root prepublishOnly runs npm run clean, npm run build, and npm run check. packages/coding-agent additionally defines its own prepublishOnly (npm run clean && npm run build) and a postinstall (node postinstall.cjs).
scripts/build-web-release.mjs (npm run build:web:release) assembles the production web runtime inside the coding-agent artifact. It requires pnpm --dir web --filter @prime-agent/web build output (web/app/dist/server/server.js and web/app/dist/client), copies the client into packages/coding-agent/dist/web/client, and uses esbuild to bundle the server entry into dist/web/server with platform: node, target: node22, splitting: true, and a large external set (all coding-agent dependencies, @earendil-works/*, react, react-dom, debug, undici, zeromq, and others). It then copies scripts/prime-agent-web-launcher.mjs to dist/web/launcher.mjs.
Current state as of HEAD 57e3d5445. .github/workflows/ contains three tracked workflows:
-
ci.yml, on push tomainand pull requests: abuild-checkjob (pnpm 11.15.1, Node 22,npm ci,pnpm install --dir web --frozen-lockfile,npm run build,npm run check), a matrixedtestjob (agent, ai, tui, coding-agent sharded 1/3, 2/3, 3/3, plus coding-agent process-smoke and kernel suites), atest-webjob, and abuild-check-testguard that fails if any of the three finished with anything other than success. -
release-prime-agent.yml, the current release workflow. It triggers on av*tag push orworkflow_dispatch, resolves the release context (version andstable/betachannel), checks out the build ref, installs and builds packages plus the packaged web runtime, runsnpm run check, runsnpm run release:packwith--base-urlfromR2_PUBLIC_BASE_URL, smoke-tests the installed release withscripts/check-web-release.mjs, uploads the artifacts, then publishes to Qredence R2 (tarballs,SHA256SUMS,latest.json/beta.json, the channel pointer, and a renderedinstall.sh/install-beta.shwith the__PRIME_AGENT_DOWNLOAD_BASE_URL__and__PRIME_AGENT_DEFAULT_RELEASE_CHANNEL__placeholders filled in) and creates a GitHub release for stable builds. -
nightly-process-stress.yml, scheduled daily (cron0 9 * * *) plusworkflow_dispatch; installs, builds, and runs the process-stress suite inpackages/coding-agent(npm run test:process-stress) withPRIME_AGENT_STRESS_WORKERS=10.
The removal commit 859871ada (implementation/remove-release-ci, merged as PR #12) did not remove release-prime-agent.yml. It removed the older .github/workflows/build-binaries.yml (412 lines) and deleted one line from scripts/build-binaries.sh; scripts/build-binaries.sh itself remains in the tree. release-prime-agent.yml is present and tracked, and is the workflow that publishes the installer artifacts to R2.
- Deployment, the shipping model
- Development workflow, release process summary and changelog discipline
- History, the timeline of the release-CI removal and the installer
-
CLI,
prime-agent updateand the self-update flow