Context
The SDK currently loads the imednet-workflows plugin via a dynamic import_module inside a try/except block, returning Any. This defeats static typing, breaks IDE autocomplete for sdk.workflows, and introduces a hidden dependency anti-pattern.
Implementation Plan
- Refactor the workflow loading mechanism to use
importlib.metadata.entry_points.
- The
imednet-workflows package should register itself to an imednet.plugins entry point in its pyproject.toml.
- Ensure Mypy/Pyright can correctly infer the types of loaded workflows.
Acceptance Criteria
Context
The SDK currently loads the
imednet-workflowsplugin via a dynamicimport_moduleinside atry/exceptblock, returningAny. This defeats static typing, breaks IDE autocomplete forsdk.workflows, and introduces a hidden dependency anti-pattern.Implementation Plan
importlib.metadata.entry_points.imednet-workflowspackage should register itself to animednet.pluginsentry point in itspyproject.toml.Acceptance Criteria
import_module("imednet_workflows.namespace")is replaced with standard entry point discovery.pyproject.tomlin the workflows package..workflowsnamespace.