Repository navigation
feat(shiso): Vault Image Intelligence & Generation - #80
Merged
Merged
Conversation
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.
Summary
SHISO R2 connects the assistant to The Kitchen Codex's existing Vault image authority instead of guessing image presence or claiming image generation is unsupported.
missing,broken,valid, andunknownstatus.RecipeImageRecoveryController, provider selection, quote/confirmation, and canonical save path.No second image engine, provider route, Vault writer, or image tool was introduced.
R2-A — Vault Image Inventory
New closed tool
inventory_vault_images:{"tool":"inventory_vault_images","status":"missing","limit":20,"offset":0}assessRecipeImageHealth.missing,broken(broken local/invalid remote),valid(valid local), andunknown(remote-present or unverifiable).unknown, nevermissing.search_vault_recipeswith “no image”.Acceptance: a disposable on-disk Vault with two missing images and other valid/broken images returns exactly the two missing recipes.
R2-B — Image Generation
Tool
generate_recipe_imagecalls the existingRecipeImageRecoveryControllerwith the selected canonical recipe.It preserves:
The tool never saves, never exposes preview tokens/paths, and never invents recipe details. Generation uses the canonical recipe title, ingredients, cuisine, course, description, and Markdown hash; unsaved SHISO working-copy edits are not used.
A compact image panel shows the authenticated preview with:
Preview is never automatically saved. Save uses the existing canonical image-save path and the R1 immediate-refresh correction to update the current recipe and Vault card.
Application-boundary image authorization
The model prompt is not the authorization boundary.
src/core/shiso/imageGenerationAuthorization.tsclassifies the exact user-authored message before the turn.ShisoModalcreates a per-turn grant only when:generate_recipe_imagechecks this grant before calling the controller. The model cannot create, widen, or replay it. A second tool call in the same turn is rejected after the first consumes the grant.Verified:
Verification
tsc --noEmitgit diff --checkA combined 2-worker run exposed two pre-existing 1-second Vault-connect timeouts in the large real-App file; that file passes 13/13 when run alone, and the 27-file focused suite passes 370/370. No R2 assertion failed.
The rendered preview test uses jsdom and deterministic PNG bytes. No paid provider calls were made. No visual screenshot was captured in this scope.
Scope
15 files: 11 modified, 4 new.
No personal Vault or credential changes, no paid inference, no additional image engine, no bulk generation, and no Advanced Nutrition/metadata-recovery changes.
Not merged.