@@ -114,7 +114,7 @@ it("prepareSearch returns a QueryAgentSearcher", async () => {
114114 systemPrompt : "test system prompt" ,
115115 } ) ;
116116
117- const searcher = agent . prepareSearch ( "test query" ) ;
117+ const searcher = agent . configureSearch ( "test query" ) ;
118118 expect ( searcher ) . toBeInstanceOf ( QueryAgentSearcher ) ;
119119} ) ;
120120
@@ -196,11 +196,11 @@ it("search-only mode success: caches searches and sends on subsequent request",
196196 } ) as jest . Mock ;
197197
198198 const agent = new QueryAgent ( mockClient ) ;
199- const searcher = agent . prepareSearch ( "test query" , {
199+ const searcher = agent . configureSearch ( "test query" , {
200200 collections : [ "test_collection" ] ,
201201 } ) ;
202202
203- const first = await searcher . execute ( { limit : 2 , offset : 0 } ) ;
203+ const first = await searcher . run ( { limit : 2 , offset : 0 } ) ;
204204
205205 expect ( first ) . toEqual < SearchModeResponse < undefined > > ( {
206206 originalQuery : apiSuccess . original_query ,
@@ -234,7 +234,7 @@ it("search-only mode success: caches searches and sends on subsequent request",
234234
235235 // First request should have searches: null (generation request)
236236 expect ( capturedBodies [ 0 ] . searches ) . toBeNull ( ) ;
237- const second = await searcher . execute ( { limit : 2 , offset : 1 } ) ;
237+ const second = await searcher . run ( { limit : 2 , offset : 1 } ) ;
238238 // Second request should include the original searches (execution request)
239239 expect ( capturedBodies [ 1 ] . searches ) . toEqual ( apiSuccess . searches ) ;
240240 // Response mapping should be the same (because response is mocked)
@@ -266,12 +266,12 @@ it("search-only mode failure propagates QueryAgentError", async () => {
266266 ) as jest . Mock ;
267267
268268 const agent = new QueryAgent ( mockClient ) ;
269- const searcher = agent . prepareSearch ( "test query" , {
269+ const searcher = agent . configureSearch ( "test query" , {
270270 collections : [ "test_collection" ] ,
271271 } ) ;
272272
273273 try {
274- await searcher . execute ( { limit : 2 , offset : 0 } ) ;
274+ await searcher . run ( { limit : 2 , offset : 0 } ) ;
275275 } catch ( err ) {
276276 expect ( err ) . toBeInstanceOf ( QueryAgentError ) ;
277277 expect ( err ) . toMatchObject ( {
0 commit comments