feat(python/omp-rpc): added blocker field and blocked status to todo items
- Add blocked todo status and optional blocker attribute to todo items. - Update RPC client and worker serialization logic to support todo blockers. - Add test coverage for parsing session state with blocked todos.
This commit is contained in:
@@ -176,6 +176,37 @@ class ProtocolParsingTests(unittest.TestCase):
|
||||
self.assertEqual(notification.todos[0].content, "Map tools")
|
||||
self.assertEqual(notification.todos[0].status, "pending")
|
||||
|
||||
def test_parse_session_state_accepts_blocked_todo(self) -> None:
|
||||
# Regression: the TS agent added a `blocked` todo status (with a
|
||||
# `blocker` note); resuming a session whose todos were blocked must
|
||||
# not fail state parsing.
|
||||
state = parse_session_state(
|
||||
{
|
||||
"sessionId": "session-123",
|
||||
"steeringMode": "one-at-a-time",
|
||||
"followUpMode": "one-at-a-time",
|
||||
"interruptMode": "immediate",
|
||||
"todoPhases": [
|
||||
{
|
||||
"id": "phase-1",
|
||||
"name": "Fix",
|
||||
"tasks": [
|
||||
{
|
||||
"id": "task-1",
|
||||
"content": "Open PR",
|
||||
"status": "blocked",
|
||||
"blocker": "waiting on maintainer go-ahead",
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
task = state.todo_phases[0].tasks[0]
|
||||
self.assertEqual(task.status, "blocked")
|
||||
self.assertEqual(task.blocker, "waiting on maintainer go-ahead")
|
||||
|
||||
def test_assistant_text_excludes_thinking_by_default(self) -> None:
|
||||
message = {
|
||||
"role": "assistant",
|
||||
|
||||
Reference in New Issue
Block a user