Decode the worker's stream leniently, name UserEntryKind's members only, and restore the section-headers decision's citation

This commit is contained in:
2026-09-28 16:28:43 +02:00
parent 72d04227f9
commit 9659f70efd
6 changed files with 24 additions and 20 deletions
+8 -8
View File
@@ -5,15 +5,15 @@ from loop_claude.outcome import Failure
class UserEntryKind(enum.Enum):
"""Who wrote a "user" entry: the human wrote HUMAN, Claude Code every other kind; the value is the tell."""
"""Who wrote a "user" entry: the human wrote HUMAN, Claude Code every other kind."""
COMMAND = "string content starting with <"
CTRL_C = "a text part starting with [Request interrupted"
EMPTY = "no content"
HUMAN = "typed by the human"
META = "isMeta"
NON_TEXT = "a part that is not text, such as a tool result"
SDK_PROMPT = "promptSource sdk: the claude -p prompt"
COMMAND = enum.auto()
CTRL_C = enum.auto()
EMPTY = enum.auto()
HUMAN = enum.auto()
META = enum.auto()
NON_TEXT = enum.auto()
SDK_PROMPT = enum.auto()
def read(path):