There already is a way for a plugin to participate in Smart Filters, but I think it’s somewhat ill-suited for the use case you are describing. The general idea is that a plugin can vend additional properties on GSGlyph and GSLayer by extending the types (in Objective-C this would be a “Category” but I am sure there is a way to do this from Python as well). Then, you can query those properties using the “Custom” predicate pattern.
For example, I am working on a plugin that vends a lightTableStatus property on both GSGlyph and GSLayer. Then, it can be used in a Smart Filter like so:
This queries the property on GSGlyph. To access the layer of the currently selected master, you would need to prefix the property with layer0. (for example, layer0.lightTableStatus == 2).
The glyph order and their section headings will be preserved, but the filtering is all performed using custom code (plus custom cell drawing, in this case):

