@devness/useai 0.6.28 → 0.6.29

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/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -684,7 +684,7 @@ var VERSION;
684
684
  var init_version = __esm({
685
685
  "../shared/dist/constants/version.js"() {
686
686
  "use strict";
687
- VERSION = "0.6.28";
687
+ VERSION = "0.6.29";
688
688
  }
689
689
  });
690
690
 
@@ -35429,9 +35429,9 @@ function sealOrphanFile(sessionId) {
35429
35429
  const lastRecordTime = new Date(lastRecord.timestamp).getTime();
35430
35430
  const startTimeMs = new Date(startTime).getTime();
35431
35431
  const chainDuration = Math.round((lastRecordTime - startTimeMs) / 1e3);
35432
- const useWallClock = chainDuration < 1;
35433
- const duration3 = useWallClock ? Math.round((Date.now() - startTimeMs) / 1e3) : chainDuration;
35434
- const now = useWallClock ? (/* @__PURE__ */ new Date()).toISOString() : lastRecord.timestamp;
35432
+ const mtimeMs = statSync(filePath).mtimeMs;
35433
+ const duration3 = chainDuration < 1 ? Math.max(0, Math.round((mtimeMs - startTimeMs) / 1e3)) : chainDuration;
35434
+ const now = chainDuration < 1 ? new Date(mtimeMs).toISOString() : lastRecord.timestamp;
35435
35435
  const endRecord = buildChainRecord("session_end", sessionId, {
35436
35436
  duration_seconds: duration3,
35437
35437
  task_type: taskType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai",
3
- "version": "0.6.28",
3
+ "version": "0.6.29",
4
4
  "description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
5
5
  "keywords": [
6
6
  "mcp",