The Plugin API is the surface plugins use to talk to BlackBox, and the surface models use to call plugins.
A plugin registers one or more capabilities at load: a model it can run, a tool a model can call (with a name, description, and input schema), or a background service.
When a model calls a tool, BlackBox validates the arguments against the tool's schema, checks the plugin's declared permissions, then invokes the handler and returns its result to the model. Long-running handlers should report progress rather than block.
Return structured errors (a short message plus details) so the model — and the user — can understand what went wrong and what to try next.