How to resolve external v4 plugins

I’m converting my v3 plugins to v4 which I maintain externally in their own repos. I have a middleware plugin in V3 that I would add to my package.json as follows:

"strapi-plugin-prometheus": "npm:@myscope/strapi-plugin-prometheus@^1.2.3",

I’d then enable this in /config/functions/middleware.js:

module.exports = {
  settings: {
    prometheus: {
      enabled: true,
    },
  },
};

I didn’t have to explicitly configure the plugin (presumably because it use the right naming convention?) - I’m now struggling to activate the new plugin in under V4. I’m getting:

error: The "path" argument must be of type string. Received undefined

…which I believe is due to the fact that I don’t have a ‘resolve’ in my plugin config:

module.exports = ({ env }) => ({
  prometheus: {
    enabled: true,
  },
});

Can anyone suggest what I’m missing here?

I’m an idiot. I was just missing “kind”: “plugin” in my strapi config…