Show every waiting loop-claude in loop-inbox and take each one's answer there

This commit is contained in:
2026-10-28 23:24:29 +01:00
parent d13c4fb0db
commit a7fe878631
24 changed files with 938 additions and 81 deletions
+8 -6
View File
@@ -42,8 +42,9 @@ class Interrupting:
@dataclasses.dataclass(frozen=True)
class Talking:
"""The human answers in the worker's claude session, on the terminal."""
"""The human answers in the worker's claude session, on the terminal; question is what they were asked."""
transcript_path: str
question: str
quoted_answers: int = 0
@@ -81,12 +82,13 @@ class HumanTyped:
@dataclasses.dataclass(frozen=True)
class TalkChosen:
"""The human typed /talk, or the interrupt is for a release ready to cut."""
"""The human typed /talk at loop-claude's terminal, or the interrupt is for a release ready to cut."""
question: str
@dataclasses.dataclass(frozen=True)
class HumanTalked:
"""The human typed in the worker's claude session."""
"""The human typed in the worker's claude session, opened on loop-claude's terminal or in loop-inbox."""
@dataclasses.dataclass(frozen=True)
@@ -111,10 +113,10 @@ def transition(state: State, event: Event) -> State:
return Closing(transcript_path, verdict)
case Interrupting(_, _, quoted_answers, step_up), HumanTyped(typed):
return Working(typed, quoted_answers, step_up)
case Interrupting(transcript_path, _, quoted_answers), TalkChosen():
return Talking(transcript_path, quoted_answers)
case Interrupting(transcript_path, _, quoted_answers), TalkChosen(question):
return Talking(transcript_path, question, quoted_answers)
# The human worked in the worker's claude session, so the judge rules again on the transcript it leaves.
case Talking(transcript_path, quoted_answers), HumanTalked():
case Talking(transcript_path, _, quoted_answers) | Interrupting(transcript_path, _, quoted_answers), HumanTalked():
return Judging(transcript_path, quoted_answers)
case Closing(_, verdict), Archived():
return Ended(verdict)