Publishing
To make a repository hub-loadable you add one manifest section, keep the module import-safe, and register the repo in the Hub index. After that, hub.use("your-org/your-module:Export") resolves for anyone.
Package layout
Section titled “Package layout”The loader supports a flat package or the standard src/ layout:
The [tool.retriever.module] manifest
Section titled “The [tool.retriever.module] manifest”This section is the entire contract the loader reads. module names the importable package; the exports table maps each public name to a dotted.module:Attribute path inside that package.
Rules the loader enforces:
- Every export value needs the
:separator, and the module part must live inside the declared package (lidar_slam.*). min_retriever_versionis checked against the consumer’s installedretrieverversion.[project].dependenciesare checked as PEP 508 requirements — a missing or version-incompatible dependency raises before your code imports.
An export can be anything importable: a Flow class, a @io envelope type, a plain domain type, a transform, or a pipeline builder (Composable Pipelines covers the builder exports).
Keep modules import-safe
Section titled “Keep modules import-safe”The loader imports your package top-to-bottom. Top-level code must not open cameras, sockets, SDK clients, GPU contexts, or files — importing the module must be free of side effects.
Push all resource acquisition into the Flow lifecycle:
- module top level: import-safe only
__init__: store lightweight, serializable configurationinit_config(): return serializable reconstruction datareset()/__lazy_init__(): acquire runtime-local resources
Register in the Hub index
Section titled “Register in the Hub index”The index is a git repo of TOML entries keyed by modules/{org}/{name}.toml. Each entry points at your repo:
The default index is openretriever/hub-index; consumers can point elsewhere with RETRIEVER_HUB_INDEX_URL.
Before you publish
Section titled “Before you publish”- the repo is reachable (add
RETRIEVER_HUB_TOKENsupport in mind for private repos) pyproject.tomlhas a valid[tool.retriever.module]section- at least one semver tag exists — version resolution reads git tags like
v1.0.0, and a repo with none raisesHUB_NO_SEMVER_TAGS - the declared package imports cleanly with no side effects
- the smallest public example runs without private credentials or local-only paths
Run your module’s smallest smoke command and confirm every documented import and output still matches before announcing. Keep hosting credentials, DNS, and org-specific release notes out of the public package docs.
Release boundary
Section titled “Release boundary”GoldenRetriever is the current applied catalog and the reference for this shape: source examples plus a manifest-declared Hub payload pack. Do not ship a second runtime package to share applied robot payloads — publish them as a Hub module instead. See GoldenRetriever Examples.
