Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

390 B
Raw Blame
'use strict';

const plans = require('../config/plans.json');

const FREE_CUTOFF = 1.1;

/** Soft limits: over is permitted and billed later, except free past 110 percent. */
function checkQuota(usage, plan) {
  const limit = plans[plan].limit;
  if (plan === 'free' && usage > limit * FREE_CUTOFF) return { allowed: false };
  return { allowed: true };
}

module.exports = { checkQuota };