Support extension repositories and catalog discovery
- Dominant language
- Rust
- Stars
- 209
- Forks
- 65
- Avg merge
- 8h 55m
- Merged PRs (30d)
- 126
Description
## Goal
Let people configure extension repositories, discover available releases through one catalog view, and install an extension from a local directory through the same lifecycle intended for later remote repositories.
This work is connected to #758. The first demonstration should install the released morphir-avro extension from a local repository and use it in the Desktop product steel thread.
## Language
- **Extension repository** is a logical collection of published extension releases, metadata, and artifacts. A directory, Git checkout, HTTP location, TUF repository, or OCI repository can back it.
- **Repository endpoint** is one configured location through which Morphir accesses a repository.
- **Extension registry** is a network service that hosts extension repositories. A local directory is a repository, not a registry.
- **Extension catalog** is the searchable view Morphir builds over enabled repositories. It is not an authority or a storage layout.
- **Repository metadata** is backend-specific data used to resolve releases. An index, TUF metadata, and OCI manifests are forms of repository metadata.
- **Installed extension inventory** is Morphir Home's durable record of installed releases and active selections.
User-facing commands should not use index as the name of a repository or installed state.
## Steel thread 1: one local repository
A contributor can start with a released extension bundle and an empty Morphir Home, then:
```text
morphir extension repository init
morphir extension repository add local-dev --directory
morphir extension repository publish --repository local-dev
morphir extension repository list
morphir extension search avro --repository local-dev
morphir extension install morphir-avro --repository local-dev
```
The exact bundle flag may change after inspecting the existing Avro release assets. The workflow must:
- use the verified artifact store, lock, activation, repair, and offline execution paths already delivered;
- persist repository configuration and installed inventory beneath Morphir Home;
- record repository identity, endpoint, metadata revision, artifact digest, and selected release;
- reject unsafe paths, malformed metadata, digest mismatches, and incompatible artifacts;
- report an operation ID and log location when repository, publication, or installation work fails;
- install and invoke morphir-avro without modifying repository files by hand;
- work again offline after installation.
## Steel thread 2: multiple local repositories
Add deterministic repository priority, duplicate-release handling, enable and disable operations, removal, refresh, and bounded metadata or download caching. Search output must identify which repository supplied each result. An exact lock continues to activate offline even if a repository is disabled or unavailable.
## Connected follow-up work
Track these as separate GitHub issues when their delivery is ready:
- Git or HTTP repository endpoints;
- authenticated TUF extension repositories;
- OCI-backed extension repositories;
- Desktop extension discovery and management UI;
- remote publication and maintainer authorization.
Those additions should implement the repository contract without changing the CLI nouns.
## Acceptance demonstration
From an empty Morphir Home:
1. Build or obtain the released morphir-avro bundle.
2. Initialize and populate a local extension repository.
3. Configure the repository.
4. Find Avro through morphir extension search.
5. Install it by extension identity.
6. Use it to generate an Avro schema from the Desktop steel-thread workspace.
7. Inspect the installed inventory and correlated logs.
8. Disconnect the network and repeat generation.
## References
- #758
- CONTEXT.md
- docs/design/draft/extensions/distribution-and-acquisition.md
- docs/design/proposals/wasm-extension-runtime-and-avro-backend.md
Contributor guide
Research direction
Start by reading CONTEXT.md, docs/design/draft/extensions/distribution-and-acquisition.md, docs/design/proposals/wasm-extension-runtime-and-avro-backend.md, and issue #758. Trace the existing artifact store, lock, activation, repair, and offline execution paths before defining the repository lifecycle. Done means the acceptance demonstration works from an empty Morphir Home, including search, installation, inventory, logs, and offline generation with morphir-avro.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100