MCPcopy Create free account
hub / github.com/Noumena-Network/code / parseAutoModeEnabledState

Function parseAutoModeEnabledState

src/utils/permissions/permissionSetup.ts:1316–1321  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1314const AUTO_MODE_ENABLED_DEFAULT: AutoModeEnabledState = 'disabled'
1315
1316function parseAutoModeEnabledState(value: unknown): AutoModeEnabledState {
1317 if (value === 'enabled' || value === 'disabled' || value === 'opt-in') {
1318 return value
1319 }
1320 return AUTO_MODE_ENABLED_DEFAULT
1321}
1322
1323/**
1324 * Reads the `enabled` field from ncode_auto_mode_config (cached, may be stale).

Callers 3

verifyAutoModeGateAccessFunction · 0.85
getAutoModeEnabledStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected