Skip to content

add Panel ABC and entry-point discovery for panels and tools#2

Draft
Jepson2k wants to merge 1 commit into
mainfrom
claude/modular-gui-middleware-Z8j1C
Draft

add Panel ABC and entry-point discovery for panels and tools#2
Jepson2k wants to merge 1 commit into
mainfrom
claude/modular-gui-middleware-Z8j1C

Conversation

@Jepson2k
Copy link
Copy Markdown
Owner

Summary

Lets third-party packages register additional frontend tabs and tool specs purely via Python entry points - the frontend stays oblivious.

  • panels.py (new): Panel ABC + PanelSlot + PanelContext. NiceGUI-free so waldoctl stays import-light - plugin implementations import their UI toolkit themselves inside build().
  • discovery.py: list_panels / load_panel_class / iter_plugin_panels for the waldoctl.panels group, and list_tool_specs / load_tool_spec_class for waldoctl.tools. Mirrors the existing waldoctl.robots helper trio at discovery.py:25-67.
  • tools.py: ToolType flipped to StrEnum; ToolSpec.tool_type and ToolsSpec.by_type widened to str | ToolType so third-party tools can introduce categories beyond the built-in enum. Existing == ToolType.GRIPPER equality and isinstance(tool, GripperTool) checks keep working.
  • __init__.py: re-exports the new public surface.

Test plan

  • pytest tests/ - 12/12 pass (test_discovery_panels.py, test_discovery_tools.py)
  • Companion Waldo-Commander PR ships on the same branch (claude/modular-gui-middleware-Z8j1C); CI's branch-matching will use this waldoctl revision for that PR's job

Companion PR

The frontend wiring that consumes these new entry-point groups lives in jepson2k/Waldo-Commander#… on the matching branch.

https://claude.ai/code/session_01SxLY5QswPFprNvxDfDhwMU


Generated by Claude Code

Lets third-party packages register additional frontend tabs and tool
specs purely via Python entry points - the frontend stays oblivious.

- panels.py: Panel ABC + PanelSlot + PanelContext (NiceGUI-free so
  waldoctl stays import-light).
- discovery.py: list_panels / load_panel_class / iter_plugin_panels for
  the waldoctl.panels group, and list_tool_specs / load_tool_spec_class
  for waldoctl.tools - parallel to the existing waldoctl.robots
  helpers.
- tools.py: ToolType flipped to StrEnum and ToolSpec.tool_type /
  ToolsSpec.by_type widened to str | ToolType so third-party tools can
  introduce categories without extending the enum; existing
  ToolType.GRIPPER == "gripper" checks keep working.

https://claude.ai/code/session_01SxLY5QswPFprNvxDfDhwMU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants