Name loop_claude's modules and words by what each holds, explain the reload, and tie each exit-1 clause of --help to its Stop

This commit is contained in:
2026-10-02 08:42:29 +02:00
parent dc844030fa
commit 211524196b
27 changed files with 212 additions and 165 deletions
+5 -3
View File
@@ -1,8 +1,10 @@
from loop_claude.claude_code.formats import assistant_parts, ends_stream, parse
from loop_claude.claude_code.entries import assistant_parts, ends_stream, parse
from loop_claude.claude_code.session import Session
from loop_claude.claude_code.transcript import part_line
from loop_claude.effects import Effects
from loop_claude.outcome import Failure
from loop_claude.failure import Failure
PRINTED_TOOL_INPUT = 160
def run_worker(root: str, args: list[str], effects: Effects) -> Failure | None:
@@ -15,7 +17,7 @@ def run_worker(root: str, args: list[str], effects: Effects) -> Failure | None:
event = parse(raw) or {}
done = done or ends_stream(event)
for part in assistant_parts(event):
if line := part_line(part, 160):
if line := part_line(part, PRINTED_TOOL_INPUT):
print(line, flush=True)
code = proc.wait()
if code < 0: