Since its northern border has never been fully ratified or indeed recognized by an Afghan state, the condition of that state is of great importance to Pakistan. This situation has been complicated by the presence of four million displaced Afghans in Pakistan itself, who show no signs of returning home anytime soon. These refugees are Pukhtuns ('Pathans') like their tribal relatives (and enemies) along most of the southern tier of Afghanistan.
Whatever kind of political deal is made in Kabul following the departure of the US forces will of necessity require participation by representatives of the Taliban of Mullah Omar, the forces of the Haqqani Talibs, of the Pakistan government, and possibly will include the Jamaatis as well. If there is going to be an attempt to mine the mineral wealth of Afghanistan, everyone involved will want access to the future profits.
But just in terms of Pakistan's national security, I am sure that Pakistani Army chief General Kayani is keenly attuned to developments in the Northwest and that his own ISI scouts are very busy trying to assess the present state of play in those parts.
The Punjab presents another, as yet unaddressed, area of militant Taliban activity. Although not fully aligned with either Mullah Omar or with the Haqqani, the southern Punjab holds many militant madrassas in Bahawalpur and Multan and is the home recruiting ground for the Kashmiri jihadis who perpetrated the 2008 Mumbai massacre.
There are about three groups there, at least, who have been semi-acknowledged by the Mian brothers in Lahore: Shahbaz, the Chief Minister of the province, and Nawaz, the former Chief Minister and twice Prime Minister. This deal has however fallen through, as all such concessions to the Islamic militants do, and the jihadis have moved during the last year to either bomb or take over such notable Barelvi/Sufi shrines as that of Data Sahib outside Lahore, and have bombed a variety of targets within the city itself.
Civil authority seems to have weakened recently in Sindh as well. The continued targeted killings of muhajirs (Muslim immigrants from India) by Pukhtuns from the Awami Party have provoked a good deal of reciprocal violence from them. In Baluchistan, meanwhile, there is a great deal of militant feeling against Islamabad and the central government which is regarded, with some justification, as Punjabi dominated and exploitative of the other three provinces. There is a great deal of violence around Quetta and the writ of national law does not seem to run there any more than it does in the Northwest or in other Taliban-dominated areas.
General Kayani does not want to be the president or prime minister or even dictator of such a decaying polity. He is a hands-on general officer who understands how to lead men and to rely on his staff and his corps commanders. He knows what happened to Zia and how Musharraf failed. He has also been trained partly in America and knows something of how Americans think and respond. He is definitely the most important source of national power right now, but he does not want to waste that power by investing it in the political process directly.
But he will need outside help, both militarily and financially, and the likeliest source is the USA, also needed to help keep India from becoming involved in Pakistan's problems more than is good for either of them. How all of this will play out in the long run, or even the short run, is beyond anyone's powers of prophecy.