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
44
45
46
47
48
49
50
51
use Cow;
use JsonSchema;
use ;
use crateerror;
/// An inner error from a [`LaboratoryExecutionChunk`](super::LaboratoryExecutionChunk).
///
/// Yielded by [`LaboratoryExecutionChunk::inner_errors`](super::LaboratoryExecutionChunk::inner_errors).
/// The variant identifies which child collection the failing agent
/// completion came from; fields locate it by `index` (builder or
/// evaluation index) and `agent_index` (agent slot within that builder
/// or evaluation), with the underlying [`ResponseError`](error::ResponseError)
/// held as a `Cow` so iteration is zero-allocation while deserialization
/// still produces a self-owning value.
///
/// Wire shape (internally tagged on `"type"`):
/// ```json
/// { "type": "builder", "builder_index": 0, "agent_completion_index": 1, "error": { } }
/// { "type": "evaluation", "evaluation_index": 2, "agent_completion_index": 0, "error": { } }
/// ```
///
/// Does NOT include the lab chunk's own top-level `.error` — that
/// field is the chunk's own failure state and is reachable directly
/// via [`LaboratoryExecutionChunk::error`](super::LaboratoryExecutionChunk::error).