cancelTask

abstract suspend fun cancelTask(context: Ctx, taskId: String, reason: String? = null): CancelTaskResponse

Requests cancellation of an active task.

Return

Response indicating if cancellation was requested or if the task was already terminal.

Parameters

context

Context for the request.

taskId

The ID of the task to cancel.

reason

Optional human-readable reason for cancellation.