Skip to content

feat(ext-registry): external package variant registry (Plan 09) + folder-based package management - #291

Merged
TablewareBox merged 15 commits into
devfrom
feat/ext-registry-plan09
Jun 25, 2026
Merged

feat(ext-registry): external package variant registry (Plan 09) + folder-based package management#291
TablewareBox merged 15 commits into
devfrom
feat/ext-registry-plan09

Conversation

@TablewareBox

Copy link
Copy Markdown
Collaborator

Summary

Lands the external package variant registry (Plan 09) on dev, plus extends package management to discover folder-based registries (Plan 04). External packages can expose registry YAML via pyproject.toml [tool.unilabos.registry] paths=[...] (fallback unilabos_registry/), where multiple device entries share one Python class with different class.init params.

15 commits, fast-forward over dev (0 behind), all isolated from the sim-pair / RMF work on the isaac branch.

Core capabilities

  • T1 discover external registry paths (pyproject [tool.unilabos.registry] + unilabos_registry/ fallback)
  • T2 YAML $ref resolver (relative path + JSON pointer + cycle detection); fix: only expand cross-file refs, preserve same-doc JSON-Schema $ref (#/$defs)
  • T3 build instances from class.init (factory / value / ${config.*} / ${node.*} placeholders)
  • T4 expand $ref during device YAML loading (shared contracts), multi-variant support
  • T5 wire external registry paths into setup / build_registry / startup
  • T6 resolve class.init into driver_params (ROS2 wrapper kept; config only feeds placeholders)
  • T7 community alias resolution + graph lookup fallback (community.<id> → local id)
  • D discover registry paths from unilabos.registry entry points
  • A/B startup wiring (devices roots + entry points) + local external-package full-chain test
  • package mgmt: inspect/upload now discover folder-based unilabos_registry/devices/*.yaml (reuses the discovery + $ref helpers, reads devices/*.yaml like the runtime registry). Source priority: root registry.yaml > unilabos_registry/ folder > @device AST.

Tests

  • tests/registry/ full suite green (21 passed), incl. new test_package_cli_folder_registry.py and the external-package full-chain test.
  • Verified end-to-end against a real pylabrobot package (5 devices: 4 LiquidHandler variants with distinct backends + 1 PlateReader), discovered from its native Plan-09 folder layout with no per-package workaround file.

Test plan

  • pytest tests/registry/
  • unilab package inspect --path <external-pkg-with-unilabos_registry/> reports source unilabos_registry/ and all variant devices
  • Start Edge with a graph referencing community.* variant ids; confirm class.init construction

🤖 Generated with Claude Code

Skyzuo9 and others added 15 commits June 25, 2026 16:28
…fallback)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 2add158)
…r + cycle detect)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit dfa523c)
…/placeholders)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 7e3f75d)
…iant test

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit d0aa6b6)
…registry/startup

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit e4c0fbb)
…back

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 478e6c0)
…pper kept)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit dede8fb)
…r + ROS device node

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 6eef718)
…ig only feeds placeholders)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 28a1879)
Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 764cd31)
…ame-doc JSON-Schema $ref (#/$defs)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 54b8a8f)
…entry points

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit b95a463)
…ib + edge wrapper)

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 80cfa8c)
…devices roots + entry points); B local external-package full-chain test

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit f74eec5)
…stry/ devices

inspect/upload previously only saw @device decorators and a root-level
registry.yaml. Add read_external_registry_devices() (reuses Plan-09
discover_registry_paths_from_project + resolve_yaml_refs, reads devices/*.yaml
like the runtime registry) and wire it into inspect_package source priority:
root registry.yaml > unilabos_registry/ folder > @device AST.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@TablewareBox
TablewareBox merged commit 77984f3 into dev Jun 25, 2026
1 check failed
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