This is more or less a digression from the topic but here goes. Sneaking as a mechanic prevents anyone besides those in your party from seeing you, friendly disposition or not.... This means if you can enter sneaking mode directly in front of a friendly, then he cannot see you which enables you to pick up everything he owns right in front of his nose
Yeah I agree this is a digression so I hope I don't drag this too far off. My issue is with stealth and how friendlies in combat are forcing you out of it when the sneak act is intended for the enemy, and I agree with you that the whole wilderness/home area thing is a way to complicated solution.
So how about this instead: You are never forced out of sneak by friendlies, but npcs who see you go into sneak (or see you while sneaking) will be tagged as having spotted you and your sneak bonus will no longer apply to them. This way sneak is not some free invisible spell to steal from friendlies but you can still hide from enemies while friendlies are nearby. In short: Friendlies will spot your sneak attempt but not make it fail globally