tokentracker-cli 0.75.0 → 0.76.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-NlteaURo.js → ActivityHeatmap-Cc7rHzpc.js} +1 -1
- package/dashboard/dist/assets/{Card-BVG43KVJ.js → Card-i15i_EDL.js} +1 -1
- package/dashboard/dist/assets/ClawdAnimated-DMuZ5d5m.js +1 -0
- package/dashboard/dist/assets/{CommunityStatsModal-dA0LpCuF.js → CommunityStatsModal-cKwxGEGB.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-Dnku7IC9.js → ConfirmModal-Ck-ybj6p.js} +1 -1
- package/dashboard/dist/assets/Controls-CxmOdwJ3.js +1 -0
- package/dashboard/dist/assets/DashboardPage-ED4-b7kr.js +19 -0
- package/dashboard/dist/assets/{DevicePage-Dc6i-F8M.js → DevicePage-DcKvkJNR.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-BB7UtCRI.js → DialogClose-C6nuJJ_i.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-C6z_szoN.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-ph8nfIGQ.js → DialogTitle-D0xEUAQD.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-QMO-YzLy.js → FadeIn-GWxxEiEG.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-CEp_XRDw.js → HeaderGithubStar-BNs6lPrd.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-D8uBQ0JI.js → IpCheckPage-BHEGYdwZ.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-C2UtqjdO.js → LandingPage-qCAwHW-r.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-C8DmsH-j.js → LeaderboardAvatar-aso6D7AA.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-B2ladVht.js → LeaderboardPage-BVDho0zN.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-CTNkaMCj.js → LeaderboardProfileModal-D5qe822P.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfilePage-DWxd3ucC.js → LeaderboardProfilePage-BhfX0BP4.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-B0qoet_a.js → LimitsPage-BDld2Tw9.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-btctK_hV.js → LocalOnlyNotice-B7Ws4lUu.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-CDabTPUM.js → LoginPage-D7OQrvP6.js} +1 -1
- package/dashboard/dist/assets/PetPage-DsCEXiJf.js +1 -0
- package/dashboard/dist/assets/{PopoverPopup-BPGVB58i.js → PopoverPopup-MhHKPgtt.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-Rcb-qUVt.js → ResetPasswordPage-C3QmfXcI.js} +1 -1
- package/dashboard/dist/assets/{Select-O1kJcCB_.js → Select-B9zxyBF3.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-B_Et2ne0.js → SelectItemText-D-kCTY6-.js} +1 -1
- package/dashboard/dist/assets/SettingsPage-1NY7r1OL.js +1 -0
- package/dashboard/dist/assets/{SkillsPage-B--OAvXa.js → SkillsPage-B6dZnAvn.js} +1 -1
- package/dashboard/dist/assets/WidgetsPage-BY_51IWL.js +1 -0
- package/dashboard/dist/assets/{WrappedPage--syJmYj3.js → WrappedPage-BNvs3dW4.js} +1 -1
- package/dashboard/dist/assets/{agent-logos-DwbekVvR.js → agent-logos-Cg92StIs.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-DHW3Tzzj.js → arrow-up-right-5jhx4tzl.js} +1 -1
- package/dashboard/dist/assets/check-DhneqxBx.js +1 -0
- package/dashboard/dist/assets/{copy-CPyu7xwq.js → copy-CcD9E3do.js} +1 -1
- package/dashboard/dist/assets/{download-BIddy32E.js → download-hUD-lQh8.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-PbHFZolD.js → format-tokens-BPZCO1fQ.js} +1 -1
- package/dashboard/dist/assets/{info-BTrJEPNA.js → info-4Bz63oh6.js} +1 -1
- package/dashboard/dist/assets/main-BI3jOnQS.css +1 -0
- package/dashboard/dist/assets/main-nNmpL8Cj.js +1161 -0
- package/dashboard/dist/assets/{use-community-stats-BZrsznk2.js → use-community-stats-D6SkhwbZ.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-BzJmwfGV.js → use-limits-display-prefs-BAQYB-31.js} +1 -1
- package/dashboard/dist/assets/use-native-settings-xp2V6xfM.js +1 -0
- package/dashboard/dist/assets/{use-ordered-list-DMGs_T-c.js → use-ordered-list-C5_uGsrS.js} +1 -1
- package/dashboard/dist/assets/{use-quality-per-dollar-pref-ByGYkk6K.js → use-quality-per-dollar-pref-iQsn9WQp.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-DsdUUdvV.js → use-usage-limits-6uexiute.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-Bdt5sSKc.js → useCurrency-CmVvLPhb.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-DJTP5gLq.js → useScrollLock-C-uJaCDp.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist/pets/byte/spritesheet.webp +0 -0
- package/dashboard/dist/pets/ember/spritesheet.webp +0 -0
- package/dashboard/dist/pets/sprout/spritesheet.webp +0 -0
- package/dashboard/dist/share.html +2 -2
- package/package.json +1 -1
- package/src/commands/init.js +34 -1
- package/src/commands/sync.js +8 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +73 -1
- package/dashboard/dist/assets/DashboardPage-CWd44H6F.js +0 -19
- package/dashboard/dist/assets/DialogDescription-PKD88hBC.js +0 -1
- package/dashboard/dist/assets/SettingsPage-BKwsEcbf.js +0 -1
- package/dashboard/dist/assets/WidgetsPage-C-TViI3r.js +0 -1
- package/dashboard/dist/assets/check-CFYC8q6o.js +0 -1
- package/dashboard/dist/assets/main--nUrKVF3.css +0 -1
- package/dashboard/dist/assets/main-DO22Hl_4.js +0 -1131
- package/dashboard/dist/assets/use-native-settings-BIfY4lL7.js +0 -1
package/src/lib/rollout.js
CHANGED
|
@@ -6474,6 +6474,9 @@ async function parseWorkbuddyIncremental({
|
|
|
6474
6474
|
//
|
|
6475
6475
|
// oh-my-pi writes one append-only JSONL per session:
|
|
6476
6476
|
// ~/.omp/agent/sessions/--<cwd-encoded>--/<timestamp>_<sessionId>.jsonl
|
|
6477
|
+
// Task subagents spawned by that session get their own JSONL files nested in
|
|
6478
|
+
// a sibling directory named after the session file (see
|
|
6479
|
+
// resolveOmpSubagentFiles); their usage counts toward the same "omp" totals.
|
|
6477
6480
|
//
|
|
6478
6481
|
// Per-line record types: the first line is type:"session" (header).
|
|
6479
6482
|
// Only type:"message" lines with message.role=="assistant" carry token usage.
|
|
@@ -6580,6 +6583,63 @@ function resolveOmpSessionFiles(env = process.env) {
|
|
|
6580
6583
|
return files;
|
|
6581
6584
|
}
|
|
6582
6585
|
|
|
6586
|
+
// Subagent transcripts live in a directory named after the session file:
|
|
6587
|
+
// ~/.omp/agent/sessions/<cwd>/<session>.jsonl (main agent)
|
|
6588
|
+
// ~/.omp/agent/sessions/<cwd>/<session>/<Agent>.jsonl (task subagent)
|
|
6589
|
+
// ~/.omp/agent/sessions/<cwd>/<session>/<sub>/<A>.jsonl (nested advisor)
|
|
6590
|
+
// oh-my-pi's own stats indexer classifies by depth (packages/stats/parser.ts:
|
|
6591
|
+
// rel path <= 2 segments → main, deeper → subagent/advisor), so we mirror
|
|
6592
|
+
// that: everything below the cwd level is subagent traffic. Session dirs also
|
|
6593
|
+
// hold non-JSONL artefacts (*.bash-original.log, *.md) — skipped by extension.
|
|
6594
|
+
function resolveOmpSubagentFiles(env = process.env) {
|
|
6595
|
+
const agentDir = resolveOmpAgentDir(env);
|
|
6596
|
+
if (!agentDir) return [];
|
|
6597
|
+
const sessionsDir = path.join(agentDir, "sessions");
|
|
6598
|
+
if (!fssync.existsSync(sessionsDir)) return [];
|
|
6599
|
+
const files = [];
|
|
6600
|
+
const walk = (dir) => {
|
|
6601
|
+
let entries;
|
|
6602
|
+
try { entries = fssync.readdirSync(dir, { withFileTypes: true }); } catch { return; }
|
|
6603
|
+
for (const entry of entries) {
|
|
6604
|
+
const full = path.join(dir, entry.name);
|
|
6605
|
+
let isDir = entry.isDirectory();
|
|
6606
|
+
let isFile = entry.isFile();
|
|
6607
|
+
// Resolve symlinks defensively (Dirent flags are false for symlinks).
|
|
6608
|
+
if (!isDir && !isFile) {
|
|
6609
|
+
try {
|
|
6610
|
+
const st = fssync.statSync(full);
|
|
6611
|
+
isDir = st.isDirectory();
|
|
6612
|
+
isFile = st.isFile();
|
|
6613
|
+
} catch { continue; }
|
|
6614
|
+
}
|
|
6615
|
+
if (isDir) walk(full);
|
|
6616
|
+
else if (isFile && entry.name.endsWith(".jsonl")) files.push(full);
|
|
6617
|
+
}
|
|
6618
|
+
};
|
|
6619
|
+
try {
|
|
6620
|
+
for (const cwdDir of fssync.readdirSync(sessionsDir)) {
|
|
6621
|
+
const cwdPath = path.join(sessionsDir, cwdDir);
|
|
6622
|
+
let stat;
|
|
6623
|
+
try { stat = fssync.statSync(cwdPath); } catch { continue; }
|
|
6624
|
+
if (!stat.isDirectory()) continue;
|
|
6625
|
+
let entries;
|
|
6626
|
+
try { entries = fssync.readdirSync(cwdPath, { withFileTypes: true }); } catch { continue; }
|
|
6627
|
+
for (const entry of entries) {
|
|
6628
|
+
const full = path.join(cwdPath, entry.name);
|
|
6629
|
+
let isDir = entry.isDirectory();
|
|
6630
|
+
if (!isDir && !entry.isFile()) {
|
|
6631
|
+
try { isDir = fssync.statSync(full).isDirectory(); } catch { continue; }
|
|
6632
|
+
}
|
|
6633
|
+
if (isDir) walk(full);
|
|
6634
|
+
}
|
|
6635
|
+
}
|
|
6636
|
+
} catch {
|
|
6637
|
+
// ignore — return what we have
|
|
6638
|
+
}
|
|
6639
|
+
files.sort((a, b) => a.localeCompare(b));
|
|
6640
|
+
return files;
|
|
6641
|
+
}
|
|
6642
|
+
|
|
6583
6643
|
function resolveOmpDefaultModel() {
|
|
6584
6644
|
// oh-my-pi has no global default model setting; model is per-message.
|
|
6585
6645
|
return "omp-unknown";
|
|
@@ -8331,6 +8391,7 @@ async function parseKilocodeIncremental({
|
|
|
8331
8391
|
|
|
8332
8392
|
async function parseOmpIncremental({
|
|
8333
8393
|
sessionFiles,
|
|
8394
|
+
subagentFiles,
|
|
8334
8395
|
cursors,
|
|
8335
8396
|
queuePath,
|
|
8336
8397
|
onProgress,
|
|
@@ -8345,9 +8406,19 @@ async function parseOmpIncremental({
|
|
|
8345
8406
|
? { ...ompState.fileOffsets }
|
|
8346
8407
|
: {};
|
|
8347
8408
|
|
|
8348
|
-
const
|
|
8409
|
+
const mainFiles = Array.isArray(sessionFiles)
|
|
8349
8410
|
? sessionFiles
|
|
8350
8411
|
: resolveOmpSessionFiles(env || process.env);
|
|
8412
|
+
// Subagent transcripts share the session format and count toward the same
|
|
8413
|
+
// "omp" totals; they're discovered separately because they nest below the
|
|
8414
|
+
// cwd level. When the caller supplies explicit sessionFiles (tests), don't
|
|
8415
|
+
// auto-resolve — keep the parse hermetic.
|
|
8416
|
+
const subFiles = Array.isArray(subagentFiles)
|
|
8417
|
+
? subagentFiles
|
|
8418
|
+
: Array.isArray(sessionFiles)
|
|
8419
|
+
? []
|
|
8420
|
+
: resolveOmpSubagentFiles(env || process.env);
|
|
8421
|
+
const files = [...mainFiles, ...subFiles];
|
|
8351
8422
|
const fallbackModel = defaultModel || resolveOmpDefaultModel();
|
|
8352
8423
|
|
|
8353
8424
|
if (files.length === 0) {
|
|
@@ -10782,6 +10853,7 @@ module.exports = {
|
|
|
10782
10853
|
resolveOmpHome,
|
|
10783
10854
|
resolveOmpAgentDir,
|
|
10784
10855
|
resolveOmpSessionFiles,
|
|
10856
|
+
resolveOmpSubagentFiles,
|
|
10785
10857
|
resolveOmpDefaultModel,
|
|
10786
10858
|
parseOmpIncremental,
|
|
10787
10859
|
resolveKilocodeRoots,
|