@masslessai/push-todo 3.10.1 → 3.10.3
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 +7 -5
- package/lib/api.js +3 -1
- package/lib/connect.js +19 -6
- package/lib/fetch.js +27 -5
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -32,11 +32,13 @@ When this command is invoked:
|
|
|
32
32
|
push-todo
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
4. **
|
|
35
|
+
4. **If no tasks are returned** (output says "No active tasks"): This is **normal and expected** — it means no tasks have been assigned to this project's action yet. Do NOT treat this as an error. Simply tell the user: "No tasks for this project yet. Create tasks in the Push iOS app and assign them to this action." Do NOT spawn diagnostic agents or troubleshoot — empty task lists are the expected state for new or unused actions.
|
|
36
36
|
|
|
37
|
-
5.
|
|
37
|
+
5. **Present ALL tasks** - Do NOT summarize or truncate the list. Show every active task in a table format. Users want to see their complete task list, not a curated subset. If there are 35 tasks, show all 35.
|
|
38
38
|
|
|
39
|
-
6.
|
|
39
|
+
6. Ask which task the user wants to work on
|
|
40
|
+
|
|
41
|
+
7. **Check if the daemon is currently working on this task:**
|
|
40
42
|
- If the task output shows `**Status:** 🔄 Running`:
|
|
41
43
|
- The daemon is actively working on this task RIGHT NOW
|
|
42
44
|
- Follow the [Live Session Status](#live-session-status) procedure to show progress
|
|
@@ -46,13 +48,13 @@ When this command is invoked:
|
|
|
46
48
|
- Tell the user: "This task is queued and will be picked up by the daemon shortly."
|
|
47
49
|
- Do NOT start working on this task
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
8. **Check for resumable daemon sessions:**
|
|
50
52
|
- If the task output contains `**Session:** Resumable`, the daemon already ran Claude Code on this task
|
|
51
53
|
- Do NOT start working from scratch — automatically load the daemon's session context
|
|
52
54
|
- Follow the [Auto-Resume from Session Transcript](#auto-resume-from-session-transcript) procedure below
|
|
53
55
|
- Only if the session transcript cannot be found should you begin working from scratch
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
9. If no resumable session exists, begin working on the task normally
|
|
56
58
|
|
|
57
59
|
## Review Mode
|
|
58
60
|
|
package/lib/api.js
CHANGED
|
@@ -49,7 +49,9 @@ async function apiRequest(endpoint, options = {}) {
|
|
|
49
49
|
export async function fetchTasks(gitRemote, options = {}) {
|
|
50
50
|
const params = new URLSearchParams();
|
|
51
51
|
|
|
52
|
-
if (
|
|
52
|
+
if (options.actionId) {
|
|
53
|
+
params.set('action_id', options.actionId);
|
|
54
|
+
} else if (gitRemote) {
|
|
53
55
|
params.set('git_remote', gitRemote);
|
|
54
56
|
}
|
|
55
57
|
if (options.actionType) {
|
package/lib/connect.js
CHANGED
|
@@ -1048,19 +1048,32 @@ function detectCallerAgent(explicitClient) {
|
|
|
1048
1048
|
/**
|
|
1049
1049
|
* Register project in local registry for daemon routing.
|
|
1050
1050
|
*
|
|
1051
|
-
*
|
|
1051
|
+
* Supports both git-remote-based and path-based projects.
|
|
1052
|
+
* - Git projects: key is "gitRemote::actionType"
|
|
1053
|
+
* - Non-git projects (e.g., OpenClaw workspace): key is "path:/abs/path::actionType"
|
|
1054
|
+
*
|
|
1055
|
+
* @param {string} gitRemoteRaw - Raw git remote URL (can be null for non-git projects)
|
|
1052
1056
|
* @param {string} localPath - Absolute local path
|
|
1053
1057
|
* @param {Object} [actionMeta] - Action metadata from register-project response
|
|
1054
1058
|
* @returns {boolean}
|
|
1055
1059
|
*/
|
|
1056
1060
|
function registerProjectLocally(gitRemoteRaw, localPath, actionMeta = {}) {
|
|
1057
|
-
|
|
1061
|
+
const registry = getRegistry();
|
|
1062
|
+
|
|
1063
|
+
if (gitRemoteRaw) {
|
|
1064
|
+
const gitRemote = normalizeGitRemote(gitRemoteRaw);
|
|
1065
|
+
if (gitRemote) {
|
|
1066
|
+
return registry.register(gitRemote, localPath, actionMeta);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1058
1069
|
|
|
1059
|
-
|
|
1060
|
-
if (
|
|
1070
|
+
// Non-git project: use path-based key (e.g., OpenClaw workspace)
|
|
1071
|
+
if (localPath) {
|
|
1072
|
+
const pathKey = `path:${localPath}`;
|
|
1073
|
+
return registry.register(pathKey, localPath, actionMeta);
|
|
1074
|
+
}
|
|
1061
1075
|
|
|
1062
|
-
|
|
1063
|
-
return registry.register(gitRemote, localPath, actionMeta);
|
|
1076
|
+
return false;
|
|
1064
1077
|
}
|
|
1065
1078
|
|
|
1066
1079
|
/**
|
package/lib/fetch.js
CHANGED
|
@@ -58,21 +58,34 @@ function decryptTaskFields(task) {
|
|
|
58
58
|
* @returns {Promise<void>}
|
|
59
59
|
*/
|
|
60
60
|
export async function listTasks(options = {}) {
|
|
61
|
-
// Determine git remote and action
|
|
61
|
+
// Determine git remote, action type, and action ID for scoping
|
|
62
62
|
let gitRemote = null;
|
|
63
63
|
let actionType = null;
|
|
64
|
+
let actionId = null;
|
|
64
65
|
if (!options.allProjects) {
|
|
65
66
|
gitRemote = getGitRemote();
|
|
66
67
|
if (!gitRemote && isGitRepo()) {
|
|
67
68
|
console.error(yellow('Warning: In a git repo but no remote configured.'));
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
|
|
71
|
+
const registry = getRegistry();
|
|
70
72
|
if (gitRemote) {
|
|
71
|
-
|
|
73
|
+
// Git project: look up action type from registry
|
|
72
74
|
const project = registry.findProject(gitRemote);
|
|
73
75
|
if (project) {
|
|
74
76
|
actionType = project.actionType;
|
|
75
77
|
}
|
|
78
|
+
} else {
|
|
79
|
+
// Non-git project (e.g., OpenClaw workspace): look up by cwd path
|
|
80
|
+
const pathKey = `path:${process.cwd()}`;
|
|
81
|
+
const project = registry.findProject(pathKey);
|
|
82
|
+
if (project) {
|
|
83
|
+
actionType = project.actionType;
|
|
84
|
+
// For path-based projects, use action_id directly since there's no git_remote
|
|
85
|
+
if (project.actionId) {
|
|
86
|
+
actionId = project.actionId;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
76
89
|
}
|
|
77
90
|
}
|
|
78
91
|
|
|
@@ -83,6 +96,7 @@ export async function listTasks(options = {}) {
|
|
|
83
96
|
completedOnly: options.completed,
|
|
84
97
|
includeCompleted: options.includeCompleted,
|
|
85
98
|
actionType,
|
|
99
|
+
actionId,
|
|
86
100
|
});
|
|
87
101
|
|
|
88
102
|
// Decrypt if E2EE is available
|
|
@@ -95,8 +109,16 @@ export async function listTasks(options = {}) {
|
|
|
95
109
|
}
|
|
96
110
|
|
|
97
111
|
if (decryptedTasks.length === 0) {
|
|
98
|
-
|
|
99
|
-
|
|
112
|
+
let scope;
|
|
113
|
+
if (gitRemote) {
|
|
114
|
+
scope = `for ${cyan(gitRemote)}`;
|
|
115
|
+
} else if (actionId || actionType) {
|
|
116
|
+
// Path-based project (e.g., OpenClaw workspace) — scoped to a specific action
|
|
117
|
+
scope = `for this project (${cyan(actionType || 'unknown')})`;
|
|
118
|
+
} else {
|
|
119
|
+
scope = 'across all projects';
|
|
120
|
+
}
|
|
121
|
+
console.log(`No active tasks ${scope}. This is normal if no tasks have been assigned to this action yet.`);
|
|
100
122
|
return;
|
|
101
123
|
}
|
|
102
124
|
|