File size: 435 Bytes
e249c6d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import "./bash.js";

type BashToolTestApi = {
  resolveBashTimeoutMs(timeoutSeconds: unknown): number | undefined;
};

function getTestApi(): BashToolTestApi {
  return (globalThis as Record<PropertyKey, unknown>)[
    Symbol.for("openclaw.bashToolTestApi")
  ] as BashToolTestApi;
}

export const resolveBashTimeoutMs: BashToolTestApi["resolveBashTimeoutMs"] = (timeoutSeconds) =>
  getTestApi().resolveBashTimeoutMs(timeoutSeconds);