Versions are derived automatically from git tags using MinVer-style calculation:
| Git State | Version |
|---|---|
On tag v0.1.0 |
0.1.0 |
5 commits after v0.1.0 |
0.1.1-alpha.5+abc1234 |
| No tags exist | 0.0.0-alpha.N+abc1234 |
| Dirty working tree | 0.1.1-alpha.5+abc1234.dirty |
The version is calculated from git describe --tags --long --always --dirty:
- If exactly on a tag: use the tag version
- If N commits after a tag: bump patch, add
-alpha.N+commit - If no tags exist:
0.0.0-alpha.N+commitwhere N is total commit count
git checkout main
git pull
npm test# For a new release
git tag v0.1.0
git push origin v0.1.0
# Or for a patch release
git tag v0.1.1
git push origin v0.1.1- Go to GitHub → Releases → "Create a new release"
- Select the tag you just pushed
- Add release notes (consider using "Generate release notes")
- Publish
The publish workflow automatically:
- Runs tests on all hypervisors (KVM, MSHV, WHP)
- Publishes npm package to npmjs.org
- Publishes Docker image to GitHub Container Registry (
ghcr.io/hyperlight-dev/hyperagent)
For testing or hotfixes without creating a git tag:
- Go to Actions → Publish → Run workflow
- Enter version (e.g.,
0.1.1-beta.1) - Click "Run workflow"
# Install specific version
npm install @hyperlight-dev/hyperagent@0.1.0
# Check version
npx @hyperlight-dev/hyperagent --version# Pull specific version
docker pull ghcr.io/hyperlight-dev/hyperagent:0.1.0
# Check version
docker run --rm ghcr.io/hyperlight-dev/hyperagent:0.1.0 --version
# Run interactively (requires KVM)
docker run -it --rm --device=/dev/kvm \
--group-add $(stat -c '%g' /dev/kvm) \
--user "$(id -u):$(id -g)" \
-e HOME=/home/hyperagent \
-e GITHUB_TOKEN="$GITHUB_TOKEN" \
-v "$HOME/.hyperagent:/home/hyperagent/.hyperagent" \
-v "$HOME/.hyperagent/tmp:/tmp" \
-v "$(pwd)":/workspace -w /workspace \
ghcr.io/hyperlight-dev/hyperagent:0.1.0The version is displayed:
- Via
--version/-vflag - In the startup banner
The version is injected at build time via esbuild's --define flag. In development mode (running via tsx), it's calculated from git at runtime.
This means git describe failed. Check:
- Are you in a git repository?
- Is git installed?
- For Docker: is
.gitbeing copied into the build context?
The build caches aggressively. Try:
# Clean build
rm -rf dist/
node scripts/build-binary.js --releaseFor Docker:
docker build --no-cache -t hyperagent .