@hasna/todos 0.9.68 → 0.9.69

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 CHANGED
@@ -10908,6 +10908,29 @@ No pending tasks available.`);
10908
10908
  }
10909
10909
  });
10910
10910
  }
10911
+ if (shouldRegisterTool("get_health")) {
10912
+ server.tool("get_health", "Check todos DB health. Returns status and issue summary.", {
10913
+ project_id: exports_external.string().optional()
10914
+ }, async ({ project_id }) => {
10915
+ try {
10916
+ const checks = [];
10917
+ const all = listTasks({});
10918
+ checks.push({ name: "tasks", status: "ok", value: `${all.length} total` });
10919
+ const stale = getStaleTasks(30, project_id ? { project_id: resolveId(project_id, "projects") } : undefined);
10920
+ checks.push({ name: "stale", status: stale.length > 0 ? "warn" : "ok", value: `${stale.length} stuck in_progress >30min` });
10921
+ const nowStr = new Date().toISOString();
10922
+ const overdue = all.filter((t) => t.recurrence_rule && t.status === "pending" && t.due_at && t.due_at < nowStr);
10923
+ checks.push({ name: "overdue_recurring", status: overdue.length > 0 ? "warn" : "ok", value: `${overdue.length} overdue` });
10924
+ const status = checks.some((c) => c.status === "error") ? "error" : checks.some((c) => c.status === "warn") ? "warn" : "ok";
10925
+ const text = `Status: ${status}
10926
+ ${checks.map((c) => ` ${c.status === "ok" ? "\u2713" : "\u26A0"} ${c.name}: ${c.value}`).join(`
10927
+ `)}`;
10928
+ return { content: [{ type: "text", text }] };
10929
+ } catch (e) {
10930
+ return { content: [{ type: "text", text: formatError(e) }], isError: true };
10931
+ }
10932
+ });
10933
+ }
10911
10934
  if (shouldRegisterTool("get_context")) {
10912
10935
  server.tool("get_context", "Get a compact task summary for agent prompt injection. Returns formatted text.", {
10913
10936
  agent_id: exports_external.string().optional(),
@@ -11001,6 +11024,7 @@ No pending tasks available.`);
11001
11024
  "get_stale_tasks",
11002
11025
  "get_status",
11003
11026
  "get_context",
11027
+ "get_health",
11004
11028
  "decompose_task",
11005
11029
  "set_task_status",
11006
11030
  "set_task_priority",
package/dist/mcp/index.js CHANGED
@@ -8659,6 +8659,29 @@ if (shouldRegisterTool("set_task_priority")) {
8659
8659
  }
8660
8660
  });
8661
8661
  }
8662
+ if (shouldRegisterTool("get_health")) {
8663
+ server.tool("get_health", "Check todos DB health. Returns status and issue summary.", {
8664
+ project_id: exports_external.string().optional()
8665
+ }, async ({ project_id }) => {
8666
+ try {
8667
+ const checks = [];
8668
+ const all = listTasks({});
8669
+ checks.push({ name: "tasks", status: "ok", value: `${all.length} total` });
8670
+ const stale = getStaleTasks(30, project_id ? { project_id: resolveId(project_id, "projects") } : undefined);
8671
+ checks.push({ name: "stale", status: stale.length > 0 ? "warn" : "ok", value: `${stale.length} stuck in_progress >30min` });
8672
+ const nowStr = new Date().toISOString();
8673
+ const overdue = all.filter((t) => t.recurrence_rule && t.status === "pending" && t.due_at && t.due_at < nowStr);
8674
+ checks.push({ name: "overdue_recurring", status: overdue.length > 0 ? "warn" : "ok", value: `${overdue.length} overdue` });
8675
+ const status = checks.some((c) => c.status === "error") ? "error" : checks.some((c) => c.status === "warn") ? "warn" : "ok";
8676
+ const text = `Status: ${status}
8677
+ ${checks.map((c) => ` ${c.status === "ok" ? "\u2713" : "\u26A0"} ${c.name}: ${c.value}`).join(`
8678
+ `)}`;
8679
+ return { content: [{ type: "text", text }] };
8680
+ } catch (e) {
8681
+ return { content: [{ type: "text", text: formatError(e) }], isError: true };
8682
+ }
8683
+ });
8684
+ }
8662
8685
  if (shouldRegisterTool("get_context")) {
8663
8686
  server.tool("get_context", "Get a compact task summary for agent prompt injection. Returns formatted text.", {
8664
8687
  agent_id: exports_external.string().optional(),
@@ -8752,6 +8775,7 @@ if (shouldRegisterTool("search_tools")) {
8752
8775
  "get_stale_tasks",
8753
8776
  "get_status",
8754
8777
  "get_context",
8778
+ "get_health",
8755
8779
  "decompose_task",
8756
8780
  "set_task_status",
8757
8781
  "set_task_priority",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.9.68",
3
+ "version": "0.9.69",
4
4
  "description": "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",