export type Tier = "free" | "pro"; export type LimitKey = "chat_message" | "tool_call"; export type TierLimits = Record; export const LIMITS: Record = { free: { chat_message: 10, tool_call: 5, }, pro: { chat_message: 1000, tool_call: 500, }, }; export const TIER_LABELS: Record = { free: "Free", pro: "Pro", }; export function todayPeriodKey(now = new Date()): string { const y = now.getUTCFullYear(); const m = String(now.getUTCMonth() + 1).padStart(2, "0"); const d = String(now.getUTCDate()).padStart(2, "0"); return `${y}-${m}-${d}`; }