Skip to content

feat(workspace-lens): fromUrl + fromRegistry — load a fitted lens over HTTP (0.1.1)#132

Merged
ruvnet merged 2 commits into
mainfrom
feat/workspace-lens-fromurl
Jul 7, 2026
Merged

feat(workspace-lens): fromUrl + fromRegistry — load a fitted lens over HTTP (0.1.1)#132
ruvnet merged 2 commits into
mainfrom
feat/workspace-lens-fromurl

Conversation

@ruvnet

@ruvnet ruvnet commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What / why

Adds the roadmap network-loading path to @metaharness/workspace-lens (ADR-238, #129). The typical deploy flow: fit a lens offline, publish the artifact, load it at startup.

  • WorkspaceLens.fromUrl(url, {fetchImpl?}) — fetch a serialized LensArtifact JSON from any URL (CDN, artifact store, raw gist). Injectable fetchImpl for tests / non-global-fetch runtimes (defaults to global fetch). Fails loudly on a non-2xx so a bad URL never yields a silently-broken lens.
  • WorkspaceLens.fromRegistry(name, {baseUrl, fetchImpl?}) — convenience that loads by name from a caller-supplied base (${baseUrl}/${name}.json). No registry endpoint is hardcoded — keeps the package free of any assumed/embedded URL.

Tests

3 new (fetch-stub 200 constructs + reads out; non-2xx throws with the status; fromRegistry builds the URL, trailing-slash tolerant). Full workspace-lens suite 20/20; tsc clean; healthcheck version green (workspace-lens is independently-versioned → 0.1.1). Dependency-free (global fetch, Node 20+).

Publishes as @metaharness/workspace-lens@0.1.1 on the next release tag.

🤖 Generated with claude-flow

…itted lens over HTTP (0.1.1)

Adds the roadmap network-loading path to @metaharness/workspace-lens (ADR-238): fit a lens offline,
publish the artifact, load it at startup.

- WorkspaceLens.fromUrl(url, {fetchImpl?}) — fetch a serialized LensArtifact JSON from any URL (CDN,
  artifact store, raw gist); injectable fetchImpl for tests / non-global-fetch runtimes; fails loudly on
  a non-2xx response so a bad URL never yields a silently-broken lens.
- WorkspaceLens.fromRegistry(name, {baseUrl, fetchImpl?}) — convenience that loads by name from a
  caller-supplied base (`${baseUrl}/${name}.json`). NO registry is hardcoded, so the package stays free
  of any assumed/embedded endpoint.

3 tests (fetch-stub 200 constructs + reads out; non-2xx throws; fromRegistry builds the URL with a
trailing-slash-tolerant base). Full workspace-lens suite 20/20; tsc clean; healthcheck version green
(workspace-lens is independently-versioned). Dependency-free (uses global fetch, Node 20+).

Co-Authored-By: claude-flow <ruv@ruv.net>
Comment thread packages/workspace-lens/src/lens.ts Fixed
@ruvnet ruvnet merged commit 96f1cfa into main Jul 7, 2026
25 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.

2 participants