init libTermSession

it’s reduced version and easily imported into your project.