Israel says it has agreed on the principles of a truce plan, raising hopes of an end to the violent conflict in the Gaza Strip.