davsclaus opened a new pull request, #27299: URL: https://github.com/apache/camel/pull/27299
_Claude Code on behalf of davsclaus_ [CAMEL-25283](https://issues.apache.org/jira/browse/CAMEL-25283) The kamelet page explained how to *use* a Kamelet but not how to *write* one, so an agent asking the catalog how to author a custom Kamelet found nothing. This follows CAMEL-25194, which made the tools accept a `.kamelet.yaml`. The task came from the Kaoto blog on custom Kamelets, done here with plain Camel, the CLI and the MCP tools. ### Docs (plain Camel only) - `kamelet-component.adoc`: a short *Writing a custom Kamelet* section with the three kinds (`source`, `sink`, `action`, set by the `camel.apache.org/kamelet.type` label) and where a route uses each. - New sub-page `kamelet-custom.adoc`, published under *others* like the aws2-s3 sub-pages (symlink plus nav entry). It covers: - the kinds; - the parts of the file; - parameters as `{{name}}`, `{{?name}}` for optional ones, and defaults; - one Kamelet of each kind (a timer source, a jq field-filter action, a file sink); - a route that uses all three, `camel run` and `camel validate yaml`; - where Camel looks for `<name>.kamelet.yaml` (`camel.component.kamelet.location`). - Every example was checked: the three Kamelets and the route validate, and `camel run` of them wrote files holding only the allowed fields (`{"id":"…","country":"DK"}`). ### Making a local model find the page - **`camel_catalog_doc` serves component sub-pages.** `docPage` worked only for languages. A component answer now lists `docPages` with their titles: the sub-pages its page links to with `xref:others:<name>-<page>.adoc[Title]`. `docPage=<page>` returns one as text, without the option list. The aws2-s3 sub-pages (`streaming`, `consumer-examples`, `producer-operations`) become reachable too. - The links decide what counts as a sub-page, not the name prefix: `kamelet-main` is another artifact's page, not a kamelet sub-page. - **Pointed to where a model looks or fails.** The page is named in the `camel_catalog_doc kamelet` answer, in `camel_catalog_sample kamelet` (`guide`), and in the answer of `camel_validate_source` and `camel_write_file`/`camel_edit_file` when a `.kamelet.yaml` is invalid (`guide`). No tool descriptions were changed, since the small-model prompt budget is nearly full. ### Tests - `CatalogDocComponentPagesTest`: - kamelet lists `custom` with its title and not `main`; - `docPage=custom` returns the page with all three kinds and `{{?`; - an unknown page lists the pages there are; - aws2-s3 sub-pages are found and returned; - timer has none; - the guide appears on an invalid Kamelet file, but not on a valid one or a route file; - the kamelet samples carry the guide. - `camel-jbang-core`: 1437 tests pass, including `CatalogDocExamplesTest`. 🤖 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]
