Repository navigation
feat(mcpx): in-script search also finds saved scripts (CODE-36) for #1937 - #9299
Conversation
The generated client's search() ranked tools only; saved scripts (recipes) were matched from the CLI/daemon but not from inside a script. codegen gains RecipeMeta and ModuleWithRecipes (Module delegates with none, so existing callers keep one generated search shape, now with an empty __recipeMeta). search() scores recipes with the tools weighting and returns them as kind recipe matches beside kind tool matches in one stable order (tools by namespace/name, recipes by name under an empty namespace), so limit/offset paging across the combined list stays exact. The daemon supplies its loaded recipes at both generation sites (registrySource for the exec service, consumer execScript); a recipe that opted out of tool exposure is not offered in search either. Tests: TestGeneratedSearchIncludesRecipes (codegen shape), TestSearchFindsRecipesAlongsideTools (execsvc, real runtime); full codegen/execsvc/daemon/cli/runner packages pass on the laptop, vet and gofmt clean. Docs: interfaces.md and the CODE-36 register row.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 26 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61355ef7e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…(CODE-36, #1937) Codex review on PR #9299 (P2): handleClient in daemon/server.go emitted the client through language.EmitModule, which reaches codegen.Module and therefore an empty recipe list -- and that endpoint is the one local mcpx exec/run fetch, so saved scripts only appeared in search for daemon-hosted execution. The TypeScript branch of handleClient now emits ModuleWithRecipes with the daemon's loaded recipes; other languages are unchanged. Test: TestHandleClientIncludesRecipesInSearch serves a temp scripts dir through handleClient and asserts the recipe lands in the module.
|
@codex review Both P2 findings on 3f1ee40 are fixed in bbe9dac (replies on each thread): the CLI envelope now forwards error/errorKind, and preflight timeouts are classified as timeout with the runner preserving the deadline signal. New regression tests in internal/cli, internal/execsvc, and internal/runner; all four affected packages pass on the laptop, vet clean. |
|
@codex review Correction to the previous comment (it carried the re-review text from PR #9205 by mistake): for PR #9299, the single P2 finding — the HTTP-generated TypeScript client ( |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
CODE-36 for #1937: in-script
search()also finds saved scriptsPart of task 9316 (remaining mcpx exec #1937 behaviors). PR #9205 landed CODE-35 (search offset paging) and CODE-30 (typed failure kinds); this lands CODE-36. CODE-19 (final top-level expression) remains open on #1937.
What changes
RecipeMeta(name, summary, placeholder names) andModuleWithRecipes(...);Module(...)delegates with no recipes, so existing callers' output is unchanged apart from the new empty__recipeMetaarray (one generated search shape either way).search(): saved scripts are scored with the same rules as tools (a word in the name beats a word in the prose) and returned askind: "recipe"matches besidekind: "tool"matches, in one stable order — tools by namespace then name, recipes by name under an empty namespace — solimit/offsetpaging across the combined list stays exact (CODE-35).ToolMatchgains thekind: "tool"discriminant; a recipe match carriesname,description,params,required, and no callable.registrySource(the exec service'sClientModule/ClientModuleFor, TypeScript target) and the consumerexecScriptpath.Server.recipeMetas()convertsrecipes.Recipe→codegen.RecipeMeta; a recipe that opted out of tool exposure (@tool false) is not offered in search either. The Python target has no in-script search today and is unchanged.Tests
TestGeneratedSearchIncludesRecipes(codegen): recipe data emitted, both kind discriminants present, plainModulestill emits an empty__recipeMetaand no recipe it was not given. The CODE-35 shape test's comparator expectation updated to the unifiedsortKey.TestSearchFindsRecipesAlongsideTools(execsvc, real runtime): a script callingsearch("screenshot")against a generated client getsrecipe:screenshot-and-diff:url,baselineandtool:capture_screenshot:url.go test ./internal/codegen ./internal/execsvc ./internal/daemon ./internal/cli ./internal/runner -count=1— all pass;go vetclean; gofmt clean.Docs
docs/interfaces.md:search()documented as finding recipes with thekinddiscriminant.docs/compare/register/code-mode.md: CODE-36 row marked landed (mcpx exec: typed results from outputSchema, an output cap, the final expression as the result, typed failures, paged search #1937).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.