Supply lines only deliver materials if you want to build something. The inventories are still shared. You can' take something from sanctuary if you look into the inventory of the castle, for example, even with an established supply line.
However, if you build something, you can access the resources of every village which is connected with supply lines. This does not require a direct route. You can establish a supply line from sanctuary to the castle, and from the castle to star-light dinner, and if you build something in sanctuary, you can use the materials and resources which are currently stored in in star-light dinner.