@@ -31,7 +31,9 @@ async fn main() -> Result<()> {
3131 . map ( |p| p. join ( ".a3s/config.hcl" ) ) ;
3232 project_root. filter ( |p| p. exists ( ) )
3333 } )
34- . expect ( "Config file not found. Please create ~/.a3s/config.hcl or use project .a3s/config.hcl" ) ;
34+ . expect (
35+ "Config file not found. Please create ~/.a3s/config.hcl or use project .a3s/config.hcl" ,
36+ ) ;
3537
3638 println ! ( "📄 Using config: {}" , config_path. display( ) ) ;
3739 println ! ( "{}" , "=" . repeat( 80 ) ) ;
@@ -61,8 +63,12 @@ async fn main() -> Result<()> {
6163 // Test 7: Queue Configuration
6264 test_queue_config ( & agent) . await ?;
6365
64- println ! ( "{}" , "
65- " . repeat( 2 ) ) ;
66+ println ! (
67+ "{}" ,
68+ "
69+ "
70+ . repeat( 2 )
71+ ) ;
6672 println ! ( "{}" , "=" . repeat( 80 ) ) ;
6773 println ! ( "✅ All integration tests completed successfully!" ) ;
6874 println ! ( "{}" , "=" . repeat( 80 ) ) ;
@@ -78,7 +84,9 @@ async fn test_basic_tools(agent: &Agent) -> Result<()> {
7884 let session = agent. session ( "." , None ) ?;
7985
8086 println ! ( "Testing: List current directory..." ) ;
81- let result = session. send ( "List the files in the current directory using ls" , None ) . await ?;
87+ let result = session
88+ . send ( "List the files in the current directory using ls" , None )
89+ . await ?;
8290 println ! ( "✓ Result preview: {}" , truncate( & result. text, 200 ) ) ;
8391
8492 println ! ( "\n Testing: Read a file..." ) ;
@@ -94,17 +102,18 @@ async fn test_builtin_skills(agent: &Agent) -> Result<()> {
94102 println ! ( "\n 🧠 Test 2: Built-in Skills (7 skills)" ) ;
95103 println ! ( "{}" , "-" . repeat( 80 ) ) ;
96104
97- let session = agent. session ( "." , Some (
98- SessionOptions :: new ( )
99- . with_builtin_skills ( )
100- ) ) ?;
105+ let session = agent. session ( "." , Some ( SessionOptions :: new ( ) . with_builtin_skills ( ) ) ) ?;
101106
102107 println ! ( "Testing: code-search skill..." ) ;
103- let result = session. send ( "Search for all functions named 'new' in Rust files" , None ) . await ?;
108+ let result = session
109+ . send ( "Search for all functions named 'new' in Rust files" , None )
110+ . await ?;
104111 println ! ( "✓ Result preview: {}" , truncate( & result. text, 200 ) ) ;
105112
106113 println ! ( "\n Testing: builtin-tools skill..." ) ;
107- let result = session. send ( "What tools are available for file operations?" , None ) . await ?;
114+ let result = session
115+ . send ( "What tools are available for file operations?" , None )
116+ . await ?;
108117 println ! ( "✓ Result preview: {}" , truncate( & result. text, 200 ) ) ;
109118
110119 println ! ( "\n ✅ Test 2 passed: Built-in skills work correctly" ) ;
@@ -126,14 +135,18 @@ async fn test_file_operations(agent: &Agent) -> Result<()> {
126135 println ! ( "✓ Result: {}" , truncate( & result. text, 200 ) ) ;
127136
128137 println ! ( "\n Testing: Read the test file..." ) ;
129- let result = session. send ( "Read the file test_integration.txt" , None ) . await ?;
138+ let result = session
139+ . send ( "Read the file test_integration.txt" , None )
140+ . await ?;
130141 println ! ( "✓ Result: {}" , truncate( & result. text, 200 ) ) ;
131142
132143 println ! ( "\n Testing: Edit the test file..." ) ;
133- let result = session. send (
134- "Edit test_integration.txt and replace 'Hello' with 'Greetings'" ,
135- None
136- ) . await ?;
144+ let result = session
145+ . send (
146+ "Edit test_integration.txt and replace 'Hello' with 'Greetings'" ,
147+ None ,
148+ )
149+ . await ?;
137150 println ! ( "✓ Result: {}" , truncate( & result. text, 200 ) ) ;
138151
139152 println ! ( "\n Cleaning up: Remove test file..." ) ;
@@ -151,17 +164,18 @@ async fn test_search_operations(agent: &Agent) -> Result<()> {
151164 let session = agent. session ( "." , None ) ?;
152165
153166 println ! ( "Testing: grep search..." ) ;
154- let result = session. send (
155- "Search for the word 'Agent' in all Rust files using grep" ,
156- None
157- ) . await ?;
167+ let result = session
168+ . send (
169+ "Search for the word 'Agent' in all Rust files using grep" ,
170+ None ,
171+ )
172+ . await ?;
158173 println ! ( "✓ Result preview: {}" , truncate( & result. text, 200 ) ) ;
159174
160175 println ! ( "\n Testing: glob pattern matching..." ) ;
161- let result = session. send (
162- "Find all .rs files in the src directory using glob" ,
163- None
164- ) . await ?;
176+ let result = session
177+ . send ( "Find all .rs files in the src directory using glob" , None )
178+ . await ?;
165179 println ! ( "✓ Result preview: {}" , truncate( & result. text, 200 ) ) ;
166180
167181 println ! ( "\n ✅ Test 4 passed: Search operations work correctly" ) ;
@@ -200,11 +214,14 @@ async fn test_planning_mode(agent: &Agent) -> Result<()> {
200214 println ! ( "\n 🎯 Test 6: Planning Mode" ) ;
201215 println ! ( "{}" , "-" . repeat( 80 ) ) ;
202216
203- let session = agent. session ( "." , Some (
204- SessionOptions :: new ( )
205- . with_planning ( true )
206- . with_goal_tracking ( true )
207- ) ) ?;
217+ let session = agent. session (
218+ "." ,
219+ Some (
220+ SessionOptions :: new ( )
221+ . with_planning ( true )
222+ . with_goal_tracking ( true ) ,
223+ ) ,
224+ ) ?;
208225
209226 println ! ( "Testing: Multi-step task with planning..." ) ;
210227 let result = session. send (
@@ -225,7 +242,7 @@ async fn test_queue_config(agent: &Agent) -> Result<()> {
225242 println ! ( "\n ⚡ Test 7: Queue Configuration (A3S Lane v0.4.0)" ) ;
226243 println ! ( "{}" , "-" . repeat( 80 ) ) ;
227244
228- use a3s_code_core:: queue:: { SessionQueueConfig , RetryPolicyConfig } ;
245+ use a3s_code_core:: queue:: { RetryPolicyConfig , SessionQueueConfig } ;
229246
230247 let queue_config = SessionQueueConfig {
231248 query_max_concurrency : 5 ,
@@ -241,16 +258,18 @@ async fn test_queue_config(agent: &Agent) -> Result<()> {
241258 ..Default :: default ( )
242259 } ;
243260
244- let session = agent. session ( "." , Some (
245- SessionOptions :: new ( )
246- . with_queue_config ( queue_config)
247- ) ) ?;
261+ let session = agent. session (
262+ "." ,
263+ Some ( SessionOptions :: new ( ) . with_queue_config ( queue_config) ) ,
264+ ) ?;
248265
249266 println ! ( "Testing: Parallel query operations with queue..." ) ;
250- let result = session. send (
251- "List all .rs files and count how many contain the word 'async'" ,
252- None
253- ) . await ?;
267+ let result = session
268+ . send (
269+ "List all .rs files and count how many contain the word 'async'" ,
270+ None ,
271+ )
272+ . await ?;
254273 println ! ( "✓ Result preview: {}" , truncate( & result. text, 200 ) ) ;
255274
256275 println ! ( "\n ✅ Test 7 passed: Queue configuration works correctly" ) ;
0 commit comments