These situations rarely work out well, but you're going to have to deal with it for now or find a new job. It sounds like you're going to have to think about how to organize your projects for outside development. I'll let you in on a little hint that will help you: Your software libraries aren't worth as much as you think they are. If you have specific pieces that are outright trade secrets, lock them down, but don't be overprotective of your product as a whole. That should be handled through contracts and litigation.