@blockrun/franklin 3.15.45 → 3.15.46

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.
@@ -36,7 +36,18 @@ export function buildTaskCommand() {
36
36
  }
37
37
  const now = Date.now();
38
38
  for (const t of tasks) {
39
- const age = fmtAge(now - (t.lastEventAt ?? t.createdAt));
39
+ // For a running task, "age" should mean "how long has this been
40
+ // going" — use startedAt (or createdAt). For a terminal task,
41
+ // "age" should mean "how recently did this end" — use endedAt
42
+ // (or lastEventAt). Verified 2026-05-04 on a real machine: a
43
+ // running ETL that had been chewing through 685k files for
44
+ // 13 minutes was displayed as "0s" because the runner's 5s
45
+ // heartbeat keeps lastEventAt fresh — useless signal.
46
+ const isTerminal = isTerminalTaskStatus(t.status);
47
+ const ageRefMs = isTerminal
48
+ ? (t.endedAt ?? t.lastEventAt ?? t.createdAt)
49
+ : (t.startedAt ?? t.createdAt);
50
+ const age = fmtAge(now - ageRefMs);
40
51
  console.log(`${t.runId} ${t.status.padEnd(10)} ${age.padStart(5)} ${t.label}`);
41
52
  }
42
53
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/franklin",
3
- "version": "3.15.45",
3
+ "version": "3.15.46",
4
4
  "description": "Franklin — The AI agent with a wallet. Spends USDC autonomously to get real work done. Pay per action, no subscriptions.",
5
5
  "type": "module",
6
6
  "exports": {