We just merged an Open Library book lens (#199 → #399): look at a bookshelf, get ratings/edition info on the glass. The pattern is now proven and repeatable — so pick a domain you care about and build the lens for it.
What: a shop-provider plugin that answers a lookup from a free API and surfaces it through TasteLens, mirroring the Open Food Facts / Open Library connectors.
Pick a no-key API so anyone can run it:
- 🎬 TVmaze (shows) · 🎨 Art Institute of Chicago (artworks) · 🎲 BoardGameGeek (games) · 🌍 REST Countries (flags/facts) · 🐦 iNaturalist (species) · 🎮 PokeAPI · 🍿 Open Trivia — all keyless. (Anything OpenAI-style needing a key works too, but keyless is friendlier to try live.)
Start here:
host-python/src/dreamlayer/plugins/openlibrary.py — the connector to mirror (freshly merged, so it reflects current API v2). Note the injected fetch_fn seam — that's what makes it testable offline.
host-python/src/dreamlayer/plugins/openfoodfacts.py — the original, same shape.
examples/hello-lens/ — the ten-minute plugin tutorial.
- Register through
ctx.add_shop_provider(fn); declare requires = ("network",); return {} when offline or on a miss (never throw into rank()).
Done means: a connector module + a test with a faked HTTP response (no network in CI — pass a lambda returning canned JSON, exactly like openlibrary's tests), an offline-returns-{} path, and a passing validation gate. Gate a rating on the source actually having one, so an unrated item never fakes a score. Sign your commits (git commit -s) — CI checks DCO.
No hardware needed — everything runs in the test suite.
We just merged an Open Library book lens (#199 → #399): look at a bookshelf, get ratings/edition info on the glass. The pattern is now proven and repeatable — so pick a domain you care about and build the lens for it.
What: a shop-provider plugin that answers a lookup from a free API and surfaces it through TasteLens, mirroring the Open Food Facts / Open Library connectors.
Pick a no-key API so anyone can run it:
Start here:
host-python/src/dreamlayer/plugins/openlibrary.py— the connector to mirror (freshly merged, so it reflects current API v2). Note the injectedfetch_fnseam — that's what makes it testable offline.host-python/src/dreamlayer/plugins/openfoodfacts.py— the original, same shape.examples/hello-lens/— the ten-minute plugin tutorial.ctx.add_shop_provider(fn); declarerequires = ("network",); return{}when offline or on a miss (never throw intorank()).Done means: a connector module + a test with a faked HTTP response (no network in CI — pass a lambda returning canned JSON, exactly like
openlibrary's tests), an offline-returns-{}path, and a passing validation gate. Gate a rating on the source actually having one, so an unrated item never fakes a score. Sign your commits (git commit -s) — CI checks DCO.No hardware needed — everything runs in the test suite.