Repository navigation
feat: --color for recolourable illustrations; the More: line keeps your filters; buy's default tier said right - #4
Merged
Conversation
…ur filters; buy's default tier said right --color <hex> on download and sync, and color on the local MCP server's download_to_folder and get_download_links (the store's contract since the-stack #362). The hex is checked here first (2f9e44, #2f9e44, #2f9; a usage error otherwise). A product whose library entry has no recolor is refused before any links are asked for; sync recolours the recolourable products, brings the rest as drawn, and refuses a --product that can't take a colour. The checksum is the one the store sends for the recoloured bytes: download plans from those links, sync asks for each recolourable product's links before planning so a second run skips files already there, every renewed link carries the colour, --file still takes the file's own name, and a coloured zip is <slug>-<rrggbb>.zip. `show` says when a product is recolourable. search's "More:" hint was `kadal-store search <words> --cursor N`, built from the words alone. The store's cursor is an offset into whatever list the call names, so following the hint without --shelf, --format, --max… paged through a different list. It is now searchAgain(), the tool arguments read back into flags (with --host), so the next page is of the same search. Without a tier, buy gets the cheapest licence on sale (the store's quote()), not "standard". The help, create_buy_link's tier description, the skill and the README now say so. The README's buy example carries the store's new second-person note (the-stack #366), and render.ts's "said once" check is tested against both versions of that note and against a note that doesn't say it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Three fixes found while rewriting the README, and
--colorfor the recolourable illustrations the store shipped in pmithunish/the-stack#362. The store-side fixes (recommend's scoring, the buy note's voice) are pmithunish/the-stack#366.--color <hex>(download, sync, and the local MCP server)The contract is #362's
get_download_linkson the store'smain:colortakes hex, each recoloured SVG's link comes back named<name>-<rrggbb>.svgwith the sha256 of the recoloured file and the same byte count, and the store refuses a colour for a product that isn't recolourable.download <slug> --color 2f9e44(or"#2f9e44", or#2f9): the hex is checked locally first (exit 2 before any request). The library'srecolordecides whether the product can be recoloured. If it can't, the refusal is clear and exit 2: "Retro UI sound effects comes in its own colours and can't be recoloured; leave the colour out. Only recolourable products (the Illustrations shelf) take one."--file hero.svgstill matches, a coloured zip is<slug>-<rrggbb>.zip, andshowsays "Recolourable".sync --color: recolourable products come in the colour and the rest as drawn. Their links are fetched before planning, because only the store knows a recoloured file's sha256. A--productthat can't be recoloured is refused.download_to_folderand the proxiedget_download_linkstakecolor. Until now the local server's schema dropped the field.--help, the README (download/sync and the tools table) and the skill, including that an unquoted#starts a shell comment.The search
More:hint dropped your filtersThe hint was built from the positional words only (
kadal-store search <words> --cursor N). The store'snextCursoris an offset into whatever list the call names. On the live catalogue, ordering is deterministic (everycreated_atis unique), so the store pages the same search correctly. The CLI was printing a different search. Following the hint forsearch --format png --limit 1gave page 2 of everything.searchAgain()reads the tool arguments back into flags (--shelf --style --topic --format --kind --sort --limit --max, quoting where needed, plus--hostwhen given). An integration test runs the printed line and gets the next PNG.The default tier was described wrongly
The help,
create_buy_link's tier description and the skill saidstandard (default). Without a tier, the store'squote()takes the cheapest licence on sale. All of them, and the README, now say so.buy's noteThe store's note was written for an agent ("until the person pays…"). #366 makes it second person. The README example now shows the new wording, which becomes real output once #366 deploys.
render.ts's "say it once" check is unchanged and now tested against the old note, the new one, and a note that doesn't say it.Verified
bun test: 74 pass (13 new).bun run lintandbun run typecheckare clean.bun run buildandnode tools/smoke.mjspass under Node.search_products, and recolours like #362: same length, coloured names, recoloured sha256, refusals word for word. Before the fix, the new search test failed:More: kadal-store search --cursor 1.search,show,download --color(twice: downloads, then skips), a refused colour, a bad hex andsync --color --dry-run.Not verified against the live store: there is no sign-in on this machine, and the live catalogue has no Illustrations shelf yet.
Changeset: patch.
🤖 Generated with Claude Code