Resolve The Chain
A realm declares its parent in its owning config document:- The chain is head-first and follows exactly one parent at each step.
- A terminal non-global realm appends
globalwhen a global config section is present. - An explicit parent of
globalis allowed even when no global section has been materialized; the absent document contributes nothing. globalis the root and cannot declare a parent.- Unrelated sibling realms are never searched.
- The maximum chain depth is 16.
env_default, a parent on global, or
excessive depth.
An absent head is legal for internal default-selection paths: it contributes no
config and may still reach a configured global tail before environment
fallback. A caller that explicitly names a configured realm or binding
requires that head to exist and receives a typed error when it does not.
The synthetic environment default is not a config realm. It cannot be a parent,
cannot own durable config, and is selected only by the typed environment
fallback path.
State Never Inherits
Every state domain remains keyed to the consuming head realm:- sessions and transcripts;
- runtime liveness, operation-delivery state, provisional physical successors, and exact run-boundary receipts;
- schedules, WorkGraph, and jobs;
- blobs and artifacts;
- mob state and derived projections.
Config Composes Root-First
The effective config fold starts from built-in defaults, then applies the resolved chain from root to head, then applies per-request overrides.
There are no removal tombstones for inherited MCP servers, hooks, or skill
sources. An empty child section does not delete a parent entry.
config get, config set, and config patch operate on the raw head
document. Runtime agent construction reads the composed effective config. This
read/write split prevents a read-modify-write from flattening inherited entries
into the child. RFC 7396 config patch updates the raw document; it is distinct
from these realm-composition rules.
Credentials Read Down, Write To The Owner
A child can use a binding defined by a parent or byglobal, but the resolved
reference records the realm that defines it:
- Reads inherit. Runtime resolution walks the chain and can select a matching ancestor binding.
- HostAuthService and RPC/REST writes are strict-owner and explicitly addressed. A child-addressed credential write to an inherited binding is rejected and reports the owner so the caller can retarget; those services do not forward it automatically.
- Managed leases use owner provenance. AuthMachine, TokenStore, and refresh
coordination use the owning realm plus binding and optional profile by
default. A configured
credential_accountinstead uses the owning realm plus account, sharing the credential lifecycle across route bindings.
The Global Realm
global is a reserved configured realm with a special document location:
rkat auth login provisions nonsecret binding
configuration in this document and stores its credential separately through
TokenStore under the global credential identity. Scripted API-key login only
stores a token and requires matching managed-store config. Once a
[realm.global] section exists, it becomes the implicit tail for workspace
realms without another explicit terminal parent.
The global realm is different from env_default:
Legacy Login Migration
Older Meerkat versions stored CLI logins underdev. The current run path has
an idempotent no-clobber migration that copies an absent token/binding to
global. New documentation and config should use global; dev is not a
special fallback realm.
