openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 639 B
JavaScript
import{o as getAsyncWorkSignal}from"./async-work-scope-DBcxYU4O.mjs";import{r as callGatewayFromCliWithTransport}from"./gateway-rpc-17pTfL8i.mjs";
//!src/cli/devices-cli-gateway.ts
const DEFAULT_DEVICES_TIMEOUT_MS=1e4;const callDevicesGateway=async(e,t,n,r)=>callGatewayFromCliWithTransport(e,t,n,{label:`Devices ${e}`,defaultTimeoutMs:DEFAULT_DEVICES_TIMEOUT_MS,scopes:r?.scopes,signal:r?.signal,sharedStateMode:`read-only`});async function readUnlessAborted(e){const t=getAsyncWorkSignal();try{const n=await e(t);return t?.aborted?null:n}catch(e){if(!t?.aborted)throw e}return null}export{readUnlessAborted as n,callDevicesGateway as t};