Plugin Architecture - cprima-forks/uipath-ai-skills GitHub Wiki
Plugin Architecture
The plugin system allows domain-specific skills to extend the core generator and lint subsystems at runtime without modifying any core file.
Registration API (v1)
Plugins call registration functions from plugin_loader.py at import time:
from plugin_loader import register_generator, register_lint, register_scaffold_hook, register_namespace
register_generator("my_activity", gen_my_activity, display_name="MyActivity")
register_lint(my_lint_function, "lint_my_rules")
register_scaffold_hook(my_post_scaffold_hook)
register_namespace("mypfx", "clr-namespace:MyNamespace;assembly=MyAssembly")
load_plugins() is called at module load time in both generate_workflow.py and validate_xaml/_constants.py, so plugins are available to both subsystems.
Generator Extension
Plugin generators registered via register_generator are stored in a separate dict from _REGISTRY. In _generate_activity, they are checked after core registry lookup:
plugin_gens = get_generators()
if gen in plugin_gens:
id_ref = counter.next(_idref_prefix(gen))
return _auto_dispatch(plugin_gens[gen], args, id_ref=id_ref, scope_id=scope_id, indent=indent)
Plugin generators go through the same _auto_dispatch path as core generators — same parameter introspection, same framework arg injection. Plugin generators that produce UI activities register with get_ui_generators() to trigger has_ui namespace detection.
Lint Extension
Plugin lint functions are merged into the lint rule set via get_extra_known_activities() and get_extra_key_activities(). _constants.py merges plugin namespaces into PREFIX_TO_XMLNS and plugin activities into NEEDS_IDREF at import time.
Namespace Extension
Plugin namespaces registered via register_namespace are injected into the workflow's xmlns block by _build_namespaces when a plugin gen name appears in the spec. This ensures the correct xmlns:mypfx= declaration is emitted without any change to the core namespace logic.
Scaffold Hooks
Scaffold hooks run after scaffold_project.py creates the project skeleton. They allow plugins to inject additional files, directories, or configuration specific to their domain.
Planned Plugin Skills
| Plugin | Purpose |
|---|---|
uipath-sap-wingui |
SAP GUI for Windows automation |
uipath-action-center |
Human-in-the-loop form tasks and approval workflows |
uipath-du |
Document Understanding — taxonomy, extraction, classification |
The Action Center plugin (upaf: namespace) and SAP WinGUI plugin are partially referenced in _constants.py comments, indicating their namespace prefixes are reserved.