Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

7.5 KB
Raw Blame
# Convenience targets for this repository.
#
# Pass extra arguments to a target's script via ARGS, e.g.:
#   make install-cli ARGS="--no-restart"
#   make release-cli ARGS="--dry-run"

.PHONY: validate merge-pr desktop-test cli-test install-cli upload-cli-install-sh upload-cli-install-ps1 release-cli mcpb release-backend release-desktop release-web remote-machine upload-circle upload-pro device-test

## validate: bounded independent checks with logs and a source/timing receipt.
## See docs/validation-and-release.md. ARGS="path/to/plan.json".
validate:
	python3 scripts/validate-change.py $(ARGS)

## merge-pr: wait for required CI and verify an already-reviewed PR; add --merge to squash it.
## See docs/validation-and-release.md for reviewed source arguments and non-CI checks.
merge-pr:
	python3 scripts/merge-validated-pr.py $(ARGS)

## desktop-test: bounded VM tests, host-sized workers and recorded startup recovery.
## ARGS="test/affected_test.dart --workers 2"; omit paths for the full VM suite.
desktop-test:
	python3 scripts/test-desktop.py $(ARGS)

## cli-test: typecheck + run the CLI test suite.
cli-test:
	cd cli && npx tsc --noEmit && npx vitest run

## The four release targets below are refused with RELEASE_WINDOW outside 09:00-18:00 Asia/Ho_Chi_Minh, a backend
## release within 2 hours of the last, and a backend release inside 09:00-10:00 (the morning peak). The refusal names the
## next allowed time (scripts/release-window.py; numbers in scripts/release-window.json).
## A P0 adds ARGS='--urgent "<reason>"': the reason goes on the tag and the script prints the line to post in the
## project chat. The tag workflows check the same rule, so a hand-pushed tag is refused too.

## release-cli: tag this commit vX.Y.Z_cli and push the tag — CI bundles the CLI, publishes it to
## GCS, and cuts the GitHub Release. The version is bumped from max(last git tag, live
## metadata.json's `cli` key). The `_cli` suffix is a tag-trigger marker only (see cli/RELEASE.md);
## it never appears in the published version. ARGS="--dry-run" to preview.
release-cli:
	bash cli/scripts/release-cli.sh $(ARGS)

## mcpb: build harness-mcp.mcpb (Harness's MCP Bundle, for Claude Desktop, the Official MCP Registry and
## Smithery) and the server.json to publish it with, into cli/packages/harness-mcp/mcpb/dist/, and print its
## sha256. ARGS="X.Y.Z" names the CLI release it goes on (tag vX.Y.Z_cli). Uploads and publishes nothing:
## docs/research/2026-10-11-listing-submissions.md has the steps.
mcpb:
	node cli/packages/harness-mcp/mcpb/build.mjs $(ARGS)

## release-backend: tag this commit vX.Y.Z_backend and push the tag — CI builds the backend's Docker
## image and rolls it out. ARGS=minor|major|X.Y.Z to bump differently, ARGS=--dry-run to preview.
## See backend/scripts/release-be.sh.
release-backend:
	bash backend/scripts/release-be.sh $(ARGS)

## release-desktop: tag this commit vX.Y.Z_desktop and push the tag — CI builds both macOS builds
## and both Linux architectures, publishes to GCS, and cuts the GitHub Release. The version is bumped
## from max(last git tag, live harness/desktop/metadata.json). ARGS="--dry-run" to preview,
## ARGS="--prepare" to package a pushed PR head during final checks, without publishing,
## ARGS="--minor" for a forced-update minor bump, ARGS="X.Y.Z" for an explicit version. The by-hand
## escape hatches (upload-desktop, upload-desktop-linux, upload-node-runtime, upload-tmux-runtime) live in desktop/Makefile.
release-desktop:
	bash desktop/scripts/release-desktop.sh $(ARGS)

## release-web: ship the browser app to harness.autonomous.ai — tag this commit vX.Y.Z_web; CI builds
## the Flutter bundle into website/'s image and pushes it (ArgoCD deploys). Re-run with the same version
## to resume waiting on a tag that already exists.
## ARGS="--dry-run" to preview, ARGS="--minor" or ARGS="X.Y.Z" to bump differently.
release-web:
	bash desktop/scripts/release-web.sh $(ARGS)

## install-cli: bundle the CLI from THIS working tree and install it into ~/.harness/cli — the local dev
## loop, nothing published. Restarts the daemon on the new bytes. Self-update stays ON: the build is
## labelled with the published version, which the release you are level with cannot outrank, so your bytes
## survive until a NEWER version ships — then it lands. ARGS="--no-updates" to pin instead.
install-cli:
	bash cli/scripts/install-cli.sh $(ARGS)

## upload-cli-install-sh: publish cli/scripts/install.sh — the `curl ... | bash` installer — to
## harness/cli/install.sh in the release bucket (-> https://cdn.autonomous.ai/harness/cli/install.sh).
## One static file, no version; MAINTAINER ONLY (an authenticated `gcloud storage` with write access
## on the bucket). The CLI bundle itself is never published from a laptop: `make release-cli` tags,
## and CI runs cli/scripts/upload-cli.sh from the tag (.github/workflows/release.yml). Verify the CDN edge
## serves the new bytes afterwards (the script prints the command).
upload-cli-install-sh:
	bash cli/scripts/upload-install-sh.sh

## upload-cli-install-ps1: publish cli/scripts/install.ps1, the Windows installer (`irm ... | iex`), to STAGING:
## harness/staging/cli/install.ps1, which reads the staging manifests. ARGS="--production" is the owner's step once
## the staging E2E has passed (harness/cli/install.ps1 -> https://cdn.autonomous.ai/harness/cli/install.ps1).
## ARGS="--print" shows what would be uploaded.
upload-cli-install-ps1:
	bash cli/scripts/upload-install-ps1.sh $(ARGS)

## remote-machine: drive a SECOND harness machine in Docker, so the app's remote path (relay ->
## another machine's daemon) can be tested from one laptop. ARGS picks the step:
##   make remote-machine ARGS=build   -> bundle this tree + build the image
##   make remote-machine ARGS=up      -> start the box
##   make remote-machine ARGS=login   -> SSO on the box (interactive)
##   make remote-machine ARGS=link    -> let this Mac's relay reach it
##   make remote-machine ARGS=verify  -> what each remote agent is ACTUALLY running on
##   make remote-machine ARGS=destroy -> throw it away (prints how to drop the machine record)
## See cli/docker/remote-machine/README.md.
remote-machine:
	bash cli/scripts/remote-machine.sh $(ARGS)

## upload-circle: bump version -> build -> publish the dial's firmware OTA. MAINTAINER ONLY.
##
## NOT a tag-triggered release like the three above, and deliberately so: this builds with a local
## ESP-IDF toolchain and writes straight to the GCS bucket every running dial polls, so it needs an
## authenticated `gcloud storage` and a sourced IDF env on the machine that runs it. There is no CI runner with
## a board attached to check the result. See devices/harness-device/firmware/RELEASE.md.
##
## ARGS="--dry-run" to preview, ARGS="X.Y.Z" for an explicit version, ARGS="--no-bump" to rebuild and
## upload what version.txt already says.
upload-circle:
	bash devices/harness-device/firmware/scripts/upload-firmware.sh $(ARGS)

## upload-pro: next patch version -> build -> publish the Harness Pro's firmware OTA. MAINTAINER ONLY.
## Same constraints as upload-circle (local IDF 5.5.4, authenticated gcloud). ARGS="--dry-run" to preview,
## ARGS="--check-only BIN" to just vet an image. See devices/harness-pro/firmware/README.md.
upload-pro:
	bash devices/harness-pro/firmware/scripts/upload-firmware.sh $(ARGS)

## device-test: the firmware's host-side unit tests — frame codec, machine list, carousel ring.
##
## Plain `cc` on the host, no board and no ESP-IDF: the parts worth testing here are arithmetic and
## parsing, and a test that needed hardware attached is a test nobody runs.
device-test:
	bash devices/harness-device/firmware/test/run.sh