As a parent, I view this from a different perspective. I've been teaching my 5 year old firearms handling using airsoft since he was 4. The primary rule is that the adult is always responsible. It's easy to talk about training and punishment and lessons learned, and while that covers the effect it doesn't cover the cause. Without correcting the cause, the problem will never be resolved.
With kids it's easy to overestimate their ability and level of understanding. Not being there and only having what you've said to go on, the first problem is that you gave a loaded weapon (Airsoft not withstanding) to someone who's ability you did not have full knowledge (neighbor kid you're around infrequently). It's not enough to say "you cant actuate the bolt without having to fire it to clear it, so taking the mag out and putting the safety on is the best bet." The best bet is that you take the necessary steps to ensure that the firearm is clear - regardless of how inconvenient it is for you at the time.
The second problem of course is that you turned your back on them. With kids, you can't ever use this as an excuse. It doesn't work. I liken it to speeding. You speed down a roadway every day for year and nothing happens. Does that make it ok? No, it makes you lucky. It's still wrong and it still has consequences.
The third problem is that you didn't have the proper safety equipment. You can't say, "we're just practicing handling" or whatever so we'll take this short cut. Practice doesn't make perfect, perfect practice makes perfect. When kids are doing something, they should ALWAYS do it the precise way. For Airsoft, that means safety glasses on when handling the firearm.
If you would have addressed any one of these problems, none of this would have been an issue.
The bottom line is that kids don't do "what they're supposed to do" because they don't understand consequences - it doesn't matter how many times you tell them. As such, you have to take the extras steps to maintain safety. You can't blame kids for being kids, so don't blame them for your mistake. Analyze what you did wrong and learn from it.