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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! Deterministic-script override types for the mock agent.
//!
//! When [`super::AgentBase::calls`] is `Some(vec![Call{...}, ...])`,
//! the mock agent skips its usual per-turn RNG response selection and
//! instead emits each [`Call`] as its own assistant turn — every
//! [`CallToolCall`] in `tool_calls` first (as tool-call deltas), then
//! `content` (as content deltas) — in array order. Each subsequent
//! turn walks the continuation to count how many [`Call`]s have
//! already been satisfied; the next un-matched [`Call`] is what that
//! turn emits. Once every [`Call`] has been satisfied, the mock falls
//! through to its normal mode-driven dispatcher.
use JsonSchema;
use ;
/// One scripted assistant turn for the mock agent's deterministic
/// `calls` override (see [`super::AgentBase::calls`]).
///
/// When the mock fires this `Call`, it emits every entry in
/// `tool_calls` first (as tool-call deltas), then `content` (as
/// content deltas), finishing the turn after the last content chunk.
/// The match check on the continuation compares
/// `(tool_calls[i].name, tool_calls[i].arguments)` pairs plus the
/// full `content` string — call ids are intentionally excluded since
/// they're random per-emit.
/// A single tool call within a [`Call`]. Identifies the tool by
/// `name` and carries the exact JSON-encoded arguments to pass. No
/// `id` field — call ids on the wire are minted randomly per emit
/// and are ignored by the override's match check.