File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ import { textResult } from './utils';
99
1010const engineDir = path . join ( import . meta. dirname , 'data-liberation-agent' ) ;
1111
12+ // Engine ops (extract/screenshot/reconstruct) routinely run for minutes; the MCP SDK's
13+ // 60 s default times them out (-32001) even though the engine keeps working.
14+ const ENGINE_CALL_TIMEOUT_MS = 600_000 ;
15+
1216let chromiumPromise : Promise < void > | null = null ;
1317
1418function ensureEngineChromium ( ) : Promise < void > {
@@ -147,10 +151,14 @@ export const dataLiberationTool = defineTool(
147151
148152 await ensureEngineChromium ( ) ;
149153
150- const result = await client . callTool ( {
151- name : args . tool ,
152- arguments : normalizeArgs ( args . args ) ,
153- } ) ;
154+ const result = await client . callTool (
155+ {
156+ name : args . tool ,
157+ arguments : normalizeArgs ( args . args ) ,
158+ } ,
159+ undefined ,
160+ { timeout : ENGINE_CALL_TIMEOUT_MS , resetTimeoutOnProgress : true }
161+ ) ;
154162
155163 const rawContent = Array . isArray ( result . content )
156164 ? ( result . content as DataLiberationResultContent [ ] )
You can’t perform that action at this time.
0 commit comments