exe-watcher 0.2.0 → 0.2.2

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/dist/cli.js CHANGED
@@ -150,8 +150,10 @@ function getShortModelName(model) {
150
150
  "gpt-4.1-nano": "GPT-4.1 Nano",
151
151
  "gpt-4.1-mini": "GPT-4.1 Mini",
152
152
  "gpt-4.1": "GPT-4.1",
153
+ "gpt-5.5": "GPT-5.5",
153
154
  "gpt-5.4-mini": "GPT-5.4 Mini",
154
155
  "gpt-5.4": "GPT-5.4",
156
+ "gpt-5.3-codex-spark": "GPT-5.3 Codex Spark",
155
157
  "gpt-5.3-codex": "GPT-5.3 Codex",
156
158
  "gpt-5-mini": "GPT-5 Mini",
157
159
  "gpt-5": "GPT-5",
@@ -190,9 +192,11 @@ var init_models = __esm({
190
192
  "gpt-4o": { inputCostPerToken: 25e-7, outputCostPerToken: 1e-5, cacheWriteCostPerToken: 25e-7, cacheReadCostPerToken: 125e-8, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
191
193
  "gpt-4o-mini": { inputCostPerToken: 15e-8, outputCostPerToken: 6e-7, cacheWriteCostPerToken: 15e-8, cacheReadCostPerToken: 75e-9, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
192
194
  "gemini-2.5-pro": { inputCostPerToken: 125e-8, outputCostPerToken: 1e-5, cacheWriteCostPerToken: 125e-8, cacheReadCostPerToken: 315e-9, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
193
- "gpt-5.3-codex": { inputCostPerToken: 25e-7, outputCostPerToken: 1e-5, cacheWriteCostPerToken: 25e-7, cacheReadCostPerToken: 125e-8, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
194
- "gpt-5.4": { inputCostPerToken: 25e-7, outputCostPerToken: 1e-5, cacheWriteCostPerToken: 25e-7, cacheReadCostPerToken: 125e-8, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
195
- "gpt-5.4-mini": { inputCostPerToken: 4e-7, outputCostPerToken: 16e-7, cacheWriteCostPerToken: 4e-7, cacheReadCostPerToken: 2e-7, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
195
+ "gpt-5.5": { inputCostPerToken: 5e-6, outputCostPerToken: 3e-5, cacheWriteCostPerToken: 5e-6, cacheReadCostPerToken: 5e-7, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
196
+ "gpt-5.4": { inputCostPerToken: 25e-7, outputCostPerToken: 15e-6, cacheWriteCostPerToken: 25e-7, cacheReadCostPerToken: 25e-8, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
197
+ "gpt-5.4-mini": { inputCostPerToken: 75e-8, outputCostPerToken: 45e-7, cacheWriteCostPerToken: 75e-8, cacheReadCostPerToken: 75e-9, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
198
+ "gpt-5.3-codex": { inputCostPerToken: 175e-8, outputCostPerToken: 14e-6, cacheWriteCostPerToken: 175e-8, cacheReadCostPerToken: 175e-9, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
199
+ "gpt-5.3-codex-spark": { inputCostPerToken: 175e-8, outputCostPerToken: 14e-6, cacheWriteCostPerToken: 175e-8, cacheReadCostPerToken: 175e-9, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
196
200
  "gpt-5": { inputCostPerToken: 25e-7, outputCostPerToken: 1e-5, cacheWriteCostPerToken: 25e-7, cacheReadCostPerToken: 125e-8, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
197
201
  "gpt-5-mini": { inputCostPerToken: 4e-7, outputCostPerToken: 16e-7, cacheWriteCostPerToken: 4e-7, cacheReadCostPerToken: 2e-7, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
198
202
  "gpt-4.1": { inputCostPerToken: 2e-6, outputCostPerToken: 8e-6, cacheWriteCostPerToken: 2e-6, cacheReadCostPerToken: 5e-7, webSearchCostPerRequest: WEB_SEARCH_COST, fastMultiplier: 1 },
@@ -1628,6 +1632,28 @@ function aggregateProjectsIntoDays(projects) {
1628
1632
  }
1629
1633
  return [...byDate.values()].sort((a, b) => a.date.localeCompare(b.date));
1630
1634
  }
1635
+ function filterDaysToProvider(days, provider) {
1636
+ return days.map((d) => {
1637
+ const p = d.providers[provider];
1638
+ if (!p) return null;
1639
+ return {
1640
+ ...d,
1641
+ cost: p.cost,
1642
+ calls: p.calls,
1643
+ // sessions count is not per-provider in cache — approximate at 0
1644
+ sessions: 0,
1645
+ inputTokens: 0,
1646
+ outputTokens: 0,
1647
+ cacheReadTokens: 0,
1648
+ cacheWriteTokens: 0,
1649
+ editTurns: 0,
1650
+ oneShotTurns: 0,
1651
+ models: {},
1652
+ categories: {},
1653
+ providers: { [provider]: p }
1654
+ };
1655
+ }).filter((d) => d !== null);
1656
+ }
1631
1657
  function buildPeriodDataFromDays(days, label) {
1632
1658
  let cost = 0, calls = 0, sessions = 0;
1633
1659
  let inputTokens = 0, outputTokens = 0, cacheReadTokens = 0, cacheWriteTokens = 0;
@@ -2166,9 +2192,11 @@ import { basename as basename2, join as join8 } from "path";
2166
2192
  import { homedir as homedir5 } from "os";
2167
2193
  init_models();
2168
2194
  var modelDisplayNames = {
2169
- "gpt-5.3-codex": "GPT-5.3 Codex",
2170
- "gpt-5.4-mini": "GPT-5.4 Mini",
2195
+ "gpt-5.5": "GPT-5.5",
2171
2196
  "gpt-5.4": "GPT-5.4",
2197
+ "gpt-5.4-mini": "GPT-5.4 Mini",
2198
+ "gpt-5.3-codex-spark": "GPT-5.3 Codex Spark",
2199
+ "gpt-5.3-codex": "GPT-5.3 Codex",
2172
2200
  "gpt-5": "GPT-5",
2173
2201
  "gpt-4o-mini": "GPT-4o Mini",
2174
2202
  "gpt-4o": "GPT-4o"
@@ -6770,20 +6798,20 @@ program.command("status").description("Compact status output (today + week + mon
6770
6798
  const todayRange = { start: todayStart, end: periodInfo.range.end };
6771
6799
  const todayProjects = fp(await parseAllSessions(todayRange, "all"));
6772
6800
  const todayDays = aggregateProjectsIntoDays(todayProjects);
6773
- if (isAllProviders) {
6801
+ {
6774
6802
  const rangeStartStr = toDateString(periodInfo.range.start);
6775
6803
  const rangeEndStr = toDateString(periodInfo.range.end);
6776
6804
  const historicalDays = getDaysInRange(cache, rangeStartStr, yesterdayStr);
6777
6805
  const todayOnly = todayDays.filter((d) => d.date > yesterdayStr && d.date <= rangeEndStr);
6778
6806
  const allDays = [...historicalDays, ...todayOnly].sort((a, b) => a.date.localeCompare(b.date));
6779
- currentData = buildPeriodDataFromDays(allDays, periodInfo.label);
6807
+ if (isAllProviders) {
6808
+ currentData = buildPeriodDataFromDays(allDays, periodInfo.label);
6809
+ } else {
6810
+ const providerDays = filterDaysToProvider(allDays, pf);
6811
+ currentData = buildPeriodDataFromDays(providerDays, periodInfo.label);
6812
+ }
6780
6813
  scanProjects = todayProjects;
6781
6814
  scanRange = periodInfo.range;
6782
- } else {
6783
- const projects = fp(await parseAllSessions(periodInfo.range, pf));
6784
- currentData = buildPeriodData(periodInfo.label, projects);
6785
- scanProjects = projects;
6786
- scanRange = periodInfo.range;
6787
6815
  }
6788
6816
  const allProviders = await getAllProviders();
6789
6817
  const displayNameByName = new Map(allProviders.map((p) => [p.name, p.displayName]));