Repository navigation
SRP-001 Registry Expansion Proposal #26
dbotwinick
started this conversation in
Ideas
Replies: 1 comment 3 replies
|
Suggestion for the Perhaps use a mapping, where the current registries:
sparkrun-official:
name: 'Sparkrun Official'
url: https://github.com/scitrera/sparkrun
subpath: recipes
description: Official sparkrun recipes
enabled: true
visible: true
eugr-vllm
url: https://github.com/eugr/spark-vllm-docker
subpath: recipes
description: EUGR vLLM recipes for DGX Spark
enabled: true
visible: true
#... |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Registry Expansion Spec
Status: DRAFT
Summary
Expand the sparkrun registry system with three capabilities:
@registry/recipe-namesyntax for scoped lookups with interactive disambiguation1. Visibility Control (
visiblefield)Data Model
Add a
visiblefield toRegistryEntry:Semantics Matrix
enabledvisiblelist?@prefix/?TrueTrueTrueFalseFalse*Unless
--allis passed tolist/search, or--registry <name>explicitly targets it.Key Behavior
updatepulls them). They just don't appear in default output.sparkrun run qwen3-1.7b-vllmonly searchesvisible: trueregistries. This prevents experimental recipes from shadow-matching user intent.sparkrun run @experimental/my-reciperesolves from a hidden registry.--registry <name>overrides visibility.sparkrun recipe list --registry sparkrun-experimentalshows recipes from a hidden registry.--allreveals everything.sparkrun recipe list --allincludes hidden registries.registries.yaml Format
2. Enable/Disable CLI Commands
New Commands
These flip the
enabledfield inregistries.yamland report the change.Behavior:
recipe updaterefreshes it.Output Examples
Visibility Toggle (future consideration)
These flip
visiblewithout touchingenabled. Lower priority — can be added when there's demand. For now, users can editregistries.yamldirectly.3. Registry-Prefixed Recipe Names (
@registry/recipe)Syntax
Examples:
Parsing Rules
find_recipe(name)applies these rules in order:namecontains no@prefix AND (contains/or ends in.yaml/.yml) -> treat as file path (unchanged behavior)namestarts with@-> parse as@registry/recipe, search only that registry@, no/, no.yamlextension -> search paths -> visible+enabled registries (current behavior)Parsing detail for step 2:
Why
@prefix/Instead of Alternativesregistry/reciperecipes/qwen3-1.7b-vllm)registry:reciperepo:quant)registry::recipe#registry/recipe#is a shell comment character@prefix is unambiguous:@@scope/package), Git (@{upstream}), social mediaTab Completion (Two-Phase)
The
RecipeNameType.shell_completemethod becomes two-phase:Phase 1: No
@yet (or partial@reg...)Phase 2: After
@registry/Implementation sketch:
Interactive Disambiguation (Bare Name Collisions)
When a bare recipe name matches in multiple registries:
Implementation:
find_recipereturns all matches when multiple exist (currently returns first)click.promptwhenlen(matches) > 1and stdin is a TTY@registry/recipe) skip disambiguation entirely — the scope is explicit4. RegistryManager API Changes
New/Modified Methods
find_recipe Changes
New exception type:
5. Default Registries Update
Note:
sparkrun-experimentaluses the same repo assparkrun-officialbut withsubpath: experimental-recipes. This means a singlegit clonecould serve both, but the current sparse-checkout approach clones per-registry. That's fine — the shallow clone is cheap and keeps the cache layout simple. Future optimization: detect same-URL registries and share a single clone with multiple sparse-checkout paths.6. CLI Command Summary
New Commands
sparkrun recipe enable-registry <name>sparkrun recipe disable-registry <name>Modified Commands
sparkrun recipe listvisibleflag; add--allflagsparkrun recipe search <query>visibleflag; add--allflagsparkrun recipe registriesvisiblecolumnsparkrun run <recipe>@registry/recipesyntax; interactive disambiguationsparkrun stop <recipe>@registry/recipesyntaxsparkrun logs <recipe>@registry/recipesyntaxsparkrun recipe show <recipe>@registry/recipesyntaxsparkrun recipe validate <recipe>@registry/recipesyntaxsparkrun recipe vram <recipe>@registry/recipesyntaxUnchanged
sparkrun recipe updatesparkrun recipe add-registry--visible/--no-visibleflag (optional)sparkrun recipe remove-registry7. Migration / Backward Compatibility
visibledefaults toTruewhen absent fromregistries.yaml, so existing configs are unaffected.@prefix is opt-in. Users who never type@see no behavior change (aside from disambiguation prompts when collisions occur).find_recipecallers that don't catchRecipeAmbiguousErrorwill see it as aRecipeError(it's a subclass), so they'll report an error message rather than silently picking the wrong recipe.8. Implementation Order
include_hiddenfilters,enable/disable_registry,find_recipe_in_registry,list_registry_recipes@prefix/parsing,RecipeAmbiguousError, visible-aware search--allflag onlistandsearchregistriestable update — show visible column_load_recipe@completionDEFAULT_REGISTRIES, createexperimental-recipes/subpath in repo9. Edge Cases
@nonexistent/recipe@disabled-reg/recipe@hidden-reg/recipe@reg/nonexistent@reg/(no recipe name)@/recipe(no registry)./foo.yamlrecipes/foo.yaml/, no@prefix)All reactions