feat: v2.5.12 — plan and quota for every AI tool, Grok Build and Kimi Code, Quit AgentHub (#65)

Usage panel (status bar):
- every account shows its plan (Claude subscriptionType, Codex
  chatgpt_plan_type, Cursor membershipType, Grok subscriptionTier)
- new quota rows: Cursor CLI (cursor.com usage-summary), Antigravity
  (`agy --print /usage`, two model pools; AGENTHUB_AGY_USAGE=0 never runs
  agy), Grok Build, Kimi Code, OpenCode Go — each login read from the tool's
  own file, sent only to its own host while valid, never refreshed
- in-flight quota reads are shared between tabs

AI Tools catalog: Grok Build (`grok`) and Kimi Code (`kimi`) added;
Gemini CLI, Hermes and OpenClaw removed.

Also: Quit AgentHub (#65, `agenthub stop`), status-area icon, Add to Chat
on an editor selection, Settings in three groups, JetBrains-style Changes
panel (ticked files/hunks, ignore, blame, file history), terminal font.

--no-verify: :3000 is taken by another dev server (lane-detect tests);
both suites run by hand — server 2636/2639 (the 3 are :3000), client
1131/1131.
This commit is contained in:
2026-10-08 12:22:14 +07:00
parent 6ef9a5d4b7
commit a9c71cd905
133 changed files with 8007 additions and 1830 deletions
+11
View File
@@ -22,6 +22,7 @@ const {
normalizeGeo,
normalizeTier,
accumulateBucket,
longArgs,
} = require("../server/lib/token-usage");
const {
@@ -822,6 +823,11 @@ function writeSessionTokens(dbModule, sessionId, tokensByModel, opts = {}) {
tokens.webFetch || 0,
tokens.codeExec || 0
);
// The exact path also clears a stale subset; the default one only raises.
const long = longArgs(tokens);
const key = [sessionId, tokens.model, tokens.speed, tokens.geo, tokens.tier];
if (opts.exact) stmts.setLongTokens.run(...(long || [0, 0, 0, 0, 0]), ...key);
else if (long) stmts.raiseLongTokens.run(...long, ...key);
written++;
}
}
@@ -852,6 +858,11 @@ function subagentTokenRows(tokensByModel) {
web_search_requests: b.webSearch || 0,
web_fetch_requests: b.webFetch || 0,
code_execution_requests: b.codeExec || 0,
long_input_tokens: b.longInput || 0,
long_output_tokens: b.longOutput || 0,
long_cache_read_tokens: b.longCacheRead || 0,
long_cache_write_tokens: b.longCacheWrite || 0,
long_cache_write_1h_tokens: b.longCacheWrite1h || 0,
};
const hasUsage =
row.input_tokens ||