import dataclasses import pathlib import typing from loop_effects.effects import Effects from loop_state.paths import Paths from claude_code.session import Session from agent_cycle.tmux import Window @dataclasses.dataclass(frozen=True) class Loop: """What stays the same through one run of loop-claude; run_loop builds it once per process, so a reload builds it afresh.""" # The checkout the loop runs in. LoopRun.root names it too, since a reload hands it on there. root: str # The worker's session. session: Session # The tmux window the loop runs in. window: Window paths: Paths env: typing.Mapping[str, str] # The loop-claude script, whose edits reload the loop and beside which chunk-preflight lies. launcher: pathlib.Path effects: Effects