| File | Role |
|---|---|
teaagent/sandbox/__init__.py |
Package init, re-exports |
teaagent/sandbox/_git_branch.py |
Git branch isolation: GitSandboxResult, is_git_repository, stash_save, create_sandbox_branch, merge_sandbox_branch |
teaagent/sandbox/_os_sandbox.py |
OS-level sandbox using seccomp/landlock |
teaagent/sandbox/_parallel_experiment.py |
A/B parallel experiment framework |
teaagent/sandbox/_vfs_sandbox.py |
VFS copy-on-write overlay |
teaagent/git_sandbox.py |
Legacy git sandbox adapter (wraps sandbox/_git_branch.py) |
teaagent/docker_sandbox.py |
DockerSandbox — runs skill code in Docker containers |
GitSandboxResult— frozen dataclass:success,branch_name,original_branch,error,stash_id,has_conflicts,conflicted_filesis_git_repository(root) -> boolis_worktree_clean(root) -> boolstash_save(root, label) -> Optional[str]— returns stash ref likestash@{0}create_sandbox_branch(root, prefix?) -> GitSandboxResultmerge_sandbox_branch(root, branch_name, *, stash_id?) -> GitSandboxResultcleanup_sandbox_branch(root, branch_name) -> None
sandbox/_git_branch.py
└── stdlib: subprocess, threading, json, pathlib
sandbox/_os_sandbox.py
└── (platform-specific: seccomp, landlock)
docker_sandbox.py
└── teaagent.skill_router (SandboxType)
runner/_core.py— optionally wraps run increate_sandbox_branchwhen--sandbox=gitflag usedskill_executor.py— usesDockerSandboxfor Docker-isolated skill executioncli/_handlers/_sandbox.py—sandbox_*CLI commands
runner._core (with git sandbox)
create_sandbox_branch(root)
[agent runs, writes to sandbox branch]
merge_sandbox_branch(root, branch_name)
└── subprocess: git merge
cleanup_sandbox_branch(root, branch_name)
skill_executor
DockerSandbox.run(code, payload)
└── subprocess: docker run