diff options
| author | t <t@tjp.lol> | 2026-09-01 12:00:53 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-09-02 08:30:29 -0600 |
| commit | 9d6b9a68f3df389a68b6b2cd69d17e01b81024dd (patch) | |
| tree | 24e921ac74663ed0c14534be276dc2a85c403bc9 /_selfcheck.lua | |
| parent | 04791c3273ab7076cc53f146d7751670d86c5c9b (diff) | |
Track foreground turns and balanced background-work events independently so
Herdr only reports idle after the primary and every background task settle.
Diffstat (limited to '_selfcheck.lua')
| -rw-r--r-- | _selfcheck.lua | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/_selfcheck.lua b/_selfcheck.lua index 08df12c..cb479d6 100644 --- a/_selfcheck.lua +++ b/_selfcheck.lua @@ -50,7 +50,12 @@ events.user_message() events.user_message() events.tool_details({ tool_name = "read" }) events.assistant_text() -events.assistant_text_complete() +events.background_work_start() +events.turn_end() +events.agent_submission() +events.background_work_end() +events.assistant_text() +events.turn_end() events.session_end() -- A new process in the same pane/source must outrank the old process's final @@ -61,15 +66,18 @@ entry.activate() events.session_start() events.assistant_text() events.session_ready() +events.turn_end() -assert(#reports == 9) +assert(#reports == 12) assert(reports[1].command == "herdr") assert(table.concat(reports[1].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state idle --seq 100000001") assert(table.concat(reports[3].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state working --seq 100000003 --message tool:read") -assert(table.concat(reports[5].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state idle --seq 100000005") -assert(table.concat(reports[6].args, " ") == "pane release-agent w1:p1 --source panto:extension --agent panto --seq 100000006") -assert(table.concat(reports[7].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state idle --seq 101000001") -assert(table.concat(reports[8].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state working --seq 101000002 --message responding") -assert(table.concat(reports[9].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state idle --seq 101000003") +assert(table.concat(reports[5].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state working --seq 100000005 --message background") +assert(table.concat(reports[6].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state working --seq 100000006 --message thinking") +assert(table.concat(reports[8].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state idle --seq 100000008") +assert(table.concat(reports[9].args, " ") == "pane release-agent w1:p1 --source panto:extension --agent panto --seq 100000009") +assert(table.concat(reports[10].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state idle --seq 101000001") +assert(table.concat(reports[11].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state working --seq 101000002 --message responding") +assert(table.concat(reports[12].args, " ") == "pane report-agent w1:p1 --source panto:extension --agent panto --state idle --seq 101000003") print("panto-herdr self-check: ok") |
