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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user