fleetlens 0.6.2 → 0.6.4

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.
Files changed (55) hide show
  1. package/app/apps/web/.next/BUILD_ID +1 -1
  2. package/app/apps/web/.next/build-manifest.json +3 -3
  3. package/app/apps/web/.next/prerender-manifest.json +3 -3
  4. package/app/apps/web/.next/server/app/_global-error.html +1 -1
  5. package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
  6. package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  12. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js.nft.json +1 -1
  13. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -1
  14. package/app/apps/web/.next/server/app/api/digest/month-index/route.js.nft.json +1 -1
  15. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -1
  16. package/app/apps/web/.next/server/app/api/digest/week-index/route.js.nft.json +1 -1
  17. package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -1
  18. package/app/apps/web/.next/server/app/api/runs/[runId]/route.js.nft.json +1 -1
  19. package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.nft.json +1 -1
  20. package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -1
  21. package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -1
  22. package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -1
  23. package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -1
  24. package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -1
  25. package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
  26. package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
  27. package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
  28. package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
  29. package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  30. package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
  31. package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -1
  32. package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  33. package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
  34. package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
  35. package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
  36. package/app/apps/web/.next/server/chunks/packages_entries_dist_node_0bckr7-.js +10 -10
  37. package/app/apps/web/.next/server/chunks/packages_parser_dist_fs_0bc7ptm.js +1 -1
  38. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0-1_njm._.js +1 -1
  39. package/app/apps/web/.next/server/chunks/ssr/_0xu2pvc._.js +1 -1
  40. package/app/apps/web/.next/server/chunks/ssr/packages_entries_dist_node_0_271yr.js +1 -1
  41. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0-jvt~a._.js +1 -1
  42. package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
  43. package/app/apps/web/.next/server/pages/500.html +1 -1
  44. package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
  45. package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
  46. package/app/apps/web/app/insights/page.tsx +5 -3
  47. package/app/apps/web/package.json +1 -1
  48. package/app/apps/web/tsconfig.tsbuildinfo +1 -1
  49. package/dist/daemon-worker.js +82 -48
  50. package/dist/index.js +102 -102
  51. package/package.json +1 -1
  52. package/app/apps/web/lib/auto-week-fire.ts +0 -1
  53. /package/app/apps/web/.next/static/{MLK3PKEm3q_E_QuKH5kOz → 2jcMG-92q2XKei8dN7BMd}/_buildManifest.js +0 -0
  54. /package/app/apps/web/.next/static/{MLK3PKEm3q_E_QuKH5kOz → 2jcMG-92q2XKei8dN7BMd}/_clientMiddlewareManifest.js +0 -0
  55. /package/app/apps/web/.next/static/{MLK3PKEm3q_E_QuKH5kOz → 2jcMG-92q2XKei8dN7BMd}/_ssgManifest.js +0 -0
package/dist/index.js CHANGED
@@ -454,9 +454,9 @@ Installed: ${PACKAGE_NAME}@${verify.installedVersion} at ${verify.installedPath
454
454
  console.warn(
455
455
  ` \u2022 reinstall in the correct Node env: 'npm install -g ${PACKAGE_NAME}@latest'`
456
456
  );
457
- } else if (verify.installedVersion !== "0.6.2") {
457
+ } else if (verify.installedVersion !== "0.6.4") {
458
458
  console.log(
459
- ` \u2192 This process is still running ${"0.6.2"}. Next invocation will use ${verify.installedVersion}.`
459
+ ` \u2192 This process is still running ${"0.6.4"}. Next invocation will use ${verify.installedVersion}.`
460
460
  );
461
461
  }
462
462
  }
@@ -492,7 +492,7 @@ async function checkForUpdate() {
492
492
  if (process.env.__FLEETLENS_UPDATED === "1" || process.env.__CCLENS_UPDATED === "1") return;
493
493
  const latest = await fetchLatestVersion();
494
494
  if (latest === null) return;
495
- const current = "0.6.2";
495
+ const current = "0.6.4";
496
496
  if (!shouldUpdate(current, latest)) return;
497
497
  console.log(`Updating ${PACKAGE_NAME} ${current} \u2192 ${latest}...`);
498
498
  await stopRunningServices();
@@ -574,7 +574,7 @@ async function restartServices(state) {
574
574
  }
575
575
  async function forceUpdate() {
576
576
  const latest = await fetchLatestVersion();
577
- const current = "0.6.2";
577
+ const current = "0.6.4";
578
578
  if (latest === null) {
579
579
  console.error("Could not reach npm registry. Check your network.");
580
580
  process.exit(1);
@@ -2338,16 +2338,22 @@ async function readJsonlFile(filePath) {
2338
2338
  return out;
2339
2339
  }
2340
2340
  function cacheStats() {
2341
- return { metaEntries: metaCache.size, detailEntries: detailCache.size };
2341
+ return {
2342
+ metaEntries: metaCache.size,
2343
+ detailEntries: detailCache.size,
2344
+ calibrationEventsEntries: calibrationEventsCache.size
2345
+ };
2342
2346
  }
2343
2347
  function clearCaches() {
2344
2348
  metaCache.clear();
2345
2349
  detailCache.clear();
2350
+ calibrationEventsCache.clear();
2346
2351
  fileListCache = null;
2347
2352
  }
2348
2353
  function invalidateFile(fullPath) {
2349
2354
  metaCache.delete(fullPath);
2350
2355
  detailCache.delete(fullPath);
2356
+ calibrationEventsCache.delete(fullPath);
2351
2357
  fileListCache = null;
2352
2358
  }
2353
2359
  async function walkJsonlFiles(root = DEFAULT_ROOT) {
@@ -2832,14 +2838,18 @@ async function loadUsageByDay(start2, end) {
2832
2838
  }
2833
2839
  async function loadCalibrationEvents(root = DEFAULT_ROOT) {
2834
2840
  const files = await walkJsonlFiles(root);
2835
- const byId = /* @__PURE__ */ new Map();
2836
- for (const f of files) {
2841
+ const perFile = await Promise.all(files.map(async (f) => {
2842
+ const cached = calibrationEventsCache.get(f.fullPath);
2843
+ if (cached && cached.mtimeMs === f.mtimeMs && cached.sizeBytes === f.sizeBytes) {
2844
+ return cached.events;
2845
+ }
2837
2846
  let lines;
2838
2847
  try {
2839
2848
  lines = await readJsonlFile(f.fullPath);
2840
2849
  } catch {
2841
- continue;
2850
+ return [];
2842
2851
  }
2852
+ const byId = /* @__PURE__ */ new Map();
2843
2853
  for (const raw of lines) {
2844
2854
  if (!raw || typeof raw !== "object")
2845
2855
  continue;
@@ -2871,10 +2881,17 @@ async function loadCalibrationEvents(root = DEFAULT_ROOT) {
2871
2881
  cache_5m: toNum(cc.ephemeral_5m_input_tokens)
2872
2882
  });
2873
2883
  }
2874
- }
2875
- const events = Array.from(byId.values());
2876
- events.sort((a, b) => a.ts.localeCompare(b.ts));
2877
- return events;
2884
+ const events = Array.from(byId.values());
2885
+ calibrationEventsCache.set(f.fullPath, {
2886
+ events,
2887
+ mtimeMs: f.mtimeMs,
2888
+ sizeBytes: f.sizeBytes
2889
+ });
2890
+ return events;
2891
+ }));
2892
+ const out = perFile.flat();
2893
+ out.sort((a, b) => a.ts.localeCompare(b.ts));
2894
+ return out;
2878
2895
  }
2879
2896
  async function loadCalibrationSnapshots() {
2880
2897
  let raw;
@@ -3034,7 +3051,7 @@ async function loadCalibrationCurve(tier = "pro-max-20x", root = DEFAULT_ROOT, g
3034
3051
  ]);
3035
3052
  return buildCalibrationCurve(events, snapshots, tier, granularityMin);
3036
3053
  }
3037
- var DEFAULT_ROOT, metaCache, detailCache, fileListCache, FILE_LIST_TTL_MS, BLANK_USAGE3, USAGE_LOG2;
3054
+ var DEFAULT_ROOT, metaCache, detailCache, calibrationEventsCache, fileListCache, FILE_LIST_TTL_MS, BLANK_USAGE3, USAGE_LOG2;
3038
3055
  var init_fs = __esm({
3039
3056
  "../parser/dist/fs.js"() {
3040
3057
  "use strict";
@@ -3045,6 +3062,7 @@ var init_fs = __esm({
3045
3062
  DEFAULT_ROOT = path.join(os.homedir(), ".claude", "projects");
3046
3063
  metaCache = /* @__PURE__ */ new Map();
3047
3064
  detailCache = /* @__PURE__ */ new Map();
3065
+ calibrationEventsCache = /* @__PURE__ */ new Map();
3048
3066
  fileListCache = null;
3049
3067
  FILE_LIST_TTL_MS = 1e3;
3050
3068
  BLANK_USAGE3 = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
@@ -8552,10 +8570,26 @@ function lockPath() {
8552
8570
  function __setInteractiveLockPathForTest(path2) {
8553
8571
  lockPathCached = path2;
8554
8572
  }
8555
- function writeInteractiveLock() {
8573
+ function touchLock() {
8556
8574
  writeFileSync5(lockPath(), String(process.pid), "utf8");
8557
8575
  }
8576
+ function writeInteractiveLock() {
8577
+ touchLock();
8578
+ if (heartbeat)
8579
+ clearInterval(heartbeat);
8580
+ heartbeat = setInterval(() => {
8581
+ try {
8582
+ touchLock();
8583
+ } catch {
8584
+ }
8585
+ }, HEARTBEAT_MS);
8586
+ heartbeat.unref?.();
8587
+ }
8558
8588
  function removeInteractiveLock() {
8589
+ if (heartbeat) {
8590
+ clearInterval(heartbeat);
8591
+ heartbeat = null;
8592
+ }
8559
8593
  try {
8560
8594
  unlinkSync2(lockPath());
8561
8595
  } catch {
@@ -8587,12 +8621,14 @@ function interactiveLockFresh(nowMs) {
8587
8621
  return false;
8588
8622
  }
8589
8623
  }
8590
- var STALE_MS, lockPathCached;
8624
+ var STALE_MS, HEARTBEAT_MS, lockPathCached, heartbeat;
8591
8625
  var init_pipeline_lock = __esm({
8592
8626
  "../entries/dist/pipeline-lock.js"() {
8593
8627
  "use strict";
8594
8628
  STALE_MS = 60 * 1e3;
8629
+ HEARTBEAT_MS = 30 * 1e3;
8595
8630
  lockPathCached = null;
8631
+ heartbeat = null;
8596
8632
  }
8597
8633
  });
8598
8634
 
@@ -12297,40 +12333,6 @@ var init_digest_month_pipeline = __esm({
12297
12333
  }
12298
12334
  });
12299
12335
 
12300
- // ../entries/dist/auto-week-fire.js
12301
- import { existsSync as existsSync11, readFileSync as readFileSync11, mkdirSync as mkdirSync8, renameSync as renameSync4, writeFileSync as writeFileSync7 } from "node:fs";
12302
- import { join as join12, dirname as dirname9 } from "node:path";
12303
- import { homedir as homedir11 } from "node:os";
12304
- function autoFireFile() {
12305
- return process.env.CCLENS_AUTO_WEEK_FILE ?? join12(homedir11(), ".cclens", "auto-week-fired-at");
12306
- }
12307
- function shouldAutoFireWeek(monday) {
12308
- const file = autoFireFile();
12309
- let prev = null;
12310
- if (existsSync11(file)) {
12311
- try {
12312
- const raw = readFileSync11(file, "utf8").trim();
12313
- if (MONDAY_RE.test(raw))
12314
- prev = raw;
12315
- } catch {
12316
- }
12317
- }
12318
- if (prev === monday)
12319
- return false;
12320
- mkdirSync8(dirname9(file), { recursive: true });
12321
- const tmp = `${file}.tmp`;
12322
- writeFileSync7(tmp, monday + "\n", "utf8");
12323
- renameSync4(tmp, file);
12324
- return true;
12325
- }
12326
- var MONDAY_RE;
12327
- var init_auto_week_fire = __esm({
12328
- "../entries/dist/auto-week-fire.js"() {
12329
- "use strict";
12330
- MONDAY_RE = /^\d{4}-\d{2}-\d{2}$/;
12331
- }
12332
- });
12333
-
12334
12336
  // ../entries/dist/node.js
12335
12337
  var node_exports = {};
12336
12338
  __export(node_exports, {
@@ -12384,7 +12386,6 @@ __export(node_exports, {
12384
12386
  setCurrentMonthDigestInCache: () => setCurrentMonthDigestInCache,
12385
12387
  setCurrentWeekDigestInCache: () => setCurrentWeekDigestInCache,
12386
12388
  setTodayDigestInCache: () => setTodayDigestInCache,
12387
- shouldAutoFireWeek: () => shouldAutoFireWeek,
12388
12389
  weekDates: () => weekDates,
12389
12390
  writeDayDigest: () => writeDayDigest,
12390
12391
  writeInteractiveLock: () => writeInteractiveLock,
@@ -12410,7 +12411,6 @@ var init_node = __esm({
12410
12411
  init_digest_month();
12411
12412
  init_digest_week_pipeline();
12412
12413
  init_digest_month_pipeline();
12413
- init_auto_week_fire();
12414
12414
  init_digest_fs();
12415
12415
  }
12416
12416
  });
@@ -12882,23 +12882,23 @@ var init_digest = __esm({
12882
12882
  });
12883
12883
 
12884
12884
  // src/team/config.ts
12885
- import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, unlinkSync as unlinkSync3, mkdirSync as mkdirSync9 } from "node:fs";
12886
- import { join as join13 } from "node:path";
12887
- import { homedir as homedir12 } from "node:os";
12885
+ import { readFileSync as readFileSync11, writeFileSync as writeFileSync7, unlinkSync as unlinkSync3, mkdirSync as mkdirSync8 } from "node:fs";
12886
+ import { join as join12 } from "node:path";
12887
+ import { homedir as homedir11 } from "node:os";
12888
12888
  function readTeamConfig(dir = DEFAULT_DIR) {
12889
12889
  try {
12890
- return JSON.parse(readFileSync12(join13(dir, CONFIG_FILE), "utf8"));
12890
+ return JSON.parse(readFileSync11(join12(dir, CONFIG_FILE), "utf8"));
12891
12891
  } catch {
12892
12892
  return null;
12893
12893
  }
12894
12894
  }
12895
12895
  function writeTeamConfig(config, dir = DEFAULT_DIR) {
12896
- mkdirSync9(dir, { recursive: true });
12897
- writeFileSync8(join13(dir, CONFIG_FILE), JSON.stringify(config, null, 2), { mode: 384 });
12896
+ mkdirSync8(dir, { recursive: true });
12897
+ writeFileSync7(join12(dir, CONFIG_FILE), JSON.stringify(config, null, 2), { mode: 384 });
12898
12898
  }
12899
12899
  function clearTeamConfig(dir = DEFAULT_DIR) {
12900
12900
  try {
12901
- unlinkSync3(join13(dir, CONFIG_FILE));
12901
+ unlinkSync3(join12(dir, CONFIG_FILE));
12902
12902
  } catch {
12903
12903
  }
12904
12904
  }
@@ -12906,14 +12906,14 @@ var DEFAULT_DIR, CONFIG_FILE;
12906
12906
  var init_config = __esm({
12907
12907
  "src/team/config.ts"() {
12908
12908
  "use strict";
12909
- DEFAULT_DIR = join13(homedir12(), ".cclens");
12909
+ DEFAULT_DIR = join12(homedir11(), ".cclens");
12910
12910
  CONFIG_FILE = "team.json";
12911
12911
  }
12912
12912
  });
12913
12913
 
12914
12914
  // src/usage/profile.ts
12915
- import { existsSync as existsSync12, mkdirSync as mkdirSync10, readFileSync as readFileSync13, writeFileSync as writeFileSync9 } from "node:fs";
12916
- import { dirname as dirname10 } from "node:path";
12915
+ import { existsSync as existsSync11, mkdirSync as mkdirSync9, readFileSync as readFileSync12, writeFileSync as writeFileSync8 } from "node:fs";
12916
+ import { dirname as dirname9 } from "node:path";
12917
12917
  function mapRateLimitTier(rateLimitTier) {
12918
12918
  switch (rateLimitTier) {
12919
12919
  case "default_claude_pro":
@@ -12953,9 +12953,9 @@ async function fetchProfile(nowMs = Date.now()) {
12953
12953
  };
12954
12954
  }
12955
12955
  function readCachedProfile(cachePath) {
12956
- if (!existsSync12(cachePath)) return null;
12956
+ if (!existsSync11(cachePath)) return null;
12957
12957
  try {
12958
- const raw = JSON.parse(readFileSync13(cachePath, "utf8"));
12958
+ const raw = JSON.parse(readFileSync12(cachePath, "utf8"));
12959
12959
  if (typeof raw.fetchedAtMs !== "number" || !raw.profile) return null;
12960
12960
  return raw;
12961
12961
  } catch {
@@ -12963,8 +12963,8 @@ function readCachedProfile(cachePath) {
12963
12963
  }
12964
12964
  }
12965
12965
  function writeCachedProfile(cachePath, profile, nowMs = Date.now()) {
12966
- mkdirSync10(dirname10(cachePath), { recursive: true });
12967
- writeFileSync9(
12966
+ mkdirSync9(dirname9(cachePath), { recursive: true });
12967
+ writeFileSync8(
12968
12968
  cachePath,
12969
12969
  JSON.stringify({ fetchedAtMs: nowMs, profile }, null, 2),
12970
12970
  { mode: 384 }
@@ -12999,8 +12999,8 @@ __export(backfill_exports, {
12999
12999
  chunk: () => chunk,
13000
13000
  runTeamBackfill: () => runTeamBackfill
13001
13001
  });
13002
- import { homedir as homedir13 } from "node:os";
13003
- import { join as join14 } from "node:path";
13002
+ import { homedir as homedir12 } from "node:os";
13003
+ import { join as join13 } from "node:path";
13004
13004
  function rawToWire(raw) {
13005
13005
  const win = (w) => w ? { utilization: w.utilization, resetsAt: w.resets_at } : null;
13006
13006
  return {
@@ -13107,8 +13107,8 @@ var init_backfill = __esm({
13107
13107
  init_storage();
13108
13108
  init_config();
13109
13109
  init_profile();
13110
- USAGE_LOG4 = join14(homedir13(), ".cclens", "usage.jsonl");
13111
- PROFILE_CACHE = join14(homedir13(), ".cclens", "profile.json");
13110
+ USAGE_LOG4 = join13(homedir12(), ".cclens", "usage.jsonl");
13111
+ PROFILE_CACHE = join13(homedir12(), ".cclens", "profile.json");
13112
13112
  BATCH_SIZE = 500;
13113
13113
  noopLog = () => {
13114
13114
  };
@@ -13195,11 +13195,11 @@ var init_push = __esm({
13195
13195
  });
13196
13196
 
13197
13197
  // src/team/queue.ts
13198
- import { readFileSync as readFileSync14, writeFileSync as writeFileSync10, appendFileSync as appendFileSync4, statSync as statSync3, mkdirSync as mkdirSync11 } from "node:fs";
13199
- import { join as join15, dirname as dirname11 } from "node:path";
13200
- import { homedir as homedir14 } from "node:os";
13198
+ import { readFileSync as readFileSync13, writeFileSync as writeFileSync9, appendFileSync as appendFileSync4, statSync as statSync3, mkdirSync as mkdirSync10 } from "node:fs";
13199
+ import { join as join14, dirname as dirname10 } from "node:path";
13200
+ import { homedir as homedir13 } from "node:os";
13201
13201
  function enqueuePayload(payload, queuePath = QUEUE_PATH) {
13202
- mkdirSync11(dirname11(queuePath), { recursive: true });
13202
+ mkdirSync10(dirname10(queuePath), { recursive: true });
13203
13203
  const entry = { payload, enqueuedAt: (/* @__PURE__ */ new Date()).toISOString() };
13204
13204
  appendFileSync4(queuePath, JSON.stringify(entry) + "\n", "utf8");
13205
13205
  try {
@@ -13213,7 +13213,7 @@ function enqueuePayload(payload, queuePath = QUEUE_PATH) {
13213
13213
  function dequeuePayloads(queuePath = QUEUE_PATH) {
13214
13214
  let lines;
13215
13215
  try {
13216
- lines = readFileSync14(queuePath, "utf8").trim().split("\n").filter(Boolean);
13216
+ lines = readFileSync13(queuePath, "utf8").trim().split("\n").filter(Boolean);
13217
13217
  } catch {
13218
13218
  return [];
13219
13219
  }
@@ -13228,24 +13228,24 @@ function dequeuePayloads(queuePath = QUEUE_PATH) {
13228
13228
  } catch {
13229
13229
  }
13230
13230
  }
13231
- writeFileSync10(queuePath, "", "utf8");
13231
+ writeFileSync9(queuePath, "", "utf8");
13232
13232
  return valid.map((e) => e.payload);
13233
13233
  }
13234
13234
  function pruneOldest(queuePath) {
13235
13235
  let lines;
13236
13236
  try {
13237
- lines = readFileSync14(queuePath, "utf8").trim().split("\n").filter(Boolean);
13237
+ lines = readFileSync13(queuePath, "utf8").trim().split("\n").filter(Boolean);
13238
13238
  } catch {
13239
13239
  return;
13240
13240
  }
13241
13241
  const keep = lines.slice(Math.floor(lines.length / 2));
13242
- writeFileSync10(queuePath, keep.join("\n") + "\n", "utf8");
13242
+ writeFileSync9(queuePath, keep.join("\n") + "\n", "utf8");
13243
13243
  }
13244
13244
  var QUEUE_PATH, MAX_SIZE_BYTES, MAX_AGE_MS;
13245
13245
  var init_queue2 = __esm({
13246
13246
  "src/team/queue.ts"() {
13247
13247
  "use strict";
13248
- QUEUE_PATH = join15(homedir14(), ".cclens", "ingest-queue.jsonl");
13248
+ QUEUE_PATH = join14(homedir13(), ".cclens", "ingest-queue.jsonl");
13249
13249
  MAX_SIZE_BYTES = 10 * 1024 * 1024;
13250
13250
  MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
13251
13251
  }
@@ -13256,8 +13256,8 @@ var sync_exports = {};
13256
13256
  __export(sync_exports, {
13257
13257
  runTeamSync: () => runTeamSync
13258
13258
  });
13259
- import { homedir as homedir15 } from "node:os";
13260
- import { join as join16 } from "node:path";
13259
+ import { homedir as homedir14 } from "node:os";
13260
+ import { join as join15 } from "node:path";
13261
13261
  async function runTeamSync(log = noopLog2, configOverride) {
13262
13262
  const config = configOverride === void 0 ? readTeamConfig() : configOverride;
13263
13263
  if (!config) return { paired: false, pushed: 0, queued: 0, queuedDrained: 0 };
@@ -13401,8 +13401,8 @@ var init_sync = __esm({
13401
13401
  init_push();
13402
13402
  init_queue2();
13403
13403
  init_profile();
13404
- USAGE_LOG5 = join16(homedir15(), ".cclens", "usage.jsonl");
13405
- PROFILE_CACHE2 = join16(homedir15(), ".cclens", "profile.json");
13404
+ USAGE_LOG5 = join15(homedir14(), ".cclens", "usage.jsonl");
13405
+ PROFILE_CACHE2 = join15(homedir14(), ".cclens", "profile.json");
13406
13406
  noopLog2 = () => {
13407
13407
  };
13408
13408
  }
@@ -13547,13 +13547,13 @@ var logs_exports = {};
13547
13547
  __export(logs_exports, {
13548
13548
  teamLogs: () => teamLogs
13549
13549
  });
13550
- import { readFileSync as readFileSync15 } from "node:fs";
13551
- import { join as join17 } from "node:path";
13552
- import { homedir as homedir16 } from "node:os";
13550
+ import { readFileSync as readFileSync14 } from "node:fs";
13551
+ import { join as join16 } from "node:path";
13552
+ import { homedir as homedir15 } from "node:os";
13553
13553
  async function teamLogs() {
13554
- const logPath = join17(homedir16(), ".cclens", "daemon.log");
13554
+ const logPath = join16(homedir15(), ".cclens", "daemon.log");
13555
13555
  try {
13556
- const lines = readFileSync15(logPath, "utf8").trim().split("\n");
13556
+ const lines = readFileSync14(logPath, "utf8").trim().split("\n");
13557
13557
  const teamLines = lines.filter((l) => l.includes("team "));
13558
13558
  if (teamLines.length === 0) {
13559
13559
  console.log("No team-related log entries found.");
@@ -13649,9 +13649,9 @@ __export(runs_exports, {
13649
13649
  runs: () => runs
13650
13650
  });
13651
13651
  import { execSync as execSync2 } from "node:child_process";
13652
- import { existsSync as existsSync13, readFileSync as readFileSync16, readdirSync as readdirSync3, statSync as statSync4 } from "node:fs";
13653
- import { homedir as homedir17 } from "node:os";
13654
- import { join as join18 } from "node:path";
13652
+ import { existsSync as existsSync12, readFileSync as readFileSync15, readdirSync as readdirSync3, statSync as statSync4 } from "node:fs";
13653
+ import { homedir as homedir16 } from "node:os";
13654
+ import { join as join17 } from "node:path";
13655
13655
  async function runs(args2) {
13656
13656
  const json = args2.includes("--json");
13657
13657
  const watch = args2.includes("--watch");
@@ -13735,8 +13735,8 @@ function listActiveRuns() {
13735
13735
  return runs2.sort((a, b) => a.elapsed_s - b.elapsed_s);
13736
13736
  }
13737
13737
  function readSpend(sinceMs) {
13738
- if (!existsSync13(SPEND_PATH)) return [];
13739
- const lines = readFileSync16(SPEND_PATH, "utf-8").split("\n").filter((l) => l.trim());
13738
+ if (!existsSync12(SPEND_PATH)) return [];
13739
+ const lines = readFileSync15(SPEND_PATH, "utf-8").split("\n").filter((l) => l.trim());
13740
13740
  const out = [];
13741
13741
  for (const line of lines) {
13742
13742
  try {
@@ -13857,23 +13857,23 @@ function ageLabel(ms) {
13857
13857
  return `${Math.floor(ms / 864e5)}d`;
13858
13858
  }
13859
13859
  function listTraceFiles() {
13860
- if (!existsSync13(RUNS_DIR2)) return [];
13860
+ if (!existsSync12(RUNS_DIR2)) return [];
13861
13861
  const entries2 = readdirSync3(RUNS_DIR2).filter((f) => f.endsWith(".jsonl"));
13862
13862
  return entries2.map((f) => {
13863
- const path2 = join18(RUNS_DIR2, f);
13863
+ const path2 = join17(RUNS_DIR2, f);
13864
13864
  const st = statSync4(path2);
13865
13865
  return { runId: f.replace(/\.jsonl$/, ""), path: path2, mtimeMs: st.mtimeMs };
13866
13866
  }).sort((a, b) => b.mtimeMs - a.mtimeMs);
13867
13867
  }
13868
13868
  function resolveRunId(arg) {
13869
- if (!existsSync13(RUNS_DIR2)) return null;
13869
+ if (!existsSync12(RUNS_DIR2)) return null;
13870
13870
  if (arg === "latest") {
13871
13871
  const all2 = listTraceFiles();
13872
13872
  if (all2.length === 0) return null;
13873
13873
  return { runId: all2[0].runId, path: all2[0].path };
13874
13874
  }
13875
- const exact = join18(RUNS_DIR2, `${arg}.jsonl`);
13876
- if (existsSync13(exact)) return { runId: arg, path: exact };
13875
+ const exact = join17(RUNS_DIR2, `${arg}.jsonl`);
13876
+ if (existsSync12(exact)) return { runId: arg, path: exact };
13877
13877
  const all = listTraceFiles();
13878
13878
  const matches = all.filter((r) => r.runId.includes(arg));
13879
13879
  if (matches.length === 1) return { runId: matches[0].runId, path: matches[0].path };
@@ -13885,7 +13885,7 @@ function resolveRunId(arg) {
13885
13885
  return null;
13886
13886
  }
13887
13887
  function readTrace(path2) {
13888
- return readFileSync16(path2, "utf-8").split("\n").filter((l) => l.trim()).map((l) => {
13888
+ return readFileSync15(path2, "utf-8").split("\n").filter((l) => l.trim()).map((l) => {
13889
13889
  try {
13890
13890
  return JSON.parse(l);
13891
13891
  } catch {
@@ -13897,7 +13897,7 @@ async function inspect(arg, follow, json) {
13897
13897
  const r = resolveRunId(arg);
13898
13898
  if (!r) {
13899
13899
  console.error(`run not found: ${arg}`);
13900
- if (existsSync13(RUNS_DIR2)) {
13900
+ if (existsSync12(RUNS_DIR2)) {
13901
13901
  const all = listTraceFiles().slice(0, 5);
13902
13902
  if (all.length > 0) {
13903
13903
  console.error(`
@@ -13998,8 +13998,8 @@ var init_runs = __esm({
13998
13998
  { kind: "day_digest", marker: /single local day into a short, honest narrative/i },
13999
13999
  { kind: "entry_enrich", marker: /per[- ]entry|enrich.{0,40}entry|brief_summary/i }
14000
14000
  ];
14001
- SPEND_PATH = join18(homedir17(), ".cclens", "llm-spend.jsonl");
14002
- RUNS_DIR2 = join18(homedir17(), ".cclens", "llm-runs");
14001
+ SPEND_PATH = join17(homedir16(), ".cclens", "llm-spend.jsonl");
14002
+ RUNS_DIR2 = join17(homedir16(), ".cclens", "llm-runs");
14003
14003
  }
14004
14004
  });
14005
14005
 
@@ -14066,7 +14066,7 @@ async function main() {
14066
14066
  case "version":
14067
14067
  case "--version":
14068
14068
  case "-v":
14069
- console.log(`fleetlens ${"0.6.2"}`);
14069
+ console.log(`fleetlens ${"0.6.4"}`);
14070
14070
  break;
14071
14071
  case "help":
14072
14072
  case "--help":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetlens",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "fleetlens — local-only dashboard and usage tracker for Claude Code sessions and agent fleets",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- export { shouldAutoFireWeek } from "@claude-lens/entries/node";