Settings
Helios's "everything is tunable" property lives in `core/settings/`.
Helios's "everything is tunable" property lives in core/settings/.
Adding a parameter
- Append a
register(Parameter(...))call incore/settings/parameters.py. - Run
make params-check(regeneratesapps/miniapp/public/parameters-manifest.json). - Replace the hardcoded value with
await resolve(<key>, scope_ctx). - Add a
tests/settings/test_<category>.pycase.
Reading a value
from core.settings.resolver import resolve
from core.settings.scopes import ScopeContext
ctx = ScopeContext(tier="pro", client_id=client_id, target_id=target_id)
cadence = await resolve("polling.presence.cadence_seconds", ctx)
Writing an override (owner)
from core.settings.overrides import OverrideWrite, set_override
from core.settings.scopes import ScopeLevel
await set_override(OverrideWrite(
key="polling.presence.cadence_seconds",
scope_level=ScopeLevel.TARGET,
scope_id=42,
value=5,
actor_id=owner_actor_id,
note="VIP target — capture every 5s",
))
Validation runs first; an audit row is emitted; settings:changed:<key> is
published on Redis Pub/Sub and every process invalidates its resolver cache.
Scope levels
GLOBAL < TIER < CLIENT < TEAM
< TARGET < CHAT < ROUTE
< USERBOT < PERSONA
The resolver walks most specific first and returns the first override
found. Falls back to the parameter's default if no override exists.
What is NOT a parameter
- Stealth invariants (forbidden RPCs,
messages_sent_per_day = 0). - Schema definitions.
- Wire protocols.
- Cryptographic algorithm choices (AES-256-GCM is fixed; the key is in KMS).
OWNER_TG_USER_ID— boot-time env var (a change here is a deploy event).