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
//! The small per-call tool context (ADR-0003).
use PathBuf;
use CancellationToken;
/// The context handed to a tool for one call.
///
/// Deliberately small (ADR-0003 rejects a god-object context): just the working
/// directory, the id of the `tool_use` being answered, the workspace jail root,
/// and a cancellation handle. The loop builds one of these per tool call, setting
/// [`ToolCtx::call_id`] to the `tool_use` id so the produced `tool_result` pairs
/// back to it (ADR-0004).