Updated plugin to use the new invocation model