sbxloop 0.4.1__tar.gz → 0.4.3__tar.gz
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.
- {sbxloop-0.4.1 → sbxloop-0.4.3}/PKG-INFO +1 -1
- sbxloop-0.4.1/src/sbxloop/_vendor/sbxloop_worker-0.4.1-py3-none-any.whl → sbxloop-0.4.3/src/sbxloop/_vendor/sbxloop_worker-0.4.3-py3-none-any.whl +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/_version.py +2 -2
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/cli/tui.py +15 -3
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/engine.py +3 -1
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/worker/client.py +38 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/.gitignore +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/README.md +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/hatch_build.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/pyproject.toml +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/__init__.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/cli/__init__.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/cli/app.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/cli/doctor.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/config.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/deliver.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/__init__.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/model.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/phases.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/prompts/__init__.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/prompts/decompose.md +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/prompts/execute.md +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/prompts/plan.md +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/prompts/scrutinize.md +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/prompts/validate.md +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/engine/store.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/errors.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/events.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/gh/__init__.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/gh/ops.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/gh/reporter.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/ids.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/py.typed +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/sbx/__init__.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/sbx/cli.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/sbx/models.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/sbx/pair.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/sbx/parse.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/sbx/provision.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/sbx/sandbox.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/worker/__init__.py +0 -0
- {sbxloop-0.4.1 → sbxloop-0.4.3}/src/sbxloop/worker/wheel.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sbxloop
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Agentic loop orchestration on Docker Sandboxes (sbx) with isolated credential domains
|
|
5
5
|
Project-URL: Homepage, https://github.com/brettbergin/sbxloop
|
|
6
6
|
Project-URL: Repository, https://github.com/brettbergin/sbxloop
|
|
Binary file
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.4.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 4,
|
|
21
|
+
__version__ = version = '0.4.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 4, 3)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -116,14 +116,22 @@ def render_event(event: Event) -> RenderableType | None:
|
|
|
116
116
|
tool = data.get("tool") or "tool"
|
|
117
117
|
success = data.get("success")
|
|
118
118
|
exit_code = data.get("exit_code")
|
|
119
|
-
|
|
119
|
+
error = str(data.get("error") or "").strip()
|
|
120
|
+
if success is None and exit_code is None and not error:
|
|
120
121
|
return None # nothing informative beyond the start line
|
|
121
|
-
if success or (success is None and exit_code == 0):
|
|
122
|
+
if success or (success is None and exit_code == 0 and not error):
|
|
122
123
|
suffix = " exit 0" if exit_code == 0 else ""
|
|
123
124
|
return Text(f"{_stamp(event)} ✓ {tool}{suffix}", style="green dim")
|
|
124
125
|
suffix = f" exit {exit_code}" if exit_code is not None else ""
|
|
125
126
|
failure = Text(f"{_stamp(event)} ✗ {tool}{suffix}", style="red")
|
|
126
|
-
|
|
127
|
+
args = _one_line(str(data.get("args") or ""))
|
|
128
|
+
if args:
|
|
129
|
+
failure.append(" $ ", style="bold red")
|
|
130
|
+
failure.append(args, style="red dim")
|
|
131
|
+
failure.overflow = "fold"
|
|
132
|
+
# Failed executions carry the reason in `error` (the SDK omits
|
|
133
|
+
# `output` on failure); prefer real output when both exist.
|
|
134
|
+
tail = str(data.get("output") or "").strip() or error
|
|
127
135
|
if tail:
|
|
128
136
|
return Group(
|
|
129
137
|
failure,
|
|
@@ -224,13 +232,17 @@ def format_event(event: Event) -> str:
|
|
|
224
232
|
if event.data.get("task_id"):
|
|
225
233
|
parts.append(f"[{event.data['task_id']}]")
|
|
226
234
|
keys = ("state", "content", "tool", "op", "line", "message", "outcome", "error", "url", "path")
|
|
235
|
+
picked = ""
|
|
227
236
|
for key in keys:
|
|
228
237
|
if event.data.get(key):
|
|
238
|
+
picked = key
|
|
229
239
|
value = str(event.data[key]).replace("\n", " ")
|
|
230
240
|
parts.append(value[:160])
|
|
231
241
|
break
|
|
232
242
|
if event.data.get("args"):
|
|
233
243
|
parts.append(_one_line(str(event.data["args"]), 120))
|
|
244
|
+
if picked != "error" and event.data.get("error"):
|
|
245
|
+
parts.append(_one_line(str(event.data["error"]), 160))
|
|
234
246
|
return " ".join(parts)
|
|
235
247
|
|
|
236
248
|
|
|
@@ -134,7 +134,9 @@ class LoopEngine:
|
|
|
134
134
|
else None
|
|
135
135
|
)
|
|
136
136
|
if self.install_workers:
|
|
137
|
-
agent
|
|
137
|
+
# ensure_dev_tools: the agent builds projects in this VM
|
|
138
|
+
# (venvs, pip) — the github sandbox only runs API ops.
|
|
139
|
+
agent.install(extras="copilot", ensure_dev_tools=True)
|
|
138
140
|
if github is not None:
|
|
139
141
|
github.install(extras="")
|
|
140
142
|
detach = self._attach_reporter(github, run_id)
|
|
@@ -79,6 +79,7 @@ class WorkerClient:
|
|
|
79
79
|
timeout: float = 600.0,
|
|
80
80
|
no_deps: bool = False,
|
|
81
81
|
system_site_packages: bool = False,
|
|
82
|
+
ensure_dev_tools: bool = False,
|
|
82
83
|
) -> None:
|
|
83
84
|
"""Install sbxloop-worker into the sandbox, venv-first with fallbacks.
|
|
84
85
|
|
|
@@ -98,7 +99,13 @@ class WorkerClient:
|
|
|
98
99
|
``no_deps``/``system_site_packages`` are test seams for hermetic
|
|
99
100
|
installs; production uses full dependency resolution (PyPI is
|
|
100
101
|
reachable under the balanced network policy).
|
|
102
|
+
|
|
103
|
+
``ensure_dev_tools`` additionally makes the sandbox dev-ready for
|
|
104
|
+
the AGENT's own work (see _ensure_dev_tools) — the engine sets it
|
|
105
|
+
for the agent sandbox only.
|
|
101
106
|
"""
|
|
107
|
+
if ensure_dev_tools:
|
|
108
|
+
self._ensure_dev_tools(timeout)
|
|
102
109
|
wheel = wheel if wheel is not None else resolve_worker_wheel()
|
|
103
110
|
if wheel is not None:
|
|
104
111
|
staged = f"{STAGED_WHEEL_DIR}/{wheel.name}"
|
|
@@ -153,6 +160,37 @@ class WorkerClient:
|
|
|
153
160
|
f"(rc={smoke.returncode}, expected 64): {_output_tail(smoke)}"
|
|
154
161
|
)
|
|
155
162
|
|
|
163
|
+
def _ensure_dev_tools(self, timeout: float) -> None:
|
|
164
|
+
"""Best-effort: make the sandbox dev-ready for the agent's own work.
|
|
165
|
+
|
|
166
|
+
Field failure (0.4.0): templates ship a system python without
|
|
167
|
+
ensurepip. The worker self-heals its OWN venv (the ladder below),
|
|
168
|
+
but when that apt heal silently fails the worker still succeeds via
|
|
169
|
+
the user-site fallback — leaving python3-venv missing, so the
|
|
170
|
+
AGENT's `python3 -m venv` for the project it is building dies with
|
|
171
|
+
"ensurepip is not available" on every revision until the budget
|
|
172
|
+
exhausts. Install the venv/pip packages up front, unconditionally
|
|
173
|
+
(a fast no-op when the template already has them), and WARN loudly
|
|
174
|
+
on failure instead of ignoring it. Never fatal: worker installation
|
|
175
|
+
has its own ladder, and the agent may not need venvs at all.
|
|
176
|
+
"""
|
|
177
|
+
result = self.sandbox.exec(
|
|
178
|
+
[
|
|
179
|
+
"sh",
|
|
180
|
+
"-c",
|
|
181
|
+
"sudo -n apt-get update -q && "
|
|
182
|
+
"sudo -n apt-get install -y -q python3-venv python3-pip",
|
|
183
|
+
],
|
|
184
|
+
timeout=timeout,
|
|
185
|
+
)
|
|
186
|
+
if not result.ok:
|
|
187
|
+
logger.warning(
|
|
188
|
+
"dev-tools ensure failed (rc=%s) — the agent's own venv/pip use "
|
|
189
|
+
"may fail with 'ensurepip is not available': %s",
|
|
190
|
+
result.returncode,
|
|
191
|
+
_output_tail(result),
|
|
192
|
+
)
|
|
193
|
+
|
|
156
194
|
def _create_venv(self, timeout: float, system_site_packages: bool) -> bool:
|
|
157
195
|
venv_cmd = ["python3", "-m", "venv"]
|
|
158
196
|
if system_site_packages:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|