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/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
- CONFIG_DIR_NAMES: tuple[str, ...] = ("outerloop", "autoresearch") # new first
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 `autoresearch` — the code owner decides. "
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=os.path.expanduser("~/.local/bin/claude"))
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("AUTORESEARCH_GITHUB_APP_FILE", ""),
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"