@hasna/todos 0.9.64 → 0.9.65

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
@@ -9304,6 +9304,7 @@ var init_mcp = __esm(() => {
9304
9304
  "complete_task",
9305
9305
  "fail_task",
9306
9306
  "get_status",
9307
+ "get_context",
9307
9308
  "get_task",
9308
9309
  "start_task",
9309
9310
  "add_comment",
@@ -10893,6 +10894,37 @@ No pending tasks available.`);
10893
10894
  }
10894
10895
  });
10895
10896
  }
10897
+ if (shouldRegisterTool("get_context")) {
10898
+ server.tool("get_context", "Get a compact task summary for agent prompt injection. Returns formatted text.", {
10899
+ agent_id: exports_external.string().optional(),
10900
+ project_id: exports_external.string().optional(),
10901
+ format: exports_external.enum(["text", "compact"]).optional()
10902
+ }, async ({ agent_id, project_id, format: _format }) => {
10903
+ try {
10904
+ const filters = {};
10905
+ if (project_id)
10906
+ filters.project_id = resolveId(project_id, "projects");
10907
+ const status = getStatus(Object.keys(filters).length > 0 ? filters : undefined, agent_id);
10908
+ const next = getNextTask(agent_id, Object.keys(filters).length > 0 ? filters : undefined);
10909
+ const lines = [];
10910
+ lines.push(`Tasks: ${status.pending} pending | ${status.in_progress} active | ${status.completed} done`);
10911
+ if (status.stale_count > 0)
10912
+ lines.push(`\u26A0 ${status.stale_count} stale tasks`);
10913
+ if (status.overdue_recurring > 0)
10914
+ lines.push(`\uD83D\uDD01 ${status.overdue_recurring} overdue recurring`);
10915
+ if (status.active_work.length > 0) {
10916
+ const active = status.active_work.slice(0, 3).map((w) => `${w.short_id || w.id.slice(0, 8)} (${w.assigned_to || "?"})`).join(", ");
10917
+ lines.push(`Active: ${active}`);
10918
+ }
10919
+ if (next)
10920
+ lines.push(`Next up: ${next.short_id || next.id.slice(0, 8)} [${next.priority}] ${next.title}`);
10921
+ return { content: [{ type: "text", text: lines.join(`
10922
+ `) }] };
10923
+ } catch (e) {
10924
+ return { content: [{ type: "text", text: formatError(e) }], isError: true };
10925
+ }
10926
+ });
10927
+ }
10896
10928
  if (shouldRegisterTool("search_tools")) {
10897
10929
  server.tool("search_tools", "List all tool names, optionally filtered by substring.", { query: exports_external.string().optional() }, async ({ query }) => {
10898
10930
  const all = [
@@ -10954,6 +10986,7 @@ No pending tasks available.`);
10954
10986
  "get_tasks_changed_since",
10955
10987
  "get_stale_tasks",
10956
10988
  "get_status",
10989
+ "get_context",
10957
10990
  "decompose_task",
10958
10991
  "set_task_status",
10959
10992
  "set_task_priority",
package/dist/mcp/index.js CHANGED
@@ -6970,6 +6970,7 @@ var MINIMAL_TOOLS = new Set([
6970
6970
  "complete_task",
6971
6971
  "fail_task",
6972
6972
  "get_status",
6973
+ "get_context",
6973
6974
  "get_task",
6974
6975
  "start_task",
6975
6976
  "add_comment",
@@ -8658,6 +8659,37 @@ if (shouldRegisterTool("set_task_priority")) {
8658
8659
  }
8659
8660
  });
8660
8661
  }
8662
+ if (shouldRegisterTool("get_context")) {
8663
+ server.tool("get_context", "Get a compact task summary for agent prompt injection. Returns formatted text.", {
8664
+ agent_id: exports_external.string().optional(),
8665
+ project_id: exports_external.string().optional(),
8666
+ format: exports_external.enum(["text", "compact"]).optional()
8667
+ }, async ({ agent_id, project_id, format: _format }) => {
8668
+ try {
8669
+ const filters = {};
8670
+ if (project_id)
8671
+ filters.project_id = resolveId(project_id, "projects");
8672
+ const status = getStatus(Object.keys(filters).length > 0 ? filters : undefined, agent_id);
8673
+ const next = getNextTask(agent_id, Object.keys(filters).length > 0 ? filters : undefined);
8674
+ const lines = [];
8675
+ lines.push(`Tasks: ${status.pending} pending | ${status.in_progress} active | ${status.completed} done`);
8676
+ if (status.stale_count > 0)
8677
+ lines.push(`\u26A0 ${status.stale_count} stale tasks`);
8678
+ if (status.overdue_recurring > 0)
8679
+ lines.push(`\uD83D\uDD01 ${status.overdue_recurring} overdue recurring`);
8680
+ if (status.active_work.length > 0) {
8681
+ const active = status.active_work.slice(0, 3).map((w) => `${w.short_id || w.id.slice(0, 8)} (${w.assigned_to || "?"})`).join(", ");
8682
+ lines.push(`Active: ${active}`);
8683
+ }
8684
+ if (next)
8685
+ lines.push(`Next up: ${next.short_id || next.id.slice(0, 8)} [${next.priority}] ${next.title}`);
8686
+ return { content: [{ type: "text", text: lines.join(`
8687
+ `) }] };
8688
+ } catch (e) {
8689
+ return { content: [{ type: "text", text: formatError(e) }], isError: true };
8690
+ }
8691
+ });
8692
+ }
8661
8693
  if (shouldRegisterTool("search_tools")) {
8662
8694
  server.tool("search_tools", "List all tool names, optionally filtered by substring.", { query: exports_external.string().optional() }, async ({ query }) => {
8663
8695
  const all = [
@@ -8719,6 +8751,7 @@ if (shouldRegisterTool("search_tools")) {
8719
8751
  "get_tasks_changed_since",
8720
8752
  "get_stale_tasks",
8721
8753
  "get_status",
8754
+ "get_context",
8722
8755
  "decompose_task",
8723
8756
  "set_task_status",
8724
8757
  "set_task_priority",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.9.64",
3
+ "version": "0.9.65",
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",