nntrivi2001
fa27b299e7
feat(server-mode): spend quota per user — no new session, prompts refused once used up
...
An admin sets a default spend quota on the Users page and overrides it per
user (Edit user → Spend quota: default / no limit / their own), in dollars
per local day or per sliding 5 hours. Spend is the users page's own
hourlyTokenRows + calculateCost over the sessions a user owns.
Over the quota, until it opens again:
- spawnRun refuses every start/resume/home prompt with EQUOTA (429);
- a minute sweep writes each pane's AGENTHUB_QUOTA_FILE (host: data dir,
member: handoff dir via write-as) and hook-handler.js exits 2 on
UserPromptSubmit from that file alone (Claude Code, Codex with trusted
hooks) — fail-open, never asks the dashboard, never for Antigravity;
- a member's omp on the shared login loses its gateway key (clientsFor);
- panes no hook can stop (Antigravity, Cursor, Codex without trusted
hooks, omp on its own login) are ended.
GET /api/me/quota feeds a "Quota N%" chip in the status bar.
New: server/lib/user-quota.js, user_quotas table, PUT /api/users/quota-default,
PATCH /api/users/:id {quota}, docs in SERVER-MODE.md § Spend quotas.
2026-10-28 14:31:11 +07:00
..
2026-09-18 16:52:05 +07:00
2026-10-28 10:41:53 +07:00
2026-10-26 08:32:45 +07:00
2026-10-14 16:06:54 +07:00
2026-10-01 13:39:17 +07:00
2026-09-29 08:25:37 +07:00
2026-10-26 11:18:05 +07:00
2026-10-01 13:39:17 +07:00
2026-10-20 16:44:55 +07:00
2026-09-29 08:25:37 +07:00
2026-10-23 16:41:45 +07:00
2026-10-06 17:12:28 +07:00
2026-09-29 16:09:19 +07:00
2026-09-29 16:09:19 +07:00
2026-10-21 15:44:17 +07:00
2026-10-28 10:41:53 +07:00
2026-10-22 10:04:30 +07:00
2026-10-28 10:41:53 +07:00
2026-10-08 12:22:14 +07:00
2026-10-22 14:34:50 +07:00
2026-10-22 14:34:50 +07:00
2026-10-22 14:34:50 +07:00
2026-10-16 10:20:09 +07:00
2026-10-07 14:11:25 +07:00
2026-10-26 14:22:41 +07:00
2026-10-26 14:22:41 +07:00
2026-10-26 14:22:41 +07:00
2026-10-26 14:22:41 +07:00
2026-10-28 11:47:19 +07:00
2026-10-26 14:22:41 +07:00
2026-10-26 14:22:41 +07:00
2026-09-10 16:05:07 +07:00
2026-10-13 17:10:29 +07:00
2026-10-09 14:57:10 +07:00
2026-10-28 11:47:19 +07:00
2026-10-19 17:19:41 +07:00
2026-10-09 14:57:10 +07:00
2026-09-29 16:09:19 +07:00
2026-09-29 16:09:19 +07:00
2026-10-09 14:57:10 +07:00
2026-10-28 11:47:19 +07:00
2026-10-28 10:41:53 +07:00
2026-10-08 12:22:14 +07:00
2026-10-28 10:41:53 +07:00
2026-10-21 15:44:17 +07:00
2026-10-14 16:06:54 +07:00
2026-10-06 17:12:28 +07:00
2026-10-21 15:44:17 +07:00
2026-10-08 23:04:57 +07:00
2026-10-16 10:20:38 +07:00
2026-10-26 11:18:05 +07:00
2026-10-09 14:57:10 +07:00
2026-10-06 17:12:28 +07:00
2026-10-20 16:44:55 +07:00
2026-10-26 11:18:05 +07:00
2026-10-09 14:57:10 +07:00
2026-09-25 10:44:40 +07:00
2026-10-14 12:21:55 +07:00
2026-10-23 08:33:55 +07:00
2026-10-09 14:57:10 +07:00
2026-10-20 16:44:55 +07:00
2026-10-14 12:21:55 +07:00
2026-10-19 17:13:26 +07:00
2026-10-09 14:57:10 +07:00
2026-10-27 16:39:38 +07:00
2026-10-14 11:55:53 +07:00
2026-10-19 16:49:59 +07:00
2026-10-09 14:57:10 +07:00
2026-10-26 14:22:41 +07:00
2026-10-01 16:03:24 +07:00
2026-10-14 12:21:55 +07:00
2026-10-09 14:57:10 +07:00
2026-09-25 17:30:28 +07:00
2026-09-18 09:44:17 +07:00
2026-10-01 16:03:24 +07:00
2026-10-01 16:03:24 +07:00
2026-10-16 13:38:09 +07:00
2026-10-01 16:03:24 +07:00
2026-10-14 17:21:33 +07:00
2026-10-15 16:02:11 +07:00
2026-10-27 16:39:38 +07:00
2026-10-09 14:57:10 +07:00
2026-10-15 14:44:47 +07:00
2026-10-07 14:11:25 +07:00
2026-10-12 15:40:51 +07:00
2026-10-23 16:41:45 +07:00
2026-10-26 17:12:02 +07:00
2026-10-28 14:31:11 +07:00
2026-10-19 16:49:59 +07:00
2026-10-14 11:55:53 +07:00
2026-10-14 17:21:33 +07:00
2026-10-26 14:22:41 +07:00
2026-10-23 10:44:11 +07:00
2026-10-22 17:02:08 +07:00
2026-10-27 16:39:38 +07:00
2026-10-08 23:04:57 +07:00
2026-10-08 12:22:14 +07:00
2026-10-06 17:12:28 +07:00
2026-10-26 14:22:41 +07:00
2026-10-01 16:33:25 +07:00
2026-10-26 14:22:41 +07:00
2026-10-09 14:57:10 +07:00
2026-10-14 14:17:39 +07:00
2026-10-26 14:53:29 +07:00
2026-10-28 14:31:11 +07:00
2026-10-06 17:12:28 +07:00
2026-10-07 14:11:25 +07:00
2026-10-09 14:57:10 +07:00
2026-10-28 11:47:19 +07:00
2026-10-07 14:11:25 +07:00
2026-10-16 10:16:54 +07:00
2026-10-06 17:12:28 +07:00
2026-10-06 17:12:28 +07:00
2026-10-26 14:22:41 +07:00
2026-10-07 14:11:25 +07:00
2026-10-26 14:22:41 +07:00
2026-10-07 13:24:15 +07:00
2026-10-16 10:27:22 +07:00
2026-10-26 14:22:41 +07:00
2026-09-10 13:44:28 +07:00
2026-10-07 13:24:15 +07:00
2026-10-02 13:22:29 +07:00
2026-09-29 16:09:19 +07:00
2026-10-09 14:57:10 +07:00
2026-10-07 11:18:10 +07:00
2026-10-07 14:11:25 +07:00
2026-10-23 16:41:45 +07:00
2026-10-26 14:53:29 +07:00
2026-10-08 12:22:14 +07:00
2026-10-22 11:11:38 +07:00
2026-10-09 14:57:10 +07:00
2026-10-21 15:44:17 +07:00
2026-10-08 12:22:14 +07:00
2026-10-23 10:44:11 +07:00
2026-10-28 14:31:11 +07:00
2026-10-14 17:21:33 +07:00
2026-10-06 20:22:34 +07:00
2026-10-09 14:57:10 +07:00
2026-10-08 23:04:57 +07:00
2026-10-19 17:19:41 +07:00
2026-10-26 14:22:41 +07:00