Flag Reference
Functions
parseFeatureFlags(env?)
Parses flags from process.env or a custom key-value map. Never throws — all flags have safe defaults.
getFeatureFlags()
Shorthand for parseFeatureFlags(process.env).
isLocalExecutionEnabled(userId, flags?)
Determines whether local execution is active for a specific user. Checks in order:
- Kill switch → always
false - Force flag → always
true - Canary percentage → hash-based user bucketing
isServerExecutionEnabled(flags?)
Returns flags.SERVER_EXECUTION_ENABLED.
validateFlagConfiguration(flags)
Checks for invalid flag combinations.
FORCE_LOCAL_EXECUTIONandKILL_SWITCH_LOCAL_EXECUTIONboth enabled- Both
LOCAL_EXECUTION_ENABLEDandSERVER_EXECUTION_ENABLEDdisabled

