Kurdish official says deal struck with Syrian army to help Kurdish forces end a Turkish offensive there.