Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s
CI / tests (pull_request) Successful in 6m34s
This commit is contained in:
@@ -11,12 +11,13 @@ plan. For a model off the routing ladder, the tool doesn't print anything on std
|
||||
naming the ladder's file, and exits 0; launch the subagent with no model or effort.
|
||||
|
||||
It reads the routing ladder of the project whose checkout it runs in: routing-ladder.json in the
|
||||
folder of the project's config, ~/.claude-projects/<key>/, or else the one this setup ships, as in
|
||||
folder of the project's config, ~/.config/build-release/<key>/, or else the one this setup ships, as in
|
||||
a checkout no config names. build-release --help shows the file's shape.
|
||||
|
||||
Exit 1, saying why, on bad arguments, or where the project's config or its routing ladder is faulty
|
||||
or cannot be read.
|
||||
"""
|
||||
from collections.abc import Mapping
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
@@ -37,7 +38,7 @@ def agent_args(ladder: Ladder, model: str, likelihood: int, planning: bool = Fal
|
||||
return (project.planning_rung if planning else project.worker_rung)(likelihood).agent_args()
|
||||
|
||||
|
||||
def main(argv: list[str], home: pathlib.Path) -> int:
|
||||
def main(argv: list[str], home: pathlib.Path, env: Mapping[str, str]) -> int:
|
||||
if argv[:1] in (["-h"], ["--help"]):
|
||||
print(__doc__.strip())
|
||||
return 0
|
||||
@@ -47,7 +48,7 @@ def main(argv: list[str], home: pathlib.Path) -> int:
|
||||
print(f"subagent-rung: cannot read the arguments{' ' + ' '.join(argv) if argv else ''}; {USAGE}", file=sys.stderr)
|
||||
return 1
|
||||
model, likelihood = operands
|
||||
file = project_ladder_file(None, home)
|
||||
file = project_ladder_file(None, home, env)
|
||||
ladder = file if isinstance(file, Failure) else read_ladder(file)
|
||||
if isinstance(ladder, Failure):
|
||||
print(f"subagent-rung: {ladder.reason}", file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user