feat(billing): enforce image generation quota with admin API and user display
Memind CI / Test, build, and release guards (push) Failing after 3s

Add period_images_bonus and ledger tracking, gate image_make on remaining quota,
expose admin image-quota routes, show remaining image quota in the balance popover,
and document that admin UI must live in memind_adm (5174) not ops.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-03 14:58:38 +08:00
parent 36d8e74784
commit 946d8756c8
14 changed files with 639 additions and 23 deletions
+4
View File
@@ -304,6 +304,9 @@ export type ActiveSubscription = {
status: 'active' | 'expired' | 'cancelled';
periodTokensLimit: number;
periodTokensUsed: number;
periodImagesLimit: number;
periodImagesUsed: number;
periodImagesBonus?: number;
periodStart: number;
periodEnd: number;
expiresAt: number;
@@ -317,6 +320,7 @@ export type PlanDefinition = {
priceCents: number;
periodDays: number;
periodTokens: number;
periodImages?: number;
modelTier: string;
overageRate: number;
};