Skip to content

feat(cli): default static registry for lousho add out of the box (M7b, #230) - #389

Merged
LinuxDevil merged 2 commits into
mainfrom
feat/lou-s8-default-registry
Oct 4, 2026
Merged

LinuxDevil merged 2 commits into
mainfrom
feat/lou-s8-default-registry

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Closes #230

Summary

  • lousho add works out of the box: with neither --registry nor LOUSHO_REGISTRY it reads DEFAULT_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".
  • New registry/ folder with the five starter items — open-meteo-weather and github-issues tools, changelog and code-review skills, generic-webhook channel — each an item.json plus source files, and the committed generated registry/dist/ (index.json + one document per item).
  • scripts/build-registry.ts validates every item with the now-exported IndexSchema/ItemSchema, the planFiles path rules and M7a's checkItem(), then writes deterministic sorted output. npm run registry:build regenerates it; the new npm run registry:check (wired into the CI job) fails when dist is stale.
  • Precedence is --registry > LOUSHO_REGISTRY > default; --registry none / LOUSHO_REGISTRY=none disables the registry and preserves the LOUSHO_CONFIG_INVALID "no registry configured" error.
  • Offline tests: src/cli/defaultRegistry.test.ts installs all five committed items via runAdd and loads the agent directory with resolveAgentDir() (tools and skills resolve, the channel default-exports a channel). add.test.ts covers the default fetch, none and both overrides.
  • docs/registry.md, README.md, CHANGELOG.md and regenerated llms-full.txt.

Design decisions

  • One constant for the hosting answer: DEFAULT_REGISTRY in src/cli/registry.ts is 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 recommended https://registry.lousho.com/index.json.
  • No Pages workflow yet: hosting is the owner's call, so no deployment workflow is added; committed registry/dist/ works with any of the three options, including github.com/ghraw as-is.
  • Source folders + committed static JSON: registry/<name>/ folders stay maintainable while consumers only read static JSON — the registry source is never executed by lousho add.
  • none sentinel: an explicit opt-out for offline or locked-down use that keeps the previous error path and code byte-for-byte.
  • Shared validation: the build reuses ItemSchema, planFiles and checkItem, so an item cannot pass the registry build and then fail lousho add.
  • Package boundary preserved: package.json files is untouched; registry/ is not shipped in the npm tarball.
  • Fallow: scripts/build-registry.ts carries the same // fallow-ignore-file complexity as the other scripts, and registry/** joins health.ignore — installed item code is not exercised by repo coverage, so its CRAP score would only be noise.

Tests

  • npx tsc --noEmit — clean
  • npm run lint — clean
  • npm run build, npm run build --workspace=packages/create-lousho-agent — clean
  • npm run test:types — 79 pass
  • npm run test:coverage — 4230 pass / 8 skipped, including the new defaultRegistry.test.ts
  • npm run docs:verify-snippets — 258 snippets type-check (8 run cleanly)
  • npm run docs:llms:check, npm run registry:check — clean
  • Agent Forge: typecheck, typecheck:server, vitest run (119 tests), test:server (133 tests) — all pass

Pre-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

…#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
LinuxDevil force-pushed the feat/lou-s8-default-registry branch from 04313a7 to dc5bbcd Compare October 4, 2026 15:26
@LinuxDevil
LinuxDevil marked this pull request as ready for review October 4, 2026 15:27
@LinuxDevil
LinuxDevil merged commit 26c6903 into main Oct 4, 2026
8 checks passed
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.

[M7b] Default static registry that lousho add uses out of the box

1 participant