UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

19 lines (18 loc) 718 B
import { t as getAcpRuntimeBackend } from "./registry-3G15-2Jg.js"; import { r as isAcpEnabledByPolicy } from "./policy-D-GnwOcj.js"; //#region src/acp/runtime/availability.ts /** Returns whether ACP runtime spawning is allowed and the selected backend is healthy enough. */ function isAcpRuntimeSpawnAvailable(params) { if (params.sandboxed === true) return false; if (params.config && !isAcpEnabledByPolicy(params.config)) return false; const backend = getAcpRuntimeBackend(params.backendId ?? params.config?.acp?.backend); if (!backend) return false; if (!backend.healthy) return true; try { return backend.healthy(); } catch { return false; } } //#endregion export { isAcpRuntimeSpawnAvailable as t };