Engine reference — generated from the canonical engineering source. Do not edit this page by hand.
Seats & Licensing
Seat-based capacity: caps (max agents / GPU workers / users), capacity packs, and graceful degradation — enforced by Sol, surfaced in Limon. Terminology: “seats” is the canonical word (code, config, docs, UI); the license-term vocabulary is seats only.
What this is
A license carries capacity caps — how many agents, GPU workers, and users a deployment may use — plus feature flags (clustering, SSO, audit retention, MCP gateway, multi-region, air-gap, custom branding). Since the Engine enforces the caps it has a plane for.
Commercial terms are not announced. This page documents the engine’s
seat model, not an offer. For an evaluation, licensing, or an
interest registration, contact Spacebeam (hello@spacebeam.org /
sales@spacebeam.org).
The model is deliberately not metering: the engine never meters a call, a token, or a run. Seats raise caps; failed runs never count; caps degrade (soft-cap queue), never hard-block.
Architecture
CLF v1 file (offline/air-gap) ──┐
├─▶ sol_license (gen_server) ── ETS seat cache ──▶ spawn/register checks
ZERGBASE panel /api/seats ─────┘ │ (fresher-wins merge)
▼
GET /api/v1/license/status (admin, Limon "Seats" view)
sol_seat — pure data model: caps, packs, FEFO (expiring-soonest-first)
pack consumption, merge, Community defaults.
sol_license — gen_server that loads the Spacebeam License File (CLF
v1) on cold start (offline / air-gapped), and refreshes from the
control-plane seat endpoint (SOL_SEATS_URL) when configured (online).
Merge prefers the fresher source.
sol_worker_sup — enforces caps at agent spawn; a soft-cap hit returns
{error, cap_reached} (HTTP 429 with retry-after) instead of a hard block.
Mango — cost centers + per-member caps (set_cost_centers,
set_member_caps, get_usage_attribution).
Posture record: cost centers are a Mango-only surface —
zero Sol consumers (no route, no dispatch path reads them; the archived
Header’s “DONE” claim predates this measurement). Enforcement in
Sol is deliberately not queued: it needs a real billing requirement
first. Until then this is the recorded, non-silent dormancy posture.
Limon — “Seats” view (caps, packs, source, enforced/advisory badge),
reading GET /api/v1/license/status.
CLF v1 format
{
"seats": { "max_agents": 25, "max_gpus": 4, "max_users": 10,
"clustering": 3, "mcp_gateway": true,
"multi_region": true, "custom_brand": true },
"exp": 1780000000000,
"sig": "<base64 ed25519 signature over seats+exp canonical JSON>"
}
Without SOL_LICENSE_PUBKEY the file is trusted config (dev). With a PEM
ed25519 public key, signatures are verified; failures fall back to Community
defaults (observable via status).
Seat flags
The seat map carries 8 flags (tier-architecture.md §8). The engine enforces
the capacity caps it has a plane for (max_agents / max_gpus at spawn via
sol_worker_sup); max_users is carried but NOT enforced (see the
non-claim below); the four gating flags are shipped in the seat data and
consumed by the Limon console (tier-gated UI) — they are never
check/2-enforced.
| Flag | Default | Licensed | Extended | Type |
|—|—|—|—|—|—|
| max_agents / max_gpus / max_machines | 5 / 1 / 1 | per license | unlimited | cap |
| max_users | 1 | per plan | unlimited | carried — NOT enforced (non-claim) |
| audit_retention_days | 7 | 365 | unlimited | cap |
| sso | false | ✓ (roadmap) | ✓ (roadmap) | gating |
| air_gapped | false | — | ✓ | gating |
| clustering (nodes) | 1 | 3 | unlimited | gating |
| mcp_gateway | false | — | ✓ | gating |
| multi_region | false | — | ✓ | gating |
| custom_brand | false | — | ✓ | gating |
The column names describe capacity profiles in the engine; they are not a published commercial list. Commercial packaging is not announced.
max_users non-claim. The value is
carried in the CLF/seat cache, flows through /api/v1/license/status, and
renders in Limon, but no plane enforces it: Mango has no user-count
seat check and Sol does not gate user creation. It is advisory until a
signed Sol→Mango seat datum exists; do not document it as an enforced cap. The Mango identity test suite pins this
docs-vs-code agreement.
Missing keys always fall back to Community-safe defaults (never a silent
restriction). Since, unknown keys are no longer the failure mode:
all 8 flags parse through sol_seat:from_map/1 (binary and atom keys),
surface in GET /api/v1/license/status under caps, and render in Limon’s
Seats view Features card.
Panel → Sol wire contract
The ZERGBASE panel /api/seats emits all 8 flags plus packs and
refreshed_at. The contract is additive-safe in both directions:
New panel → new Sol: all flags flow through byte-compatible. Old panel → new Sol: missing keys fill from Community defaults. Safe. New panel → old Sol: the previous allowlist drops the 4 gating keys silently, falling back to Community defaults. Safe (documented limitation, not a break).
The panel reports the capacity profile it was provisioned with: a
self-hosted engine’s own CLF/cache is the authority for its node cap, while
the default profile reports clustering: 1 and an extended profile reports
the four flags true/unlimited.
The refreshed_at field inside seats is the panel’s wall clock
(epoch ms). Sol uses it ONLY as a freshness/replay gate; the merge
currency is Sol’s own local stamp (see Trust model).
Trust model
| Authority | Trust | Role |
|---|---|---|
Signed CLF (SOL_LICENSE_FILE + SOL_LICENSE_PUBKEY) | ed25519-verified | Cryptographic authority for air-gapped operation |
ZERGBASE panel /api/seats | HMAC-verified | Tier authority for online operation — only with a valid signature (below) |
SOL_SEATS_SIGNING_KEY (required for online refresh) | HMAC-SHA256 | The ONLY thing that makes a remote response acceptable |
SOL_SEATS_SIGNING_KEY is required whenever SOL_SEATS_URL is set
. An empty key rejects every remote response with
{error, unsigned_remote} — the refresh fails CLOSED (current caps are
kept; the failure is counted in sol_license_refresh_failures_total).
The previous “unset key = trust the panel as-is” posture allowed a
forged response to outrank the signed CLF via fresher-wins and is gone.
Signature contract (set on Sol AND ZERGBASE_SEATS_SIGNING_KEY on the
panel): the response must carry
sig = hex(HMAC-SHA256(key, canonical)) where
canonical = json.dumps(seats, sort_keys=True, separators=(',', ':'))
recursively key-sorted compact JSON over the seats object. Value set
is restricted by contract to non-negative ints, booleans, ASCII strings
("unlimited"), arrays/objects thereof. A missing/invalid sig rejects
the refresh. Set both sides together — see the wild flip checklist.
Monotonic merge guard: a replayed (or clock-skewed-back)
payload cannot move the ledger backwards — refreshed_at must not be
older than the stored value.
Freshness gate: a response whose panel refreshed_at is
older (or further future) than max(2 × refresh_ms, 2 min) is rejected as
stale — replay protection. Responses without the field are accepted
(backward-compatible fail-open). This gate is NOT a substitute for the
HMAC: an active MITM sets refreshed_at to now and walks past it.
Transport: https:// → TLS with verify_peer against the
system CA store. Under SOL_SEATS_ENABLED=true, an http:// seats URL
is REFUSED at boot (seats_http_url_forbidden) — the bearer token would
be cleartext and the refresh forgeable. SOL_SEATS_URL_ALLOW_HTTP=true
exists ONLY as a loopback test override (the seats handshake CT); never
set it in production. The bearer token (SOL_SEATS_TOKEN) is not
validated by the panel — protection relies on transport + HMAC.
Merge semantics: with SOL_SEATS_URL set, a successful refresh stamps
Sol’s local clock, so the fresher remote outranks the signed CLF — the
cryptographic authority is subordinate to the (audited) panel channel
while online. Packs from the older source are preserved when the newer
omits them.
Packs are validated: invalid pack entries (non-integer
expiry/agents/gpus) are dropped, never trusted — a forged pack previously
crashed the license server (crash loop → enforcement off).
Refresh never blocks checks: the fetch runs in a companion
process; a hanging endpoint can no longer stall the license gen_server
(which previously made every check/2 time out into pass-through).
Configuration
| Key | Default | Description |
|---|---|---|
SOL_SEATS_ENABLED | false | Master switch. Off = all checks pass, Community defaults reported. Off in production until the release gate. |
SOL_LICENSE_FILE | — | Path to the CLF v1 license file (cold start / air-gap) |
SOL_LICENSE_PUBKEY | — | PEM ed25519 public key for signature verification (empty = trust file in dev) |
SOL_SEATS_URL | — | Control-plane seat endpoint (ZERGBASE panel /api/seats) for online refresh |
SOL_SEATS_TOKEN | — | Bearer token for the seat endpoint |
SOL_SEATS_SIGNING_KEY | — | HMAC-SHA256 key for /api/seats signature verification — required when SOL_SEATS_URL is set |
seats_url_allow_http (sys.config app env — no env-var mapping) | false | Test-only loopback override of the http:// hard-refusal. NEVER in production |
SOL_SEATS_REFRESH_MS | 30000 | Refresh interval (bounds: 5000–86400000, startup-validated) |
Behavior contract
Graceful degradation, never hard-block. Cap reached → new spawns queue (or 429 at the HTTP boundary); running sessions and long-running work continue. UI shows “cap reached — upgrade to lift it.” Failed runs never count. Crashed agents, failed sagas, dead workers, failed MCP calls don’t consume a seat. The engine never meters per-run. A license change keeps everything. Data, sessions, and configs are preserved; only caps tighten. Capacity packs (FEFO). Stackable capacity packs (+10 agents, +2 GPU) with per-pack expiry; expiring-soonest packs are consumed first. Pack state lives in the seat cache. Pack packaging and commercial terms are not announced. Unavailable license degrades to pass-through. Worker spawns must never crash because the license server is down — enforcement is opt-in.
Status endpoint
GET /api/v1/license/status (admin) — current caps, pack state, source
(file/cache), and whether enforcement is on (enforced) or advisory
(advisory). Limon’s Seats view renders the same data with a
enforced/advisory badge so operators can see at a glance whether caps are
live.
Current production state
Implemented and covered by contract tests (eunit: sol_seat, sol_license
remote decode/sig/freshness; CT: sol_license valid/expired/bad-sig/remote/
disabled; worker-sup cap check; sol_agent_cap concurrency tests).
** hardening (this line):** atomic spawn-cap semaphore
(sol_agent_cap, B2 race fix), remote-refresh audit logging, panel
freshness/replay gate, optional HMAC verification (SOL_SEATS_SIGNING_KEY),
scheme-derived TLS with verify_peer, async refresh (no more check stalls),
pack validation. Production flip (SOL_SEATS_ENABLED=true on blue) is
wild-owned — see wild plan/seat-enforcement-flip-cd-alerting.md.
Until the flip, Community caps are advisory in self-serve tiers. Enterprise
contracts reference caps only after enforcement lands.
Implemented since: chat-session worker spawns route through the seated,
supervised path — cap exhaustion at the HTTP
boundary is 429 + Retry-After (license outage 503), never 500.
Roadmap remainder: ZERGBASE panel seat UI, Sol-side per-member cap reads
(requires the ZERGBASE panel to write member_caps into the seat cache).
See also
Licensing and editions (evaluate/why-zerg.md) —
commercial terms are not announced; contact Spacebeam.
docs/audit-retention.md — retention semantics for the audit flag.
plan/archive/phase--seats.md — implementation plan and status