Refactor: register conductor plugins on-demand rather than unconditionally in createConductor
Currently createConductor.ts unconditionally registers all host-side plugins every time a conductor is instantiated:
hostPlugin.registerPlugin(AutoCompletePlugin);
const csePlugin = conduit.registerPlugin(CseMachineHostPlugin);
@AaravMalani has pointed this out in the review comments of #4000.
Problems:
- Every worker load registers all plugins regardless of whether the evaluator uses them AutoComplete and CSE machine code runs even for evaluators that don't need either
- The return type of createConductor grows as plugins are added, coupling callers to plugin-specific instances they may not need
Proposed direction:
The runner-side plugin (or the evaluator when it loads a CSE/autocomplete runner plugin) should signal to the host which host-side plugins it requires, triggering registration on demand. This keeps createConductor minimal and makes plugin coupling explicit at the runner level. The host only spins up what is actually requested.
Steps:
- Investigate whether conductor's conduit protocol supports runner-initiated host plugin registration, or if that needs to be added to conductor itself
- Migrate AutoCompletePlugin first : @AaravMalani has indicated he plans a PR for this side
- Migrate CseMachineHostPlugin in the same pattern once the mechanism is established
- createConductor should ideally return only { hostPlugin, conduit } specific plugin instances should be obtained separately or via a plugin registry, not bundled in the factory return
Needs discussion with @AaravMalani on what the conductor protocol changes look like before any code is written.
Refactor: register conductor plugins on-demand rather than unconditionally in createConductor
Currently createConductor.ts unconditionally registers all host-side plugins every time a conductor is instantiated:
@AaravMalani has pointed this out in the review comments of #4000.
Problems:
Proposed direction:
The runner-side plugin (or the evaluator when it loads a CSE/autocomplete runner plugin) should signal to the host which host-side plugins it requires, triggering registration on demand. This keeps createConductor minimal and makes plugin coupling explicit at the runner level. The host only spins up what is actually requested.
Steps:
Needs discussion with @AaravMalani on what the conductor protocol changes look like before any code is written.