kiwi/app/services
pyr0ball b2c546e86a feat: wire secondary-use window hints into recipe engine (#83)
Secondary-state items (stale bread, overripe bananas, day-old rice, etc.)
are now surfaced to the recipe engine so relevant recipes get matched even
when the ingredient is phrased differently in the corpus (e.g. "day-old
rice" vs. "rice").

Backend:
- Add rice and tortillas entries to SECONDARY_WINDOW in expiration_predictor
- Add secondary_pantry_items: dict[str, str] field to RecipeRequest schema
  (maps product_name → secondary_state label, e.g. {"Bread": "stale"})
- Add _SECONDARY_STATE_SYNONYMS lookup in recipe_engine — keyed by
  (category, state_label), returns corpus-matching ingredient phrases
- Update _expand_pantry_set() to accept secondary_pantry_items and inject
  synonym terms into the expanded pantry set used for FTS matching

Frontend:
- Add secondary_pantry_items to RecipeRequest interface in api.ts
- Add secondaryPantryItems param to _buildRequest / suggest / loadMore
  in the recipes store
- Add secondaryPantryItems computed to RecipesView — reads secondary_state
  from inventory items (expired but still in secondary window) and builds
  the product_name → state_label map
- Pass secondaryPantryItems into handleSuggest and handleLoadMore

Closes #83
2026-04-18 19:06:53 -07:00
..
community feat(community): KiwiCommunityStore + pseudonym helpers in per-user store 2026-04-13 10:54:13 -07:00
export chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
image_preprocessing chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
meal_plan docs(bsl): document cf-text/LLMRouter routing chain in llm_timing and llm_planner 2026-04-12 14:07:32 -07:00
ocr chore: bump circuitforge-core dep to >=0.8.0; fix stale resources imports 2026-04-04 22:39:04 -07:00
quality chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
recipe feat: wire secondary-use window hints into recipe engine (#83) 2026-04-18 19:06:53 -07:00
__init__.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
barcode_scanner.py feat: cloud auth bypass, VRAM leasing, barcode EXIF fix, pipeline improvements 2026-04-01 16:06:23 -07:00
expiration_predictor.py feat: wire secondary-use window hints into recipe engine (#83) 2026-04-18 19:06:53 -07:00
heimdall_orch.py feat(kiwi): add Heimdall orch budget client with fail-open semantics 2026-04-14 15:15:43 -07:00
inventory_service.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
openfoodfacts.py fix: barcode scan performance + timeout + success message 2026-04-16 09:57:53 -07:00
receipt_service.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
receipt_service_inmemory_backup.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00