MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / open_sandbox

Method open_sandbox

atomic-repository/src/repository/sandbox.rs:286–296  ·  view source on GitHub ↗

Open a repository for an agent sandbox. The agent's private working tree is at `working_root`, but the graph lives in the **canonical** repository found from `canonical`. All sandboxes opened this way read and write the same repository database and `changes` store, so there is exactly one graph. `view` selects which view this sandbox operates on (typically the agent's own draft view). The sandbo

(
        working_root: P,
        canonical: Q,
        _view: &str,
    )

Source from the content-addressed store, hash-verified

284 /// database. Read-only sandbox queries use `open_readonly` to share access
285 /// with other readers.
286 pub fn open_sandbox<P, Q>(
287 working_root: P,
288 canonical: Q,
289 _view: &str,
290 ) -> Result<Self, RepositoryError>
291 where
292 P: AsRef<Path>,
293 Q: AsRef<Path>,
294 {
295 Self::open_sandbox_with_mode(working_root.as_ref(), canonical.as_ref(), _view, false)
296 }
297
298 pub(super) fn open_sandbox_readonly(
299 working_root: PathBuf,

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.80

Tested by

no test coverage detected