@masslessai/push-todo 3.10.1 → 3.10.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.
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 (gitRemote) {
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
- * @param {string} gitRemoteRaw - Raw git remote URL
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
- if (!gitRemoteRaw) return false;
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
- const gitRemote = normalizeGitRemote(gitRemoteRaw);
1060
- if (!gitRemote) return false;
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
- const registry = getRegistry();
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 type for scoping
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
- // Look up action type from project registry for proper multi-agent scoping
70
+
71
+ const registry = getRegistry();
70
72
  if (gitRemote) {
71
- const registry = getRegistry();
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masslessai/push-todo",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "description": "Voice tasks from Push iOS app for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {