feat: due_date, assignee_ids, list_id for create_task/update_task (v0.4.14)

- create_task: new optional params due_date (ISO 8601) and assignee_ids (list[str])
- update_task: new optional params due_date, assignee_ids, and list_id (move task)
- get_tasks: returns due_date and assignee_ids fields per task
- API params verified via FW_DEBUG=1: dueDate, assignee, taskListId
- SPEC.md, README, CLAUDE.md updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 09:01:04 +02:00
parent 1ab410621c
commit 4411e6d93e
6 changed files with 62 additions and 17 deletions
+38 -4
View File
@@ -326,6 +326,8 @@ def get_tasks(list_id: str, only_open: bool = True):
"description": task.get("description"),
"completed": completed,
"category_id": task.get("taskCategoryId"),
"due_date": task.get("dueDate"),
"assignee_ids": task.get("assigneeIds") or [],
}
)
@@ -676,6 +678,8 @@ def create_task(
text: str,
description: str | None = None,
category_id: str | None = None,
due_date: str | None = None,
assignee_ids: list[str] | None = None,
) -> str:
"""Create a new task in the given list.
@@ -688,6 +692,9 @@ def create_task(
category_id: Optional category metaId from get_categories
(e.g. ``taskCategory/23431854_200``). Only meaningful for
shopping lists; ignored for TODO lists.
due_date: Optional due date in ISO 8601 format (e.g. ``"2026-04-30T18:00:00"``).
assignee_ids: Optional list of member IDs from get_members to assign the task
(e.g. ``["23431898"]``). Empty list assigns to nobody.
Returns:
JSON with the new task's metaId on success, or an error message.
@@ -697,6 +704,10 @@ def create_task(
params["description"] = description
if category_id:
params["taskCategoryId"] = category_id
if due_date is not None:
params["dueDate"] = due_date
if assignee_ids is not None:
params["assignee"] = assignee_ids if assignee_ids else ""
try:
data = _authenticated_call("taskcreate2", params)
@@ -728,11 +739,14 @@ def update_task(
text: str | None = None,
description: str | None = None,
category_id: str | None = None,
due_date: str | None = None,
assignee_ids: list[str] | None = None,
list_id: str | None = None,
) -> str:
"""Update the text, description, and/or category of an existing task.
"""Update an existing task's fields.
IMPORTANT: Ask the user for confirmation before calling this tool.
At least one of *text*, *description*, or *category_id* must be provided.
At least one parameter besides *task_id* must be provided.
Args:
task_id: Task metaId from get_tasks.
@@ -741,12 +755,26 @@ def update_task(
category_id: New category metaId from get_categories
(e.g. ``taskCategory/23431854_200``). Only meaningful for
shopping lists; ignored for TODO lists.
due_date: New due date in ISO 8601 format (e.g. ``"2026-04-30T18:00:00"``).
Omit to leave unchanged.
assignee_ids: New list of member IDs from get_members (e.g. ``["23431898"]``).
Pass an empty list to remove all assignees. Omit to leave unchanged.
list_id: Move the task to a different list by providing the target list ID
from get_lists (e.g. ``"taskList/23431854_29740942"``). Omit to keep in
current list.
Returns:
JSON success indicator or an error message.
"""
if text is None and description is None and category_id is None:
return "Error: At least one of 'text', 'description', or 'category_id' must be provided."
if (
text is None
and description is None
and category_id is None
and due_date is None
and assignee_ids is None
and list_id is None
):
return "Error: At least one of 'text', 'description', 'category_id', 'due_date', 'assignee_ids', or 'list_id' must be provided."
params: dict[str, Any] = {"metaId": task_id}
if text is not None:
@@ -755,6 +783,12 @@ def update_task(
params["description"] = description
if category_id is not None:
params["taskCategoryId"] = category_id
if due_date is not None:
params["dueDate"] = due_date
if assignee_ids is not None:
params["assignee"] = assignee_ids if assignee_ids else ""
if list_id is not None:
params["taskListId"] = list_id
try:
_authenticated_call("taskupdate2", params)