Green’s Dictionary of Slang

piper n.2

[pipe v.3 (2)]

1. (US) a private detective.

[US]N.Y. Times 22 May 2/1: [headline] Private Detectives: A Defence of the System by One of the Craft. Interesting Account of the ‘Shadows’ and ‘Pipers,’ their Characters, Requisites, Wages and Works — The Tendency to Dishonesty Explained by an Ex – ‘Shadow’.

2. a spy, esp. one employed on an omnibus.

[UK]Hotten Sl. Dict. 202: Piper a person employed by an omnibus proprietor to act as a spy on the conductor.
[UK]Sl. Dict.

3. (US Und.) a lookout.

[US]A. Pinkerton Reminiscences 94: Three of his compatriots, or pals, are called ‘pipers,’ are on the look-out.