Using a custom route source (an external routing service, hand-authored scenario routes) currently means editing core code: RouteGeneratorType is a closed enum and RouteGenerator.create() dispatches to the two built-in generators directly.
PLUGIN_SYSTEM.md states the direction for this kind of extension: "Any installed package can register models, configs, or tools without modifying the core codebase." Route generators aren't one of the extension points today, and I can't tell from the outside whether that's a deliberate boundary or just not built yet, hence a question before any PR.
If you'd take it, the shape I have in mind follows the doc's guideline that plugins extend components and never replace built-in ones: an alpasim.route_generators registry plus an optional route_generator_plugin config field that resolves through it when set. Unset keeps the enum dispatch untouched, so existing configs see no change. I would deliberately not migrate the two built-in generators to entry points in the same change; RouteGenerator is an ABC, and retrofitting a uniform construction contract onto both existing classes is more than this needs.
I have a working version of this, small and strictly additive, and can open a PR if the direction sounds right, or build a different shape if you'd draw the boundary elsewhere.
Using a custom route source (an external routing service, hand-authored scenario routes) currently means editing core code:
RouteGeneratorTypeis a closed enum andRouteGenerator.create()dispatches to the two built-in generators directly.PLUGIN_SYSTEM.md states the direction for this kind of extension: "Any installed package can register models, configs, or tools without modifying the core codebase." Route generators aren't one of the extension points today, and I can't tell from the outside whether that's a deliberate boundary or just not built yet, hence a question before any PR.
If you'd take it, the shape I have in mind follows the doc's guideline that plugins extend components and never replace built-in ones: an
alpasim.route_generatorsregistry plus an optionalroute_generator_pluginconfig field that resolves through it when set. Unset keeps the enum dispatch untouched, so existing configs see no change. I would deliberately not migrate the two built-in generators to entry points in the same change;RouteGeneratoris an ABC, and retrofitting a uniform construction contract onto both existing classes is more than this needs.I have a working version of this, small and strictly additive, and can open a PR if the direction sounds right, or build a different shape if you'd draw the boundary elsewhere.