50 std::filesystem::path
path;
155 const std::string& delegation_id,
156 std::optional<SandboxInfo> chain_from = std::nullopt);
201 const std::string& delegation_id,
202 const std::string& patch);
224 bool ensure_base_snapshot();
238 bool snapshot_tree(
const std::filesystem::path& source,
239 const std::filesystem::path& target);
253 bool path_in_session_base(
const std::filesystem::path& p)
const;
260 void safe_remove(
const std::filesystem::path& p);
266 void prune_stale_sessions();
268 std::filesystem::path project_dir_;
269 std::string session_id_;
270 std::filesystem::path session_base_;
271 std::filesystem::path base_dir_;
272 bool base_ready_ =
false;
298 const std::filesystem::path& path,
void* user_data);
310 const std::filesystem::path& sandbox_path,
311 const std::filesystem::path& original_path);
325 std::filesystem::path original_path_;
Create, finalize, and discard per-delegation filesystem sandboxes.
const std::filesystem::path & session_base() const
Get this session's sandbox base directory.
void discard_sandbox(const SandboxInfo &info)
Remove a sandbox directory.
std::optional< SandboxResult > finalize_sandbox(const SandboxInfo &info)
Produce the final patch artifact for a sandbox.
std::optional< SandboxInfo > create_sandbox(const std::string &delegation_id, std::optional< SandboxInfo > chain_from=std::nullopt)
Create a new delegation sandbox.
~SandboxManager()
Remove this session's sandbox tree.
std::optional< std::filesystem::path > write_pending_patch(const std::string &delegation_id, const std::string &patch)
Write a patch to the session's pending/ directory.
const std::filesystem::path & project_dir() const
Get the project directory this manager snapshots from.
RAII directory swapper for sandbox-scoped tool execution.
~ScopedSandbox()
Restore the original directory.
void(*)(const std::filesystem::path &path, void *user_data) SwapDirFn
Callback type for directory swapping.
Activate model on GPU (WARM → ACTIVE).
Identifies one delegation's sandbox directory.
std::filesystem::path base_dir
Snapshot used as this sandbox's starting state.
std::filesystem::path path
Sandbox directory (under session base)
std::string delegation_id
Short delegation id (e.g. "d1", "pipeline")
Final artifact emitted by a finalized sandbox.
std::filesystem::path head_dir
Final sandbox state.
std::vector< std::filesystem::path > files_touched
Relative paths that changed.
std::string patch
Unified diff text.
std::filesystem::path base_dir
Snapshot the diff is against.