UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

19 lines (18 loc) 718 B
import { t as getAcpRuntimeBackend } from "./registry-DXcNog2m.js"; import { t as isAcpEnabledByPolicy } from "./policy-Dc3ayPTK.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 };