sdxloop 0.1.0__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.
- sdxloop-0.1.0/.gitignore +222 -0
- sdxloop-0.1.0/PKG-INFO +32 -0
- sdxloop-0.1.0/README.md +8 -0
- sdxloop-0.1.0/hatch_build.py +58 -0
- sdxloop-0.1.0/pyproject.toml +49 -0
- sdxloop-0.1.0/src/sdxloop/__init__.py +26 -0
- sdxloop-0.1.0/src/sdxloop/_vendor/sdxloop_worker-0.1.0-py3-none-any.whl +0 -0
- sdxloop-0.1.0/src/sdxloop/cli/__init__.py +1 -0
- sdxloop-0.1.0/src/sdxloop/cli/app.py +359 -0
- sdxloop-0.1.0/src/sdxloop/cli/doctor.py +145 -0
- sdxloop-0.1.0/src/sdxloop/cli/tui.py +129 -0
- sdxloop-0.1.0/src/sdxloop/config.py +180 -0
- sdxloop-0.1.0/src/sdxloop/engine/__init__.py +26 -0
- sdxloop-0.1.0/src/sdxloop/engine/engine.py +380 -0
- sdxloop-0.1.0/src/sdxloop/engine/model.py +151 -0
- sdxloop-0.1.0/src/sdxloop/engine/phases.py +223 -0
- sdxloop-0.1.0/src/sdxloop/engine/prompts/__init__.py +31 -0
- sdxloop-0.1.0/src/sdxloop/engine/prompts/decompose.md +41 -0
- sdxloop-0.1.0/src/sdxloop/engine/prompts/execute.md +31 -0
- sdxloop-0.1.0/src/sdxloop/engine/prompts/plan.md +35 -0
- sdxloop-0.1.0/src/sdxloop/engine/prompts/scrutinize.md +43 -0
- sdxloop-0.1.0/src/sdxloop/engine/prompts/validate.md +38 -0
- sdxloop-0.1.0/src/sdxloop/engine/store.py +257 -0
- sdxloop-0.1.0/src/sdxloop/errors.py +73 -0
- sdxloop-0.1.0/src/sdxloop/events.py +87 -0
- sdxloop-0.1.0/src/sdxloop/gh/__init__.py +6 -0
- sdxloop-0.1.0/src/sdxloop/gh/ops.py +140 -0
- sdxloop-0.1.0/src/sdxloop/gh/reporter.py +75 -0
- sdxloop-0.1.0/src/sdxloop/ids.py +35 -0
- sdxloop-0.1.0/src/sdxloop/py.typed +0 -0
- sdxloop-0.1.0/src/sdxloop/sbx/__init__.py +6 -0
- sdxloop-0.1.0/src/sdxloop/sbx/cli.py +210 -0
- sdxloop-0.1.0/src/sdxloop/sbx/models.py +83 -0
- sdxloop-0.1.0/src/sdxloop/sbx/pair.py +125 -0
- sdxloop-0.1.0/src/sdxloop/sbx/parse.py +67 -0
- sdxloop-0.1.0/src/sdxloop/sbx/provision.py +209 -0
- sdxloop-0.1.0/src/sdxloop/sbx/sandbox.py +70 -0
- sdxloop-0.1.0/src/sdxloop/worker/__init__.py +6 -0
- sdxloop-0.1.0/src/sdxloop/worker/client.py +260 -0
- sdxloop-0.1.0/src/sdxloop/worker/wheel.py +73 -0
sdxloop-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
|
|
220
|
+
# sdxloop
|
|
221
|
+
.sdxloop/
|
|
222
|
+
packages/sdxloop/src/sdxloop/_vendor/
|
sdxloop-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sdxloop
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Agentic loop orchestration on Docker Sandboxes (sbx) with isolated credential domains
|
|
5
|
+
Project-URL: Homepage, https://github.com/brettbergin/sdxloop
|
|
6
|
+
Project-URL: Repository, https://github.com/brettbergin/sdxloop
|
|
7
|
+
Project-URL: Issues, https://github.com/brettbergin/sdxloop/issues
|
|
8
|
+
Author: Brett Bergin
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: agents,copilot,docker,orchestration,sandbox
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Requires-Dist: pydantic>=2.7
|
|
20
|
+
Requires-Dist: rich>=13.7
|
|
21
|
+
Requires-Dist: sdxloop-worker==0.1.0
|
|
22
|
+
Requires-Dist: typer>=0.12
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# sdxloop
|
|
26
|
+
|
|
27
|
+
Agentic loop orchestration on Docker Sandboxes (`sbx`) with isolated credential
|
|
28
|
+
domains. This is the host-side orchestrator package: sandbox provisioning, the
|
|
29
|
+
loop engine, and the `sdxloop` CLI.
|
|
30
|
+
|
|
31
|
+
See the [project README](https://github.com/brettbergin/sdxloop) for full
|
|
32
|
+
documentation.
|
sdxloop-0.1.0/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# sdxloop
|
|
2
|
+
|
|
3
|
+
Agentic loop orchestration on Docker Sandboxes (`sbx`) with isolated credential
|
|
4
|
+
domains. This is the host-side orchestrator package: sandbox provisioning, the
|
|
5
|
+
loop engine, and the `sdxloop` CLI.
|
|
6
|
+
|
|
7
|
+
See the [project README](https://github.com/brettbergin/sdxloop) for full
|
|
8
|
+
documentation.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Hatch build hook: embed the sdxloop-worker wheel into the host package.
|
|
2
|
+
|
|
3
|
+
Provisioning must be able to install the worker into a sandbox even when
|
|
4
|
+
sdxloop-worker is not (yet) on PyPI, so the host wheel ships the worker wheel
|
|
5
|
+
as package data at ``sdxloop/_vendor/``.
|
|
6
|
+
|
|
7
|
+
Runs for both sdist and wheel targets. When building the wheel from an sdist
|
|
8
|
+
(as ``uv build`` does), the worker source tree is not available — but the
|
|
9
|
+
sdist already contains the vendored wheel built during the sdist pass, so the
|
|
10
|
+
hook detects it and skips rebuilding.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import subprocess
|
|
16
|
+
import sys
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from typing import Any
|
|
19
|
+
|
|
20
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class VendorWorkerWheelHook(BuildHookInterface): # type: ignore[type-arg]
|
|
24
|
+
PLUGIN_NAME = "vendor-worker-wheel"
|
|
25
|
+
|
|
26
|
+
def initialize(self, version: str, build_data: dict[str, Any]) -> None:
|
|
27
|
+
root = Path(self.root)
|
|
28
|
+
vendor_dir = root / "src" / "sdxloop" / "_vendor"
|
|
29
|
+
host_version = self.metadata.version
|
|
30
|
+
expected = f"sdxloop_worker-{host_version}-py3-none-any.whl"
|
|
31
|
+
|
|
32
|
+
if (vendor_dir / expected).is_file():
|
|
33
|
+
return
|
|
34
|
+
|
|
35
|
+
worker_root = root.parent / "sdxloop-worker"
|
|
36
|
+
if not (worker_root / "pyproject.toml").is_file():
|
|
37
|
+
raise RuntimeError(
|
|
38
|
+
f"cannot vendor worker wheel: {expected} not present and worker source "
|
|
39
|
+
f"not found at {worker_root}"
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
vendor_dir.mkdir(parents=True, exist_ok=True)
|
|
43
|
+
for stale in vendor_dir.glob("*.whl"):
|
|
44
|
+
stale.unlink()
|
|
45
|
+
|
|
46
|
+
subprocess.run(
|
|
47
|
+
[sys.executable, "-m", "hatchling", "build", "-t", "wheel", "-d", str(vendor_dir)],
|
|
48
|
+
cwd=worker_root,
|
|
49
|
+
check=True,
|
|
50
|
+
capture_output=True,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
if not (vendor_dir / expected).is_file():
|
|
54
|
+
built = [p.name for p in vendor_dir.glob("*.whl")]
|
|
55
|
+
raise RuntimeError(
|
|
56
|
+
f"worker wheel version mismatch: expected {expected}, built {built}. "
|
|
57
|
+
"sdxloop and sdxloop-worker versions must stay in lockstep."
|
|
58
|
+
)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "sdxloop"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Agentic loop orchestration on Docker Sandboxes (sbx) with isolated credential domains"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [{ name = "Brett Bergin" }]
|
|
9
|
+
keywords = ["agents", "sandbox", "docker", "copilot", "orchestration"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 3 - Alpha",
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Programming Language :: Python :: 3.11",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Typing :: Typed",
|
|
18
|
+
]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"pydantic>=2.7",
|
|
21
|
+
"typer>=0.12",
|
|
22
|
+
"rich>=13.7",
|
|
23
|
+
"sdxloop-worker==0.1.0",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
sdxloop = "sdxloop.cli.app:main"
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/brettbergin/sdxloop"
|
|
31
|
+
Repository = "https://github.com/brettbergin/sdxloop"
|
|
32
|
+
Issues = "https://github.com/brettbergin/sdxloop/issues"
|
|
33
|
+
|
|
34
|
+
[tool.uv.sources]
|
|
35
|
+
sdxloop-worker = { workspace = true }
|
|
36
|
+
|
|
37
|
+
[build-system]
|
|
38
|
+
requires = ["hatchling>=1.27"]
|
|
39
|
+
build-backend = "hatchling.build"
|
|
40
|
+
|
|
41
|
+
[tool.hatch.build.targets.wheel]
|
|
42
|
+
packages = ["src/sdxloop"]
|
|
43
|
+
artifacts = ["src/sdxloop/_vendor/*.whl"]
|
|
44
|
+
|
|
45
|
+
[tool.hatch.build.targets.sdist]
|
|
46
|
+
artifacts = ["src/sdxloop/_vendor/*.whl"]
|
|
47
|
+
|
|
48
|
+
[tool.hatch.build.hooks.custom]
|
|
49
|
+
path = "hatch_build.py"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""sdxloop — agentic loop orchestration on Docker Sandboxes (sbx).
|
|
2
|
+
|
|
3
|
+
Every sdxloop operation runs as a pair of isolated microVM sandboxes: an agent
|
|
4
|
+
sandbox holding only ``COPILOT_GITHUB_TOKEN`` for the GitHub Copilot SDK
|
|
5
|
+
agentic layer, and a GitHub-ops sandbox holding only ``GH_TOKEN`` for
|
|
6
|
+
user-facing GitHub interactions. The balanced network policy is the default.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
__version__ = "0.1.0"
|
|
10
|
+
|
|
11
|
+
from sdxloop.config import Budgets, Config, load_config
|
|
12
|
+
from sdxloop.engine import LoopEngine, RunResult, run_outcome
|
|
13
|
+
from sdxloop.events import Event, EventBus, Hook
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"Budgets",
|
|
17
|
+
"Config",
|
|
18
|
+
"Event",
|
|
19
|
+
"EventBus",
|
|
20
|
+
"Hook",
|
|
21
|
+
"LoopEngine",
|
|
22
|
+
"RunResult",
|
|
23
|
+
"__version__",
|
|
24
|
+
"load_config",
|
|
25
|
+
"run_outcome",
|
|
26
|
+
]
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""The sdxloop command-line interface."""
|