Greece agrees terms, details awaited