Answer architecture round 1: 0 🔴, 3 🟡; type Effects.git, list the guards one per line, say how code_of guesses the worktree

This commit is contained in:
2026-10-21 19:44:18 +02:00
parent a261669735
commit 8bee9cb765
5 changed files with 26 additions and 9 deletions
+7 -2
View File
@@ -13,6 +13,12 @@ import git_repo
PYTHON_TIMEOUT = 600
class Git(typing.Protocol):
"""Runs git in cwd, as git_repo.git does."""
def __call__(self, *args: str, cwd: str) -> str | Failure: ...
class Streaming(typing.Protocol):
"""A started claude whose stream-json lines arrive as it works."""
@@ -28,8 +34,7 @@ class Effects:
# Drops what was typed on the terminal and not yet read.
discard_typed: typing.Callable[[], None]
execv: typing.Callable[[str, list[str]], None]
# Runs git as git_repo.git does.
git: typing.Callable[..., str | Failure]
git: Git
input: typing.Callable[[str], str]
local_time: typing.Callable[[float], str]
now: typing.Callable[[], float]