Repository navigation
Add image_find: stock photos first, licence record per picture - #27
Merged
Merged
Conversation
image_find (MCP tool and `funkbox image find`) returns a licensed stock photo from Pexels, then Unsplash, saved to inputs/ with inputs/<name>.credit.json (author, licence, credit line, contains_people, release_status). Rule: stock first. A picture with people is never generated (FastSD renders faces badly): no match means try other words. FastSD is a fallback only for a picture without people, and only with fallback="fastsd_scene"; its result is tagged generated. Keys come from PEXELS_API_KEY / UNSPLASH_ACCESS_KEY, read from the environment only. With neither set the tool answers NOT CONFIGURED and sends nothing. HTTP and the generator are injectable; the tests run offline. image_generate's description now says it is not for pictures of people. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
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
Adds
image_find, a stock-photo tool, as an MCP tool and asfunkbox image find.inputs/<name>.jpgand writesinputs/<name>.credit.jsonnext to it: source, author, licence, credit line,contains_people,release_status, query, retrieved date.The rule
fallback="none"is the default.people=true) searches stock only. A miss returnsNO MATCH.fallback="fastsd_scene". The result is taggedgeneratedwith its own record.PEXELS_API_KEY/UNSPLASH_ACCESS_KEYin the environment only. Nothing is written to a file or logged. With neither set, the tool answersNOT CONFIGUREDand sends nothing.Changed
funkbox/studio/stock.py(new),funkbox/studio/tools.py(tool),funkbox/studio/images.py(CLI verb),funkbox/tool_options.py(StockOrientation,StockFallbackenums).image_generatedescription now says it is not for pictures of people.docs/catalog.jsonregenerated (python -m funkbox catalog --checkpasses). Tool count 50 → 51 in README, llms.txt and the server tests.docs/studio.md, both funk-studio SKILL.md copies (kept identical), THIRD_PARTY_NOTICES.md (photos section). README's "no API keys" line now says stock search is the optional part.Tests
tests/studio/test_stock_find.py: 11 tests, all offline (fake HTTP, injected generator). Covers the people rule, record validation, the parsers, Pexels before Unsplash, no-key behaviour, no FastSD for people, FastSD tagging, the download and credit record, and the MCP surface.tests/test_server.pyandtests/test_p6_install.py.python -m pytest -q -p no:cacheprovider tests→ 1277 passed, 13 skipped (about 25 min).Not in this PR
release_statusrecords the licence but cannot verify a release.🤖 Generated with Claude Code
Co-Authored-By: Claude Haiku 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017qYKdYke3ySSZS76W9Tp34
Generated by Claude Code