11import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts" ;
22import { callGatewayFromCli } from "openclaw/plugin-sdk/gateway-runtime" ;
3+ import { addTimerTimeoutGraceMs } from "openclaw/plugin-sdk/number-runtime" ;
34import type { PluginRuntime } from "openclaw/plugin-sdk/plugin-runtime" ;
45import type { RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime" ;
56import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime" ;
@@ -50,6 +51,7 @@ export const testing = {
5051 } ,
5152 meetStatusScriptForTest : meetStatusScript ,
5253 parseMeetBrowserStatusForTest : parseMeetBrowserStatus ,
54+ resolveBrowserGatewayTimeoutMsForTest : resolveBrowserGatewayTimeoutMs ,
5355} ;
5456
5557function isGoogleMeetTalkBackMode ( mode : GoogleMeetMode ) : boolean {
@@ -291,7 +293,7 @@ async function callLocalBrowserRequest(params: BrowserRequestParams) {
291293 "browser.request" ,
292294 {
293295 json : true ,
294- timeout : String ( params . timeoutMs + 5_000 ) ,
296+ timeout : String ( resolveBrowserGatewayTimeoutMs ( params . timeoutMs ) ) ,
295297 } ,
296298 {
297299 method : params . method ,
@@ -303,6 +305,10 @@ async function callLocalBrowserRequest(params: BrowserRequestParams) {
303305 ) ;
304306}
305307
308+ function resolveBrowserGatewayTimeoutMs ( timeoutMs : number ) : number {
309+ return addTimerTimeoutGraceMs ( timeoutMs ) ?? 1 ;
310+ }
311+
306312function mergeBrowserNotes (
307313 browser : GoogleMeetChromeHealth | undefined ,
308314 notes : string [ ] ,
@@ -1015,7 +1021,7 @@ export async function launchChromeMeetOnNode(params: {
10151021 audioBridgeCommand : params . config . chrome . audioBridgeCommand ,
10161022 audioBridgeHealthCommand : params . config . chrome . audioBridgeHealthCommand ,
10171023 } ,
1018- timeoutMs : params . config . chrome . joinTimeoutMs + 5_000 ,
1024+ timeoutMs : addTimerTimeoutGraceMs ( params . config . chrome . joinTimeoutMs ) ?? 1 ,
10191025 } ) ;
10201026 const result = parseNodeStartResult ( raw ) ;
10211027 if ( result . audioBridge ?. type === "node-command-pair" ) {
0 commit comments