feat(cli): default static registry for lousho add out of the box (M7b, #230) - #389
Merged
Merged
Conversation
…#230) lousho add now reads a default registry - the committed registry/dist/ static JSON, built from registry/<name>/ source folders by the new scripts/build-registry.ts - when neither --registry nor LOUSHO_REGISTRY points at one, so 'lousho add --list' works with no flags. Five starter items: the open-meteo-weather and github-issues tools, the changelog and code-review skills, and the generic-webhook channel. --registry > LOUSHO_REGISTRY > the default; the new value 'none' (in either place) disables the registry and keeps the old LOUSHO_CONFIG_INVALID 'no registry configured' error. IndexSchema and ItemSchema are exported so the build validates with the same rules lousho add enforces (plus planFiles paths and checkItem); npm run registry:build regenerates dist and the new registry:check, run in CI, fails when it is stale. The default URL lives in one DEFAULT_REGISTRY constant pending the owner's hosting choice on #230; no Pages workflow is added yet. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
LinuxDevil
force-pushed
the
feat/lou-s8-default-registry
branch
from
October 4, 2026 15:26
04313a7 to
dc5bbcd
Compare
LinuxDevil
marked this pull request as ready for review
October 4, 2026 15:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #230
Summary
lousho addworks out of the box: with neither--registrynorLOUSHO_REGISTRYit readsDEFAULT_REGISTRY(https://registry.lousho.com/index.json, the issue's recommended option a) instead of failing with "no registry configured; there is no hosted registry yet".registry/folder with the five starter items —open-meteo-weatherandgithub-issuestools,changelogandcode-reviewskills,generic-webhookchannel — each anitem.jsonplus source files, and the committed generatedregistry/dist/(index.json+ one document per item).scripts/build-registry.tsvalidates every item with the now-exportedIndexSchema/ItemSchema, theplanFilespath rules and M7a'scheckItem(), then writes deterministic sorted output.npm run registry:buildregenerates it; the newnpm run registry:check(wired into the CI job) fails whendistis stale.--registry>LOUSHO_REGISTRY> default;--registry none/LOUSHO_REGISTRY=nonedisables the registry and preserves theLOUSHO_CONFIG_INVALID"no registry configured" error.src/cli/defaultRegistry.test.tsinstalls all five committed items viarunAddand loads the agent directory withresolveAgentDir()(tools and skills resolve, the channel default-exports a channel).add.test.tscovers the default fetch,noneand both overrides.docs/registry.md,README.md,CHANGELOG.mdand regeneratedllms-full.txt.Design decisions
DEFAULT_REGISTRYinsrc/cli/registry.tsis the single place the URL lives, so the owner's pending choice between options (a)/(b)/(c) is a one-line change. Set to the recommendedhttps://registry.lousho.com/index.json.registry/dist/works with any of the three options, includinggithub.laiyagushi.com/ghrawas-is.registry/<name>/folders stay maintainable while consumers only read static JSON — the registry source is never executed bylousho add.nonesentinel: an explicit opt-out for offline or locked-down use that keeps the previous error path and code byte-for-byte.ItemSchema,planFilesandcheckItem, so an item cannot pass the registry build and then faillousho add.package.jsonfilesis untouched;registry/is not shipped in the npm tarball.scripts/build-registry.tscarries the same// fallow-ignore-file complexityas the other scripts, andregistry/**joinshealth.ignore— installed item code is not exercised by repo coverage, so its CRAP score would only be noise.Tests
npx tsc --noEmit— cleannpm run lint— cleannpm run build,npm run build --workspace=packages/create-lousho-agent— cleannpm run test:types— 79 passnpm run test:coverage— 4230 pass / 8 skipped, including the newdefaultRegistry.test.tsnpm run docs:verify-snippets— 258 snippets type-check (8 run cleanly)npm run docs:llms:check,npm run registry:check— cleantypecheck,typecheck:server,vitest run(119 tests),test:server(133 tests) — all passPre-existing failures (identical on baseline, unrelated):
npm run pack-smoke: tarball unpacked size 16,982,166 exceeds the 16,777,216 cap; baseline is 16,976,834 and already over (this change adds ~5 KB;registry/is not shipped).npm run fallow: 10 circular dependencies, 5 clone groups and 6 complexity findings, all in pre-existing files — this change adds no findings.Live test spend: none — the ticket has no live test and all new tests are offline.
🤖 Generated with Devin