UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 764 B
//!src/gateway/worker-environments/node-carrier-binding.ts function snapshotWorkerNodeCarrierBinding(e,t,n=e?.ownerEpoch){if(!e||e.state!==`ready`&&e.state!==`idle`&&e.state!==`attached`||e.destroyRequestedAtMs!==null||!e.leaseId||!e.nodeDeviceId||e.sshEndpoint!==null||e.ownerEpoch!==n)throw new Error(t);return{environmentId:e.environmentId,leaseId:e.leaseId,nodeDeviceId:e.nodeDeviceId,ownerEpoch:e.ownerEpoch}}function isWorkerNodeCarrierBindingCurrent(e,t){return Boolean(e&&(e.state===`ready`||e.state===`idle`||e.state===`attached`)&&e.destroyRequestedAtMs===null&&e.leaseId===t.leaseId&&e.nodeDeviceId===t.nodeDeviceId&&e.sshEndpoint===null&&e.ownerEpoch===t.ownerEpoch)}export{snapshotWorkerNodeCarrierBinding as n,isWorkerNodeCarrierBindingCurrent as t};