tokentracker-cli 0.56.0 → 0.57.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/dashboard/dist/assets/{ActivityHeatmap-B_tfEHcm.js → ActivityHeatmap-BzYFi7If.js} +1 -1
- package/dashboard/dist/assets/{Card-D-kLfqyr.js → Card-CWlC0TT9.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-C97dctZq.js → DashboardPage-CI6QAWEh.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-B36WBvsn.js → DevicePage-CkLOUytF.js} +1 -1
- package/dashboard/dist/assets/{DialogTitle--VIyiTEE.js → DialogTitle-qpnoyCDp.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-B8pvdF9J.js → FadeIn-rEScv_td.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-B0gHTi9N.js → HeaderGithubStar-DNOf-bAX.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-Bq6MMJHQ.js → IpCheckPage-DwsvZICX.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-CZIEkNWt.js → LandingPage-BzQCcu83.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-BMRcGGFZ.js → LeaderboardAvatar-BnXyZa5v.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-B5ffZ11y.js → LeaderboardPage-W9W6St_R.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfileModal-Bz2n03P4.js → LeaderboardProfileModal-udtOlLe2.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfilePage-BP5loLjy.js → LeaderboardProfilePage-gSEw4uv8.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-DzJSi6xG.js → LimitsPage-Cw4N6JeE.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-CvfM7Yeu.js → LocalOnlyNotice-BZlvc0vN.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-D2LALlWv.js → LoginPage-B565FVDA.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-BAT6qwPl.js → PopoverPopup-BamnkoKk.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-s76Qggro.js → ResetPasswordPage-C0-ziJ-w.js} +1 -1
- package/dashboard/dist/assets/{Select-CMEwM-Mo.js → Select-DT22H5j7.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-s-8ZSDQn.js → SelectItemText-B6Wn709O.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-BKzrvCej.js → SettingsPage-Dal75OgQ.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-BX5iuYSx.js → SkillsPage-HoRP1WBr.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-CBD2lBZ1.js → WidgetsPage-e-mw3Vkq.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-DpNAeMIM.js → WrappedPage-BBFbsssQ.js} +1 -1
- package/dashboard/dist/assets/{agent-logos-Bggjr2yj.js → agent-logos-q4KY3SrS.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-C6z7x7NL.js → arrow-up-right-BF3pw1i_.js} +1 -1
- package/dashboard/dist/assets/{download-DBjVOuOZ.js → download-8G10BzKF.js} +1 -1
- package/dashboard/dist/assets/{info-DJ0Ty3Yt.js → info-D62z4eaa.js} +1 -1
- package/dashboard/dist/assets/{main-Cqhrkqr2.js → main-BqomqDjC.js} +2 -2
- package/dashboard/dist/assets/{use-limits-display-prefs-DddAHmHH.js → use-limits-display-prefs-C0ttQ7qt.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-Cha6She4.js → use-native-settings-DJPC20Xw.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-BJXjE59K.js → use-usage-limits-Ccr9ZCYy.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-C63XmlQt.js → useCurrency-DwQhSqB1.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-CHF80tR1.js → useScrollLock-DZ9md-qB.js} +1 -1
- package/dashboard/dist/brand-logos/mimo.svg +4 -0
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +2 -2
- package/src/commands/init.js +13 -0
- package/src/commands/status.js +11 -0
- package/src/commands/sync.js +44 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +62 -0
package/src/lib/rollout.js
CHANGED
|
@@ -2520,6 +2520,67 @@ function readOpencodeDbMessages(dbPath, sqliteOptions = {}) {
|
|
|
2520
2520
|
return out;
|
|
2521
2521
|
}
|
|
2522
2522
|
|
|
2523
|
+
// Mimo (mimocode) reuses OpenCode's `message` table schema, but its DB ALSO
|
|
2524
|
+
// contains the user's imported Claude Code history: on install, mimocode reads
|
|
2525
|
+
// ~/.claude/projects/*.jsonl and copies those sessions into its own DB,
|
|
2526
|
+
// recording each in the `claude_import` table (source_path → session_id +
|
|
2527
|
+
// message_ids). Those imported messages are already counted by the Claude
|
|
2528
|
+
// parser, so counting them here would double-count Claude usage AND mislabel it
|
|
2529
|
+
// as "mimo".
|
|
2530
|
+
//
|
|
2531
|
+
// `message_ids` was added to claude_import via a migration, so rows written by
|
|
2532
|
+
// an older mimocode have it NULL. For those we fall back to excluding the whole
|
|
2533
|
+
// imported session by session_id — a claude_import.session_id is always an
|
|
2534
|
+
// import-created session, never a native mimo one, so this is safe. Rows that
|
|
2535
|
+
// DO carry message_ids use precise per-id exclusion, which preserves any native
|
|
2536
|
+
// turns the user later added to an imported session.
|
|
2537
|
+
function readMimoImportedKeys(dbPath, sqliteOptions = {}) {
|
|
2538
|
+
const sql = `SELECT session_id, message_ids FROM claude_import`;
|
|
2539
|
+
let rows;
|
|
2540
|
+
try {
|
|
2541
|
+
rows = readSqliteJsonRows(dbPath, sql, {
|
|
2542
|
+
label: "Mimo import",
|
|
2543
|
+
maxBuffer: 200 * 1024 * 1024,
|
|
2544
|
+
timeout: 30_000,
|
|
2545
|
+
...sqliteOptions,
|
|
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.
|
|
2575
|
+
function readMimoDbMessages(dbPath, sqliteOptions = {}) {
|
|
2576
|
+
if (!dbPath || !fssync.existsSync(dbPath)) return [];
|
|
2577
|
+
const all = readOpencodeDbMessages(dbPath, sqliteOptions);
|
|
2578
|
+
if (all.length === 0) return all;
|
|
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));
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2523
2584
|
async function parseOpencodeDbIncremental({
|
|
2524
2585
|
dbMessages,
|
|
2525
2586
|
cursors,
|
|
@@ -9033,6 +9094,7 @@ module.exports = {
|
|
|
9033
9094
|
listGeminiSessionFiles,
|
|
9034
9095
|
listOpencodeMessageFiles,
|
|
9035
9096
|
readOpencodeDbMessages,
|
|
9097
|
+
readMimoDbMessages,
|
|
9036
9098
|
resolveKiroDbPath,
|
|
9037
9099
|
resolveKiroJsonlPath,
|
|
9038
9100
|
resolveHermesPath,
|