@@ -174,25 +174,20 @@ export function runReadOnlySpineToolcallSuite(
174174 expect ( output ) . toContain ( "ToolCallOutlineService" ) ;
175175 } ) ;
176176
177- test ( "aft_outline returns structured directory JSON through tool_call" , async ( ) => {
177+ test ( "aft_outline returns plain-text directory outline through tool_call" , async ( ) => {
178178 const h = await harness ( ) ;
179179 const tools = readingTools ( createPluginContext ( h ) ) ;
180180
181181 const output = await tools . aft_outline . execute ( { target : "src" } , createToolContext ( h ) ) ;
182- const parsed = JSON . parse ( output ) as {
183- success ?: boolean ;
184- complete ?: boolean ;
185- text ?: string ;
186- skipped_files ?: unknown [ ] ;
187- } ;
188-
189- expect ( parsed . success ) . toBe ( true ) ;
190- expect ( parsed . complete ) . toBe ( true ) ;
191- expect ( parsed . text ) . toContain ( "src/" ) ;
192- expect ( parsed . text ) . toContain ( "hit.ts" ) ;
193- expect ( parsed . text ) . toContain ( "toolCallOutlineFunction" ) ;
194- expect ( parsed . text ) . not . toContain ( "hit.test.ts" ) ;
195- expect ( parsed . skipped_files ) . toEqual ( [ ] ) ;
182+
183+ // Directory outlines render as plain text like every other outline
184+ // mode; a complete walk carries no partial-result footer.
185+ expect ( ( ) => JSON . parse ( output ) ) . toThrow ( ) ;
186+ expect ( output ) . toContain ( "src/" ) ;
187+ expect ( output ) . toContain ( "hit.ts" ) ;
188+ expect ( output ) . toContain ( "toolCallOutlineFunction" ) ;
189+ expect ( output ) . not . toContain ( "hit.test.ts" ) ;
190+ expect ( output ) . not . toContain ( "⚠ Partial result" ) ;
196191 } ) ;
197192
198193 test ( "aft_outline files:true returns the server-rendered files tree through tool_call" , async ( ) => {
@@ -230,20 +225,19 @@ export function runReadOnlySpineToolcallSuite(
230225 const h = await harness ( ) ;
231226 const tools = readingTools ( createPluginContext ( h ) ) ;
232227
233- const withoutTests = JSON . parse (
234- await tools . aft_outline . execute ( { target : "src" } , createToolContext ( h ) ) ,
235- ) as { text ?: string } ;
236- const withTests = JSON . parse (
237- await tools . aft_outline . execute (
238- { target : "src" , includeTests : true } ,
239- createToolContext ( h ) ,
240- ) ,
241- ) as { text ?: string } ;
242-
243- expect ( withoutTests . text ) . not . toContain ( "hit.test.ts" ) ;
244- expect ( withoutTests . text ) . not . toContain ( "toolCallOutlineTestOnly" ) ;
245- expect ( withTests . text ) . toContain ( "hit.test.ts" ) ;
246- expect ( withTests . text ) . toContain ( "toolCallOutlineTestOnly" ) ;
228+ const withoutTests = await tools . aft_outline . execute (
229+ { target : "src" } ,
230+ createToolContext ( h ) ,
231+ ) ;
232+ const withTests = await tools . aft_outline . execute (
233+ { target : "src" , includeTests : true } ,
234+ createToolContext ( h ) ,
235+ ) ;
236+
237+ expect ( withoutTests ) . not . toContain ( "hit.test.ts" ) ;
238+ expect ( withoutTests ) . not . toContain ( "toolCallOutlineTestOnly" ) ;
239+ expect ( withTests ) . toContain ( "hit.test.ts" ) ;
240+ expect ( withTests ) . toContain ( "toolCallOutlineTestOnly" ) ;
247241 } ) ;
248242 } ) ;
249243}
0 commit comments