Implement a rate limiter CLI tool at /app/ratelim that reads a JSON events file and enforces a hybrid…
Implement a rate limiter CLI tool at /app/ratelim that reads a JSON events file and enforces a hybrid…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input ( /app/events.json ): array of event objects with fields: - "id" : string, unique per event - "user" …
The task
**Input** (`/app/events.json`): array of event objects with fields: - `"id"`: string, unique per event - `"user"`: string, user identifier (case-sensitive) - `"timestamp"`: string in ISO 8601 format, always UTC, but may use either `Z` suffix or `+00:00` offset - `"weight"`: integer 1–100, the token cost of this event
Part of ai-and/termgrade-environments.