MCPcopy Create free account
hub / github.com/aetherstate/GODMOD3.AI / minimumTierFor

Function minimumTierFor

api/middleware/tierGate.ts:63–69  ·  view source on GitHub ↗

* Find the minimum tier that passes the gate (for upgrade messaging).

(gate: GateCheck)

Source from the content-addressed store, hash-verified

61 * Find the minimum tier that passes the gate (for upgrade messaging).
62 */
63function minimumTierFor(gate: GateCheck): Tier {
64 const order: Tier[] = ['free', 'pro', 'enterprise']
65 for (const tier of order) {
66 if (passesGate(TIER_CONFIGS[tier], gate)) return tier
67 }
68 return 'enterprise'
69}
70
71/**
72 * Create middleware that enforces a tier gate.

Callers 1

tierGateFunction · 0.85

Calls 1

passesGateFunction · 0.85

Tested by

no test coverage detected