Skip to content

Task.completed

Emitted each time a Task is completed.

Task.complete emits Task.completed when it completes on a Task.

PropertyValue
Emitted byTask.complete
NounTask
WakesNone.

Payload

Each delivery is an Event record. data holds what Task.complete returns.

FieldTypeRequiredDescription
namestringrequiredTask.completed.
atdatetimerequiredWhen it happened.
seqintegerIts position in the namespace, one more than the Event before; any seq is a cursor into the history.
datajsonrequiredThe Thing as the Action left it.
data.taskTaskrequiredThe completed Task.
data.task.statusstringrequiredOne of pending, done, failed, canceled, or refused.
data.task.reasonstringWhy a pending Action waits: queued, running, retrying, awaitingWorker, awaitingInput, awaitingSource, awaitingAction, or awaitingTime.
data.task.modestringrequiredHow the caller invoked it: try, send, or do.
data.task.byWorkerThe Worker that performed it.
data.task.forPartyThe Party it was done on behalf of.
data.task.viastringThe Interface or request it arrived through.
data.task.onstringThe Action or Event that caused it, such as the failed attempt a retry follows.
data.task.thingstringThe record, at the Version the Action was decided against.
data.task.inputjsonThe input it was called with.
data.task.createdAtdatetimeWhen it was called.
data.task.reservedmoneyThe most this Action may cost, held against its Limits from the check until it settles, billed misses included.
data.task.duedatetimeWhen the Task is due.
data.task.priorityintegerIts rank in the inbox, highest first.
data.task.recurrencestringThe schedule a recurring duty repeats on.

Example

JSON
{
  "$id": "https://api.sb/routewise.dev/events/event_1",
  "$type": "Event",
  "name": "Task.completed",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "task": {
      "$id": "https://api.sb/routewise.dev/tasks/task_1",
      "$type": "Task",
      "status": "pending",
      "reason": "queued",
      "mode": "try",
      "by": "worker_1",
      "for": "party_1",
      "via": "API",
      "on": "Invoice.overdue",
      "thing": "invoice_1@v3",
      "input": {},
      "createdAt": "2026-10-22T12:00:00Z",
      "reserved": {
        "amount": 25,
        "currency": "USD"
      },
      "due": "2026-10-22T12:00:00Z",
      "priority": 1,
      "recurrence": "Weekly on Friday"
    }
  },
  "seq": 1
}