Fold task state into one server field; add ready cancel and dismiss

This commit is contained in:
Ian Gulliver
2026-10-20 08:51:32 -07:00
parent 224a0d5a4b
commit e7724977c8
12 changed files with 506 additions and 388 deletions
+4 -1
View File
@@ -578,7 +578,7 @@ final class TranscriptBuilder {
if (ev.kind == "task.ready" || ev.kind == "task.discard_suggested") && sink == nil {
lastReady = row.id
}
if ev.kind == "inbox.created" && sink == nil {
if (ev.kind == "inbox.created" || ev.kind == "task.ready_cleared") && sink == nil {
lastReady = nil
}
put(row, keepHeld: ev.kind == "agent.thinking")
@@ -801,6 +801,9 @@ final class TranscriptBuilder {
case "task.discard_suggested":
return Row(.ready(when: when, md: parseMarkdown(jsString(p["reason"])), discard: true), taskId: taskId)
case "task.ready_cleared":
return note([.text(ev.actor == "agent" ? "the agent withdrew its ready call" : "\(ev.actor) dismissed the ready call")])
case "task.discard_started":
return note([.text("\(ev.actor) asked to discard the task; the agent writes the task summary first")])