@yhong91/vibetime 0.1.73 → 0.1.74

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 (2) hide show
  1. package/bin/vibetime.mjs +7 -21
  2. package/package.json +1 -1
package/bin/vibetime.mjs CHANGED
@@ -2047,7 +2047,7 @@ function claudeStyleFileMetrics(tool, input) {
2047
2047
  }
2048
2048
 
2049
2049
  // src/lib/constants.ts
2050
- var PACKAGE_VERSION = true ? "0.1.73" : "0.1.1";
2050
+ var PACKAGE_VERSION = true ? "0.1.74" : "0.1.1";
2051
2051
  var GENERATED_MARKER = "Generated by vibetime.";
2052
2052
  var DEFAULT_API_URL = "http://121.196.224.82:3001";
2053
2053
  var DEFAULT_BACKFILL_BATCH_SIZE = 50;
@@ -5163,7 +5163,6 @@ async function parseCodexSessionFile(filePath, options) {
5163
5163
  let lastTurnIdForComplete;
5164
5164
  let turnIdAtLastUserMessage;
5165
5165
  let sessionMetaLocked = false;
5166
- let forkedSession = false;
5167
5166
  let lastTotalTokenUsage;
5168
5167
  let lastPerCallUsageKey;
5169
5168
  let compactionPending = false;
@@ -5184,7 +5183,6 @@ async function parseCodexSessionFile(filePath, options) {
5184
5183
  }
5185
5184
  sessionMetaLocked = true;
5186
5185
  const forkedFromId = stringField(payload, "forked_from_id");
5187
- forkedSession = Boolean(forkedFromId);
5188
5186
  const inherited = forkedFromId ? await readPersistedSessionContextFromOptions(options, forkedFromId) : void 0;
5189
5187
  sessionId = stringField(payload, "id") || sessionId;
5190
5188
  cwd = inherited?.cwd || stringField(payload, "cwd") || cwd;
@@ -5336,7 +5334,7 @@ async function parseCodexSessionFile(filePath, options) {
5336
5334
  project,
5337
5335
  model: rewriteCodexModelForTier(model, serviceTier),
5338
5336
  confidence: "partial",
5339
- metrics: excludeForkInheritedCache(usage, forkedSession)
5337
+ metrics: usage
5340
5338
  }), { filePath, sourcePathHash, lineNumber, topType, payloadType, options }));
5341
5339
  lastPerCallUsageKey = usageKey;
5342
5340
  }
@@ -5354,7 +5352,7 @@ async function parseCodexSessionFile(filePath, options) {
5354
5352
  project,
5355
5353
  model: rewriteCodexModelForTier(model, serviceTier),
5356
5354
  confidence: "partial",
5357
- metrics: excludeForkInheritedCache({ ...lastUsage, reasoningEffort }, forkedSession)
5355
+ metrics: { ...lastUsage, reasoningEffort }
5358
5356
  }), { filePath, sourcePathHash, lineNumber, topType, payloadType, options }));
5359
5357
  }
5360
5358
  lastTotalTokenUsage = { input, cached, output, reasoning, total };
@@ -5378,7 +5376,7 @@ async function parseCodexSessionFile(filePath, options) {
5378
5376
  project,
5379
5377
  model: rewriteCodexModelForTier(model, serviceTier),
5380
5378
  confidence: "partial",
5381
- metrics: excludeForkInheritedCache({
5379
+ metrics: {
5382
5380
  tokensInput: deltaInput > 0 ? deltaInput : void 0,
5383
5381
  tokensCachedInput: deltaCached > 0 ? deltaCached : void 0,
5384
5382
  tokensOutput: deltaOutput > 0 ? deltaOutput : void 0,
@@ -5386,7 +5384,7 @@ async function parseCodexSessionFile(filePath, options) {
5386
5384
  tokensTotal: deltaTotal > 0 ? deltaTotal : void 0,
5387
5385
  modelContextWindow: usage.modelContextWindow,
5388
5386
  reasoningEffort
5389
- }, forkedSession)
5387
+ }
5390
5388
  }), { filePath, sourcePathHash, lineNumber, topType, payloadType, options }));
5391
5389
  }
5392
5390
  } else {
@@ -5399,7 +5397,7 @@ async function parseCodexSessionFile(filePath, options) {
5399
5397
  project,
5400
5398
  model: rewriteCodexModelForTier(model, serviceTier),
5401
5399
  confidence: "partial",
5402
- metrics: excludeForkInheritedCache({
5400
+ metrics: {
5403
5401
  tokensInput: input,
5404
5402
  tokensCachedInput: cached,
5405
5403
  tokensOutput: output,
@@ -5407,7 +5405,7 @@ async function parseCodexSessionFile(filePath, options) {
5407
5405
  tokensTotal: total,
5408
5406
  modelContextWindow: usage.modelContextWindow,
5409
5407
  reasoningEffort
5410
- }, forkedSession)
5408
+ }
5411
5409
  }), { filePath, sourcePathHash, lineNumber, topType, payloadType, options }));
5412
5410
  }
5413
5411
  lastTotalTokenUsage = { input, cached, output, reasoning, total };
@@ -5708,18 +5706,6 @@ function tokenUsageFromRecord(usage, info) {
5708
5706
  modelContextWindow: numberField(info, "model_context_window")
5709
5707
  };
5710
5708
  }
5711
- function excludeForkInheritedCache(usage, forked) {
5712
- if (!forked || !usage) {
5713
- return usage;
5714
- }
5715
- const cached = usage.tokensCachedInput ?? 0;
5716
- return {
5717
- ...usage,
5718
- tokensInput: Math.max(0, (usage.tokensInput ?? 0) - cached) || void 0,
5719
- tokensCachedInput: void 0,
5720
- tokensTotal: Math.max(0, (usage.tokensTotal ?? 0) - cached) || void 0
5721
- };
5722
- }
5723
5709
  function toolNameFromPayload(payload, payloadType) {
5724
5710
  if (payloadType === "web_search_call") {
5725
5711
  return "web_search";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yhong91/vibetime",
3
3
  "type": "module",
4
- "version": "0.1.73",
4
+ "version": "0.1.74",
5
5
  "description": "vibetime CLI — install AI-agent hooks (Claude Code, Codex, OpenCode, Pi, Cursor) and report activity to vibetime.",
6
6
  "license": "MIT",
7
7
  "publishConfig": {