generated from coulomb/repo-seed
feat: add State Hub bulk status skill
This commit is contained in:
@@ -633,6 +633,34 @@ def update_task_status(
|
||||
return _json_result(task)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def bulk_update_task_statuses(
|
||||
updates: list[dict[str, Any]],
|
||||
author: str | None = "custodian",
|
||||
session_id: str | None = None,
|
||||
) -> str:
|
||||
"""Update many task statuses in one call and emit one progress_event per task.
|
||||
|
||||
Args:
|
||||
updates: list of {task_id, status, blocking_reason?}; status values are
|
||||
wait | todo | progress | done | cancel
|
||||
author: optional progress event author (defaults to custodian)
|
||||
session_id: optional agent session identifier for progress events
|
||||
"""
|
||||
result = _post("/tasks/bulk-status-sync", {
|
||||
"updates": updates,
|
||||
"author": author,
|
||||
"session_id": session_id,
|
||||
})
|
||||
if error := _response_error(
|
||||
"bulk_update_task_statuses",
|
||||
result,
|
||||
("updated", "progress_event_ids"),
|
||||
):
|
||||
return _json_result(error)
|
||||
return _json_result(result)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def flag_for_human(task_id: str, note: str) -> str:
|
||||
"""Flag a task as requiring human intervention.
|
||||
|
||||
Reference in New Issue
Block a user