davsclaus opened a new pull request, #31091: URL: https://github.com/apache/camel/pull/31091
_Claude Code on behalf of Claus Ibsen_ [CAMEL-27762](https://issues.apache.org/jira/browse/CAMEL-27762) A project that runs a newer Kamelets release than the Camel CLI's default sets `camel.jbang.kameletsVersion` in `application.properties`, and `camel run` uses that catalog. The AI tools (the MCP server, `camel ask`, the TUI source editor) checked the `kamelet:` endpoints against the catalog of the CLI's classpath instead. A Kamelet that only the newer release has was then reported as unknown on every validate and every write, though the route runs: ``` kamelet:soap-source: no Kamelet named soap-source in the Kamelet catalog or the project ``` Found with the SOAP examples (apache/camel-jbang-examples#145): `soap-source` and `soap-action` are new in camel-kamelets 4.24.0, and main still runs the 4.23.0 catalog by default. - **Validator and file tools:** `KameletDefinitions.projectVersion` reads `camel.jbang.kameletsVersion` as `camel run` does: `application.properties` of the directory, with `application-dev.properties` (the default profile) winning, and a placeholder ignored. The Kamelet checks look the Kamelets up in that catalog, including their properties. - **`camel_catalog_doc` and `camel_catalog_find`:** they use that version when the project directory is known (the default directory of the TUI and `camel ask`, or the only root an MCP client declares). - **Errors:** a Kamelet that isn't found is reported with the catalog version that was looked at (`in the Kamelet catalog 4.23.0 or the project`). `camel_catalog_doc` gives it as `kameletsVersion`, and the error of `camel_catalog_kamelet_doc` says to pass the project's version as `kameletsVersion`. - **Docs:** the Kamelet Catalog section of the MCP page says how the version is picked. ## Tests - **New tests in `KameletChecksTest`:** reading the project's version, the validator with and without it (a misspelt property of the newer Kamelet is still caught), and `camel_catalog_doc` and `camel_catalog_find` with a version. The validator test fails with the version lookup turned off. - **Existing tests:** the AI tools tests of `camel-jbang-core` pass (1115, 1 skipped). - **End to end:** the MCP server was built from this branch, with the `soap-facade` route of apache/camel-jbang-examples#145: - without the property, `camel_validate_source` reports `no Kamelet named soap-source in the Kamelet catalog 4.23.0 or the project`; - with `camel.jbang.kameletsVersion=4.24.0-SNAPSHOT`, it reports the source as valid, and `camel_write_file` reports no Kamelet error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
