open-swe/agent
Adam Moussa 532788d409
refactor: adopt graphs/runtime/providers shims + retarget langgraph.json
Part of the domain-reorg adoption (build plan step C3): fork content,
upstream layout. Adds agent/graphs/{agent,analyzer,chat,reviewer,
scheduler}.py as thin re-export shims delegating to the existing fork
graph factories (agent.server/analyzer/chat/reviewer/scheduler), plus
agent/providers/__init__.py re-exporting agent.utils.model's
make_model/provider_model_kwargs/fallback_model_id_for surface —
verbatim upstream content, verified each import resolves against fork
modules with no name changes needed.

agent/runtime/{constants,execution}.py deviate from upstream's
verbatim shim bodies: rather than duplicating DEFAULT_LLM_MODEL_ID/
DEFAULT_LLM_MAX_TOKENS/DEFAULT_RECURSION_LIMIT/MODEL_CALL_RECURSION_LIMIT
and graph_loaded_for_execution's logic (upstream's shims assume
agent/server.py already had these extracted into runtime/ modules,
which is out of this commit's scope — server.py is untouched), they
import the fork's existing agent.server attributes directly. This
keeps the values/logic single-sourced instead of forking a second
copy that could drift.

agent/runtime/sandbox.py's delegation targets also differ from
upstream: fork's sandbox lifecycle helpers are private
(_get_cached_sandbox_backend, _configure_git_identity,
_recreate_sandbox in agent/server.py) since the fork's sync
4-case `__creating__` sentinel design (AGENTS.md) never made them
public. get_cached_sandbox_backend() also drops upstream's
caller-supplied `reconnect` callback parameter — fork's
_get_cached_sandbox_backend is a plain cache lookup; reconnection is
handled internally by ensure_sandbox_for_thread/
check_or_recreate_sandbox, not via a passed-in callback. No other
signature changes.

Added fork-only agent/graphs/ci_monitor.py (delegates to
agent.ci_monitor:get_ci_monitor) for symmetry, since upstream deleted
its ci-autofix cluster and has no equivalent shim. langgraph.json's
five stock graph entrypoints plus the fork-only ci_monitor now all
point at agent.graphs.<name>; http.app stays agent.webapp:app
(unchanged, per plan).

Deliberately NOT included (owned by build plan step C4, the FastAPI
split, gated on /sh-security-review): agent/api/{__init__,app,
health}.py, agent/webhooks/common.py, and the three
agent/webhooks/{github,linear,slack}_routes.py files. Those aren't
thin structural shims like the 21-file list implies in isolation —
they carry the fork's actual webhook dispatch/verify logic split out
of the still-monolithic webapp.py, which hasn't happened yet.
Building them now against upstream's placeholder content would ship
incomplete auth surface that C4 would just discard and redo.

Pinned oven-sh/setup-bun's bun-version to 1.3.14 (the version
installed locally; ui/ has no .bun-version file or package.json
engines/packageManager field pinning one) across all three CI jobs
that install bun, removing the latest-resolution flake.

Gates: ruff check + ruff format --check (clean), pytest --co -q
(1637 collected, no import errors), a direct import smoke-test of
every new module's public symbols, and a make dev boot check —
langgraph dev registered all six graphs (agent, reviewer, analyzer,
chat, scheduler, ci_monitor) each importing from agent.graphs.*, and
loaded the custom app from agent.webapp:app, before the process was
killed. (The subsequent lifespan failure, "DEFAULT_SANDBOX_SNAPSHOT_ID
must be set when SANDBOX_TYPE=langsmith", is expected with no .env
secrets configured in this environment and unrelated to this commit.)
2026-07-17 13:57:20 -04:00
..
dashboard refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
graphs refactor: adopt graphs/runtime/providers shims + retarget langgraph.json 2026-07-17 13:57:20 -04:00
integrations feat(open-swe): add E2B sandbox provider (port of upstream 48217b68, #1489) (#199) 2026-07-16 18:23:42 -04:00
middleware refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
providers refactor: adopt graphs/runtime/providers shims + retarget langgraph.json 2026-07-17 13:57:20 -04:00
resources refactor: move docs/resources/assets to domain layout 2026-07-17 13:45:39 -04:00
review refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
runtime refactor: adopt graphs/runtime/providers shims + retarget langgraph.json 2026-07-17 13:57:20 -04:00
skills feat: outcomes dataset + bootstrap/continual split via skills (#1365) 2026-06-01 13:25:12 -07:00
tools refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
utils refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
webhooks refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
analyzer.py refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
chat.py feat(open-swe): re-add Fable 5 behind an admin toggle (Bedrock) (#172) 2026-07-10 14:05:20 -04:00
ci_autofix.py refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
ci_monitor.py feat: CI auto-fix and PR babysitting for agent PRs (#1530) 2026-06-15 13:53:50 -07:00
completion.py feat: Jira + Confluence integration (tools + triggers) (#182) 2026-07-13 19:45:54 -04:00
dispatch.py feat: port durable dispatch hardening and startup latency improvements (#160) 2026-07-09 17:11:25 -04:00
encryption.py feat: support TOKEN_ENCRYPTION_KEY rotation via MultiFernet [closes AB-2323] (#1275) 2026-05-08 14:29:23 -07:00
prompt.py refactor: move docs/resources/assets to domain layout 2026-07-17 13:45:39 -04:00
reconcile.py refactor: adopt modular webhook architecture (#1621) + port fork customizations (#85) 2026-06-30 18:46:46 -04:00
reviewer.py refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00
scheduler.py refactor: adopt modular webhook architecture (#1621) + port fork customizations (#85) 2026-06-30 18:46:46 -04:00
server.py feat: Jira + Confluence integration (tools + triggers) (#182) 2026-07-13 19:45:54 -04:00
webapp.py refactor: consolidate reviewer modules into agent/review/ 2026-07-17 13:52:03 -04:00