@hasna/todos 0.3.1 → 0.3.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/dist/cli/index.js CHANGED
@@ -6688,7 +6688,12 @@ var init_mcp = __esm(() => {
6688
6688
  metadata: exports_external.record(exports_external.unknown()).optional().describe("Arbitrary metadata")
6689
6689
  }, async (params) => {
6690
6690
  try {
6691
- const task = createTask(params);
6691
+ const resolved = { ...params };
6692
+ if (resolved.project_id)
6693
+ resolved.project_id = resolveId(resolved.project_id, "projects");
6694
+ if (resolved.parent_id)
6695
+ resolved.parent_id = resolveId(resolved.parent_id);
6696
+ const task = createTask(resolved);
6692
6697
  return { content: [{ type: "text", text: `Task created:
6693
6698
  ${formatTask(task)}` }] };
6694
6699
  } catch (e) {
@@ -6709,7 +6714,10 @@ ${formatTask(task)}` }] };
6709
6714
  tags: exports_external.array(exports_external.string()).optional().describe("Filter by tags (any match)")
6710
6715
  }, async (params) => {
6711
6716
  try {
6712
- const tasks = listTasks(params);
6717
+ const resolved = { ...params };
6718
+ if (resolved.project_id)
6719
+ resolved.project_id = resolveId(resolved.project_id, "projects");
6720
+ const tasks = listTasks(resolved);
6713
6721
  if (tasks.length === 0) {
6714
6722
  return { content: [{ type: "text", text: "No tasks found." }] };
6715
6723
  }
@@ -6943,7 +6951,8 @@ ${text}` }] };
6943
6951
  project_id: exports_external.string().optional().describe("Limit to project")
6944
6952
  }, async ({ query, project_id }) => {
6945
6953
  try {
6946
- const tasks = searchTasks(query, project_id);
6954
+ const resolvedProjectId = project_id ? resolveId(project_id, "projects") : undefined;
6955
+ const tasks = searchTasks(query, resolvedProjectId);
6947
6956
  if (tasks.length === 0) {
6948
6957
  return { content: [{ type: "text", text: `No tasks matching "${query}".` }] };
6949
6958
  }
package/dist/mcp/index.js CHANGED
@@ -4597,7 +4597,12 @@ server.tool("create_task", "Create a new task", {
4597
4597
  metadata: exports_external.record(exports_external.unknown()).optional().describe("Arbitrary metadata")
4598
4598
  }, async (params) => {
4599
4599
  try {
4600
- const task = createTask(params);
4600
+ const resolved = { ...params };
4601
+ if (resolved.project_id)
4602
+ resolved.project_id = resolveId(resolved.project_id, "projects");
4603
+ if (resolved.parent_id)
4604
+ resolved.parent_id = resolveId(resolved.parent_id);
4605
+ const task = createTask(resolved);
4601
4606
  return { content: [{ type: "text", text: `Task created:
4602
4607
  ${formatTask(task)}` }] };
4603
4608
  } catch (e) {
@@ -4618,7 +4623,10 @@ server.tool("list_tasks", "List tasks with optional filters", {
4618
4623
  tags: exports_external.array(exports_external.string()).optional().describe("Filter by tags (any match)")
4619
4624
  }, async (params) => {
4620
4625
  try {
4621
- const tasks = listTasks(params);
4626
+ const resolved = { ...params };
4627
+ if (resolved.project_id)
4628
+ resolved.project_id = resolveId(resolved.project_id, "projects");
4629
+ const tasks = listTasks(resolved);
4622
4630
  if (tasks.length === 0) {
4623
4631
  return { content: [{ type: "text", text: "No tasks found." }] };
4624
4632
  }
@@ -4852,7 +4860,8 @@ server.tool("search_tasks", "Full-text search across task titles, descriptions,
4852
4860
  project_id: exports_external.string().optional().describe("Limit to project")
4853
4861
  }, async ({ query, project_id }) => {
4854
4862
  try {
4855
- const tasks = searchTasks(query, project_id);
4863
+ const resolvedProjectId = project_id ? resolveId(project_id, "projects") : undefined;
4864
+ const tasks = searchTasks(query, resolvedProjectId);
4856
4865
  if (tasks.length === 0) {
4857
4866
  return { content: [{ type: "text", text: `No tasks matching "${query}".` }] };
4858
4867
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
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",