@hasna/todos 0.9.52 → 0.9.53
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/dist/cli/index.js +9 -2
- package/dist/mcp/index.js +9 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -10331,8 +10331,15 @@ Retry task created: ${formatTask(result.retryTask)}`;
|
|
|
10331
10331
|
}, async ({ agent_name }) => {
|
|
10332
10332
|
try {
|
|
10333
10333
|
const agent = registerAgent({ name: agent_name });
|
|
10334
|
-
const
|
|
10335
|
-
const
|
|
10334
|
+
const byName = listTasks({ assigned_to: agent_name });
|
|
10335
|
+
const byId = listTasks({ agent_id: agent.id });
|
|
10336
|
+
const seen = new Set;
|
|
10337
|
+
const myTasks = [...byName, ...byId].filter((t) => {
|
|
10338
|
+
if (seen.has(t.id))
|
|
10339
|
+
return false;
|
|
10340
|
+
seen.add(t.id);
|
|
10341
|
+
return true;
|
|
10342
|
+
});
|
|
10336
10343
|
const pending = myTasks.filter((t) => t.status === "pending");
|
|
10337
10344
|
const inProgress = myTasks.filter((t) => t.status === "in_progress");
|
|
10338
10345
|
const completed = myTasks.filter((t) => t.status === "completed");
|
package/dist/mcp/index.js
CHANGED
|
@@ -8105,8 +8105,15 @@ if (shouldRegisterTool("get_my_tasks")) {
|
|
|
8105
8105
|
}, async ({ agent_name }) => {
|
|
8106
8106
|
try {
|
|
8107
8107
|
const agent = registerAgent({ name: agent_name });
|
|
8108
|
-
const
|
|
8109
|
-
const
|
|
8108
|
+
const byName = listTasks({ assigned_to: agent_name });
|
|
8109
|
+
const byId = listTasks({ agent_id: agent.id });
|
|
8110
|
+
const seen = new Set;
|
|
8111
|
+
const myTasks = [...byName, ...byId].filter((t) => {
|
|
8112
|
+
if (seen.has(t.id))
|
|
8113
|
+
return false;
|
|
8114
|
+
seen.add(t.id);
|
|
8115
|
+
return true;
|
|
8116
|
+
});
|
|
8110
8117
|
const pending = myTasks.filter((t) => t.status === "pending");
|
|
8111
8118
|
const inProgress = myTasks.filter((t) => t.status === "in_progress");
|
|
8112
8119
|
const completed = myTasks.filter((t) => t.status === "completed");
|