feat(workspace-lens): fromUrl + fromRegistry — load a fitted lens over HTTP (0.1.1)#132
Merged
Conversation
…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>
…oS — CodeQL js/redos)
4 tasks
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.
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 serializedLensArtifactJSON from any URL (CDN, artifact store, raw gist). InjectablefetchImplfor tests / non-global-fetch runtimes (defaults to globalfetch). 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;
fromRegistrybuilds the URL, trailing-slash tolerant). Full workspace-lens suite 20/20;tscclean; healthcheck version green (workspace-lens is independently-versioned → 0.1.1). Dependency-free (globalfetch, Node 20+).Publishes as
@metaharness/workspace-lens@0.1.1on the next release tag.🤖 Generated with claude-flow