The binding law (.agents/rules/licensing-separation.md, CTO decision 2026-07-15): there are two licensing systems. KOS signed grants carry entitlement…
machinesactivation_grants, offline_grantsb64url(sorted JSON claims).b64url(64-byte sig), v=2; claims incl. features[], valid_until/grace_until/kid/server_time; signer = OpenBao Transit (non-exportable key, legacy id engen-os-license-signing; private key never leaves OpenBao); test-only LocalEd25519Signerengen_os_license_session), scopes license:activate|heartbeat|read|manage, non-refreshable, org baked in; never a console JWTengen_os_revocations)/internal/admin/license/revoke; seats marked MACHINE_REVOKED; heartbeat surfaces revoked:trueengen_os_releases)GET /api/v1/license/releases/{channel} — public, no credential; R2 artifact_url + sha256 + optional signatureengen_os_license_keys)app/edition.pydev | open-source | commercial, baked at build; structural provider gate, never licensableapp/license.py entitlements()manifold_access, byok, harness atoms); effective = max(commercial_floor, grant)app/deployment_identity.py + license moduleapp/deployment_identity.pyKAIDERA_OS_PRODUCTION_LICENSE_KID=kaidera-os-lic-prod-v1credit_wallets/credit_transactions + credit_service.pyconsume_credits idempotent on (wallet,'consumed',reference); auto-topup; expiry buckets; offboard closesubscription_addons, seed_plans.pyunits_per_license pricing (e.g. +1 project $199/mo)entitlement_service.pystripe_service.py, webhooks.pysend_invoice no-card fallback (14-day due); refunds; credit notes; coupons; Billing Meter llm_token_usage1. the manifold_access key gate 2. the shared Stripe rails
Lives in 02-cust-portal, in the dedicated Kaidera OS license schema (Postgres schema engen_os + role engen_os_app_dml — legacy compatibility namespace until the verified identifier migration; FORCE RLS; migration 104; commercial tables from 115).
POST /api/v1/license/login console email/password ± MFA → license session (rate-limited 5/min)
POST /api/v1/license/activate bind install/deployment → Ed25519 grant (402 no paid sub · 403 revoked · 409 seat limit)
POST /api/v1/license/heartbeat ~24h; refreshed grant + revoked + server_time high-water mark (clock-rollback defence)
POST /api/v1/license/deactivate
GET /api/v1/license/customer/summary
POST /api/v1/license/customer/licenses/{id}/restore | seats/{install_id}/enable | expire
GET /api/v1/license/releases/{channel}Six enforcement gates: 1 provider list (edition) · 2 harness picker (license) · 3 runtime backstop _chat_routing_for — the teeth · 4 project-create cap · 5 worker/team cap · 6 startup posture (soft; hard-gate flag default off).