cmpatino HF Staff Claude Opus 5.5 commited on
Commit
bd4a7bb
·
1 Parent(s): 8b9329d

world: serve a plain HTTP API without external world libraries

Browse files

The world now runs on its own small HTTP server (server.py, standard library)
with per-seat agent credentials from PYBOT_TOKEN_<seat> (Bearer or
X-World-Token): POST /v1/tools/<name> with flat arguments, the direct
GET /world/manifest and POST /world/tools/<name> routes with the
{"ok", ...} envelope, /healthz, and /metrics and /admin behind
PYBOT_ADMIN_TOKEN. Admission control (429 + Retry-After) and parked mode
are kept.

open_pr and run_bot take the agent's change as a workspace argument
{base_sha, patch} (patch only); a missing base is fetched from the Hub,
else the call fails with unknown_base. Tool schemas come from the tool
methods' type hints and docstrings (api.py). The lanes, state store and
process isolation are vendored; bucket snapshots use huggingface_hub
directly. requirements.txt lists only huggingface_hub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

19 files changed +2071 -1002
Files changed (19)
world/Dockerfile+6-12
world/api.pyAdded+372
world/entrypoint.sh+9-13
world/isolation.pyAdded+381
world/lanes.pyAdded+385
world/pybot.py+82-152
world/pytest.ini-2
world/repository.py+2-3
world/requirements.txt+1-660
world/sandbox.py+3-3
world/scripts/check-sidecar.py+2-2
world/scripts/smoke-local.py+24-27
world/server.pyAdded+323
world/snapshot.py+30-4
world/store.pyAdded+179
world/tests/conftest.py+19-1
world/tests/fixtures/seed-basic/CONTRIBUTING.md+7-8
world/tests/test_pybot.py+179-115
world/workspace.pyAdded+67