tokentracker-cli 0.58.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dashboard/dist/assets/{ActivityHeatmap--h7iLeSz.js → ActivityHeatmap-DxRcGqb0.js} +1 -1
- package/dashboard/dist/assets/{Card-KutJI7Kb.js → Card-CSvrNnBU.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-Cj-7LbVz.js +19 -0
- package/dashboard/dist/assets/{DevicePage-Bvf6grjO.js → DevicePage-MIwh75pN.js} +1 -1
- package/dashboard/dist/assets/DialogTitle-5Pz9G5vx.js +1 -0
- package/dashboard/dist/assets/{FadeIn-D_0IpM7h.js → FadeIn-BswCXVn8.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-wllgUDeU.js → HeaderGithubStar-DcEFKMNV.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-oUeKrhWf.js → IpCheckPage-DNiWD9VI.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-BqzdZPJZ.js → LandingPage-mipacgyL.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-Bib0pX-r.js → LeaderboardAvatar-Cha0prSv.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-BjLZyZb-.js → LeaderboardPage-DB4L0VDC.js} +3 -3
- package/dashboard/dist/assets/LeaderboardProfileModal-CXBulhhd.js +72 -0
- package/dashboard/dist/assets/{LeaderboardProfilePage-Df_jL82E.js → LeaderboardProfilePage-BHYi-9Nl.js} +1 -1
- package/dashboard/dist/assets/LimitsPage-BjD-_Cbj.js +2 -0
- package/dashboard/dist/assets/{LocalOnlyNotice-B01hqlKr.js → LocalOnlyNotice-C4z5PX1u.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-BjqX1wZg.js → LoginPage-awg65x0b.js} +1 -1
- package/dashboard/dist/assets/PopoverPopup-D-wymWwQ.js +1 -0
- package/dashboard/dist/assets/{ResetPasswordPage-Bw7tWm1t.js → ResetPasswordPage-DBCOMvii.js} +1 -1
- package/dashboard/dist/assets/{Select-DbBT6mPJ.js → Select-CkunmlOy.js} +1 -1
- package/dashboard/dist/assets/SelectItemText-D7T3VeBt.js +1 -0
- package/dashboard/dist/assets/{SettingsPage-CrA-jBWs.js → SettingsPage-DIsoKZO8.js} +1 -1
- package/dashboard/dist/assets/SkillsPage-DIGp5OHK.js +1 -0
- package/dashboard/dist/assets/{WidgetsPage-DjE_NMiT.js → WidgetsPage-N_zvVc5J.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-MciuOQFt.js → WrappedPage-DKH7yGKN.js} +1 -1
- package/dashboard/dist/assets/{agent-logos-JyXME_ur.js → agent-logos-CcHm05Tf.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-U8aUNwfl.js → arrow-up-right-Srji5q6H.js} +1 -1
- package/dashboard/dist/assets/{download-CK8DaHH6.js → download-D3OfnpNz.js} +1 -1
- package/dashboard/dist/assets/{info-DF9b_Lut.js → info-lMniNm1U.js} +1 -1
- package/dashboard/dist/assets/main-BGYbJv-h.js +1034 -0
- package/dashboard/dist/assets/use-limits-display-prefs-D9l2vQL-.js +1 -0
- package/dashboard/dist/assets/{use-native-settings-PZ_s8TF_.js → use-native-settings-CtMHe825.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-B11QqFl7.js → use-usage-limits-CsWdVm7H.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-CzRjastg.js → useCurrency-8LyGElzm.js} +1 -1
- package/dashboard/dist/assets/useScrollLock-CuXeF5Ev.js +1 -0
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/cli.js +2 -2
- package/src/commands/status.js +4 -0
- package/src/commands/sync.js +2 -2
- package/src/lib/diagnostics.js +3 -0
- package/src/lib/openclaw-session-plugin.js +54 -2
- package/src/lib/opencode-go-limits.js +261 -0
- package/src/lib/pricing/curated-overrides.json +4 -2
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +22 -13
- package/src/lib/usage-limits.js +9 -1
- package/dashboard/dist/assets/DashboardPage-CZS3KR2C.js +0 -19
- package/dashboard/dist/assets/DialogTitle-Cd8SHRAb.js +0 -1
- package/dashboard/dist/assets/LeaderboardProfileModal-GiTmpwyn.js +0 -72
- package/dashboard/dist/assets/LimitsPage-BhPNmv6R.js +0 -2
- package/dashboard/dist/assets/PopoverPopup-CWyN32rM.js +0 -1
- package/dashboard/dist/assets/SelectItemText-XGWezP4M.js +0 -1
- package/dashboard/dist/assets/SkillsPage-CfYTgQMY.js +0 -1
- package/dashboard/dist/assets/main-4M5oNV2-.js +0 -1030
- package/dashboard/dist/assets/use-limits-display-prefs--1a77fnk.js +0 -1
- package/dashboard/dist/assets/useScrollLock-BXcNDJbM.js +0 -1
package/src/lib/rollout.js
CHANGED
|
@@ -2553,22 +2553,31 @@ function readMimoDbMessages(dbPath, sqliteOptions = {}) {
|
|
|
2553
2553
|
// ZCode is Z.ai's (Zhipu) coding agent — another OpenCode-fork that stores
|
|
2554
2554
|
// assistant messages in the identical `message` table schema
|
|
2555
2555
|
// (~/.zcode/cli/db/db.sqlite). Its own agent runs GLM models through Z.ai /
|
|
2556
|
-
// BigModel endpoints
|
|
2557
|
-
// "builtin:
|
|
2558
|
-
//
|
|
2559
|
-
//
|
|
2560
|
-
//
|
|
2561
|
-
//
|
|
2562
|
-
//
|
|
2563
|
-
//
|
|
2556
|
+
// BigModel endpoints (providerID "builtin:zai-start-plan",
|
|
2557
|
+
// "builtin:bigmodel-coding-plan", …), but ZCode also lets users add CUSTOM
|
|
2558
|
+
// providers (a built-in feature beyond the Z.ai plan subscription) that point at
|
|
2559
|
+
// ANY model — MiMo, Sakana Fugu, any OpenAI-compatible proxy. A user-defined
|
|
2560
|
+
// provider is assigned a random UUID as its providerID (observed on a real box:
|
|
2561
|
+
// model "mimo-v2.5-pro" under providerID "265956bf-…"), so an allowlist of known
|
|
2562
|
+
// vendor keywords can NEVER match it and silently drops every custom-provider
|
|
2563
|
+
// turn (issue #216). Those turns live ONLY in this DB, so we must keep them or
|
|
2564
|
+
// they go uncounted entirely. The exception is the bundled
|
|
2565
|
+
// claude-code / codex / gemini-cli sub-agents ZCode can orchestrate: those carry
|
|
2566
|
+
// providerID "anthropic"/"openai"/"google" and write to ~/.claude / ~/.codex /
|
|
2567
|
+
// ~/.gemini, so the standalone Claude/Codex/Gemini parsers already count them —
|
|
2568
|
+
// DROP those here to avoid double-counting. Hence a blocklist (exclude the three
|
|
2569
|
+
// direct vendors), not an allowlist that would silently miss every third-party
|
|
2570
|
+
// model. Key off providerID, NEVER the model id — a GLM/Claude model the user
|
|
2571
|
+
// ran *inside* Claude Code is source=claude, so matching the model name would
|
|
2572
|
+
// re-count it. Mirrors the Mimo discipline.
|
|
2564
2573
|
function isZcodeNativeMessage(data) {
|
|
2565
2574
|
if (!data) return false;
|
|
2566
2575
|
const provider = String(data.providerID || "").toLowerCase();
|
|
2567
|
-
return
|
|
2568
|
-
|
|
2569
|
-
provider.includes("
|
|
2570
|
-
provider.includes("
|
|
2571
|
-
provider.includes("
|
|
2576
|
+
if (!provider) return false;
|
|
2577
|
+
return !(
|
|
2578
|
+
provider.includes("anthropic") ||
|
|
2579
|
+
provider.includes("openai") ||
|
|
2580
|
+
provider.includes("google")
|
|
2572
2581
|
);
|
|
2573
2582
|
}
|
|
2574
2583
|
|
package/src/lib/usage-limits.js
CHANGED
|
@@ -25,6 +25,7 @@ const {
|
|
|
25
25
|
} = require("./cursor-config");
|
|
26
26
|
const { fetchGrokLimits } = require("./grok-limits");
|
|
27
27
|
const { fetchZcodeLimits } = require("./zcode-limits");
|
|
28
|
+
const { fetchOpencodeGoLimits } = require("./opencode-go-limits");
|
|
28
29
|
const { readSqliteJsonRows } = require("./sqlite-reader");
|
|
29
30
|
|
|
30
31
|
// 2-minute in-memory cache
|
|
@@ -2290,7 +2291,7 @@ async function fetchUsageLimitsUncached({
|
|
|
2290
2291
|
const freshClaudeCache = claudeToken ? readFreshClaudeLimitsCache({ home, nowMs }) : null;
|
|
2291
2292
|
|
|
2292
2293
|
const providerFetch = withFetchTimeout(fetchImpl, providerTimeoutMs);
|
|
2293
|
-
const [claudeResult, codexResult, cursor, kimi, gemini, kiro, antigravity, copilot, grok, zcode] = await Promise.all([
|
|
2294
|
+
const [claudeResult, codexResult, cursor, kimi, gemini, kiro, antigravity, copilot, grok, zcode, opencodeGo] = await Promise.all([
|
|
2294
2295
|
claudeToken && !freshClaudeCache && !claudeRetryAtMs
|
|
2295
2296
|
? withProviderTimeout(fetchClaudeUsageLimits(claudeToken, { fetchImpl: providerFetch, maxAttempts: 1 }), "Claude", providerTimeoutMs).then(
|
|
2296
2297
|
(value) => ({ status: "fulfilled", value }),
|
|
@@ -2321,6 +2322,11 @@ async function fetchUsageLimitsUncached({
|
|
|
2321
2322
|
.catch((reason) => ({ configured: true, error: reason?.message || "Unknown error" })),
|
|
2322
2323
|
withProviderTimeout(fetchZcodeLimits({ home, env, fetchImpl: providerFetch }), "ZCode", providerTimeoutMs)
|
|
2323
2324
|
.catch((reason) => ({ configured: true, error: reason?.message || "Unknown error" })),
|
|
2325
|
+
// OpenCode Go scrapes the workspace dashboard (no public REST API yet,
|
|
2326
|
+
// tracked at anomalyco/opencode#16017). Auth is via two env vars, see
|
|
2327
|
+
// src/lib/opencode-go-limits.js for the exact endpoint + cookie shape.
|
|
2328
|
+
withProviderTimeout(fetchOpencodeGoLimits({ env, fetchImpl: providerFetch }), "OpenCode Go", providerTimeoutMs)
|
|
2329
|
+
.catch((reason) => ({ configured: true, error: reason?.message || "Unknown error" })),
|
|
2324
2330
|
]);
|
|
2325
2331
|
|
|
2326
2332
|
let claude;
|
|
@@ -2403,6 +2409,7 @@ async function fetchUsageLimitsUncached({
|
|
|
2403
2409
|
copilot: withPlanLabel(copilot, copilot.plan_name, "Copilot"),
|
|
2404
2410
|
grok: withPlanLabel(grok, null, "Grok"),
|
|
2405
2411
|
zcode: withPlanLabel(zcode, zcode.plan_label, "ZCode"),
|
|
2412
|
+
opencodeGo: withPlanLabel(opencodeGo, opencodeGo?.plan_label, "OpenCode Go"),
|
|
2406
2413
|
};
|
|
2407
2414
|
|
|
2408
2415
|
cache = { data, fetchedAt: nowMs };
|
|
@@ -2435,4 +2442,5 @@ module.exports = {
|
|
|
2435
2442
|
describeCopilotOtelStatus,
|
|
2436
2443
|
fetchGrokLimits,
|
|
2437
2444
|
fetchZcodeLimits,
|
|
2445
|
+
fetchOpencodeGoLimits,
|
|
2438
2446
|
};
|