Expand description
Session registration: the binding of (org, project, session) to
an account, and the env set a child is stamped with.
The child never holds a real credential. Its ANTHROPIC_BASE_URL
points at this listener with the three routing segments in the
path, and the credential it does hold is a dummy delivered through
the SAME variable the account’s real credential uses - moving a
credential between variables changes which entitlements reach the
backend, not only which header carries it.
Re-exports§
use std::collections::HashMap;🔒use forge_primitives::account::Provider;🔒use parking_lot::Mutex;🔒use crate::account::AccountKey;🔒
Structs§
- Bindings
- The session bindings, keyed by the three routing segments.
- EnvSet
- The env a child is stamped with, in insertion order.
- Registration
- One spawn’s registration: who owns the session and where it sits.
Constants§
- ALT_
BASE_ 🔒URL_ VARIABLE - API_
KEY_ 🔒VARIABLE - AUTH_
TOKEN_ 🔒VARIABLE - BASE_
URL_ 🔒VARIABLE - DUMMY_
CREDENTIAL - What the CLI sends when it has no real credential. Authorises nothing upstream; the gateway replaces it before forwarding.
- OAUTH_
VARIABLE 🔒
Functions§
- credential_
variable_ for - The variable the account’s real credential lives in, which is the variable its dummy has to travel in too. The one home for the rule: the config load maps the flat token onto it, the stamp puts the dummy in it, and the forward leg reads the real credential back out of it.
- stamped_
gateway_ 🔒keys - The four gateway-owned keys, stamped fresh for
registration: every other env key composes per the documented precedence, these four are the gateway’s alone.