@masslessai/push-todo 3.5.4 → 3.5.6
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/SKILL.md +13 -0
- package/lib/daemon.js +4 -35
- package/lib/utils/format.js +7 -10
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -197,6 +197,18 @@ If no CLAUDE.md or README.md exists, generate minimal keywords from:
|
|
|
197
197
|
- Git repo name
|
|
198
198
|
- Primary file extensions (`.swift` -> iOS, `.py` -> Python, `.rs` -> Rust)
|
|
199
199
|
|
|
200
|
+
## Resuming Daemon Sessions
|
|
201
|
+
|
|
202
|
+
When tasks are executed by the Push daemon on a Mac, each task creates a Claude Code session. These sessions can be resumed to continue exactly where the daemon left off.
|
|
203
|
+
|
|
204
|
+
**When you see `**Session:** Resumable` in a task's output**, tell the user:
|
|
205
|
+
- The task has a saved Claude Code session from the daemon
|
|
206
|
+
- They can resume it with `push-todo resume <number>` (run in their terminal, not here)
|
|
207
|
+
- This opens an **interactive** Claude Code session with the full conversation history - every file read, edit, and decision the daemon made
|
|
208
|
+
- It must be run on the **same machine** that executed the task (sessions are stored locally)
|
|
209
|
+
|
|
210
|
+
**Important:** `push-todo resume` launches an interactive Claude Code terminal session. It cannot be run from within an existing Claude Code session. Instruct the user to run it directly in their terminal.
|
|
211
|
+
|
|
200
212
|
## CLI Reference
|
|
201
213
|
|
|
202
214
|
The `push-todo` CLI supports these commands:
|
|
@@ -207,6 +219,7 @@ The `push-todo` CLI supports these commands:
|
|
|
207
219
|
| `push-todo <number>` | Show specific task (e.g., `push-todo 427`) |
|
|
208
220
|
| `push-todo --all-projects` | List tasks from all projects |
|
|
209
221
|
| `push-todo --backlog` | Show backlog items |
|
|
222
|
+
| `push-todo --resume <number>` | Resume the daemon's Claude Code session for a task |
|
|
210
223
|
| `push-todo connect` | Run connection diagnostics and setup |
|
|
211
224
|
| `push-todo search <query>` | Search tasks |
|
|
212
225
|
| `push-todo --status` | Show connection status |
|
package/lib/daemon.js
CHANGED
|
@@ -823,45 +823,14 @@ function executeTask(task) {
|
|
|
823
823
|
|
|
824
824
|
// Analyze certainty
|
|
825
825
|
const analysis = analyzeTaskCertainty(task);
|
|
826
|
-
|
|
826
|
+
let executionMode = determineExecutionMode(analysis);
|
|
827
827
|
|
|
828
828
|
log(`Task #${displayNumber} execution mode: ${executionMode}`);
|
|
829
829
|
|
|
830
|
-
//
|
|
830
|
+
// Low-certainty tasks: run in planning mode instead of blocking
|
|
831
831
|
if (executionMode === 'clarify') {
|
|
832
|
-
log(`Task #${displayNumber}
|
|
833
|
-
|
|
834
|
-
const questions = analysis?.clarificationQuestions?.map(q => ({
|
|
835
|
-
question: q.question,
|
|
836
|
-
options: q.options,
|
|
837
|
-
priority: q.priority
|
|
838
|
-
})) || [];
|
|
839
|
-
|
|
840
|
-
let clarificationSummary = 'Task requires clarification before execution.';
|
|
841
|
-
if (analysis) {
|
|
842
|
-
clarificationSummary += ` Certainty score: ${analysis.score}`;
|
|
843
|
-
if (analysis.reasons?.length > 0) {
|
|
844
|
-
clarificationSummary += ` (${analysis.reasons[0].explanation})`;
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
updateTaskStatus(displayNumber, 'needs_clarification', {
|
|
849
|
-
summary: clarificationSummary,
|
|
850
|
-
certaintyScore: analysis?.score,
|
|
851
|
-
clarificationQuestions: questions
|
|
852
|
-
});
|
|
853
|
-
|
|
854
|
-
if (NOTIFY_ON_NEEDS_INPUT) {
|
|
855
|
-
sendMacNotification(
|
|
856
|
-
`Task #${displayNumber} needs clarification`,
|
|
857
|
-
`${summary.slice(0, 50)}... Low certainty - please clarify.`,
|
|
858
|
-
'Ping'
|
|
859
|
-
);
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
taskDetails.delete(displayNumber);
|
|
863
|
-
updateStatusFile();
|
|
864
|
-
return null;
|
|
832
|
+
log(`Task #${displayNumber} low certainty - running in planning mode instead of blocking`);
|
|
833
|
+
executionMode = 'planning';
|
|
865
834
|
}
|
|
866
835
|
|
|
867
836
|
// Create worktree
|
package/lib/utils/format.js
CHANGED
|
@@ -131,28 +131,25 @@ export function formatTaskForDisplay(task) {
|
|
|
131
131
|
// Status
|
|
132
132
|
if (task.isCompleted || task.is_completed) {
|
|
133
133
|
lines.push('**Status:** ✅ Completed');
|
|
134
|
-
// Show session resume hint if session_id is available
|
|
135
|
-
const sessionId = task.executionSessionId || task.execution_session_id;
|
|
136
|
-
if (sessionId) {
|
|
137
|
-
lines.push(`**Session:** Available (\`push-todo resume ${displayNum}\`)`);
|
|
138
|
-
}
|
|
139
134
|
} else if (execStatus === 'running') {
|
|
140
|
-
|
|
141
|
-
const machineHint = machineName ? ` on ${machineName}` : '';
|
|
142
|
-
lines.push(`**Status:** 🔄 Running${machineHint}`);
|
|
135
|
+
lines.push('**Status:** 🔄 Running');
|
|
143
136
|
} else if (execStatus === 'queued') {
|
|
144
137
|
lines.push('**Status:** ⚡ Queued for Mac execution');
|
|
145
138
|
} else if (execStatus === 'failed') {
|
|
146
139
|
const error = task.executionError || task.execution_error || 'Unknown error';
|
|
147
140
|
lines.push(`**Status:** ❌ Failed: ${error}`);
|
|
148
|
-
} else if (execStatus === 'needs_clarification') {
|
|
149
|
-
lines.push('**Status:** ❓ Needs clarification');
|
|
150
141
|
} else if (task.isBacklog || task.is_backlog) {
|
|
151
142
|
lines.push('**Status:** 📦 Backlog');
|
|
152
143
|
} else {
|
|
153
144
|
lines.push('**Status:** Active');
|
|
154
145
|
}
|
|
155
146
|
|
|
147
|
+
// Show session resume hint for any task with a session ID
|
|
148
|
+
const sessionId = task.executionSessionId || task.execution_session_id;
|
|
149
|
+
if (sessionId && displayNum) {
|
|
150
|
+
lines.push(`**Session:** Resumable (\`push-todo resume ${displayNum}\`) - continues the exact Claude Code conversation`);
|
|
151
|
+
}
|
|
152
|
+
|
|
156
153
|
const createdAt = task.createdAt || task.created_at;
|
|
157
154
|
lines.push(`**Created:** ${createdAt || 'unknown'}`);
|
|
158
155
|
|