@masslessai/push-todo 4.5.1 → 4.5.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.
Files changed (2) hide show
  1. package/lib/daemon.js +23 -3
  2. package/package.json +1 -1
package/lib/daemon.js CHANGED
@@ -2564,16 +2564,30 @@ async function handleTaskCompletion(displayNumber, exitCode) {
2564
2564
  executionSummary += ` PR: ${prUrl}`;
2565
2565
  }
2566
2566
 
2567
+ // Build structured recap for briefing visualization (JSONB column)
2568
+ const prNumber = prUrl ? parseInt((prUrl.match(/\/(\d+)$/) || [])[1] || '0', 10) || null : null;
2569
+ const executionRecap = {
2570
+ durationStr,
2571
+ durationSeconds: duration,
2572
+ diagram: visualArtifact || null,
2573
+ machineName,
2574
+ outcome: {
2575
+ prUrl: prUrl || null,
2576
+ prNumber,
2577
+ },
2578
+ };
2579
+
2567
2580
  const statusUpdated = await updateTaskStatus(displayNumber, 'session_finished', {
2568
2581
  duration,
2569
2582
  sessionId,
2570
- summary: executionSummary
2583
+ summary: executionSummary,
2584
+ executionRecap,
2571
2585
  }, info.taskId);
2572
2586
  if (!statusUpdated) {
2573
2587
  logError(`Task #${displayNumber}: Failed to update status to session_finished — will retry`);
2574
2588
  // Retry once
2575
2589
  await updateTaskStatus(displayNumber, 'session_finished', {
2576
- duration, sessionId, summary: executionSummary
2590
+ duration, sessionId, summary: executionSummary, executionRecap,
2577
2591
  }, info.taskId);
2578
2592
  }
2579
2593
 
@@ -2692,7 +2706,13 @@ async function handleTaskCompletion(displayNumber, exitCode) {
2692
2706
  ? `${failureSummary}\nExit code ${exitCode}. Ran for ${durationStr} on ${machineName}.`
2693
2707
  : `Exit code ${exitCode}: ${stderr.slice(0, 200)}`;
2694
2708
 
2695
- await updateTaskStatus(displayNumber, 'failed', { error: errorMsg, sessionId }, info.taskId);
2709
+ const failedRecap = {
2710
+ durationStr,
2711
+ durationSeconds: duration,
2712
+ machineName,
2713
+ exitCode,
2714
+ };
2715
+ await updateTaskStatus(displayNumber, 'failed', { error: errorMsg, sessionId, executionRecap: failedRecap }, info.taskId);
2696
2716
 
2697
2717
  if (NOTIFY_ON_FAILURE) {
2698
2718
  sendMacNotification(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masslessai/push-todo",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
4
4
  "description": "Voice tasks from Push iOS app for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {