pkg: extend the surface of the stub API a little.