A hammerkit server now runs work for coding agents and CI on your own machines: agents
get sandboxes with the repository's files, a team gets service runs with sign-in endpoints
for previews, and CI gets verified checks, all on a Docker host or a Kubernetes cluster
with the credentials of service accounts. Tasks build container images with build, and a
dashboard shows how a server stands. The release notes
walk through it.
2.0.0 is a major release for one change: continuous is for services only.
Breaking change
- A task with
continuousis refused. Hammerkit names the task and the file. Move such a task to a container service withcontinuous: true: itscmdsbecome onecmd, and it keeps itssrcandports.up --watchstarts it once and leaves it running, and on a service run that moves to a new commit it gets the changed files and reloads.
Upgrade notes
- Every cache misses once. A task's cache key now covers its services and uses sha256, and its id covers which secrets it declares (by name and source, never the value). Tasks behind an aggregate task can now be cached at all.
- A need on an included service is named after the service, with dashes for colons
(
services-postgres, notservices:postgres), and agents see needs by their plan key (sub:db). - A build file that fails the schema exits with 1, and every problem of a refused publish is printed.
hammerkit downonly stops services. 1.26 also ran every task it selected.down <service>stops that service alone, seedown.- Field substitution reads a value once.
$NAMEinimage,src,mountsand the other fields is replaced by its value as written, so to build one value from another, use${NAME}inenvs.pa$$wordstayspa$$word. - Limits on what a build file can make hammerkit read: includes go at most 32 levels deep and 1,000 build files, inputs of an include at most 64 KiB, and one file parses to at most 16 MiB and 10,000 items, also for local runs.
- Item paths: a
src, output, mount, volume or secret file at/, or in a folder of/whose name starts with.hammerkit, is refused. A link that leads outside the files of a run is refused also when a task inherits the path from a dependency, and a path hammerkit can't look into is refused with the reason instead of being skipped. - Mount targets are no longer chowned.
- A service without a healthcheck on Kubernetes counts as up only after it ran 10 s, and
a container service that crashes more than
restartstimes (default 2) fails. - The Postgres examples read their password from
EXAMPLE_DB_PASSWORD; runhammerkit cleanonce if they ran before.
For servers
- Upgrade servers before clients. A 2.0 client sends
maxTimeoutwith a run, which a 1.26 server refuses. - A run executes the build files of the published version, includes too, whatever the checkout holds, and plans every task before the first one starts. A git include inside a fetched git file must be pinned to a commit; a published version with such an include on a branch is refused when it runs, so publish it again with the include pinned.
capAddis opt-in. A server adds Linux capabilities only wherebackend.capabilitiesallows them, in the sandboxed runtime it names. On a Docker host, a task that adds capabilities can't bind files of the run for now, and image builds are refused at publish.- Run variables: a run hands its tasks
HAMMERKIT_RUN_REPO,HAMMERKIT_RUN_REFandHAMMERKIT_RUN_COMMIT, soruns.envmay no longer set them. Plans, proposals and publishes show run variables by name (${NAME}); versions published before keep their stored plan until they are published again. - Several tasks named in one run (
remote run a b) run as one plan side by side, longest remaining chain first, no longer in the given order. To keep an order, make one depend on the other. - Networks: each further service a limited task or service needs is on an internal
Docker network of its own, so a host may need more address pools
(
default-address-poolsof the Docker daemon). - A Kubernetes server needs
deleteon namespaces and the admission policy from the backend page;listonevents, nodes and metrics is optional and only adds detail to failed runs and capacity. - Commands that take a server use the only registered server when none is named and no
default is set; a
remote usedefault that names a server no longer registered is an error. - If a server ran a 2.0.0-next prerelease: kept services of service runs roll their pods
once, kept claims from before claims were per branch expire after
keepVolumes(the first run of each branch restores from the cache), and Docker volumes of service runs from early prereleases are not swept, so remove them withdocker volume rmonce their runs ended.
Added
Sandboxes for coding agents
- Sandboxes on a server: a copy of a repository an agent works in, with reading, searching and editing its files, running the build file's tasks on it, and pushing the changes to an allowed branch. On Kubernetes, commands run in a warm runner pod and each sandbox has its own egress proxy.
- Agent clients:
hammerkit remote mcp, a pi extension and an opencode plugin with tools to run tasks, read logs, check work, start service runs and open their endpoints. Guides: pi, opencode. - An approved run of a sandbox works on a copy of the approved tree, with a cache of its own.
Service runs
- Service runs:
hammerkit remote upstarts services of a published build file on a server, with public endpoints behind the server's sign-in, a ttl and asleepTtl. A run that sleeps keeps its volumes, andremote upwith the name of a run moves it to a new commit in place. - Who may publish endpoints of a repository may also stop its service runs; who may only open them may extend them.
Runs on a server
- A Kubernetes backend: tasks run as Jobs in a
namespace per caller, with kept claims per
branch,
volumeSize, quotas that say why a pod waits, and network policies. hammerkit remote runfor CI jobs, with an optionalsource.commitpin, and verified checks:hammerkit remote verifyin CI only checks that the checks for the commit's files passed on the server. Guide: verified checks.- Per-task arguments with
runs.args, network ceilings withruns.networkandruns.secretNetwork, and allowed hosts of a provider through the egress proxy. --max-timeoutcaps every task of a run.- Retrying a run that is over:
hammerkit remote retry, a button on the dashboard, orPOST /v1/runs/<id>/retry. - Runs hand their tasks
HAMMERKIT_RUN_REPO,HAMMERKIT_RUN_REFandHAMMERKIT_RUN_COMMIT, for previews that need their branch. hammerkit remote logs,remote runs, and failed runs that name their causes, with the cluster's reason and warning events on Kubernetes.remote publish --dry-runchecks a build file against the server's policy without storing it, andremote up/remote runoffer to publish a build file the server doesn't have.
Status and dashboard
hammerkit remote status,remote capacityandremote dashboard: places, the queue and why each run waits, approvals, service runs, your limits and past task timings. Anobserveentitlement sees every run and changes nothing.- A dashboard at
https://hammerkit.<domain>on a server withendpoints.login: runs with their graph, timeline and logs, build files with their versions and proposals, sandboxes, and buttons to publish, reject, wake, stop and retry.endpoints.dashboard: falseswitches it off.
Tasks and build files
- Image builds: a task with
buildbuilds a Dockerfile with BuildKit, with tags, push, a registry layer cache, registry logins from secrets, the digest of the pushed image as an output, andplatforms. Guide: building container images. capAddon container tasks.publish: falseon tasks, services, includes and references keeps them out of a published version, so one build file serves local runs and a server.secretProvidersandsecretAccountsin the host config, winning over a build file's of the same name.- A local include or reference can be
{ path, with, publish }. hammerkit up [names...]anddown [names...]start or stop the named services and the services of named tasks.hammerkit run --no-restoreonly looks cache hits up and restores their outputs once a task that runs needs them.- Container services take
restartsbefore they count as crashing. hammerkit remote add --token-commandkeeps a token command per server in the host config, andremote login/remote logouttake an optional server name.- Secret errors name the task or service, the secret and the account, and say what to add where.
Changed
- Archives are packed one file at a time, and a hard link is packed as a link only when its file id is exact, so Windows no longer restores two files with each other's content.
- Each output of a task gets its own folder in its Kubernetes claim, and an output with a
file extension is a file there, as on Docker. A file output must be written in place
(BusyBox
cponto it fails). - A
srcinside a folder of anothersrcis part of that folder's upload and mount on Kubernetes, as on Docker. - A file a container task generates reaches the container tasks that depend on it.
- Output is masked line by line across chunks, and registry credentials go only to the registry's own origin.
- Sandbox commits by an account without a name are authored by the local part of its email.
Fixed
- A service with more than one port on Kubernetes.
hammerkit serverexited onSIGHUP; it now reloads its entitlements.hammerkit github-app-tokensays why it failed,hammerkit --versionprints the bare version, and log lines show the day of the month.- The init task of an included service reaches it by a host name instead of a link Docker refused.
- A crash-looping service on Kubernetes fails in time instead of waiting out its timeout.