Client config
A single public endpoint the CLI polls for two things: the data-plane image refs it should deploy, and the CLI support policy (minimum supported release, latest release, install URL).
GET /v1/clientconfig — published images + CLI support policy
Auth: public. Always 200 OK — there is no error case; a server with no
policy configured just returns empty version strings.
$ curl -s https://api.stagdb.com/v1/clientconfig
Response 200 OK
{
"agent_image": "registry.stagdb.com/adjoint-agent:v0.4.0-a8f670b",
"operator_image": "registry.stagdb.com/adjoint-operator:v0.4.0-a8f670b",
"cli": {
"min_version": "v0.2.0",
"latest_version": "v0.3.0",
"install_url": "https://stagdb.com/adjoint/install.sh"
}
}
| Field | Type | Notes |
|---|---|---|
agent_image |
string | Full adjoint-agent image ref to deploy. Server-configured (ADJ_AGENT_IMAGE); never empty in practice. |
operator_image |
string | Full adjoint-operator image ref to deploy. Server-configured (ADJ_OPERATOR_IMAGE); never empty in practice. |
cli.min_version |
string | Minimum supported adj release for cluster provisioning, e.g. v0.2.0. Empty means no floor is enforced. |
cli.latest_version |
string | Current recommended adj release, e.g. v0.3.0. Empty means no update nag is shown. |
cli.install_url |
string | URL the CLI pipes into sh to (re)install. Falls back to https://stagdb.com/adjoint/install.sh client-side if empty. |
cli.min_version and cli.latest_version, when non-empty, are always a clean
release tag (vX.Y.Z — no prerelease or build suffix); the server refuses to
boot with a malformed value in ADJ_CLI_MIN_VERSION/ADJ_CLI_LATEST_VERSION.
Who consumes this, and when
Every request adj (v0.3.0+) makes carries an X-Adj-CLI-Version header —
the control plane logs it (cli_version=..., log-only, no response
behavior) as a fleet-version signal. GET /v1/clientconfig is the other
half: the CLI reads it back to drive three things, all in
cli/internal/clientcfg/ and cli/internal/cli/clientconfig.go:
- Image defaults.
adj cluster provisionresolves--agent-image/--operator-imageas: explicit flag > this endpoint'sagent_image/operator_image> a baked-in fallback (used if the control plane is unreachable). The resolved refs are printed (Images: agent=... operator=...) before the confirmation prompt. - Provisioning version gate.
adj cluster provision/deprovision(only those two commands) compare the running CLI's version againstcli.min_version. A release build below it is refused, with the install one-liner printed. Unreleased/dev builds (not a cleanvX.Y.Ztag) are exempt, with a notice. If the control plane can't be reached, the gate fails open — a warning is printed and the command proceeds. - Update nag. At most once per 24 hours, after a command finishes,
the CLI compares its own version against
cli.latest_versionand prints a one-line stderr notice if a newer release exists. The fetched config and last-nag time are cached at~/.config/adj/clientconfig.json(honoring$XDG_CONFIG_HOME) with a 24-hour TTL, so this endpoint is hit at most once per 24 hours per machine, not on every invocation.
Both the gate and the nag only ever compare release versions
(vX.Y.Z — the same format this endpoint returns); a locally-built or
git-describe adj binary skips both policies rather than failing a
comparison it can't make sense of.