When it comes to miracles and Sikhi I find that there are two sentiments. One is that Guru's condemned miracles full stop and the other is that Guru's often performed them. So let's look at both.
Examples in history of Guru's opposing the use of miracles are plenty. When Baba Atal raised his friend from the dead his father, Guru Hargobind, did not approve and then the young son of the Guru was compelled to offer his own life as a consequence.
The Vaars of Bhai Gurdas feature an episode where Siddhas execute many miraculous powers when they are offended by Guru Nanak including turning into ferocious animals plucking stars from the sky and floating on water. Guru Nanak however refused to meet them where they were and on being challenged he performed no miracles himself saying that instead he relies on bani alone.
It is said that during both the shaheedi of Guru Arjan Dev and Guru Teg Bahadur they were asked to do miracles to save their lives but they chose death instead.
Bhai Amar Das, before becoming Guru took retaliation on a tapasia who convinced farmers to turn away from Guru Angad by having those farmers drag him through their fields until he died. Wherever the tapasia was dragged it rained on those fields thus proving the supremacy of the Guru's house over such as the tapasia. Guru Angad was not pleased with this abuse of spiritual power and initially wouldn't even look at his devotee.
In our most recent animation Guru Hargobind and Spiritual Powers two Bhai Sahib's in the court of Guru Hargobind turn themselves into tigers in order to scare the emperor into freeing Guru Sahib from Gwalior. Guru is not pleased with this action and instructs them to accept difficulties and not abuse such powers.
So, it is pretty clear that Guru teaches us that the use of spiritual power is not allowed. So why does our story not directly say "spiritual powers are never to be used" and instead opts to say, "we can only use power if we have Guru's permission"? First let's look at counter examples where Gurus did use spiritual powers.
One Janam Sakhi has the story of Guru Nanak raising an elephant from the dead that tells us about this subject. This story was depicted as a fresco in Baba Atal. A hunter had killed an elephant and Guru Nanak who had witnessed the killing took mercy and resurrected the animal. The hunter spread the news of the miracle all the way to the local king who wanted to see this miracle for himself. So the king killed the elephant again and asked Guru Nanak to enact his miraculous revival. Guru Nanak turned down the request saying that the miracle was done in the flow of nature while this act would be for the sake of ego.
There are numerous stories of Gurus creating water springs. Guru Gobind Singh's horse miraculously produced a spring in Anandpur, Guru Har Rai created a spring after firing an arrow and perhaps the most famous water spring incident was when Guru Nanak created a water spring to relieve the people being exploited by Wali Kandhari and then stopped a boulder that was flung towards himself (a double miracle story).
These are all miracles.
Guru Gobind Singh once pushed a leper in a pool who was at first angry at the apparent aggression but then elated once he realized he'd been healed of leprosy.
Guru HarKrishan miraculously healed thousands of smallpox in Delhi.
A critical thinker might dismiss many, or all of these incidents as unreliable oral traditions. People say that the Janam Sakhis are also unreliable and not meant to be taken literally.
So, let's see what the most irrefutable source of Sikh history has to say: the Vaars of Bhai Gurdas. Vaar 1 Paurhi 32 states:
ਟੰਗੋਂ ਪਕੜਿ ਘਸੀਟੀਆ ਫਿਰਿਆ ਮਕਾ ਕਲਾ ਦਿਖਾਰੀ।
(Jeevan) violently grabbed (Guru Nanak's) legs and threw them to the side. By some power the whole Mecca was seen to rotate.
ਹੋਇ ਹੈਰਾਨੁ ਕਰੇਨਿ ਜੁਹਾਰੀ।All were surprised and bowed down (to the Guru)
Keep in mind this is the Bhai Gurdas who compiled the Aad Granth Sahib under the supervision of Guru Arjan Dev. This is from the Vaars that Guru offered to be included in Aad Granth Sahib. Bhai Gurdas is an unimpeachable source of Sikh history and he is here affirming that Mecca miraculously rotated.
In a following episode from the Vaars Guru Nanak is asked by Pir Dastagir to prove his contention that there are more than 7 heavens and 7 hells. Vaar 1 Paurhi 36 starts by specifically using the word for miracles 'karaamaat' saying that Guru Nanak showed such a miracle to the adherents present:
ਏਥੇ ਵਿਚਿ ਬਗਦਾਦ ਦੇ ਵਡੀ ਕਰਾਮਾਤਿ ਦਿਖਲਾਈ।
Here, in Baghdad, (Guru Nanak) showed a great miracle.
The story proceeds to tell of a miracle performed by Guru Nanak who mystically took a child with him to other worlds:
ਨਾਲਿ ਲੀਤਾ ਬੇਟਾ ਪੀਰ ਦਾ ਅਖੀ ਮੀਟਿ ਗਇਆ ਹਵਾਈ।
(Guru Nanak) took the Pir's son with him and they disappeared into thin air.
ਲਖ ਆਕਾਸ ਪਤਾਲ ਲਖ ਅਖਿ ਫੁਰੰਕ ਵਚਿ ਸਭਿ ਦਿਖਲਾਈ।In the wink of an eye (Guru Sahib) showed (the boy) the countless heavens and countless hells.
ਭਰਿ ਕਚਕੌਲ ਪ੍ਰਸਾਦਿ ਦਾ ਧੁਰੋ ਪਤਾਲੋ ਲਈ ਕੜਾਹੀ।From such underworlds they brought back a bowl full of Krah (food offering).
ਜਾਹਰ ਕਲਾ ਨ ਛਪੈ ਛਪਾਈ ॥੩੬॥The manifest power (of the Guru) can not be hidden.
The disappearing and transportation of another person to other realms is certainly not a statement that miracles are strictly forbidden!
So it seems that the Guru's both performed miracles and also refused to do miracles in order to show off. Harkening back to when the Siddhas showed their miracles to Guru Nanak: the reason they challenge him to perform miracles is because they knew he'd shown miracles to others but wanted him to show something to them personally:
ਸਿਧਿ ਬੋਲਨਿ ਸੁਣਿ ਨਾਨਕਾ ਤੁਹਿ ਜਗ ਨੋ ਕਆਿ ਕਰਾਮਾਤਿ ਦਿਖਾਈ।
The Siddhas said, "Listen Nanak! Why have you shown karaamaat, miracles, to the world..
ਕੁਝ ਵਖਿਾਲੇਂ ਅਸਾਨੋ, ਤੁਹਿ ਕਿਉ ਢਿਲ ਅਵੇਹੀ ਲਾਈ।..But to show us something, you are so hesitant?"
Thus, history, Bhai Gurdas nontheless, makes it clear that Gurus performed miracles in certain circumstances. We cannot make flat statements that Gurus were fully against using karaamaat, miracles.
Back to our current story which specifically deals with the use of spiritual powers. For the saakhi we used the Suraj Prakash Granth as the source. Much of the dialogues are direct translations of that text. At the end of the story Guru Sahib reprimands Bhai Jetha for using miracle powers by transforming into a tiger. In that section the wording is important. Guru does not strictly tell him to never use such powers, but instead says that the Bhai should receive a consequence for using them "outside the Guru's aagiaa, permission". This passage is meant to be Guru Sahib's speech:
"Who told you to go to the emperor and show a miracle? You have acted outside Guru's aagiaa, permission, and therefor will face a consequence".
The implication here is that there could be a time when using such powers would be inside Guru's aagiaa. There are many stories of mahapursh who do miraculous things which are understood to be inside Guru's permission and in the flow of hukam. Once a mahapursh turned a bitter fruit sweet in order to convey to someone that 'if a worm like me can do such a thing of course Guru Nanak could do it and much more'.
Thus, the various accounts of miracles by Gurus and by GurSikhs seem to convey the following: Using miracle powers is not allowed if one does so for the purpose of proving a point, showing off or any other ego related reason. However, if it is in the flow of hukam, tapping into the Guru's flowing river of power may be permitted. But only with Guru's permission! And it's always better to be safe than sorry so the use of spiritual powers is to be generally avoided.
This teaching of the Guru is conveyed in our latest animation: