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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! # aptitude
//!
//! A fluent assertion library for testing AI agent tool calls.
//!
//! This library provides a Jest-like API for asserting on tool calls made by AI coding agents.
//! It can be used with Rust's native `#[test]` framework.
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use aptitude::{prompt, expect, Tool};
//!
//! #[test]
//! fn test_agent_behavior() {
//! let tool_calls = prompt("Read the config file").run().unwrap();
//!
//! expect(&tool_calls)
//! .tool(Tool::Read)
//! .to_be_called();
//!
//! expect(&tool_calls)
//! .tool(Tool::Bash)
//! .not_to_be_called();
//! }
//! ```
//!
//! ## With Working Directory
//!
//! ```rust,ignore
//! use aptitude::{prompt, expect, Tool};
//!
//! #[test]
//! fn test_in_project_dir() {
//! let tool_calls = prompt("List files here")
//! .in_dir("/path/to/project")
//! .run()
//! .unwrap();
//!
//! expect(&tool_calls)
//! .tool(Tool::Bash)
//! .to_be_called();
//! }
//! ```
//!
//! ## Analyzing Existing Sessions
//!
//! ```rust,ignore
//! use aptitude::{parse_session, expect, Tool};
//!
//! #[test]
//! fn test_existing_session() {
//! let tool_calls = parse_session("session.jsonl").unwrap();
//!
//! expect(&tool_calls)
//! .tool(Tool::Write)
//! .after(Tool::Read);
//! }
//! ```
// Core types
pub use ;
pub use ;
// Tool enum
pub use Tool;
// Agent execution
pub use ;
// Prompt builder
pub use ;
// Output formatting
pub use ;
// YAML (feature-gated)
pub use ;