Question: What queen's marriage was a condition of the promises in the Poland-Lithuanian union that was threatened to be severed by the Lithuanian Civil War?
Context: The Union of Grodno was a series of acts of the Polish–Lithuanian union between Kingdom of Poland and Grand Duchy of Lithuania.  The first acts were signed in 1432 during the Lithuanian Civil War of 1431–1435.  The acts confirmed the Union of Vilnius and Radom (1401).  The Union established Sigismund Kęstutaitis as the Grand Duke of Lithuania and re-established Władysław II Jagiełło's seniority and dynastic interest in Lithuania. The Treaty of Dubysa or Treaty of Dubissa (Lithuanian: "Dubysos sutartys" ) consisted of three legal acts formulated on 31 October 1382 between Jogaila, Grand Duke of Lithuania, with his brother Skirgaila and Konrad von Wallenrode, Marshal of the Teutonic Order.  During the Lithuanian Civil War (1381–84), Teutonic Order helped Jogaila and Skirgaila to defeat their uncle Kęstutis and his son Vytautas.  Trying to realize promises given by Jogaila during the war, Teutonic Order organized the negotiations for the treaty.  The acts were signed after six days of negotiations on an island in the mouth of the Dubysa River.  The treaty was never ratified and never came into effect.  The civil war resumed in summer 1383. The Treaty of Lyck was a treaty between Vytautas the Great, future Grand Duke of Lithuania, and the Teutonic Knights, represented by Marquard von Salzbach, "komtur" Arnold von Bürglen, and Thomas, son of Lithuanian duke Survila.  It was signed on January 19, 1390 in Lyck, State of the Teutonic Order, (now Ełk, Poland).  Vytautas, in exchange for a military alliance against his cousin Jogaila during the Lithuanian Civil War (1389–1392), agreed to cede Samogitia up to the Nevėžis River and become the Order's vassal.  In essence Vytautas confirmed the Treaty of Königsberg (1384) that he had signed with the Knights during the Lithuanian Civil War (1381–1384).  Once betrayed, the Knights now asked for hostages as a guarantee of Vytautas' loyalty.  The Order demanded as hostages his two brothers Sigismund and Tautvilas, wife Anna, daughter Sophia, sister Rymgajla, brother-in-law Ivan Olshanski, and a number of other nobles. The Lithuanian Civil War of 1432–1438 was a conflict over the succession to the throne of the Grand Duchy of Lithuania, after Vytautas the Great died in 1430 without leaving an heir.  The war was fought on the one side by Švitrigaila, allied with the Teutonic Knights, and on the other by Sigismund Kęstutaitis, backed by the Kingdom of Poland.  The war threatened to sever the Union of Krewo, the personal union between Poland and Lithuania.  Švitrigaila's alliance with the Grand Master of the Teutonic Order, Paul von Rusdorf, launched the Polish–Teutonic War (1431–1435) but failed to secure victory for Švitrigaila. The Ostrów or Astrava Agreement (Lithuanian: "Astravos sutartis" , Belarusian: Востраўскае пагадненне , Polish: "Ugoda w Ostrowie" ) was a treaty between Jogaila (Władysław II Jagiełło), King of Poland and Grand Duke of Lithuania, and his cousin Vytautas the Great, signed on 4 August 1392.  The treaty ended the destructive Lithuanian Civil War, launched in 1389 by Vytautas who hoped to gain political power, and concluded the power struggle between the two cousins that erupted in 1380 after Jogaila secretly signed the Treaty of Dovydiškės with the Teutonic Knights.  The Ostrów Agreement did not stop attacks from the Teutonic Knights and the territorial dispute over Samogitia continued up to 1422.  According to the treaty, Vytautas became the ruler of Lithuania (styled Grand Duke), but he also acknowledged Jogaila's (styled Supreme Duke) rights to Lithuania.  The details of the Polish–Lithuanian relationship were clarified in several later treaties, including the Union of Vilnius and Radom in 1401 and Union of Horodło in 1413. Bayernburg (German for "Bavarian Castle"; Lithuanian: "Bajenburgas" ) is the name of three separate wooden castles of the Teutonic Order in different locations along the Neman River in the Grand Duchy of Lithuania during the Lithuanian Crusade.  Their exact locations are not known and historians provide conflicting versions.  The first fortress was built in 1337 by guest crusaders, including Henry XIV, Duke of Bavaria, in whose honor it was named after Bavaria.  Emperor Louis IV declared it the capital of the to-be-conquered Lithuania.  The newly built castle withstood a 22-day siege by Grand Duke Gediminas, but was abandoned by the Order in 1344.  The Teutons burned down the first Bayernburg and built a brand new fortress a little closer to Prussia.  The second Bayernburg withstood a six-day Lithuanian attack in 1381 but was burned down in July 1384 by Vytautas when he betrayed the Order at the conclusion of the Lithuanian Civil War (1381–84).  The third Bayernburg was built in spring 1387 where Georgenburg stood but the new name did not gain acceptance and the fortress continued to be known as Georgenburg.  This fortress was captured and burned down by Vytautas in April 1403 during the first Samogitian uprising. The Lithuanian Civil War of 1389–92 was the second civil conflict between Jogaila, King of Poland and Grand Duke of Lithuania, and his cousin Vytautas.  At issue was control of the Grand Duchy of Lithuania, then the largest state in Europe.  Jogaila had been crowned King of Poland in 1386; he installed his brother Skirgaila as ruler of Lithuania.  Skirgaila proved unpopular and Vytautas attempted to depose him.  When his first attempt to take the capital city of Vilnius failed, Vytautas forged an alliance with the Teutonic Knights, their common enemy – just as both cousins had done during the Lithuanian Civil War between 1381 and 1384.  Vytautas and the Knights unsuccessfully besieged Vilnius in 1390.  Over the next two years it became clear that neither side could achieve a quick victory, and Jogaila proposed a compromise: Vytautas would become Grand Duke and Jogaila would remain Superior Duke.  This proposal was formalized in the Ostrów Agreement of 1392, and Vytautas turned against the Knights.  He went on to reign as Grand Duke of Lithuania for 38 years, and the cousins remained at peace. In a strict sense, the Union of Krewo or Act of Krėva (also Union of Krevo, Act of Kreva) was a set of prenuptial promises made in the Kreva Castle on 14 August 1385 by Jogaila, Grand Duke of Lithuania, in exchange for marriage to the underage reigning Queen Jadwiga of Poland.  The act was very limited in scope and in the historiography the term "Union of Krewo" often refers not only to the particular document but to the events of 1385–1386 as a whole.  After the negotiations in 1385, Jogaila converted to Christianity, married Jadwiga, and was crowned King of Poland in 1386.  The union was a decisive moment in the histories of Poland and Lithuania; it marked a beginning of the four centuries of shared history between the two nations.  By 1569 the Polish–Lithuanian union grew into a new state, the Polish–Lithuanian Commonwealth, and lasted until the Third Partition in 1795. The Treaty of Königsberg was signed in Königsberg (Królewiec) on 30 January 1384, during the Lithuanian Civil War (1381–1384) between Vytautas the Great and representatives of the Teutonic Knights.  Vytautas waged a civil against his cousin Jogaila, Grand Duke of Lithuania and future King of Poland, and allied himself with the Teutonic Knights.  In order to secure Teutonic support in the civil war, Vytautas signed the treaty and granted Samogitia up to the Nevėžis River and Kaunas to the Knights.  In 1382 Jogaila promised the Knights Samogitia only up to the Dubysa River, but never ratified the Treaty of Dubysa.  Samogitia was important for the Knights as this territory physically separated them from uniting with the Livonian order in the north.  Vytautas also promised to become Order's vassal.  In February several Samogitian regions acknowledged their support to Vytautas and the Knights. The Lithuanian Civil War of 1381–1384 was the first struggle for power between the cousins Jogaila, Grand Duke of Lithuania and later King of Poland, and Vytautas the Great.  It began after Jogaila signed the Treaty of Dovydiškės with the Teutonic Knights which was aimed against his uncle Kęstutis, father of Vytautas.  Kęstutis briefly seized power in the Grand Duchy, but was betrayed by adherents of Jogaila primarily from Vilnius.  During negotiations for a truce Kęstutis and Vytautas were arrested and transported to the Kreva Castle.  Kęstutis died there a week later but Vytautas managed to escape and then sought an alliance with the Teutonic Knights.  Subsequently their joint forces raided Lithuanian lands.  Eventually the cousins were reconciled as Jogaila needed internal stability in anticipation of negotiations with the Grand Duchy of Moscow and the Kingdom of Poland regarding the possible Christianization of Lithuania.  The war did not settle the power struggle; it continued during the next Lithuanian Civil War (1389–1392) which was resolved by the signing of the Ostrów Agreement.  After more than ten years of struggle, Vytautas finally became the Grand Duke of Lithuania and ruled the country for thirty-eight years.
Answer: Queen Jadwiga