[
https://issues.apache.org/jira/browse/CAMEL-26563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-26563:
--------------------------------
Fix Version/s: 4.25.0
(was: 4.24.0)
> camel-jbang-mcp - Citrus tests: answer from the Citrus catalog, with a
> tooling model for it
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-26563
> URL: https://issues.apache.org/jira/browse/CAMEL-26563
> Project: Camel
> Issue Type: New Feature
> Components: camel-jbang, camel-jbang-mcp, tooling
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 4.25.0
>
>
> Citrus YAML tests (test/<name>.citrus.it.yaml, run with camel test run) are a
> good way for an AI agent to check what it built. The camel-jbang-mcp server
> knows Camel well, but almost nothing about Citrus:
> * camel_catalog_doc and camel_catalog_find answer for Camel components and
> EIPs. They know camel-test-citrus (a Camel component), not the actions of a
> Citrus test.
> * The only Citrus help is the sample tests of the examples
> (camel_catalog_examples with filter citrus, CAMEL-26493).
> In the local-model benchmark (example test-citrus-orders), the model invented
> the YAML of a Citrus test in 14 of 14 runs: an http action with uri, method
> and expectStatus, and log and assert-log actions that Citrus does not have. A
> separate change checks a Citrus test against the test schema of the Citrus
> catalog when it is written. That catches the mistakes, but the agent still
> has no way to look up what an action takes.
> *The Citrus catalog*
> Citrus publishes a catalog much like camel-catalog:
> org.citrusframework:citrus-catalog-schema (also inside citrus-jbang), for the
> Citrus version Camel uses (5.1.0):
> * test actions (161, with sub-actions such as http-sendRequest and
> camel-cli-verify), containers (12), endpoints (41), functions (43),
> validation matchers (31) and infra services (78);
> * each entry has a title, a description, its module, and the JSON schema of
> its keys, with a description per key, the required keys and an advanced group;
> * citrus-testcase.json, the JSON schema of a YAML test.
> Some descriptions are missing (76 of 161 actions, 365 of 757 keys). The
> Citrus issue https://github.com/citrusframework/citrus/issues/1918 asks for
> them.
> *Proposal*
> # A tooling model for Citrus: POJOs that represent the Citrus catalog (test
> action, container, endpoint, function and validation matcher, with their
> options), read from the catalog JSON, as camel-tooling-model does for
> camel-catalog (ComponentModel, EipModel, JsonMapper). One parser for the MCP
> server, the CLI and editors.
> # MCP: let an agent look up a Citrus test action (what it does, its keys with
> descriptions, the required and advanced keys, a short YAML sample), and list
> the actions, endpoints, functions and validation matchers. To decide: a tool
> of its own, or a part of the catalog tools (see the tool consolidation in
> CAMEL-25639).
> # The write-time check of a Citrus test can then add the description of each
> key it lists.
> # Later: code completion for Citrus test files in editors, from the same
> model, as the YAML DSL completion works from the YAML DSL schema.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)