1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Mirrors `packages/agent/src/harness/tools/tool-context.ts` — the context the
//! built-in tools execute against.
//!
//! TS: `interface ExecutionToolContext { env: ExecutionEnv }`. The Rust port
//! keeps the same single-field shape but splits `env` into the read-only
//! `ExecutionEnv` view and (for the write/edit tools) the `MutatingEnv` view
//! that carries the file-mutation-queue registry.
use Arc;
use crateExecutionEnv;
use crateMutatingEnv;
/// The context handed to a built-in tool's `execute`. Mirrors TS
/// `ExecutionToolContext`.
///
/// `env` is the read-only view for read/bash; `mutating_env` is `Some` when the
/// context was built with a mutation-capable env (write/edit use it to reach
/// the per-canonical-path queue). Callers conventionally wrap an
/// `OsExecutionEnv` or `InMemoryExecutionEnv` (which implement both traits)
/// via [`ExecutionToolContext::new`].