Group of 4 Under the hood
Messages delivering queued command results now carry explicit turn/position context used for dedup, telemetry, and history
What
- The dedup/merge helper that delivers queued-command notifications into the transcript now takes a structured options object (
{startsTurn, inDrainPosition, inHumanTurn}) instead of positional booleans, used for bothtaskDeliveryon user messages andqueued_commandattachments. - The bash-task-delivery splicing logic now distinguishes a third structural outcome,
after_turn, in addition to the existingappend/new_turn, based on new position parameters; it's recorded in thetengu_bash_task_deliveredtelemetry event. - The logic that decides whether a message counts as a completed tool-result turn (for grouping/rendering) now also treats user messages carrying a
taskDeliveryfield as qualifying, not just ones withtool_resultcontent. - The check for whether a message counts toward rewind/history segmentation likewise now treats messages with a
taskDeliveryfield as eligible, not justtool_result-bearing ones.
Why These changes make messages that deliver queued command results behave consistently with normal tool-result messages for turn grouping, rewind/history, and telemetry, instead of being treated as a special case that could be miscounted or misplaced.