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
+13 -1
View File
@@ -18,6 +18,7 @@ function broadcast(type, data) {
}
const TranscriptCache = require("../lib/transcript-cache");
const { writeHourly } = require("../lib/hourly-usage");
const { longArgs } = require("../lib/token-usage");
const { scanAndImportSubagents } = require("../../scripts/import-history");
const { evaluateEvent } = require("../lib/alerts");
const { ingestWorkflowsForSession } = require("../lib/workflow-ingest");
@@ -1036,6 +1037,17 @@ const processEventTx = db.transaction((hookType, data, tool = "claude") => {
tokens.webFetch,
tokens.codeExec
);
const long = longArgs(tokens);
if (long) {
stmts.raiseLongTokens.run(
...long,
sessionId,
tokens.model,
tokens.speed,
tokens.geo,
tokens.tier
);
}
}
writeHourly(sessionId, result.tokensByHour);
}
@@ -1602,7 +1614,7 @@ router.post("/event", (req, res) => {
// ── POST /api/hooks/ingest-batch ────────────────────────────────────────────
// Hooks from a machine this dashboard cannot reach over SSH, pushed with the
// bearer token Settings → Data → Push ingest makes (server/lib/push-token.js).
// bearer token Settings → Database → Push ingest makes (server/lib/push-token.js).
// Off — 503 — until a token exists. Body: {source, events: [{hook_type, data,
// tool?}]}; each event goes through ingestHook exactly as POST /event would,
// with its session tagged `push:<source>`. Under /hooks, so DASHBOARD_TOKEN