outerloop-science 0.1.0.dev0__py3-none-any.whl → 0.1.0.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- outerloop/__init__.py +7 -7
- outerloop/appauth.py +3 -3
- outerloop/appmanifest.py +16 -11
- outerloop/attempt.py +80 -52
- outerloop/cli.py +170 -86
- outerloop/climbboard.py +209 -4
- outerloop/compute.py +84 -7
- outerloop/contract.py +3 -2
- outerloop/followup.py +37 -23
- outerloop/github.py +4 -4
- outerloop/harness.py +18 -7
- outerloop/image.py +372 -0
- outerloop/init.py +417 -29
- outerloop/limits.py +1 -1
- outerloop/measure.py +2 -2
- outerloop/orchestrator.py +1 -1
- outerloop/paths.py +14 -1
- outerloop/review.py +1 -1
- outerloop/steward.py +3 -3
- outerloop/syscall.py +1 -0
- outerloop/tick.py +400 -105
- {outerloop_science-0.1.0.dev0.dist-info → outerloop_science-0.1.0.dev2.dist-info}/METADATA +14 -10
- {outerloop_science-0.1.0.dev0.dist-info → outerloop_science-0.1.0.dev2.dist-info}/RECORD +27 -26
- {outerloop_science-0.1.0.dev0.dist-info → outerloop_science-0.1.0.dev2.dist-info}/WHEEL +0 -0
- {outerloop_science-0.1.0.dev0.dist-info → outerloop_science-0.1.0.dev2.dist-info}/entry_points.txt +0 -0
- {outerloop_science-0.1.0.dev0.dist-info → outerloop_science-0.1.0.dev2.dist-info}/licenses/LICENSE +0 -0
- {outerloop_science-0.1.0.dev0.dist-info → outerloop_science-0.1.0.dev2.dist-info}/licenses/NOTICE +0 -0
outerloop/paths.py
CHANGED
|
@@ -9,9 +9,11 @@ dir if it exists, else the legacy dir if it exists, else the new dir.
|
|
|
9
9
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
|
+
import os
|
|
12
13
|
from pathlib import Path
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
# New name first; the pre-rename name is dropped in the release after 0.1.
|
|
16
|
+
CONFIG_DIR_NAMES: tuple[str, ...] = ("outerloop", "autoresearch")
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
def config_dir(home: Path | None = None) -> Path:
|
|
@@ -25,3 +27,14 @@ def config_dir(home: Path | None = None) -> Path:
|
|
|
25
27
|
|
|
26
28
|
CONFIG_DIR = config_dir()
|
|
27
29
|
ENV_FILE = CONFIG_DIR / ".env"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def write_private(path: Path, text: str) -> None:
|
|
33
|
+
"""Write `text` to `path` so no other user can read it at any moment: the
|
|
34
|
+
file is created (or truncated) with mode 0600 in the same call, and a file
|
|
35
|
+
that already existed has its mode forced to 0600 before the write."""
|
|
36
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
37
|
+
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
|
|
38
|
+
with os.fdopen(fd, "w") as fh:
|
|
39
|
+
os.fchmod(fd, 0o600)
|
|
40
|
+
fh.write(text)
|
outerloop/review.py
CHANGED
|
@@ -34,7 +34,7 @@ OPT_OUT_LABEL = label_name("no-review")
|
|
|
34
34
|
# One calm line: the mechanical defense against forged endorsements is the
|
|
35
35
|
# approval-language redaction in sanitize(), not header volume.
|
|
36
36
|
ADVISORY_HEADER = (
|
|
37
|
-
"*Advisory findings from `
|
|
37
|
+
"*Advisory findings from `outerloop` — the code owner decides. "
|
|
38
38
|
f"Reply to disagree; the `{OPT_OUT_LABEL}` label opts this PR out.*"
|
|
39
39
|
)
|
|
40
40
|
MAX_DIFF_CHARS = 200_000
|
outerloop/steward.py
CHANGED
|
@@ -43,7 +43,7 @@ from outerloop.github import (
|
|
|
43
43
|
bot_login_from_env,
|
|
44
44
|
is_own_login,
|
|
45
45
|
)
|
|
46
|
-
from outerloop.harness import Harness, budget_exhausted, outage, redact
|
|
46
|
+
from outerloop.harness import Harness, budget_exhausted, default_binary, outage, redact
|
|
47
47
|
from outerloop.intake import (
|
|
48
48
|
CLAIM_MARKER,
|
|
49
49
|
RELEASE_MARKER,
|
|
@@ -768,7 +768,7 @@ def main() -> int:
|
|
|
768
768
|
action="store_true",
|
|
769
769
|
help="run WITHOUT a container (dev only)",
|
|
770
770
|
)
|
|
771
|
-
parser.add_argument("--claude-bin", default=
|
|
771
|
+
parser.add_argument("--claude-bin", default=default_binary("claude"))
|
|
772
772
|
parser.add_argument("--model", default="claude-opus-5")
|
|
773
773
|
parser.add_argument("--max-turns", type=int, default=60)
|
|
774
774
|
parser.add_argument("--session-minutes", type=int, default=60)
|
|
@@ -777,7 +777,7 @@ def main() -> int:
|
|
|
777
777
|
parser.add_argument("--pat-file", default=str(CONFIG_DIR / "bot_pat"))
|
|
778
778
|
parser.add_argument(
|
|
779
779
|
"--github-app-file",
|
|
780
|
-
default=os.environ.get("
|
|
780
|
+
default=os.environ.get("OUTERLOOP_GITHUB_APP_FILE", ""),
|
|
781
781
|
help="GitHub App config (JSON: app_id, installation_id, private_key); "
|
|
782
782
|
"when set, installation tokens replace the PAT",
|
|
783
783
|
)
|
outerloop/syscall.py
CHANGED
|
@@ -50,6 +50,7 @@ from outerloop.compute import GONE
|
|
|
50
50
|
# workspace and the session's own memory of the path both predate the rename.
|
|
51
51
|
# `channel_dir(ws)` resolves per workspace: existing dir (new name first), else
|
|
52
52
|
# the new default. Every site keys off it, so a resumed run finds its own path.
|
|
53
|
+
# The pre-rename name is dropped in the release after 0.1.
|
|
53
54
|
CHANNEL_DIR_NAMES: tuple[str, ...] = (".outerloop", ".autoresearch")
|
|
54
55
|
SYSCALL_DIR = CHANNEL_DIR_NAMES[0] # the new default (a fresh clone installs this)
|
|
55
56
|
SYSCALL_FILE = "syscall.json"
|