Croway opened a new pull request, #27817:
URL: https://github.com/apache/camel/pull/27817

   Fixes https://issues.apache.org/jira/browse/CAMEL-25535
   
   `camel_catalog_example_file` resolved an example by its short name 
(`timer-log` finds `quick-start/timer-log`) but read the bundled file from a 
path built from the caller's string, so every short name ended in "Could not 
read bundled file", although the tool's own argument description uses short 
names. In an evaluation of coding agents, 25 of the 36 sessions that called the 
tool hit this and none got the file. The same code was duplicated in the shared 
registry of camel-jbang-core, with divergent not-found behaviour.
   
   - One implementation: the registry's `get_example_file` builds the resource 
path from the catalog entry's name and returns the full name; an unknown 
example lists the closest names, an unknown file the files of the example, an 
unknown level the levels that exist. `camel_catalog_examples` and 
`camel_catalog_example_file` are now thin wrappers of the registry tools, as 
the other shared tools already are (the answer is a `JsonObject` instead of the 
records).
   - The argument descriptions name an example and a file that exist 
(`quick-start/timer-log`, `timer-log.camel.yaml`); the doc table lists the real 
levels.
   - In the same change: the header of `throwException-eip.adoc` was the Stop 
EIP's (copied from stop-eip.adoc); it now has its own title, shortname and 
description, in the page and its catalog mirror.
   - Tests: `ExampleToolsRegistryTest` reads one file of every bundled example 
by its short name (iterating the catalog JSON), plus the error answers; 
`ExampleToolsTest` covers the wrappers.
   
   Tests: camel-jbang-core `ExampleToolsRegistryTest`, `ToolRegistryTest`, 
`ExampleHelper*Test`; camel-jbang-mcp full suite.
   
   _Claude Code on behalf of Croway_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to