tokentracker-cli 0.57.0 → 0.57.1
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 +5 -3
- package/README.ko.md +5 -3
- package/README.md +5 -3
- package/README.zh-CN.md +5 -3
- package/dashboard/dist/assets/{ActivityHeatmap-BzYFi7If.js → ActivityHeatmap-BvbV3_J7.js} +1 -1
- package/dashboard/dist/assets/{Card-CWlC0TT9.js → Card-DJZ6ntik.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-CI6QAWEh.js → DashboardPage-Bu3v5Fm2.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-CkLOUytF.js → DevicePage-DW6XIKeU.js} +1 -1
- package/dashboard/dist/assets/{DialogTitle-qpnoyCDp.js → DialogTitle-BsrlMQVP.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-rEScv_td.js → FadeIn-XjqQkcHf.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-DNOf-bAX.js → HeaderGithubStar-DcwDZDfU.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-DwsvZICX.js → IpCheckPage-DwWHgam0.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-BzQCcu83.js → LandingPage-BqtWjGwE.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-BnXyZa5v.js → LeaderboardAvatar-BeBtwC-_.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-W9W6St_R.js → LeaderboardPage-0TwqZOxu.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfileModal-udtOlLe2.js → LeaderboardProfileModal-3HwkYdbM.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfilePage-gSEw4uv8.js → LeaderboardProfilePage-865y5FBU.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-Cw4N6JeE.js → LimitsPage-CfGYwdDz.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-BZlvc0vN.js → LocalOnlyNotice-CTKip6yZ.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-B565FVDA.js → LoginPage-DhfoXUgm.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-BamnkoKk.js → PopoverPopup-3YotW-4M.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-C0-ziJ-w.js → ResetPasswordPage-CqEEo2VL.js} +1 -1
- package/dashboard/dist/assets/{Select-DT22H5j7.js → Select-BjnA__CB.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-B6Wn709O.js → SelectItemText-CoQ0e4TL.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-Dal75OgQ.js → SettingsPage-ushnnb65.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-HoRP1WBr.js → SkillsPage-CW4mBNzt.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-e-mw3Vkq.js → WidgetsPage-BiwEsW3y.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-BBFbsssQ.js → WrappedPage-vu2gEGcG.js} +1 -1
- package/dashboard/dist/assets/{agent-logos-q4KY3SrS.js → agent-logos-CvsRxSzl.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-BF3pw1i_.js → arrow-up-right-DwYMKA3i.js} +1 -1
- package/dashboard/dist/assets/{download-8G10BzKF.js → download-BpLBXlyg.js} +1 -1
- package/dashboard/dist/assets/{info-D62z4eaa.js → info-D7gs3LAC.js} +1 -1
- package/dashboard/dist/assets/{main-BqomqDjC.js → main-D2iJg7iA.js} +2 -2
- package/dashboard/dist/assets/{use-limits-display-prefs-C0ttQ7qt.js → use-limits-display-prefs-BDCL1zsb.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-DJPC20Xw.js → use-native-settings-C-JvsUqt.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Ccr9ZCYy.js → use-usage-limits-DfKKdPYm.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-DwQhSqB1.js → useCurrency-CAzf_Pmi.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-DZ9md-qB.js → useScrollLock-DNuJyLo9.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/commands/sync.js +159 -4
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +24 -55
package/src/lib/rollout.js
CHANGED
|
@@ -2520,65 +2520,34 @@ function readOpencodeDbMessages(dbPath, sqliteOptions = {}) {
|
|
|
2520
2520
|
return out;
|
|
2521
2521
|
}
|
|
2522
2522
|
|
|
2523
|
-
//
|
|
2524
|
-
//
|
|
2525
|
-
//
|
|
2526
|
-
//
|
|
2527
|
-
//
|
|
2528
|
-
//
|
|
2529
|
-
//
|
|
2523
|
+
// mimocode mirrors the user's Claude Code + claude-mem history into its own
|
|
2524
|
+
// `message` table — via an explicit `claude_import` AND a live observer /
|
|
2525
|
+
// session sync — so the overwhelming majority of rows are anthropic-endpoint
|
|
2526
|
+
// turns (providerID="anthropic") the Claude parser ALREADY counts as
|
|
2527
|
+
// source=claude. On the dev's box that's ~3.9B mirrored tokens vs ~22M genuine
|
|
2528
|
+
// mimo tokens. Counting the mirror under "mimo" double-counts and mislabels
|
|
2529
|
+
// Claude usage (user saw claude-* rows under the MIMO provider).
|
|
2530
2530
|
//
|
|
2531
|
-
//
|
|
2532
|
-
//
|
|
2533
|
-
//
|
|
2534
|
-
//
|
|
2535
|
-
//
|
|
2536
|
-
//
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
} catch (_e) {
|
|
2548
|
-
// claude_import table absent (older/newer mimocode) → treat as no imports.
|
|
2549
|
-
return { ids: new Set(), sessions: new Set() };
|
|
2550
|
-
}
|
|
2551
|
-
const ids = new Set();
|
|
2552
|
-
const sessions = new Set();
|
|
2553
|
-
for (const row of rows) {
|
|
2554
|
-
if (!row) continue;
|
|
2555
|
-
let arr = null;
|
|
2556
|
-
if (typeof row.message_ids === "string") {
|
|
2557
|
-
try {
|
|
2558
|
-
arr = JSON.parse(row.message_ids);
|
|
2559
|
-
} catch (_e) {
|
|
2560
|
-
arr = null;
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
if (Array.isArray(arr) && arr.length > 0) {
|
|
2564
|
-
for (const id of arr) if (typeof id === "string") ids.add(id);
|
|
2565
|
-
} else if (typeof row.session_id === "string" && row.session_id) {
|
|
2566
|
-
sessions.add(row.session_id);
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
return { ids, sessions };
|
|
2570
|
-
}
|
|
2571
|
-
|
|
2572
|
-
// Read only NATIVE mimo assistant messages — token-bearing rows that are not
|
|
2573
|
-
// part of any claude_import row (by message id, or session id for legacy import
|
|
2574
|
-
// rows without message_ids). See readMimoImportedKeys for why.
|
|
2531
|
+
// The discriminator is providerID, NOT the model id. mimo's own runtime tags
|
|
2532
|
+
// turns providerID="mimo" (its auto router) or "xiaomi". providerID="anthropic"
|
|
2533
|
+
// means the turn went through a Claude-compatible endpoint — plain Claude Code,
|
|
2534
|
+
// OR a mimo-named model the user picked IN Claude Code (e.g. model=mimo-v2.5-pro
|
|
2535
|
+
// run inside Claude Code, logged in ~/.claude, counted as source=claude). Keying
|
|
2536
|
+
// off the model id would wrongly re-count that mimo-v2.5-pro. claude_import is
|
|
2537
|
+
// irrelevant — it never covers the observer/session mirror; the provider rule
|
|
2538
|
+
// subsumes it.
|
|
2539
|
+
function isMimoNativeMessage(data) {
|
|
2540
|
+
if (!data) return false;
|
|
2541
|
+
const provider = String(data.providerID || "").toLowerCase();
|
|
2542
|
+
return provider === "mimo" || provider === "xiaomi";
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
// Read only genuine mimo assistant messages (mimo's own models), dropping the
|
|
2546
|
+
// mirrored Claude/claude-mem rows. See isMimoNativeMessage for why.
|
|
2575
2547
|
function readMimoDbMessages(dbPath, sqliteOptions = {}) {
|
|
2576
2548
|
if (!dbPath || !fssync.existsSync(dbPath)) return [];
|
|
2577
2549
|
const all = readOpencodeDbMessages(dbPath, sqliteOptions);
|
|
2578
|
-
|
|
2579
|
-
const { ids, sessions } = readMimoImportedKeys(dbPath, sqliteOptions);
|
|
2580
|
-
if (ids.size === 0 && sessions.size === 0) return all;
|
|
2581
|
-
return all.filter((m) => !ids.has(m.id) && !sessions.has(m.sessionID));
|
|
2550
|
+
return all.filter((m) => isMimoNativeMessage(m.data));
|
|
2582
2551
|
}
|
|
2583
2552
|
|
|
2584
2553
|
async function parseOpencodeDbIncremental({
|