CookBot tools: workspace search, pantry, shopping list, catalog (#82, cook-md#293) - #103
Merged
Conversation
…ervice.computeResult
…g tools live in catalog-recipe-tools.ts
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.
Closes #82 (part 1 — CookCLI operations as tools). Client side of cook-md/cook-md#293 (pairs with cook-md/cook-md#309).
Six deterministic CookBot tools so the assistant stops re-reading files each turn and can reach the curated cook.md catalog.
Spec:
docs/superpowers/specs/2026-08-18-cookbot-workspace-and-catalog-tools-design.md· Plan:docs/superpowers/plans/2026-08-18-cookbot-workspace-and-catalog-tools.mdWorkspace tools (
packages/cooklang, issue #82)searchRecipes— the realcook search(cooklang_find::search) via a new async native export; blank query lists every.cook/.menu; tag filter; workspace-relative paths.getPantry/checkPantry—config/pantry.confparsed by the cooklang crate (sections, low stock; case-insensitive in-stock check). Missing file is a valid answer, other read errors are errors.generateShoppingList— headless list from recipes or a.menu(aisle-grouped, pantry-subtracted, sub-recipe refs resolved), oraddToList: trueto add to the live list and open the view. Validates before mutating; paths bounded to the workspace.RecipeReferenceResolverextracted fromShoppingListContribution;ShoppingListService.computeResult()extracted fromregenerate().searchRecipes/parsePantry/checkPantryexports;cooklang-find→ 0.6.1 withdefault-features = false(avoids duplicate uniffi symbols;cooklang-reportsstill pulls 0.5.8 — collapses when it bumps).Catalog tools (
packages/cooklang-ai, #293)SearchRecipeCatalog,GetCatalogRecipe); gRPC client +CookbotServerToolsServiceplumbing.searchRecipeCatalog— structured criteria (enums match the Rails vocabulary and the cookbotrecipe-discoveryskill) + keywords; returns Rails JSON verbatim.addCatalogRecipe— fetches the recipe and stages it through the chat changeset exactly likesuggestFileContent(default path<Meal>/<Title>.cook); the recipe body never round-trips through the model.Verification
@theia/cooklang151 +@theia/cooklang-ai88 specs green; lint clean;cargo test/clippy clean; whole-monoreponpm run compileandappbundle OK.Release note
The cookbot server PR (cook-md/cook-md#309) ships prompts that name these tools — release this editor build first or together.